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 Bilderzeugung
- Das Seedream 5.0 Pro (doubao-seedream-5.0-pro) Modell unterstützt Text-zu-Bild, Bild-zu-Bild, Bildbearbeitung und andere Generierungsmodi
- Asynchroner Verarbeitungsmodus, verwenden Sie die zurückgegebene Aufgaben-ID zur Abfrage
- Generierte Bildlinks sind 24 Stunden gültig, bitte speichern Sie diese umgehend
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"
}
}Autorisierungen
##Alle APIs erfordern Bearer-Token-Authentifizierung##
API-Schlüssel erhalten:
Besuchen Sie die API-Schlüsselverwaltungsseite, um Ihren API-Schlüssel zu erhalten
Zum Anfrage-Header hinzufügen:
Authorization: Bearer YOUR_API_KEY
Body
Modellname für Bildgenerierung
doubao-seedream-5.0-pro "doubao-seedream-5.0-pro"
Prompt, der das zu generierende Bild beschreibt oder wie das Eingabebild bearbeitet werden soll
Sprachunterstützung: Neben Chinesisch und Englisch unterstützt Seedream 5.0 Pro auch Russisch, Arabisch, Filipino, Thai, Türkisch, Koreanisch, Malaiisch, Spanisch, Portugiesisch, Indonesisch, Französisch, Deutsch, Vietnamesisch und Japanisch.
Längenbeschränkung: max. 4000 Token (etwa 2.600 chinesische Zeichen bzw. 5.000 englische Wörter); bei Überschreitung wird 400 zurückgegeben und nichts berechnet.
Empfehlung: Nicht mehr als 300 chinesische Zeichen bzw. 600 englische Wörter verwenden. Ein längerer Prompt liegt zwar im Limit, verteilt die Information aber zu stark; das Modell übersieht dann leicht Details, sodass Bildelemente fehlen.
"A serene lake reflecting the beautiful sunset"
Größe des generierten Bildes; unterstützt zwei Formate:
Methode 1 - Verhältnisformat:
auto,1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9,9:21- In Kombination mit dem Parameter
qualitygeneriert das System automatisch ein Bild mit dem entsprechenden Seitenverhältnis und der entsprechenden Auflösung, ohne Pixel manuell anzugeben
Methode 2 - Pixelformat:
- Breite x Höhe, z. B.:
1024x1024,2048x2048 - Gesamtpixelbereich:
[921600, 4624220] - Seitenverhältnisbereich:
[1/16, 16] - Breite und Höhe müssen jeweils größer als
14pxsein
Wenn size nicht angegeben wird, ist der Standardwert auto. auto bedeutet, dass kein festes Seitenverhältnis vorgegeben wird: Das Modell bestimmt die Bildkomposition anhand des Prompts, und die Ausgabeauflösung richtet sich nach der mit quality gewählten Stufe.
"16:9"
Auflösungsstufe, die mit dem Verhältnisformat von size verwendet wird; Standardwert ist 1K.
| Seitenverhältnis | 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 |
Abrechnung:
1Kund1.5Kkosten gleich viel;1.5Kliefert die bessere Qualität und ist daher zu bevorzugen- Beim Pixelformat von
sizeentscheidet die tatsächliche Gesamtpixelzahl über die Stufe: bis2610000gilt der niedrigere Preis, darüber der höhere
1K, 1.5K, 2K "2K"
Prompt-Optimierungsstrategie, zur Einstellung des Modus für die Prompt-Optimierung
Optionen:
standard: Standardmodus, höhere Ausgabequalität, längere Verarbeitungszeitfast: Schnellmodus, kürzere Verarbeitungszeit, etwas geringere Qualität als der Standardmodus
standard, fast "standard"
Referenzbild-URL-Liste für Bild-zu-Bild- und Bildbearbeitungsfunktionen
Hinweis:
- Einzelne Anfrage unterstützt Eingabebildanzahl:
10Bilder - Bildgröße: nicht mehr als
30MB - Unterstützte Bildformate:
.jpeg,.jpg,.png,.webp,.bmp,.tiff,.gif,.heic,.heif - Seitenverhältnis (Breite/Höhe) Bereich:
[1/16, 16] - Breite und Höhe (px) > 14
- Gesamtpixel:
[196, 6000×6000] - Bild-URLs müssen direkt vom Server einsehbar sein oder die Bild-URL sollte beim Zugriff einen direkten Download auslösen (typischerweise enden diese URLs mit Bilddateiendungen wie
.png,.jpg)
10[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
Ausgabebildformat
Optionen:
png: PNG-Formatjpeg: JPEG-Format
Hinweis: Bei background=transparent ist die Ausgabe immer png; wird gleichzeitig output_format=jpeg übergeben, wird die Anfrage abgelehnt.
png, jpeg "jpeg"
Ob dem generierten Bild ein Wasserzeichen hinzugefügt werden soll
false
Transparenz-Schalter
Optionen:
opaque: Normaler deckender Hintergrund (Standard)transparent: Vorhandenen Alphakanal des Eingabebilds beibehalten
transparenterhält den bereits vorhandenen transparenten Hintergrund des Eingabebilds – es wird kein Freistellen bzw. Entfernen des Hintergrunds durchgeführt.
Einschränkungen (nur für transparent):
- Es muss genau ein Eingabebild übergeben werden, und dieses muss einen Alphakanal besitzen
- Die Ausgabe ist immer png; gleichzeitiges
output_format=jpegwird abgelehnt - Eingabebilder in Formaten ohne Alphakanal (z. B. jpeg) werden vom Modell abgelehnt
opaque, transparent "opaque"
HTTPS-Callback-Adresse nach Aufgabenabschluss
Callback-Zeitpunkt:
- Wird ausgelöst, wenn die Aufgabe abgeschlossen, fehlgeschlagen oder abgebrochen wurde
- Wird nach Abschluss der Abrechnungsbestätigung gesendet
Sicherheitsbeschränkungen:
- Nur HTTPS-Protokoll wird unterstützt
- Callback an interne IP-Adressen ist verboten (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, usw.)
- URL-Länge darf
2048Zeichen nicht überschreiten
Callback-Mechanismus:
- Timeout:
10Sekunden - Maximal
3Wiederholungsversuche bei Fehler (Wiederholung nach1Sekunde/2Sekunden/4Sekunden) - Das Format des Callback-Antwortkörpers entspricht dem Antwortformat der Aufgabenabfrage-API
- Ein 2xx-Statuscode der Callback-Adresse gilt als erfolgreich, andere Statuscodes lösen eine Wiederholung aus
"https://your-domain.com/webhooks/image-task-completed"
Antwort
Bildgenerierungsaufgabe erfolgreich erstellt
Zeitstempel der Aufgabenerstellung
1757165031
Aufgaben-ID
"task-unified-1757165031-seedream5pro"
Tatsächlich verwendeter Modellname
"doubao-seedream-5.0-pro"
Spezifischer Aufgabentyp
image.generation.task Aufgabenfortschritt in Prozent (0-100)
0 <= x <= 1000
Aufgabenstatus
pending, processing, completed, failed "pending"
Asynchrone Aufgabeninformationen
Show child attributes
Show child attributes
Aufgaben-Ausgabetyp
text, image, audio, video "image"
Nutzungs- und Abrechnungsinformationen
Show child attributes
Show child attributes