Model & Media Specs
Task API uses modality-specific public fields for media specs and converts them to the selected upstream protocol. Use GET /v1/tasks/models as the source of truth for models, prices, capabilities, and the constraints actually returned for the current API key.
Video and 3D fields define the common contract, but they can be submitted only after an executable adapter, channel, and plan are configured and the model appears in the model list.
Common Specs by Modality
| Modality | Public spec fields | Model-list constraints |
|---|---|---|
image | image_size, aspect_ratio, n | supported_image_sizes, supported_aspect_ratios, min_images, max_images, max_input_images |
video | duration, resolution, aspect_ratio, generate_audio | max_input_assets |
3d | output_format | max_input_assets |
Video uses params.inputs for first frames, last frames, and reference media. The public 3D parser accepts reference images only, but no 3D adapter is currently registered. The model list does not currently advertise video duration, resolution, aspect-ratio, audio, or 3D output-format value sets. The public parser validates their types and basic shape; the selected adapter and upstream service determine whether a particular combination is supported.
Portable Image Parameters
| Parameter | Common values | Description |
|---|---|---|
image_size | 0.5K, 1K, 2K, 3K, 4K | Image size tier used for routing and billing. Some models support only a subset. |
aspect_ratio | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9 | Desired image ratio. Some models support only a subset. |
Use params.extra_body when you need an upstream-specific option. Do not send params.size directly to /v1/tasks.
GPT Image 2
GPT Image 2 routes using the OpenAI Images protocol convert image_size and aspect_ratio into size. Every derived size uses edges divisible by 16, keeps each edge at or below 3840, keeps the long-to-short edge ratio at or below 3:1, and contains between 655,360 and 8,294,400 pixels.
image_size | aspect_ratio | size |
|---|---|---|
1K | 1:1 | 1024x1024 |
1K | 16:9 | 1536x864 |
1K | 9:16 | 864x1536 |
1K | 4:3 | 1360x1024 |
1K | 3:4 | 1024x1360 |
1K | 5:4 | 1280x1024 |
1K | 4:5 | 1024x1280 |
1K | 3:2 | 1536x1024 |
1K | 2:3 | 1024x1536 |
1K | 21:9 | 1536x656 |
1K | 9:21 | 656x1536 |
2K | 1:1 | 2048x2048 |
2K | 16:9 | 2048x1152 |
2K | 9:16 | 1152x2048 |
2K | 4:3 | 2048x1536 |
2K | 3:4 | 1536x2048 |
2K | 5:4 | 2000x1600 |
2K | 4:5 | 1600x2000 |
2K | 3:2 | 1536x1024 |
2K | 2:3 | 1024x1536 |
2K | 21:9 | 2048x880 |
2K | 9:21 | 880x2048 |
3K | 1:1 | 2880x2880 |
3K | 16:9 | 3072x1728 |
3K | 9:16 | 1728x3072 |
3K | 4:3 | 3072x2304 |
3K | 3:4 | 2304x3072 |
3K | 5:4 | 3040x2432 |
3K | 4:5 | 2432x3040 |
3K | 3:2 | 3072x2048 |
3K | 2:3 | 2048x3072 |
3K | 21:9 | 3072x1312 |
3K | 9:21 | 1312x3072 |
4K | 1:1 | 2880x2880 |
4K | 16:9 | 3840x2160 |
4K | 9:16 | 2160x3840 |
4K | 4:3 | 3264x2448 |
4K | 3:4 | 2448x3264 |
4K | 5:4 | 3200x2560 |
4K | 4:5 | 2560x3200 |
4K | 3:2 | 3504x2336 |
4K | 2:3 | 2336x3504 |
4K | 21:9 | 3808x1632 |
4K | 9:21 | 1632x3808 |
When setting an exact size through params.extra_body.size, use auto or a WIDTHxHEIGHT value that meets the constraints above. params.extra_body.quality accepts only low, medium, high, or auto. Invalid values return 400 TASK_INVALID_REQUEST before an upstream request is sent.
Gemini Native
Gemini Native routes use image_size and aspect_ratio directly for image generation settings. Supported tiers vary by model. Check parameter_constraints from the model list endpoint before submitting.
| Model | image_size | aspect_ratio |
|---|---|---|
gemini-3.1-flash-image | 0.5K, 1K, 2K, 4K | 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9 |
gemini-3-pro-image | 1K, 2K, 4K | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
gemini-2.5-flash-image | 1K | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
gemini-3.1-flash-lite-image | 1K | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
Gemini Native does not support 9:21. Use a ratio only if it appears in the current model list response.
Seedream
Seedream supports text-to-image, image-to-image, and multiple reference images. 1K requests are handled as 2K.
image_size | aspect_ratio | Actual size |
|---|---|---|
2K | 1:1 | 2048x2048 |
2K | 3:4 | 1728x2304 |
2K | 4:3 | 2304x1728 |
2K | 16:9 | 2848x1600 |
2K | 9:16 | 1600x2848 |
2K | 3:2 | 2496x1664 |
2K | 2:3 | 1664x2496 |
2K | 21:9 | 3136x1344 |
3K | 1:1 | 3072x3072 |
3K | 3:4 | 2592x3456 |
3K | 4:3 | 3456x2592 |
3K | 16:9 | 4096x2304 |
3K | 9:16 | 2304x4096 |
3K | 2:3 | 2496x3744 |
3K | 3:2 | 3744x2496 |
3K | 21:9 | 4704x2016 |
4K | 1:1 | 4096x4096 |
4K | 3:4 | 3520x4704 |
4K | 4:3 | 4704x3520 |
4K | 16:9 | 5504x3040 |
4K | 9:16 | 3040x5504 |
4K | 2:3 | 3328x4992 |
4K | 3:2 | 4992x3328 |
4K | 21:9 | 6240x2656 |
Exact Parameters
If the caller knows a specific upstream parameter supported by the target model, put it in params.extra_body:
{
"model": "seedream-5.0-lite",
"modality": "image",
"params": {
"model": "seedream-5.0-lite",
"prompt": "Generate a wide product image",
"image_size": "3K",
"aspect_ratio": "16:9",
"extra_body": {
"size": "4096x2304"
}
}
}If extra_body conflicts with portable sizing fields, the final upstream request uses extra_body. Billing is calculated from the final request and the actual result size tier.