Assets
Submit Asset Generation
Start generating one or more images or videos with any supported model
POST
Overview
Submits an asset (image or video) generation job and returns immediately with the IDs of the temporary assets being generated. Generations run in the background — poll/asset/status/{assetId} to track progress.
Credits are debited up front based on the model and the parameters you send. Failed generations are automatically refunded.
Authentication
This endpoint requires API key authentication. Include your API key in the
Authorization header.Request Body
image or video. Must match the type of the model you select.The model identifier. See List Models for available identifiers and capabilities.
Text prompt describing the asset to generate. Some models cap the prompt length — check the model page.
Reference media for the model. Required for image-to-video, motion control, edit, and reference-based models.Not used for models with named input slots (e.g.
kling-motion-control, veo-3.1-flf). See Named input slots below.Each item must have exactly one of:Number of variations to generate from the same prompt. Must be between 1 and 4. Credits are debited per generation.
One of the model’s supported aspect ratios. Defaults to the model’s default if omitted.
One of the model’s supported resolutions. Defaults to the model’s default if omitted.
Video duration in seconds (e.g.
8). Use one of the model’s supported durations — see the duration enum in the model’s input_schema from Get Model. The server converts it to the model’s expected format automatically.Per-model toggles such as
generateAudio, camera_fixed, quality. See the model page for available keys.ID of an existing media in the space. Used to inherit reference avatars or to group variations under a parent.
For Seedance 2.0 UGC only — appearance and actions of the subject (separate from the script).
URL that will receive a notification when generation completes (success or failure).
Named input slots
Some models require specific media types in a fixed order — for example, a subject image and a motion reference video. For these models, instead of a genericreferences[] array, you pass named top-level properties that make the intent explicit.
The named properties for a given model are listed on its model page and in the input_schema field returned by GET /models/{name}.
Each named slot accepts the same object shape as a references[] item: exactly one of url, asset_id, or avatar_id. Slots are ordered — when a slot is optional, you may omit it, but you cannot provide a later slot while leaving an earlier one empty (e.g. end_image requires start_image).
Models with named slots:
| Model | Named slots |
|---|---|
kling-pro | start_image (optional) + end_image (optional) |
kling-motion-control, kling-motion-control-pro, kling-v3-motion-pro, kling-v3-motion-standard | start_image + motion_video |
kling-o3-edit-pro, kling-o3-edit-standard | source_video |
veo-3.1-flf | first_frame + last_frame |
veo-3.1-extend, grok-imagine-video-edit, bytedance-upscaler | source_video |
Response
IDs of the created temporary assets. One ID per generation. Use these with
/asset/status/{assetId}.Always
generating on success.Number of generations launched.
Credits charged for one generation.
Total credits debited (
cost_per_generation × count).Examples
Notes
- The endpoint returns as soon as the temp assets are created — the actual generation runs in the background and typically completes in 10–120 seconds depending on the model.
- If you provide a
webhook_url, it will be called when generation completes (success or failure). - Use List Models and Get Model to discover the parameters each model accepts, including named input slots.
- Use Get Pricing for a dry-run cost estimate before submitting.

