edit_topic_short
Edit a finished Topic Short. Free kinds use no generation allowance: captions (captionStyle: off, spotlight, impact, highlighter, editorial, boxed, kicker), music (trackId from get_topic_short editCapabilities.musicOptions, or none) and swap_shot (beatIndex, shotIndex and an alternateId from get_topic_short shots). Paid kinds are quoted first with quote_topic_short_edit and run on that quoteId with the same fields: revoice (beatIndex plus the new narration for that line) and regenerate_shot (beatIndex and shotIndex of an AI shot); a shortfall returns HTTP 402 with numeric requiredCredits and availableCredits. nl takes an instruction ("make the hook punchier") and only interprets it: it returns a proposal of steps, each with a label and either a ready request (kind and params, with a quoteId and quote facts on paid steps) or the reason it cannot run. Apply each runnable step with its own edit_topic_short call, passing its params fields and quoteId. Each applied edit makes a new version; poll get_topic_short until it is completed. A public page stays on the version it was published from until you call publish_generation again. Restoring an earlier version is done on the clip page. Up to 20 free edits per short.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Topic Short generation id from generate_topic_short. | |
| kind | Yes | captions restyles or removes the burned-in captions; music swaps or removes the music bed; swap_shot replaces one shot with a judged alternate; revoice re-records one line; regenerate_shot re-rolls one AI shot; nl interprets a written instruction into these edits. | |
| quoteId | No | With revoice or regenerate_shot: the quoteId from quote_topic_short_edit (or an nl proposal step) for this exact change. The change runs only on its own quote. | |
| trackId | No | With kind music: a music option id from get_topic_short editCapabilities.musicOptions, or none for no music. | |
| beatIndex | No | With swap_shot, revoice or regenerate_shot: the beat to change (0 is the hook). | |
| narration | No | With revoice: the new spoken line for that beat, in the short’s language. | |
| shotIndex | No | With swap_shot or regenerate_shot: the shot inside that beat (default 0). | |
| alternateId | No | With swap_shot: an alternate clip id for that shot from get_topic_short shots. | |
| instruction | No | With nl: a written edit request, for example “make the hook punchier” or “more footage of the harbour”. | |
| captionStyle | No | With kind captions: the new caption look, or off for a clean frame. | |
| idempotencyKey | No | Optional. Reuse the same key when retrying an ambiguous edit so it is applied once. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edit | No | The new version (editId, version, kind, status, outputUrl, current, published). Poll get_topic_short until it is completed. | |
| proposal | No | kind nl only (nothing is applied): summary, steps (each with op, label, request with kind and params plus quoteId on paid steps, quote with numeric requiredCredits and facts on paid steps, and unavailable when the step cannot run), total numeric requiredCredits and availableCredits, and affordable. Apply each runnable step with its own edit_topic_short call. | |
| replayed | No | True when this idempotencyKey already made this edit and the same version is returned. |