Skip to main content
POST
/
v3
/
seedream-4.0
Seedream Image Generation 4.0
curl --request POST \
  --url https://api.myrouter.ai/v3/seedream-4.0 \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "images": [
    "<string>"
  ],
  "size": "<string>",
  "sequential_image_generation": "<string>",
  "max_images": 123,
  "watermark": true
}
'
{
  "images": [
    "<string>"
  ]
}
Seedream 4.0 is an advanced image generation model that offers flexible image creation capabilities, including support for 4K resolution, and can generate images from text and other images.

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
Prompt for image generation, supports Chinese and English.Recommended not to exceed 300 Chinese characters or 600 English words. Excessive text may scatter information, causing the model to focus only on key points and potentially omit some elements from the image.
images
string[]
Input Base64-encoded or accessible URL of images to edit. Supports single or multiple image input.
  • Image URL: Ensure the image URL is accessible.
  • Base64 encoding: Format must be data:image/<image format>;base64,<Base64 encoding>.
    Input images must meet the following requirements:
    • Image format: jpeg, png
    • Aspect ratio (width/height): Range is [1/3, 3]
    • Width and height (pixels): > 14
    • Size: Must not exceed 10 MB
    • Total pixel count: Must not exceed 6000x6000 PX
    • Supports uploading up to 10 reference images.
size
string
Set the specifications of the generated image. Two methods are available, but cannot be used simultaneously.
  • Method 1: Specify resolution.
    • Possible values: 1K, 2K, 4K
  • Method 2: Specify the width and height (pixels) of the generated image.
    • Default: 2048x2048
    • Total pixel range: [1024x1024, 4096x4096]
    • Aspect ratio range: [1/16, 16]
Recommended width and height values:
Aspect RatioWidth and Height Pixels
1:12048x2048
4:32304x1728
3:41728x2304
16:92560x1440
9:161440x2560
3:22496x1664
2:31664x2496
21:93024x1296
sequential_image_generation
string
default:"disabled"
Controls whether to disable batch generation.
  • auto: In automatic mode, the model will automatically decide whether to return multiple images and how many images to include based on the user’s prompt.
  • disabled: Disables batch generation. The model will only generate one image.
max_images
integer
default:15
Specifies the maximum number of images to generate in this request. This parameter is only effective when sequential_image_generation is set to auto.Range: [1, 15]
NoteThe actual number of generated images is affected by max_images and the number of input reference images. Number of input reference images + number of generated images <= 15.
watermark
boolean
default:true
Add a watermark to the generated image.
  • false: No watermark added.
  • true: Adds a watermark with “AI generated” text in the bottom-right corner of the image.

Response

images
string[]
Array containing download links for the generated images.