Video
Edit the storyboard
Get the storyboard first, edit the shots, then render the video or cancel it for a full refund.
This page uses NURETA_URL, NURETA_KEY and the wait_task helper from Get started.
With mode: "edit", the API writes the storyboard, stops, and waits for you. You pay at create. You can edit, then render, or cancel for a full refund.
- Create the draft (16 seconds, $3.02 reserved):
TASK_ID=$(curl -s -X POST "$NURETA_URL/api/v3/contents/generations/tasks" \
-H "Authorization: Bearer $NURETA_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "seahorse-480p", "duration": 16, "mode": "edit",
"content": [{"type": "text", "text": "A couple cooks dinner together, then dances in the kitchen"}]}' | jq -r .id)- Wait until
statusisplanned(1–3 minutes), and read the shots:
DRAFT=$(wait_task "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID")
printf '%s' "$DRAFT" | jq '{status, locked: .scene.lockedDurationSeconds, total: .scene.renderedDurationSeconds,
shots: [.scene.segments[] | {index, beat, durationSeconds, explicit}]}'- Edit with a structured edit. List every shot you keep, in the order you want: a shot you leave out is removed, and an entry without
indexis a new shot. The durations must add up toscene.lockedDurationSeconds(16 here):
curl -s -X PUT "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID/plan/structured" \
-H "Authorization: Bearer $NURETA_KEY" \
-H "Content-Type: application/json" \
-d '{"segments": [
{"index": 1, "beat": "They chop vegetables side by side and laugh", "duration_seconds": 8},
{"index": 2, "beat": "He takes her hand and they dance slowly by the stove", "duration_seconds": 8}
]}' | jq '{status, step}'The edit answers 202. The API now rewrites the full prompts. Wait until scene.reexpandStatus is ready:
until R=$(curl -s "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID" -H "Authorization: Bearer $NURETA_KEY" \
| jq -r .scene.reexpandStatus); [ "$R" = ready ] || [ "$R" = failed ]; do sleep 5; done; echo "$R"- Render it, or cancel it:
# Render: the task goes on like any other task.
curl -s -X POST "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID/render" -H "Authorization: Bearer $NURETA_KEY" | jq '{status}'
wait_task "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID" | jq '{status, video: .content.video_url}'
# Or cancel: the full price is refunded at once.
# curl -s -X POST "$NURETA_URL/api/v3/contents/generations/tasks/$TASK_ID/cancel" -H "Authorization: Bearer $NURETA_KEY"A draft that you do not render or cancel within 24 hours is refunded and ends failed with DraftExpired.
Common errors
| You get | Why | Fix |
|---|---|---|
400 InvalidParameter on an edit | The durations do not add up to scene.lockedDurationSeconds. | Change the durations so that they do. |
409 on an edit or a render | A re-expansion still runs, or the task is not planned. | Wait for scene.reexpandStatus: "ready". |
400 on a render | The last re-expansion failed (scene.reexpandError). | Edit again, then render. |