Seed-Dialog mit Chat Completions starten
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "Hallo! Stell dich bitte in drei Sätzen vor."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "Hallo! Stell dich bitte in drei Sätzen vor."
}
]
}
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-seed-2-1-pro',
messages: [{role: 'user', content: 'Hallo! Stell dich bitte in drei Sätzen vor.'}]
})
};
fetch('https://direct.evolink.ai/v1/chat/completions', 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://direct.evolink.ai/v1/chat/completions",
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-seed-2-1-pro',
'messages' => [
[
'role' => 'user',
'content' => 'Hallo! Stell dich bitte in drei Sätzen vor.'
]
]
]),
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://direct.evolink.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"doubao-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\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://direct.evolink.ai/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/chat/completions")
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-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-1-pro",
"object": "chat.completion",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hallo! Ich bin ein Seed-Sprachmodell für Schlussfolgerungen, Texte, Code und multimodale Inhalte …"
},
"finish_reason": "stop",
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 256,
"total_tokens": 271,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2-1-pro"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Chat Completions API
Seed Chat Completions — Schnellstart
- Rufen Sie Seed mit dem OpenAI SDK auf.
- Bei synchronen Anfragen wird die Antwort direkt zurückgegeben.
- Für den Einstieg genügen die wichtigsten Parameter.
- Unterstützte Modelle —
doubao-seed-2-1-pro,doubao-seed-2-1-turbo,doubao-seed-2-1-lite,doubao-seed-evolving,doubao-seed-2.0-pro,doubao-seed-2.0-lite,doubao-seed-2.0-mini,doubao-seed-2.0-code - Alte Seed-2.0-Modellnamen:
doubao-seed-2.0-pro/doubao-seed-2.0-litewerden jetzt aufdoubao-seed-2-1-liteunddoubao-seed-2.0-codeaufdoubao-seed-evolvingumgeleitet; das Parameterverhalten richtet sich nach dem neuen Modell. Für neue Integrationen die neuen Modellnamen verwenden.doubao-seed-2.0-miniist nicht betroffen - API-Referenz
POST
/
v1
/
chat
/
completions
Seed-Dialog mit Chat Completions starten
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "Hallo! Stell dich bitte in drei Sätzen vor."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "doubao-seed-2-1-pro",
"messages": [
{
"role": "user",
"content": "Hallo! Stell dich bitte in drei Sätzen vor."
}
]
}
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-seed-2-1-pro',
messages: [{role: 'user', content: 'Hallo! Stell dich bitte in drei Sätzen vor.'}]
})
};
fetch('https://direct.evolink.ai/v1/chat/completions', 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://direct.evolink.ai/v1/chat/completions",
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-seed-2-1-pro',
'messages' => [
[
'role' => 'user',
'content' => 'Hallo! Stell dich bitte in drei Sätzen vor.'
]
]
]),
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://direct.evolink.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"doubao-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\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://direct.evolink.ai/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/chat/completions")
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-seed-2-1-pro\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hallo! Stell dich bitte in drei Sätzen vor.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-1-pro",
"object": "chat.completion",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hallo! Ich bin ein Seed-Sprachmodell für Schlussfolgerungen, Texte, Code und multimodale Inhalte …"
},
"finish_reason": "stop",
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 256,
"total_tokens": 271,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2-1-pro"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}BaseURL: Die Standard-BaseURL ist
https://direct.evolink.ai und bietet bessere Unterstützung für Textmodelle sowie persistente Verbindungen. https://api.evolink.ai ist der primäre Endpunkt für multimodale Dienste und dient bei Textmodellen als Ausweichadresse.Autorisierungen
##Alle APIs erfordern Bearer-Token-Authentifizierung##
API-Schluessel erhalten:
Besuchen Sie die API-Schluesselverwaltungsseite, um Ihren API-Schluessel zu erhalten
Zum Anfrage-Header hinzufuegen:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Modell auswählen
| Modell-ID | Einsatzgebiet | Kontextfenster |
|---|---|---|
doubao-seed-2-1-pro | Empfohlenes Spitzenmodell für komplexe Schlussfolgerungen, lange Dokumente und Codebasen | 1.000.000 Token |
doubao-seed-2-1-turbo | Preisgünstig für Dialoge, Datenextraktion und Agentenaufgaben | 256.000 Token |
doubao-seed-2-1-lite | Günstigstes Seed-2.1-Modell, unterstützt Audioeingaben | 1.000.000 Token |
doubao-seed-evolving | Wöchentliche Updates zum Erproben neuer Funktionen | 1.000.000 Token |
doubao-seed-2.0-pro | Alter Modellname, jetzt auf doubao-seed-2-1-lite umgeleitet | 1.000.000 Token |
doubao-seed-2.0-lite | Alter Modellname, jetzt auf doubao-seed-2-1-lite umgeleitet | 1.000.000 Token |
doubao-seed-2.0-mini | Schnellstes Seed-2.0-Modell für einfache Aufgaben | 256.000 Token |
doubao-seed-2.0-code | Alter Modellname, jetzt auf doubao-seed-evolving umgeleitet | 1.000.000 Token |
Seed 2.1 verwendet in Modell-IDs einen Bindestrich (2-1), Seed 2.0 einen Punkt (2.0).
Verfügbare Optionen:
doubao-seed-2-1-pro, doubao-seed-2-1-turbo, doubao-seed-2-1-lite, doubao-seed-evolving, doubao-seed-2.0-pro, doubao-seed-2.0-lite, doubao-seed-2.0-mini, doubao-seed-2.0-code Beispiel:
"doubao-seed-2-1-pro"
Antwort
Chat-Generierung erfolgreich