Seedream 5.0 Pro

POSThttps://api.newportai.com/api/async/seedream

The SeeDream API generates high-quality images from text prompts, supporting multiple model versions for different quality and speed requirements.

Seedream 5.0 Pro is the latest high-performance image generation model, offering superior quality with support for both resolution keywords and exact pixel sizes, reference images, and seed control.

  • Submit a POST request to the SeeDream API to obtain a taskId.
  • Submit a POST request to the Polling API to retrieve the generated image results.
  • Configure a Callback URL to receive results automatically on completion.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

model string Required

Model version to use. Available options: seedream-5.0-pro, seedream-5.0-lite, seedream-4.5, seedream-4.0.

prompt string Required

Text prompt describing the image content to generate. Supports Chinese and English. Recommended up to 300 Chinese characters or 600 English words.

image array

List of reference image URLs or Base64 strings for style guidance or image-to-image generation. Supports single or multiple images (up to 10). Supported formats: jpeg, png, webp, bmp, tiff, gif, heic, heif. Max file size: 30MB per image. Total pixel limit: 6000x6000 (36MP) per image. Aspect ratio range of input image: [1/16, 16]. Minimum width/height: >14px.

size string

Image dimensions. Two supported modes:

Mode 1: Specify exact pixel values as "WIDTHxHEIGHT". Default: 1024x1024. Total pixel range [1280x720 (921,600), 4,624,220]. Aspect ratio range [1/16, 16]. Both total pixel count AND aspect ratio must be satisfied simultaneously. The total pixel limit applies to the product of width and height, not to individual dimensions.

Mode 2: Specify a resolution keyword — 1K or 2K — and describe the aspect ratio naturally in the prompt. The model will determine the actual pixel dimensions based on the described aspect ratio.

Billing: Images with total pixels ≤ 2,360,000 are billed at the 1K rate (12 credits). Images with total pixels > 2,360,000 are billed at the 2K rate (24 credits).

seed integer

Random seed for reproducible results. Default: -1 (random seed).

Response

code integer

Returns 0 for success, or a specific error code.

message string

Returns "success" or a descriptive error message.

data object
taskId string

The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.

Errors

10192Illegal param

Polling

Use the Polling API to retrieve the processing results.

Callback

Alternatively, you can enable Callback to receive task results automatically upon completion.

Task Completed
Task Completed
{
  "code": 0,
  "message": "success",
  "data": {
    "task": {
      "taskId": "b08337dc08d7428daa64b3d5e61b8350",
      "status": 3
    },
    "images": [{
      "imageUrl": "https://example.com/generated-image.png",
      "imageType": "png"
    }]
  }
}
Request
cURL
curl -X POST 'https://api.newportai.com/api/async/seedream' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer {{key}}" \
  -d '{
  "model": "seedream-5.0-pro",
  "prompt": "A beautiful sunset over the ocean with vibrant colors",
  "size": "1K",
  "seed": -1
}'
Successful
Successful
{
  "code": 0,
  "message": "success",
  "data": {
    "taskId": "b08337dc08d7428daa64b3d5e61b8350"
  }
}