Skip to main content
POST
/
v3
/
seedream-4.0
Seedream Image Generation 4.0
curl --request POST \
  --url https://api.highwayapi.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 provides flexible image creation capabilities, including support for 4K resolution and generating images from text and other images.

Request Headers

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

Request Body

prompt
string
required
The prompt used to generate the image. Chinese and English are supported.It is recommended to use no more than 300 Chinese characters or 600 English words. If the text is too long, the information may become scattered, and the model may ignore details and focus only on the main points, causing some elements to be missing from the image.
images
string[]
The Base64 encoding or accessible URL of the image to be edited. You can input one or more images.
  • Image URL: Ensure the image URL is accessible.
  • Base64 encoding: The format must be data:image/<图像格式>;base64,<Base64 编码>.
    Input images must meet the following requirements:
    • Image formats: jpeg, png
    • Aspect ratio (width/height): range [1/3, 3]
    • Width and height (pixels): > 14
    • Size: no more than 10 MB
    • Total pixels: no more than 6000×6000 PX
    • Supports uploading up to 10 reference images.
size
string
Set the specifications of the generated image. There are two available methods, but they cannot be used at the same time.
  • Method 1: Specify the resolution.
    • Optional values: 1K, 2K, 4K
  • Method 2: Specify the width and height (pixels) of the generated image.
    • Default value: 2048x2048
    • Total pixel range: [1024x1024, 4096x4096]
    • Aspect ratio range: [1/16, 16]
Recommended width and height:
Aspect RatioWidth and Height in 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 batch generation is disabled.
  • auto: In automatic mode, the model automatically decides whether to return multiple images and how many images to include based on the user’s prompt.
  • disabled: Disables batch generation. The model will generate only one image.
max_images
integer
default:15
Specifies the maximum number of images to generate in this request. This parameter is only valid when sequential_image_generation is set to auto.Value 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: Do not add a watermark.
  • true: Add a watermark with the text “AI generated” in the lower-right corner of the image.

Response Information

images
string[]
An array containing download links for the generated images.