# Content Generation API: drafts in your voice with a score · ScriptGrain

> POST /v1/generations or the generate_content MCP tool writes a draft in a voice profile and scores it against that profile. 1 credit per variant up to 5,000 words, 2 up to 10,000, 3 up to 15,000.

Canonical: https://scriptgrain.com/api/content-generation

# Content Generation API: drafts in a measured voice, scored on arrival

*By Jack Stovell [X](https://x.com/StovBuilds) · [Instagram](https://www.instagram.com/stovbuilds) · [LinkedIn](https://www.linkedin.com/in/jackstovell/) · published 2026-10-29*

The Content Generation API drafts text in a writer's measured voice and scores every draft against that profile before you read a word. Developers, agents and assistant users call it with a profile and a brief. They get back a draft plus a number that says whether it sounds like the writer.

## At a glance

**What it does:** Writes a draft in the voice profile and returns it with a voice-match score against that same profile.

· 
Endpoint · `POST /v1/generations` (plus `GET /v1/jobs/{id}` for long drafts)
MCP tools · `generate_content`, `get_job`, `save_edit`
Cost · Per variant, by length: up to 5,000 words 1 credit, up to 10,000 words 2, up to 15,000 words 3
Plans · Needs credits: Writer £12 a month includes 40, Operator £29 75, Studio £99 400, Agency £299 1,500+

## What happens on each call

You send a profile_id, a brief and a content_type. That's the one-shot shape. The other shape starts from an outline: you pass the generation_id from create_outline (see [/api/outline](https://scriptgrain.com/api/outline)) and the draft follows that structure.

Either way, the draft goes through the full voice pipeline. Then it's scored against the profile, and the response comes back with voice_match_score (0 to 1) and notes explaining the result.

So how do you read the score? On-voice text typically lands between 0.85 and 0.95. A score of 0.5 to 0.8 is partial. Under 0.45 is clearly off voice. You don't have to eyeball it.

The response also carries word_count and within_tolerance. Set a word_count_target between 50 and 15,000, inside the content type's range, and the flag tells you whether the draft landed within 15% of it. Content is UK or US English. Pick one.

## Length, variants and long drafts

Up to 4,000 words, the call is synchronous. Ask for variants 2 or 3 and you get several takes, each scored. Each variant costs 1 credit, charged only after it's generated, scored and saved. A failed variant costs nothing. Set stream: true and the draft streams, again up to 4,000 words.

Past 4,000 words, up to 15,000, the call returns 202 with a background job. Poll GET /v1/jobs/{id} or use get_job. Writing takes about a minute per 2,000 words.

Credits scale with length, per variant:

1. 1 credit up to 5,000 words
2. 2 credits up to 10,000 words
3. 3 credits up to 15,000 words

Credits are charged as words are delivered, never above the tier you asked for. Cancel a job and you pay for what arrived, and you keep the text. If the wallet runs short, you get 402 out_of_credits. Send an Idempotency-Key and retries are safe.

## The loop that improves the next draft

A score tells you where a draft stands. save_edit is how the next one gets better. When the writer finishes editing, you store their final version with save_edit. The diff between draft and final feeds closed-loop voice learning, so later drafts in that profile land closer.

Nothing changes behind the writer's back, though. Edits become suggested profile changes, and none take effect until the writer accepts one. The profile stays theirs. There's more on the mechanics at [/learns-from-your-edits](https://scriptgrain.com/learns-from-your-edits).

And when a score falls short? Polish is the next step. It takes the draft you've got and pulls it toward the profile, rather than starting from scratch. For checking text you wrote elsewhere, /api/voice-match scores it without drafting anything.

The profile itself is 45 measured attributes across eight layers. A two-pass stylometric extraction builds it from the writer's own human-written samples. ScriptGrain measures writing. It is never trained on it.

## Request and response

A one-shot draft (from the OpenAPI spec's examples). Send an `Idempotency-Key` so a retry never charges twice.

## In Claude, ChatGPT or Cursor

Over MCP this is the tools `generate_content`, `get_job` and `save_edit`. Connect `https://mcp.scriptgrain.com/mcp` once (a custom connector in claude.ai, developer mode in ChatGPT on the web, the MCP settings in Cursor, or `claude mcp add` in Claude Code), then ask in plain words:

> Write a 180-word LinkedIn post in my ScriptGrain voice announcing our webhook support, then tell me its voice-match score.

The server's `write_in_my_voice` prompt runs the whole loop: draft, score, iterate, save.

## Get a key

API and MCP access is on every plan, Free included. Create a free account (no card), then mint a key at Settings, then API: it starts `sg_live_`, is shown once, and goes in an `Authorization: Bearer` header. Every request, field and error code is in the [OpenAPI spec](https://scriptgrain.com/openapi.yaml).

## Questions

### Is the API available on the Free plan?

The API is: the REST API and the MCP server at https://mcp.scriptgrain.com/mcp are on every plan, Free included. Drafting spends credits, so regular generation needs a paid plan. Auth is an sg_live_ key minted at Settings, then API, sent as Authorization: Bearer. The limit is 60 requests a minute per key. Calls draw on the same credits as the app, with no separate API quota. Plans and credit allowances are on /pricing.

### What does voice_match_score actually tell me?

It tells you how closely the draft matches the profile, on a scale of 0 to 1. On-voice text typically scores 0.85 to 0.95, 0.5 to 0.8 is partial, and under 0.45 is clearly off voice. The notes field explains the result, so you can decide whether to accept the draft, edit it or polish it.

### How do I handle drafts longer than 4,000 words?

Ask for up to 15,000 words and the call returns 202 with a background job. Poll GET /v1/jobs/{id}, or use get_job from the MCP server. Writing takes about a minute per 2,000 words. Credits are charged as words are delivered, and a cancelled job is charged by what was delivered and keeps the text.

### Does my writing train a model?

No. ScriptGrain measures writing and is never trained on it. The voice profile is built by a two-pass stylometric extraction from the writer's own human-written samples. When you send an edit through save_edit, it becomes a suggested profile change. Nothing changes until the writer accepts one. Payments never happen through the API.

## Related

- [AI writing API and MCP server](https://scriptgrain.com/ai-writing-api-and-mcp-server)
- [Works with Claude](https://scriptgrain.com/works-with/claude)
- [Works with ChatGPT](https://scriptgrain.com/works-with/chatgpt)
- [Works with Cursor and MCP clients](https://scriptgrain.com/works-with/cursor)
- [MCP tool reference](https://scriptgrain.com/reference/mcp-tool-reference)
- [Pricing](https://scriptgrain.com/pricing)
