Skip to content

Layers

Layers are composable building blocks within a cell. A single video cell can have multiple layers — text overlays, sound effects, B-roll clips — that get composed into the final video output.

{
"id": 4000,
"name": "Background Music",
"position": 1,
"type": "audio",
"additional_attributes": {},
"created_at_ts": 1709294400000,
"updated_at_ts": 1709380800000,
"default_user_job": null,
"user_jobs": [],
"execution_cost": null
}

Adds a new layer to a cell.

POST /v1/autocontentengine/{id}/cells/{cell_id}/layers?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
FieldTypeRequiredDescription
video_layer.namestringYesLayer name (e.g., "Sound Effect").
video_layer.typestringYesLayer type.
video_layer.positionintegerNoInsert at a specific position. Appended to the end if omitted.

Returns the created layer.

Terminal window
curl -X POST "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"video_layer": {"name": "Background Music", "type": "audio"}}'

Returns a single layer with its generation history.

GET /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
layer_idintegerThe layer ID.

Returns the full layer object.

Terminal window
curl "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/4000?agent_id=42" \
-H "X-API-Key: your-api-key"

Updates a layer’s name, type, or attributes.

PATCH /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
layer_idintegerThe layer ID.

Pass the fields to update inside video_layer:

{
"video_layer": {
"name": "Renamed Layer"
}
}

Returns the updated layer.

Terminal window
curl -X PATCH "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/4000?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"video_layer": {"name": "Intro Music"}}'

Removes a layer from a cell.

DELETE /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
layer_idintegerThe layer ID.

No content.

Terminal window
curl -X DELETE "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/4000?agent_id=42" \
-H "X-API-Key: your-api-key"

Creates a copy of a layer.

POST /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}/duplicate?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
layer_idintegerThe layer ID to duplicate.

Returns the newly created layer.

Terminal window
curl -X POST "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/4000/duplicate?agent_id=42" \
-H "X-API-Key: your-api-key"

Reorders layers within a cell.

PUT /v1/autocontentengine/{id}/cells/{cell_id}/layers/update_positions?agent_id={agent_id}
FieldTypeRequiredDescription
layersarrayYesArray of {id, position} objects.
Terminal window
curl -X PUT "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/update_positions?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"layers": [{"id": 4000, "position": 2}, {"id": 4001, "position": 1}]}'

Returns the updated layers.

StatusError codeDescription
404not_foundSheet, cell, or layer not found.
422validation_errorInvalid layer data.