The SeeDream API generates high-quality images from text prompts, with support for resolution keywords, exact pixel sizes, and seed control.
taskId.Use application/json.
Use Bearer {{APIKey}}.
Use seedream-5.5.
Text prompt describing the image content to generate. Supports Chinese and English. Recommended up to 300 Chinese characters or 600 English words.
Output image dimensions. Two modes are supported:
Mode 1: Specify exact pixel dimensions as WIDTHxHEIGHT, for example 1536x1536. The output aspect ratio range is [1/16, 16]. The pixel count is width multiplied by height.
Mode 2: Specify a resolution keyword: 1K, 1.5K, or 2K. Describe the desired aspect ratio in the prompt.
Billing: 1K and 1.5K, or exact dimensions with at most 2,610,000 pixels, have a base cost of 5 credits. 2K, or exact dimensions with more than 2,610,000 pixels, have a base cost of 10 credits. If size is omitted or empty, the base cost is 10 credits.
Random seed for reproducible results. Default -1 uses a random seed.
0 indicates successful submission.
Response message.
Task identifier for polling.
Use the Polling API with the returned task ID.
Use the Callback API to receive task results automatically.
{
"code": 0,
"message": "success",
"data": {
"task": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350",
"status": 3
},
"images": [
{
"imageUrl": "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/INj5UrnnrKIzCR1uYBWv0.png",
"imageType": "png"
}
]
}
}curl -X POST 'https://api.newportai.com/api/async/seedream_5.5' \
-H 'Authorization: Bearer {{key}}' \
-H 'Content-Type: application/json' \
-d '{
"model": "seedream-5.5",
"prompt": "A watercolor lighthouse beside a calm ocean",
"size": "1536x1536"
}'{
"code": 0,
"message": "success",
"data": {
"taskId": "b08337dc08d7428daa64b3d5e61b8350"
}
}