Skip to content

Media

The Media card holds static images or videos. Unlike other card types, media does not use the generate endpoint. Instead, you set the cell value directly to a media URL.

Set the cell value to the URL of your image or video.

PATCH /v1/autocontentengine/{id}/cells/{cell_id}?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
cell_idintegerThe cell ID.
FieldTypeRequiredDescription
spreadsheet_cell.valuestringYesURL to the image or video file.
Terminal window
curl -X PATCH "https://api.gen.pro/v1/autocontentengine/101/cells/3000?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"spreadsheet_cell": {
"value": "https://your-cdn.com/assets/hero-image.png"
}
}'

Returns the updated cell object with the new value.

{
"id": 3000,
"value": "https://your-cdn.com/assets/hero-image.png",
"cell_role": "content",
"additional_attributes": {},
"created_at_ts": 1709294400000,
"updated_at_ts": 1709380800000
}

You can also add media to a layer within a video cell. This is useful for adding B-roll footage, background images, or overlay graphics to a video composition.

Update the layer value the same way:

PATCH /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}?agent_id={agent_id}
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": "B-Roll", "type": "video"}}'

When building templates for batch video creation, use variables to swap media across rows. Define a media variable in a column, then each row can reference a different image or video URL.

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

FieldTypeDescription
media.keystringMedia type: "image", "video", or "audio".
media.valuestringURL or content resource ID.
media.namestringDisplay name for the media file.
media.thumbnailUrlstringThumbnail URL (for video).
media.durationnumberDuration in seconds (for video/audio).

The Media card type does not trigger AI generation — it stores a direct reference to an uploaded file.