Scripts

Rewrite a character's acting directions in a table read.

Rewrites EVERY acting direction of ONE character in a table read — the ONE thing that decides how their lines are performed (there are no emotion tags). Generates new directions for the character's lines (with an optional creative direction), in bounded batches so a feature-length part is handled, and writes them onto the read; apply: false previews evenly-spaced samples and writes nothing. On a Cartesia voice each new direction is mapped to one emotion when the line is next SPOKEN, so the rewrite changes the written direction now and NEVER re-records audio by itself — the line shows the new sentAs on its next voice pass; re-voice or update the recording separately to hear it. The read is resolved from scriptUploadId (the caller's latest read for that script; a script that is not yours, has no read, or has no such character is 404 script_not_found). An unknown field, a missing/blank character, a non-string direction or a non-boolean apply is refused with 400 validation_failed — the same validation the Writers Lab, MCP rewrite_character_acting_directions and sleeperhit script table-read rewrite-directions go through. FREE: it reserves no credits and renders nothing. Scope: story:write.

post/scripts/{scriptUploadId}/table-read/characters/rewrite-directions

Request

  • Base URL: https://docs.sleeperhit.studio/api/v1
  • URL: https://docs.sleeperhit.studio/api/v1/scripts/{scriptUploadId}/table-read/characters/rewrite-directions
  • Auth: HTTP bearer

Request body

characterstring required

The character's name (or cue) as it appears in the read, or "NARRATOR" for narration. A name, not an id.

directionstring

Optional creative direction in the writer's words, e.g. "more subdued", "angrier", "playful irony".

applyboolean required

false previews evenly-spaced samples and writes nothing; true saves the rewrite to every line of the character.

Response

The rewrite was previewed (apply false) or saved (apply true).

previewboolean required

True when nothing was written (apply was false): the samples are a preview.

characterstring required

The character whose directions were rewritten.

totalinteger required

Every line of the character in the read.

processedinteger required

The lines this pass touched: every line when applying, the sampled lines when previewing.

directionstring nullable required

The creative direction the rewrite was asked for, or null.

ttsProviderstring required

The read's voice provider whose context shaped the directions.

Changes

No recorded changes to this operation across all 1 revision of this API.