Script
Turn a one-line idea into a structured adult storyboard: title, characters, per-scene setting, beat and duration. Flat $0.01 per script, no render.
Script generation shares the authentication, task routes, callbacks and errors documented in the Overview.
Create a script task
Generate a text storyboard only. The price is reserved from your balance.
POST /api/v3/contents/scripts
A script task uses the same v3 director as the video path, but it stops after writing the script. It makes no character/background images and no video render. The price is a flat $0.01 per script, regardless of length. duration scales how many scenes the script has.
curl -s -X POST "$NURETA_URL/api/v3/contents/scripts" \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "seahorse-script",
"content": [
{"type": "text", "text": "a lonely lighthouse keeper finds a message in a bottle"}
],
"duration": 30,
"callback_url": "https://example.com/webhooks/nureta-developer"
}'
# => HTTP 201 with the task view (see Retrieve a script task)Fields
| Field | Required | Notes |
|---|---|---|
model | yes | seahorse-script (see Script models & pricing). |
content | yes | Exactly one text item (the story idea). |
duration | no | An integer, 5–180 seconds (default 30). It scales the scene count but not the price. |
callback_url, callback_secret | no | They work as elsewhere. |
Response
201 with the task view. On success the task carries content.script: the title, the lead character's name, and per-scene setting / beat / durationSeconds.
Errors
| Code | HTTP | When |
|---|---|---|
InvalidParameter | 400 | A field is missing or invalid. |
AccountOverdueError | 403 | Your balance cannot cover the task. |
ModelNotFound | 404 | Unknown model id. |
All codes are in Errors.
Retrieve a script task
Poll one script task until status is succeeded or failed.
GET /api/v3/contents/scripts/:id
curl -s "$NURETA_URL/api/v3/contents/scripts/cgt-..." \
-H "Authorization: Bearer sk-..."
# => {"id":"cgt-...","model":"seahorse-script","status":"succeeded","duration":30,
# "created_at":1781220000,"updated_at":1781220045,
# "prompt":"a lonely lighthouse keeper finds a message in a bottle",
# "usage":{"price_usd":0.01,"refunded":false},
# "step":{"code":"done"},
# "content":{"script":{
# "title":"The Bottle","characters":["Elias"],
# "scenes":[{"index":1,"setting":"A storm-lashed lighthouse",
# "beat":"Elias spots a bottle bobbing in the surf","durationSeconds":8}]}}}Response
The task view. On success it carries content.script. On failure it carries an error, and the $0.01 is refunded automatically.
| Field | Notes |
|---|---|
id, model, status | Task id, model id and status. |
prompt, duration | Your inputs. |
created_at, updated_at | Unix timestamps in seconds. |
usage | price_usd charged and whether it was refunded. |
step | The current phase ({"code": "done"} on success). |
content.script | Only on success: title, characters (the lead character's name: an array with zero or one name), and scenes[] with index, setting, beat and durationSeconds. |
error | Only on failure, instead of content: {"code", "message"}. |
Errors
| Code | HTTP | When |
|---|---|---|
NotFound | 404 | Unknown task id, or a task of another kind. |
List script tasks
List your script tasks, newest first.
GET /api/v3/contents/scripts?limit=20&offset=0
curl -s "$NURETA_URL/api/v3/contents/scripts?limit=20&offset=0" \
-H "Authorization: Bearer sk-..."
# => {"items": [task, ...], "total": N}| Query parameter | Notes |
|---|---|
limit | 1–100 (default 20). |
offset | The number of tasks to skip. |
Response
{"items": [task, ...], "total": N}. Each item has the task view shape.
Errors
The shared codes in Errors.
Delete a script task
Delete a finished task (succeeded or failed).
DELETE /api/v3/contents/scripts/:id
curl -s -X DELETE "$NURETA_URL/api/v3/contents/scripts/cgt-..." \
-H "Authorization: Bearer sk-..."
# => {}Response
200 {}.
Errors
| Code | HTTP | When |
|---|---|---|
NotFound | 404 | Unknown task id, or a task of another kind. |
Conflict | 409 | The task is not finished. |
RateLimitExceeded | 429 | Your account already deleted 10 tasks in the last 60 seconds. Deletions on the website count too. |
Script models & pricing
GET /api/v3/scripts/models (public) returns the script model and its flat per-script price.
| Model | USD / script |
|---|---|
seahorse-script | $0.01 |