Generate the video (spends credits)
generate_videoRender an approved e-commerce product into a vertical short-form video. Confirm the credit cost with the user before launching to spend credits.
Instructions
Render the video. THIS SPENDS THE USER'S CREDITS.
Ask the user before calling this, every time. Tell them the cost first —
get_product reports it as video_direction.credit_cost, and the
user's balance as credits_remaining. Credits are charged at launch,
not on completion; a failed render is refunded automatically.
Show the user the creative direction and let them approve or edit it before you call this. Do not call it to "see what happens", to retry a render that is still in progress, or as part of a batch you decided on your own.
Returns as soon as the render is queued. Poll get_video with the
returned video_request_id every 20-30 seconds until its status is
"done" (a few minutes), then give the user output_url and
share_url.
If the account cannot afford it, nothing is charged and the response says so — tell the user to top up at the credits page rather than retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | The product to render. Its current direction and settings are used as-is. |