Use cases
Clips for a whole catalogue
Import a product spreadsheet and let the agent loop over it, one project per product.
Goal
Make one short clip per product from a spreadsheet of the catalogue.
Before you start
- A token in
executemode for the whole workspace. - The import template filled in with one product per row, with photo URLs the seller has the rights to use.
MCP calls, in order
get_workspaceRead the workspace id and your role.
Arguments for get_workspace {}get_import_templateGet the spreadsheet template: its columns and a blank .xlsx file.
Arguments for get_import_template { "workspace_id": "<workspace_id from get_workspace>" }preview_importRead the filled sheet (up to 4 MB and 100 rows) into rows. Nothing is created yet.
Arguments for preview_import { "workspace_id": "<workspace_id from get_workspace>", "xlsx_base64": "<filled template as base64>" }import_project_rowOnly after the person says yesFor one row: create its project and download its public photo URLs.
rights_confirmed: truerecords the person’s statement that they may use the text and photos.Arguments for import_project_row { "workspace_id": "<workspace_id from get_workspace>", "fields": { "...": "<fields of one row as returned by preview_import>" }, "image_urls": [ "<product photo URL>" ], "rights_confirmed": true, "request_key": "<stored key of this row>" }agent_preflightOn the row’s project: check for blockers and read
next_calls.Arguments for agent_preflight { "project_id": "<project_id of this row>" }read_external_contextRead the row’s project context.
Arguments for read_external_context { "project_id": "<project_id of this row>" }submit_external_compositionSubmit the storyboard for this product with its photo.
Arguments for submit_external_composition { "project_id": "<project_id of this row>", "expected_project_revision": "<project revision from the context>", "expected_composition_revision": "<composition revision from the context>", "context_handle": "<context_handle>", "context_hash": "<context_hash>", "composition": { "shots": [ { "reference_asset_ids": [ "<asset_id of the row photo>" ], "...": "<fields from the schema in the context>" } ] }, "client_task_id": "<row number>", "request_key": "<new UUIDv4>" }create_quoteQuote this row. Collect the quotes of all rows, then show the person the whole list.
Arguments for create_quote { "project_id": "<project_id of this row>", "composition_id": "<composition_id>", "candidates": 1, "request_key": "<new UUIDv4>" }approve_productionOnly after the person says yesOnly for the rows the person accepted.
Arguments for approve_production { "project_id": "<project_id of this row>", "quote_id": "<quote_id>", "expected_content_hash": "<content_hash from the quote>", "request_key": "<new UUIDv4>" }list_available_mediaWhen the row’s run is
READY, read its verified clip.Arguments for list_available_media { "project_id": "<project_id of this row>", "run_id": "<run_id from approve_production>" }prepare_deliveryPrepare the row’s delivery package.
Arguments for prepare_delivery { "project_id": "<project_id of this row>", "run_id": "<run_id from approve_production>", "request_key": "<new UUIDv4>" }issue_deliveryOnly after the person says yesOnly after the person has checked the clips.
Arguments for issue_delivery { "project_id": "<project_id of this row>", "run_id": "<run_id from approve_production>", "confirmed": true, "request_key": "<new UUIDv4>" }
What the person approves
- The rights to the text and photos, before the first
import_project_row. - The list of quotes, row by row, before any
approve_production. - The clips, before
issue_delivery.
Expected output
- One project and one clip per product row.
- A table the agent keeps and shows: row, project, quote, run and delivery.
Good to know
- There is no tool that produces many full videos in one call. The agent repeats the calls from
import_project_rowtoissue_deliveryonce per row, one project per product. For many short clips from one table, with no storyboard per product, use a clip batch instead. A delivery batch (create_delivery_batch) only bundles finished videos for download. - Store one
request_keyper row and per call. After a timeout, retry with the stored key, so a row is never created or produced twice. - After
WRITE_OUTCOME_UNKNOWN, read the row’s project first; never create it again.