Skip to Content
ScenebrewDevelopers
API referenceOperations

Revise Generation

POST
/v1/operations/{operation_id}/revise

Give feedback on a theme generation's plan instead of approving it: name the approval.plan_revision it is about and say what to change. The operation goes on running (progress.stage revising) while the plan is revised from the same concept images, then waits in input_required again with the next revision (r1 → r2), its estimates and budget worked out again and approval.revised_from naming the revision and feedback it came from. Nothing is in the library before an approval, and an approval of the earlier revision is then stale. The re-plan costs credits like the first plan. A re-plan that fails leaves the plan it had waiting, with approval.reason.code revision_failed. 409 plan_revision_stale for another plan revision, 409 not_awaiting_approval when the operation is not waiting on a theme's plan, 422 concept_image_not_generated for new_concept_image on a theme planned from your own images. 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.

Feedback on the plan 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/revise" \  -H "Content-Type: application/json" \  -d '{    "plan_revision": "string",    "feedback": "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"}