Generate an image, video, speech, music or 3D file
generateRuns any media model id from list_media_models with its settings (see media_model) through POST /v1/generations, waits up to wait_seconds for the files, and returns the generation: a link per file (kept 30 days), a finished image inline, and the charge. A video that is still running when the wait ends is returned as it stands; call generation with its id to keep waiting. Charged to the key in the MCP request's Authorization header when the model accepts the task; a failed generation is refunded in full. To go from an image to a video or an edit, pass the image's URL in image_urls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The model's settings, as media_model lists them under params: prompt, size or aspect_ratio, resolution, duration, image_urls, text, voice... A setting left out takes the model's default. | |
| model | Yes | A media model id from list_media_models. | |
| preview | No | Default true: a finished image comes back inline as image content besides its link. | |
| wait_seconds | No | Seconds to wait for the files before answering with the generation as it stands, 0 to 120. Images usually finish inside the default 60; a video takes minutes, so follow up with generation. |