curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedream-5.0-pro",
"prompt": "A serene lake reflecting the beautiful sunset",
"size": "16:9",
"quality": "2K"
}
'import requests
url = "https://api.evolink.ai/v1/images/generations"
payload = {
"model": "doubao-seedream-5.0-pro",
"prompt": "A serene lake reflecting the beautiful sunset",
"size": "16:9",
"quality": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedream-5.0-pro',
prompt: 'A serene lake reflecting the beautiful sunset',
size: '16:9',
quality: '2K'
})
};
fetch('https://api.evolink.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedream-5.0-pro',
'prompt' => 'A serene lake reflecting the beautiful sunset',
'size' => '16:9',
'quality' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757165031,
"id": "task-unified-1757165031-seedream5pro",
"model": "doubao-seedream-5.0-pro",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "image",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 1.8,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seedream-5.0-pro",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Seedream 5.0 Pro Image Generation
- Seedream 5.0 Pro (doubao-seedream-5.0-pro) model supports text-to-image, image-to-image, image editing and other generation modes
- Asynchronous processing mode, use the returned task ID to query
- Generated image links are valid for 24 hours, please save them promptly
curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedream-5.0-pro",
"prompt": "A serene lake reflecting the beautiful sunset",
"size": "16:9",
"quality": "2K"
}
'import requests
url = "https://api.evolink.ai/v1/images/generations"
payload = {
"model": "doubao-seedream-5.0-pro",
"prompt": "A serene lake reflecting the beautiful sunset",
"size": "16:9",
"quality": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedream-5.0-pro',
prompt: 'A serene lake reflecting the beautiful sunset',
size: '16:9',
quality: '2K'
})
};
fetch('https://api.evolink.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'doubao-seedream-5.0-pro',
'prompt' => 'A serene lake reflecting the beautiful sunset',
'size' => '16:9',
'quality' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"doubao-seedream-5.0-pro\",\n \"prompt\": \"A serene lake reflecting the beautiful sunset\",\n \"size\": \"16:9\",\n \"quality\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757165031,
"id": "task-unified-1757165031-seedream5pro",
"model": "doubao-seedream-5.0-pro",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "image",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 1.8,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seedream-5.0-pro",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Image generation model name
doubao-seedream-5.0-pro "doubao-seedream-5.0-pro"
Prompt describing the image you want to generate, or describing how to edit the input image
Language support: In addition to Chinese and English, Seedream 5.0 Pro also supports Russian, Arabic, Filipino, Thai, Turkish, Korean, Malay, Spanish, Portuguese, Indonesian, French, German, Vietnamese and Japanese.
Length limit: Up to 4000 tokens (about 2,600 Chinese characters or 5,000 English words); exceeding it returns 400 and is not billed.
Recommendation: Keep prompts under 300 Chinese characters or 600 English words. A longer prompt still fits the limit but dilutes the information, and the model may miss details, leaving elements out of the image.
"A serene lake reflecting the beautiful sunset"
Size of generated image, supports two formats:
Method 1 - Ratio format:
auto,1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9,9:21- Works with the
qualityparameter to automatically generate an image at the corresponding aspect ratio and resolution, without manually specifying pixels
Method 2 - Pixel format:
- Width x height, e.g.:
1024x1024,2048x2048 - Total pixel range:
[921600, 4624220] - Aspect ratio range:
[1/16, 16] - Both width and height must be greater than
14px
Defaults to auto when size is omitted. auto means no explicit ratio: the model decides the composition from the prompt, and the output resolution follows the tier set by quality.
"16:9"
Resolution tier, used with the ratio format of size, defaults to 1K.
| Aspect ratio | 1K | 1.5K | 2K |
|---|---|---|---|
1:1 | 1024×1024 | 1536×1536 | 2048×2048 |
2:3 | 832×1248 | 1248×1872 | 1664×2496 |
3:2 | 1248×832 | 1872×1248 | 2496×1664 |
3:4 | 864×1152 | 1344×1792 | 1776×2368 |
4:3 | 1152×864 | 1792×1344 | 2368×1776 |
4:5 | 896×1120 | 1344×1680 | 1792×2240 |
5:4 | 1120×896 | 1680×1344 | 2240×1792 |
9:16 | 800×1424 | 1152×2048 | 1584×2816 |
16:9 | 1424×800 | 2048×1152 | 2816×1584 |
21:9 | 1568×672 | 2352×1008 | 3136×1344 |
9:21 | 672×1568 | 1008×2352 | 1344×3136 |
Billing:
1Kand1.5Kcost the same;1.5Klooks better, so prefer1.5K- With the pixel format of
size, the tier follows the actual output pixel count: up to2610000is billed at the lower tier, above that at the higher tier
1K, 1.5K, 2K "2K"
Prompt optimization strategy, used to set the mode for prompt optimization
Options:
standard: Standard mode, higher quality output, longer processing timefast: Fast mode, shorter processing time, slightly lower quality than standard mode
standard, fast "standard"
Reference image URL list for image-to-image and image editing features
Note:
- Single request supports input image quantity:
10images - Image size: no more than
30MB - Supported image formats:
.jpeg,.jpg,.png,.webp,.bmp,.tiff,.gif,.heic,.heif - Aspect ratio (width/height) range:
[1/16, 16] - Width and height (px) > 14
- Total pixels:
[196, 6000×6000] - Image URLs must be directly viewable by the server, or the image URL should trigger direct download when accessed (typically these URLs end with image file extensions, such as
.png,.jpg)
10[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
Output image format
Options:
png: PNG formatjpeg: JPEG format
Note: When background=transparent is set, the output is always png; passing output_format=jpeg at the same time is rejected.
png, jpeg "jpeg"
Whether to add a watermark to the generated image
false
Transparency switch
Options:
opaque: Regular solid background (default)transparent: Preserve the alpha channel the input image already has
transparentpreserves the transparent background of the input image — it does not cut out the subject or remove the background.
Limits (apply to transparent only):
- Exactly one input image must be supplied, and it must have an alpha channel
- The output is always png; passing
output_format=jpegat the same time is rejected - Input images in formats without alpha support (such as jpeg) are rejected by the model
opaque, transparent "opaque"
HTTPS callback address after task completion
Callback Timing:
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation is completed
Security Restrictions:
- Only HTTPS protocol is supported
- Callback to internal IP addresses is prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
- URL length must not exceed
2048characters
Callback Mechanism:
- Timeout:
10seconds - Maximum
3retries on failure (retries after1second/2seconds/4seconds) - Callback response body format is consistent with the task query API response format
- Callback address returning 2xx status code is considered successful, other status codes will trigger retry
"https://your-domain.com/webhooks/image-task-completed"
Response
Image generation task created successfully
Task creation timestamp
1757165031
Task ID
"task-unified-1757165031-seedream5pro"
Actual model name used
"doubao-seedream-5.0-pro"
Specific task type
image.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Async task information
Show child attributes
Show child attributes
Task output type
text, image, audio, video "image"
Usage and billing information
Show child attributes
Show child attributes