POST
/
v1
/
images
/
generations
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
  }
}
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
string
required
Model ID, e.g. doubao-seedream-4-5.
prompt
string
required
Text prompt for image generation. Supports Chinese and English.
size
string
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
string
Controls multi-image output. auto: Model decides whether to return multiple images based on prompt. disabled: Single image only (default).
stream
boolean
Enable streaming output. Default false.
response_format
string
Return format. url: Returns downloadable image links, valid for 24 hours (default). b64_json: Returns Base64 encoded JSON.
watermark
boolean
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
  }
}