Skip to main content
POST
Adapt a hook

Authorizations

Authorization
string
header
required

A workspace API key.

Headers

idempotency-key
string

Stable retry key for this logical paid call. Reuse it after a timeout to receive the original result without duplicate work or spend.

Required string length: 1 - 255
x-sigmora-quote-only
string

Send 1 to get the price, balance and budget verdict without running anything.

Allowed value: "1"
x-sigmora-max-credits
string

The approved price; a call that would cost more is refused and nothing is charged.

Pattern: ^\d+$

Body

application/json
sourceTitle
string
required

The title of the post whose shape you want to borrow. The words are not reused.

Required string length: 1 - 300
sourcePlatform
string
required

Where it ran, e.g. tiktok. Conventions differ enough to change the adaptation.

Required string length: 1 - 60
targetPlatform
string
required

Where yours will run, e.g. shorts.

Required string length: 1 - 60
projectId
string
required

The existing project to file this work under. Create it with POST /v1/projects, then reuse its id across related calls. A project this workspace does not own answers not_found; the work is never silently filed somewhere else.

Required string length: 1 - 200
pattern
string

The structural pattern to carry over, if you have already named it.

Maximum string length: 200
hookType
string

The kind of opening, e.g. question, stat.

Maximum string length: 120
formatTags
string[]

Format traits worth preserving, e.g. listicle, voiceover, screen-recording.

Maximum array length: 20
Required string length: 1 - 60
niche
string

Your subject area, so the rewrite lands in it.

Maximum string length: 200
brandContext
string

Your brand rules: voice, audience, claims and words to avoid. The adaptation follows them; they are never treated as the source.

Maximum string length: 12000

Response

Success.

success
boolean
required
credits
number
required

What this call actually cost, which is not always what was quoted.

Example:

300

script
string
required

The adapted short-form script.

projectId
string

The existing project this work was filed under. It matches the projectId supplied by the caller after workspace ownership was verified.

Example:

"prj_9x2a4c"

creditBalance
number

Your balance after the charge. Absent when billing is disabled for the workspace.

Example:

3900

{key}
any