Scrub API
POST/v1/tools/write_contentpriced

Write content

Writes posts for X or LinkedIn, Instagram captions, blog posts, reels plans, recaps, newsletters, emails or show notes from words, a document or a transcription, one kind or several in one run: it decides how many distinct pieces it holds, up to the most asked for of each, and writes each, ready to post, one row each.

Takes file (file). Give exactly one of: source; or file. Returns pieces (the pieces written, one row each, strongest first, each with its title and its text ready to post), text (every piece under its title, as one text to read or copy).

$0.12 a piece, up to 90 pieces.

Fields

FieldTypeDefaultWhat it is
filestringNoneA file_id from create_upload, accepting text/plain, text/markdown, application/vnd.scrub.transcript+json, application/json, up to 16 MB. Get one with create_upload. Or the job_id of a finished job that made a file of this kind: that file is used. Pass the job_id rather than retyping its result. Without one, transcribe (Transcribe a video) makes one, or transcribe_audio (Transcribe audio) makes one: run it first and pass its job_id here.
sourcestringNoneThe words to write from, typed or pasted, up to 60,000 characters (about 45 minutes of fast speech); an article, notes, a transcript or a script.
skillarrayLinkedIn postWhat it writes, one kind or several in one run (LinkedIn post and Blog post), each up to At most pieces. A recap, a newsletter, an email or show notes covers the whole source, so one is usually written.
mostnumber5The most pieces it writes of each kind; fewer when the source holds fewer distinct points.
lengthone ofstandardHow long each piece runs, within its kind's own limits.
shortstandardlong
piecesarray[]The pieces to write, one by one, in place of Write and At most: each its kind and, from a plan, its idea, angle and moment; a length in its kind's own unit (characters for a post or caption, words for a blog post, newsletter, email, recap or show notes, seconds for a reels plan); or up_to, as many as the source holds of that kind up to that number.
audiencestringWho it is written for, in a few words; left empty, for whoever the source speaks to.
tonestringHow the brand sounds, in a few words or a sentence (warm, direct, no jargon); left empty, as the source sounds.
brand_kitstringNoneA Brand Kit's id (kit_…) from list_brand_kits: its look and settings fill what this call leaves out, and what the call gives wins. Read once when the job starts.

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/write_content \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Answer

{
  "ok": true,
  "result": {
    "job_id": "job_…",
    "status": "running",
    "price_usd": "$…"
  }
}

It starts at once and answers running. Ask job_status with the job_id for its result. quote gives its price first, free.

Every call can also answer an error: what comes back. Try it with your key from Account.