Use cases
Product clip from one photo
A seller turns one product photo into a short vertical clip for a shop listing.
Goal
Turn one product photo into a short vertical clip a seller can post on a product page or a short-video channel.
Before you start
- A token in
executemode: quotes and production are paid tools. See the quickstart. - One product photo (JPEG, PNG or WebP) that the seller has the rights to use.
MCP calls, in order
get_workspaceRead the workspace id, its name and your role. The server takes the workspace from the token.
Arguments for get_workspace {}list_video_modelsPick a ready model that turns an image into video, and keep its name for the project.
Arguments for list_video_models { "workspace_id": "<workspace_id from get_workspace>" }create_projectCreate the project: a vertical clip of about 10 seconds for this product. Keep
project_id.Arguments for create_project { "workspace_id": "<workspace_id from get_workspace>", "title": "<product name> clip", "product": "<product name>", "brief": "<one sentence: who it is for and what to show>", "duration": 10, "ratio": "9:16", "video_model": "<image-to-video model from list_video_models>", "request_key": "<new UUIDv4>" }create_asset_upload_intentRegister the photo with its size and SHA-256. Keep
asset_id.Arguments for create_asset_upload_intent { "project_id": "<project_id>", "filename": "product.jpg", "mime": "image/jpeg", "size": 482113, "sha256": "<sha256 of the file>", "request_key": "<new UUIDv4>" }upload_asset_contentSend the photo as base64, exactly the registered size.
Arguments for upload_asset_content { "project_id": "<project_id>", "asset_id": "<asset_id>", "content_base64": "<file as base64>", "request_key": "<new UUIDv4>" }finalize_asset_uploadCheck the upload.
attach: trueadds the photo to the project’s references.Arguments for finalize_asset_upload { "project_id": "<project_id>", "asset_id": "<asset_id>", "attach": true, "request_key": "<new UUIDv4>" }read_external_contextRead the project context: the brief, the attached photo, the storyboard schema, and the handle, hash and revisions to send back.
Arguments for read_external_context { "project_id": "<project_id>" }submit_external_compositionSubmit the storyboard with the photo’s id in
reference_asset_ids. The server checks it for free and returnscomposition_id.Arguments for submit_external_composition { "project_id": "<project_id>", "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>" ], "...": "<fields from the schema in the context>" } ] }, "client_task_id": "<your task id>", "request_key": "<new UUIDv4>" }create_quoteCreate the quote; the price is stored on it. Stop here and show the person the total.
Arguments for create_quote { "project_id": "<project_id>", "composition_id": "<composition_id>", "candidates": 1, "request_key": "<new UUIDv4>" }approve_productionOnly after the person says yesOnly after the person agrees to the price. Production starts at once; never call it twice for the same quote.
Arguments for approve_production { "project_id": "<project_id>", "quote_id": "<quote_id>", "expected_content_hash": "<content_hash from the quote>", "request_key": "<new UUIDv4>" }get_run_progressPoll with a growing wait until the run is
READY.Arguments for get_run_progress { "project_id": "<project_id>", "run_id": "<run_id from approve_production>" }list_available_mediaRead the verified clip. Partial clips are not final output.
Arguments for list_available_media { "project_id": "<project_id>", "run_id": "<run_id from approve_production>" }prepare_deliveryPrepare the delivery package for the ready run.
Arguments for prepare_delivery { "project_id": "<project_id>", "run_id": "<run_id from approve_production>", "request_key": "<new UUIDv4>" }issue_deliveryOnly after the person says yesOnly after the person has watched the clip and said yes.
confirmed: trueis their decision.Arguments for issue_delivery { "project_id": "<project_id>", "run_id": "<run_id from approve_production>", "confirmed": true, "request_key": "<new UUIDv4>" }get_delivery_downloadRead the private download details of the issued delivery.
Arguments for get_delivery_download { "project_id": "<project_id>", "delivery_id": "<delivery_id>", "request_key": "<new UUIDv4>" }
What the person approves
- The quote: the agent shows the total and waits for a yes before
approve_production. - The clip: the person watches it, then the agent calls
issue_deliverywithconfirmed: true.
Expected output
- One vertical clip (9:16) of about 10 seconds made from the photo, listed by
list_available_media. - An issued delivery with its private download details.
Good to know
- The product holds still for about the first second; plan one action per shot.
agent_preflightlists blockers before you quote. - When a call fails, follow
next_actionin the error. AfterWRITE_OUTCOME_UNKNOWN, read the state first and do not retry. See error codes.