Skip to Content
ScenebrewDevelopers
API referenceScenes

Run Scene Step

POST
/v1/scenes/{scene_id}/steps

Run one step on the scene as an Operation (202 + Location).

generate_scene_sdd writes the Scene Design Document from brief; revise_scene_sdd applies instructions to the current SDD as its next version (409 missing_sdd); generate_scene_peg builds the Player Experience Graph from the current SDD (409 missing_sdd); revise_scene_peg applies instructions to the current PEG, keeping the identifiers of what it does not change (409 missing_peg); a revise step without instructions is a 400 missing_instructions. generate_scene_blueprint turns the current PEG into a blueprint (the swfbpx package) and a layout preview (409 missing_peg; 409 theme_draft while the scene's theme is a draft), from seed when given — pass back the result.seed an earlier blueprint reported to reproduce its layout; generate_scene_model cooks the current blueprint into the model (409 missing_blueprint). Rerunning a step versions its artifact. The AI steps run on the model the team maps to its writer role, or else on Scenebrew's own model for the role, and fail with the route's code (no_role_mapping, no_provider_key, …) when none can serve them; on the team's own provider key they cost no credits, on Scenebrew's models credits by what they use. The Operation's model names the route that ran. The procedural steps are free. One step at a time per scene (409 step_in_progress). Prefer: wait=N holds the response. Requires the write scope.

Authorization

apiKey
AuthorizationBearer <token>

First-party API key (sbk_live_…), presented as a Bearer token.

In: header

Path Parameters

scene_id*Scene Id
Formatuuid

Header Parameters

Idempotency-Key?|

Optional. Repeating a request with the same key returns what it already created (200) instead of running it again.

Prefer?|

RFC 7240. wait=N (N ≤ 60) holds the response until the operation is terminal or N seconds passed: 200 with the finished operation, or the same 202 as without it. respond-async (the default) returns the queued operation at once.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

One step to run against the scene. The value of step is the name of the tool that runs it.

Response Body

application/json

application/json

application/problem+json

curl -X POST "https://example.com/v1/scenes/497f6eca-6276-4993-bfeb-53cbbbba6f08/steps" \  -H "Content-Type: application/json" \  -d '{    "step": "generate_scene_sdd"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "scene_step",  "status": "queued",  "target": {    "type": "scene",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"  },  "input": {},  "progress": {},  "approval": {    "kind": "theme_plan",    "plan_revision": "string",    "theme_id": "ef2b46f3-8ebb-437e-a671-272e4990fbc8",    "interactivity": "review",    "slots": [      {        "id": "string",        "name": "string",        "type": "material",        "family": "string",        "surface_role": "string",        "orientation": "string",        "detail_level": "string",        "evidence": {          "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",          "image": "string",          "box": [            0          ],          "note": "string"        },        "object_evidence": [],        "provider_hint": "string",        "fallback_color": "string",        "consumers": [],        "required": true,        "estimate": {          "route": "string",          "label": "string",          "provider": "string",          "creative_units": 0,          "job_count": 0,          "known": true,          "description": "string",          "fallbacks": [],          "max_creative_units": 0        },        "route_options": []      }    ],    "gaps": [],    "totals": {      "creative_units": 0,      "max_creative_units": 0,      "job_count": 0,      "unknown": 0,      "complete": true    },    "budget": {      "creative_units": 0,      "source": "request"    },    "reason": {      "code": "string",      "message": "string"    },    "revised_from": {      "plan_revision": "string",      "feedback": "string"    },    "cost_cap": {      "spent_usd": 0,      "cap_usd": 0,      "step_usd": 0    }  },  "result": {},  "error": {    "code": "string",    "message": "string",    "retryable": false  },  "credits_charged": 0,  "model": {    "id": "string",    "hosting": "scenebrew",    "billing": "credits"  },  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "finished_at": "2019-08-24T14:15:22Z",  "cancel_requested_at": "2019-08-24T14:15:22Z"}