Write a draft in a voice
generate_contentGenerate a finished draft in the user's measured voice, with an automatic voice-match score (0-1) against the profile. Two modes: (a) one-shot — pass profile_id + brief + content_type; (b) from an approved outline — pass a generation_id with status 'outline' from create_outline instead (profile_id/brief/content_type are then ignored; the word_count_target set at outline time is honoured automatically, and passing word_count_target here overrides it). The response reports the length measurement — word_count, word_count_target, within_tolerance (±15%) — so check within_tolerance before presenting a draft as on-target, and the id's status becomes 'drafted'. Multiple variants are diversified server-side along declared axes, returned per variant as variant_axis: variant 1 'standard', variant 2 'alternative_opening' (question/concrete-detail opener, different structure), variant 3 'oblique_angle' (mid-scene or counterintuitive opening); variants 2-3 only up to 4,000 words. COSTS CREDITS by length: up to 5,000 words 1 credit, up to 10,000 words 2, up to 15,000 words 3 (the cap), per produced variant (failed variants are not charged). LONG DRAFTS: above 4,000 words the draft is written in the background, section by section, from an outline (a one-shot request gets one made first). The call returns at once with status 'generating', the generation id and a job; call get_job (or get_generation, whose content fills in as sections land) until the job's status is 'succeeded', about a minute per 2,000 words, then get_generation for the finished draft and its voice-match score. Credits are charged as the words are delivered, never above the tier asked for. Don't loop this tool speculatively — confirm with the user before generating many variants, long drafts or re-generating.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brief | No | What to write about, max 8,000 chars (one-shot mode). | |
| register | No | Override the profile's formality register for this piece. | |
| variants | No | How many alternative drafts to produce (1-3, default 1; 2-3 only up to 4,000 words). Each costs its own credit. Diversified server-side; each returns its variant_axis. | |
| company_id | No | Write this FOR the user's product/company: a company profile id from list_companies. The draft is grounded in that company's facts, terminology and audience (never invented specifics). Omit company_id to use the voice's default company (set in the app under Voice Brain, when the voice has one); pass null for none. | |
| continuity | No | Voice Brain continuity. Default true once the memory knows 10+ pieces: the draft is told what the author has already established on the subject (build on it) and which prior arguments not to repeat. Pass false to write fresh, ignoring the memory. | |
| profile_id | No | Voice profile id (one-shot mode; required unless generation_id is set). | |
| template_id | No | One-shot mode: start from a saved brief template (list_brief_templates); it fills every field this call leaves empty. Not with generation_id. | |
| content_type | No | Piece type (one-shot mode). article = standalone long-form article; blog_intro = ONLY the opening section of a blog post, not a full piece; newsletter = an email newsletter issue; email = a single one-to-one or marketing email; short_story = fiction; linkedin = LinkedIn post; social_post = generic short social caption; twitter_thread = X/Twitter thread; instagram_caption = Instagram caption; press_release = press announcement; product_description = catalogue blurb for ONE product; ad_copy = very short advert copy; website_landing = campaign landing page driving one action; website_home = homepage introducing the whole brand; website_product = site page for one product/feature; website_about = about-us page. | |
| generation_id | No | A generation_id with status 'outline' (from create_outline) — drafts from that outline instead of one-shot. | |
| english_variant | No | English spelling/idiom variant. Defaults to the profile's stored variant. | |
| extra_direction | No | One-off styling guidance for this piece (max 2,000 chars). | |
| idempotency_key | No | Optional retry-safety key: retrying with the same key replays the stored result instead of generating (and charging) again; for a long draft it returns the same job instead of starting a second. | |
| word_count_target | No | Target length in words (50-15,000, lands within ±15%; each content type has its own range: long-form articles, short stories and the four website page types go to 15,000, newsletters to 5,000, short formats such as linkedin keep short ranges). Credits by length: up to 5,000 words 1 credit, up to 10,000 words 2, up to 15,000 words 3. Above 4,000 words the draft is written in the background: generate_content returns at once with status 'generating'; call get_job or get_generation until the job has succeeded (about a minute per 2,000 words). Omit for the content type's default. |