Skip to Content
ScenebrewDevelopers
API referenceOperations

Approve Generation

POST
/v1/operations/{operation_id}/approve

Answer an operation waiting in input_required. A model_asset job at its spending cap (approval.kind cost_cap): name the cap (approval.plan_revision) and continue or finish on its one slot; it goes on running. A theme generation: name the approval.plan_revision you decided on and a choice per slot, keyed by its id (a plan key) — generate (optional route, one of the slot's route_options: a mesh on Tripo 3.1, Tripo P2 or Meshy 7.1), upload (file_id, optional role), bind (asset_id) or leave_open; a slot without a choice is generated on its default route. The approved plan is created in the library: the theme, as a draft, with its designs and recipes. The choices are applied to it and the theme's readiness is validated again. With nothing to generate the operation answers succeeded with the theme in result.entity and result.approval: what was applied, what was left open and draft_accepted — true when a required slot was left open, so the theme stays a draft by your choice. With slots to generate it goes on running: each material and mesh is made on your team's Scenario key within what the approval reserved (the slots' max_creative_units, never more than the budget) and becomes a library asset marked generated, bound where the slot is used — a mesh textured, within its family's face budget and carrying metadata.fit (its family's height). The acceptance gate rejects only a defect measured on the file (a seam, a size; an empty, untextured or flat mesh, or one over its face budget) and retries it, two attempts on the slot's route and then two on each of its fallbacks; a comparison with the concept (colour, detail, proportions) never rejects. When every attempt was rejected the best one is delivered. A generated slot lists its review items (kind finding or defect, code, message, measure, limit) for you to judge and replace, and each attempt's evidence (outcome, the gate's verdict, the image or model it made); they are optional readiness findings, never a draft's blocker. A slot settles open with why only when nothing usable was made (finding.code: texture_rejected or mesh_rejected when no attempt left a usable file, over_budget, no_provider_key, provider_credits_exhausted when your team's Scenario plan has no creative units left, route_unavailable for a plain texture). Its progress names the theme (entity), each slot (slots: status, asset, creative units, finding, review, evidence) and the spend (spent); once every slot is settled it ends succeeded, result.approval.queued_for_generation keeping the same per slot. 409 plan_revision_stale for another plan revision, 409 not_awaiting_approval when the operation is not waiting, 400 unknown_route for a route the slot is not offered, 404 asset_not_found (file_not_found) for a bind (upload) whose asset is not the project's (file is not your team's), its slot in slot_id. Requires the write scope.

Authorization

apiKey
AuthorizationBearer <token>

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

In: header

Path Parameters

operation_id*Operation Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The approval of a theme generation in input_required.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/operations/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \  -H "Content-Type: application/json" \  -d '{    "plan_revision": "string"  }'
{  "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"}