Generate multiple images in a single request using the doubao-seedream-4-5 model. Supports multi-image output with sequential image generation.
Request Parameters
Model ID, e.g. doubao-seedream-4-5.
Text prompt for image generation. Supports Chinese and English.
Image size. Method 1: Resolution presets (1K, 2K, 4K). Method 2: Pixel dimensions (default 2048x2048). Area range: [1024x1024, 4096x4096], aspect ratio range: [1/16, 16].
sequential_image_generation
Controls multi-image output. auto: Model decides whether to return multiple images based on prompt. disabled: Single image only (default).
Enable streaming output. Default false.
Return format. url: Returns downloadable image links, valid for 24 hours (default). b64_json: Returns Base64 encoded JSON.
Add watermark. Default true.
curl -X POST "https://www.anyfast.ai/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-4-5",
"prompt": "Generate a set of illustrations showing four seasons",
"size": "2K",
"sequential_image_generation": "auto",
"stream": false,
"response_format": "url",
"watermark": false
}'
{
"data": [
{"url": "https://example.com/image1.jpeg"},
{"url": "https://example.com/image2.jpeg"},
{"url": "https://example.com/image3.jpeg"}
],
"created": 1757469067,
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 15908,
"output_tokens": 15908
}
}