POST
/
v1
/
images
/
generations
Multi-Image Generation (doubao-seedream-4-0)
curl --request POST \
  --url https://api.example.com/v1/images/generations

Multi-Image Generation (doubao-seedream-4-0)

Generate multiple sequential images using the doubao-seedream-4-0 model with reference images and text prompts.

Endpoint

POST /v1/images/generations

Authentication

All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel ID, e.g., doubao-seedream-4-0-250828
promptstringYesText description for image generation
imagearrayNoArray of reference image URLs
sequential_image_generationstringNoControls multi-image generation. auto: Model automatically determines number of images. disabled: Only generates one image. Default: disabled
sequential_image_generation_optionsobjectNoOptions including max_images to set maximum number of images
sizestringNoImage size. Resolution options: 1K, 2K, 4K
watermarkbooleanNoWhether to add watermark. Default: true

Request Example

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-0-250828",
    "prompt": "Generate images",
    "image": ["https://example.com/ref1.png", "https://example.com/ref2.png"],
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 3
    },
    "size": "2K",
    "watermark": false
  }'

Response Example

{
  "created": 1700000000,
  "data": [
    {
      "url": "https://example.com/generated-image-1.png"
    },
    {
      "url": "https://example.com/generated-image-2.png"
    },
    {
      "url": "https://example.com/generated-image-3.png"
    }
  ]
}

Response Fields

FieldTypeDescription
createdintegerCreation timestamp
dataarrayList of generated images
data[].urlstringImage URL