API referenceScenes

Edit a gen:html sub-composition's inner units

Apply deterministic, LLM-free edits to inner units of a resolved gen:html sub-composition: delete_unit removes the unit's element subtree; hide_unit hides it in place.

The hosted blob is rewritten IMMUTABLY (a new copy is hosted and the scene's resolution swaps to it) — the previous URL is returned so the edit can be reverted. Unit keys come from GET …/genhtml.

POST
/scenes/{sceneId}/genhtml

Authorization

bearerAuth
AuthorizationBearer <token>

Typecut API key. Generate one in app.typecut.ai → Settings → API keys. Send as Authorization: Bearer tc_live_….

In: header

Path Parameters

sceneId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/scenes/497f6eca-6276-4993-bfeb-53cbbbba6f08/genhtml" \  -H "Content-Type: application/json" \  -d '{    "element_id": "string",    "ops": [      {        "op": "delete_unit"      }    ]  }'
{
  "data": {
    "scene_id": "string",
    "element_id": "string",
    "new_url": "string",
    "previous_url": "string",
    "applied": [
      {
        "op": "string",
        "unit_key": "string"
      }
    ]
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}