Start a generation
generateStart an async AI generation of any media type and return its job id. The input shape depends on the model (see list_models); for 3D prefer generate_3d. To run an image preset (list_models returns them: figurine, style, pose, convert), send mediaType "image", scene "image-to-image", options.image (the picture, or the subject then a reference), options.preset (its id) and optionally options.preset_addons and options.preset_background; the server composes the prompt, and prompt is then only your extra instructions. Bills credits: check the price with estimate_cost first. Pass a stable idempotencyKey when retrying — a retry with the same key replays the original job instead of billing twice. Then call get_job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| scene | No | ||
| prompt | No | The prompt; with options.preset, only your additional instructions. | |
| options | No | Model-specific options; derive from list_models (include_inputs). For an image preset: preset (its id), preset_addons, preset_background. | |
| mediaType | Yes | Generation family, e.g. 'image' | 'video' | '3d' | 'music' — see list_models. | |
| workflowType | No | ||
| idempotencyKey | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| scene | Yes | ||
| job_id | Yes | Pass to get_job to follow progress. | |
| status | Yes | pending and processing are running; success, partial, failed and canceled are final. 'partial' means some outputs finished and the rest were refunded. | |
| deduped | Yes | True when an earlier call with the same idempotency key already started this job: nothing was charged again. | |
| outputs | Yes | How many results this job makes. | |
| media_type | Yes | ||
| credits_charged | Yes | Credits taken from the balance. |