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.
taskId.Enum: application/json
Bearer authentication token. Example: Bearer {{APIKey}}.
Model version to use. Available options: seedream-5.0-pro, seedream-5.0-lite, seedream-4.5, seedream-4.0.
Text prompt describing the image content to generate. Supports Chinese and English. Recommended up to 300 Chinese characters or 600 English words.
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.
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).
Random seed for reproducible results. Default: -1 (random seed).
Returns 0 for success, or a specific error code.
Returns "success" or a descriptive error message.
The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.
Use the Polling API to retrieve the processing results.
Alternatively, you can enable Callback to receive task results automatically upon completion.
{
"code": 0,
"message": "success",
"data": {
"task": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350",
"status": 3
},
"images": [{
"imageUrl": "https://example.com/generated-image.png",
"imageType": "png"
}]
}
}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
}'{
"code": 0,
"message": "success",
"data": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350"
}
}