AI Generate
ai_generateStart AI image or video generation from prompts, models, recipes, or references. Returns generation IDs for tracking and download; credits are spent after pricing approval.
Instructions
Start an AI image or video generation. SPENDS credits: price it with ai_price and get the user's OK first. Returns generation ids; follow them with ai_status, save with ai_download. Jobs the AI provider fails, blocks or cancels give their credits back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refs | No | Inputs: uploaded media, a frame or a span of the clip, or an earlier generation. role from ai_models (e.g. 'start', 'end', 'product'). | |
| model | No | A studio model id from ai_models (e.g. 'gpt-image-2.5-flare', 'kling-3.0-turbo', 'seedance-2.5-t2v'). | |
| clipId | No | The clip it is for. Needed by every recipe except canvas.loop and art.extend; frames/spans come from it. | |
| params | No | For a recipe (not a model): its params, see ai_models. | |
| prompt | No | ||
| recipe | No | Instead of model: another recipe id (see ai_models), with params. | |
| settings | No | Model settings from ai_models (duration, resolution, aspect_ratio, count…). | |
| ownFootage | No | The user's statement that the footage is theirs or they have the rights. Required for edits of real footage. Set ONLY if the user said so. | |
| templateId | No | A template id from ai_models, when using its preset. | |
| expectedCredits | No | The price from ai_price; refused (not charged) if the price changed. | |
| productAuthorized | No | The user's statement that they may promote this product/brand. Required for product shots. Set ONLY if the user said so. |