Generate Image or Video
generate_mediaStart the generation for a prepared project in the user's Abracadabrax account. Call this only after the user explicitly asked to generate, never on your own initiative: it spends the user's credits and sends the generation inputs to the configured model provider. Optional settings overwrite the saved project. Repeating with unchanged settings reuses a running or completed job, but a failed job can start a new paid attempt. Returns the job id and status; poll get_media_job for the output. It needs the user's Abracadabrax account: the client asks the user to sign in when it is missing. Use this only for text-to-image or text-to-video prompts. Do not use it for uploaded, attached or reference images, image editing, background removal, upscaling, virtual try-on, image-to-video or other media-to-media workflows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | ||
| ratio | No | Aspect ratio such as 1:1, 16:9, 9:16, 4:3, 3:4. | |
| prompt | No | ||
| duration | No | Video length in seconds; must be one of the model's supported durations. | |
| model_id | No | Abracadabrax model id, e.g. nano-banana-2, gpt-image-2, flux-2-pro, kling-3-pro, veo-3-1, sora-2. | |
| model_name | No | ||
| project_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | No | ||
| state | Yes | ||
| balance | No | ||
| message | Yes | ||
| project | Yes | ||
| dashboard_url | Yes | ||
| credits_required | Yes |