Supports text-to-image and image-to-image generation with up to three reference images.
seedream-4-0-250828Text-to-image generation.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Image model ID, e.g. `imagen-4.0-fast` / `imagen-4.0-standard` / `imagen-4.0-ultra` / `imagen-3.0-generate-002` |
prompt | string | Yes | Text description, supports both Chinese and English |
n | integer | No | Number of generated images |
size | string | No | Image size Options: 1024x1024 / 1792x1024 / 1024x1792 / 1536x1536 |
quality | string | No | Quality level (supported by some models) Options: standard / hd |
response_format | string | No | Options: url / b64_json |
curl https://api.router.ai/v1/images/generations \
-H "Authorization: Bearer sk-你的令牌" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-0-250828",
"prompt": "雪山日出,长焦压缩,胶片颗粒",
"size": "1024x1024"
}'Endpoint reference: Aliyun Qwen-Image text-to-image
Edit a reference image with a prompt using JSON or file upload.
Required parameters: model, prompt, image
Available parameters: model, prompt, image, images, image_url, n, response_format, stream, size, sequential_image_generation, sequential_image_generation_options
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Required. Use the exact model name seedream-4-0-250828. |
prompt | string | Yes | Editing instruction, 1–32000 characters. Describe the requested changes. |
image | string | object | array | Yes | Required reference image. Accepts an HTTPS URL, an image data URL, an object with url or image_url, or an array of these values. Use 1–14 images and exactly one of image, images or image_url. |
images | array | No | Optional alias of image. Elements are image URLs, data URLs, or objects with url/image_url. Do not combine with image. |
image_url | string | object | array | No | Optional alias of image. Do not combine with image or images. |
n | integer | No | Optional positive integer, default 1. Multiple outputs must be supported by the selected model. |
response_format | string | No | Optional: url or b64_json. Support and returned format depend on the model. |
stream | boolean | No | Omit or set to false; this editing endpoint does not provide streaming. |
size | string | object | No | Optional returned image size. |
sequential_image_generation | string | No | Optional: auto or disabled. Explicit disabled cannot be combined with n>1. |
sequential_image_generation_options | object | No | Optional sequential-generation settings; active only with auto. |
curl https://api.router.ai/v1/images/edits \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-0-250828",
"prompt": "将示例陶瓷杯改为蓝色,保留背景。",
"image": "https://example.invalid/reference.png",
"n": 1
}'