Artifacts

Replace a table-read screenplay exactly.

Creates a new revision from the supplied screenplay without an AI rewrite. The normal revision worker still parses the script, preserves existing voices where character names match, scores music and SFX, refreshes the stable share, and invalidates prior durable media. Set deferMusic=true when an operator will attach exact soundtrack clips through the music surface before finalizing; SFX generation still runs. Set deferAudioRender=true when the operator will run their own post-production and call POST /artifacts/{artifactId}/finalize later — without it the whole read is synthesised twice, once for a mix they discard. Season-run artifacts must use POST /season-runs/{runId}/advance with action=revise and screenplay so the durable episode state stays synchronized. It re-versions the read the way a refine does and costs the same (TABLE_READ_REFINE). TWO CALLS: a price and a spend are two calls. Sent without confirmed it returns the QUOTE and reserves and enqueues NOTHING ({ quotedOnly: true, credits, lines, balanceAfter, sufficient, note }); the same request with confirmed: true reserves exactly the quoted amount and returns { storyJob } to poll. Requires Idempotency-Key.

post/artifacts/{artifactId}/script

Request

  • Base URL: https://docs.sleeperhit.studio/api/v1
  • URL: https://docs.sleeperhit.studio/api/v1/artifacts/{artifactId}/script
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Customer-generated stable identifier for safe retries of idempotent POST requests.

Request body

screenplaystring required

Complete screenplay content to version without an AI rewrite.

instructionstring

Optional revision audit note. Defaults to an exact-replacement note.

narrationPolicy'include' | 'suppress'

Optional narration posture override. Omit to preserve the artifact posture.

deferMusicboolean

When true, skip automatic soundtrack planning/rendering while preserving the normal SFX detection/bake dispatch. Attach exact clips through the music surface and verify SFX readiness before finalizing.

deferAudioRenderboolean

When true, skip the automatic durable-MP3 render when the replaced read reaches READY. Use this when the operator runs their own post-production and will call POST /artifacts/{artifactId}/finalize later; without it the read is synthesised twice, once for a mix they discard.

confirmedboolean

Omit (or false) to get the price without spending anything. true reserves the refine price and queues the replacement, only after the writer has seen the price.

Response

Without confirmed: the price (quotedOnly: true), nothing reserved or enqueued. With confirmed: true: the exact replacement job to poll until terminal.

quotedOnlyboolean required

true when this call only PRICED the revision. false (or absent) when it created the job.

creditsinteger

Quote only: the TABLE_READ_REFINE price.

costLabelstring nullable

Quote only.

balanceAfterinteger

Quote only. Studio Credits the writer would have left once this is spent: the balance available now (as Billing shows it) minus the price. Negative means they are that many short.

sufficientboolean

Quote only. True when the available balance covers the price. False means the writer must top up first (the note names the Billing link) — do not confirm; the reserve would refuse.

notestring

Quote only: the price and what it would leave, and that nothing has been spent. Show it to the writer.

Changes

No recorded changes to this operation across all 2 revisions of this API.