curl --request POST \
--url https://gengen.farm/api/gengen/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seed-2-0-lite-260428",
"messages": [
{
"role": "user",
"content": "Write a concise product summary."
}
]
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"model": "seed-2-0-lite-260428",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Here is a concise summary."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 128,
"completion_tokens": 32,
"total_tokens": 160
}
}{
"error_code": "gengen.model_required",
"error_params": {
"field": "model"
},
"error": "A model is required"
}{
"error_code": "gengen.auth_required",
"error": "Missing Authorization bearer token"
}{
"error_code": "seedance.insufficient_balance",
"error": "Insufficient available balance"
}{
"error_code": "gengen.api_key_revoked",
"error": "GENGEN API key has been revoked"
}{
"error_code": "<string>",
"error_params": {},
"error": "<string>"
}Create a chat completion
Create an OpenAI-compatible BytePlus chat completion. Set stream to
true to receive Server-Sent Events ending with data: [DONE]. For a
streaming request, GENGEN always enables final usage reporting.
curl --request POST \
--url https://gengen.farm/api/gengen/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seed-2-0-lite-260428",
"messages": [
{
"role": "user",
"content": "Write a concise product summary."
}
]
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"model": "seed-2-0-lite-260428",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Here is a concise summary."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 128,
"completion_tokens": 32,
"total_tokens": 160
}
}{
"error_code": "gengen.model_required",
"error_params": {
"field": "model"
},
"error": "A model is required"
}{
"error_code": "gengen.auth_required",
"error": "Missing Authorization bearer token"
}{
"error_code": "seedance.insufficient_balance",
"error": "Insufficient available balance"
}{
"error_code": "gengen.api_key_revoked",
"error": "GENGEN API key has been revoked"
}{
"error_code": "<string>",
"error_params": {},
"error": "<string>"
}Authorizations
A workspace API key beginning with gengen_live_.
Body
OpenAI-compatible chat completion request. Additional BytePlus Chat API fields are forwarded to the provider and remain model-dependent.
Supported GENGEN LLM model IDs:
dola-seed-2-1-turbo-260628— Seed 2.1 Turboseed-2-0-mini-260428— Seed 2.0 Miniseed-2-0-lite-260428— Seed 2.0 Liteseed-2-0-pro-260328— Seed 2.0 Proseed-2-0-code-preview-260328— Seed 2.0 Code Previewdeepseek-v4-flash-260425— DeepSeek V4 Flashdeepseek-v4-pro-260425— DeepSeek V4 Proglm-5-2-260617— GLM 5.2
dola-seed-2-1-turbo-260628, seed-2-0-mini-260428, seed-2-0-lite-260428, seed-2-0-pro-260328, seed-2-0-code-preview-260328, deepseek-v4-flash-260425, deepseek-v4-pro-260425, glm-5-2-260617 1"seed-2-0-lite-260428"
1Show child attributes
Show child attributes
Return Server-Sent Events instead of one JSON completion.
Show child attributes
Show child attributes
Maximum answer length in tokens. Do not combine with max_completion_tokens.
x >= 1Maximum answer plus reasoning length for supported reasoning models.
x >= 1Show child attributes
Show child attributes
Provider-specific reasoning depth for supported models.
Sampling temperature. Model-specific restrictions can apply.
0 <= x <= 2Nucleus sampling threshold. Model-specific restrictions can apply.
0 <= x <= 1One stop sequence or up to four stop sequences.
Repetition penalty supported by selected models.
-2 <= x <= 2Presence penalty supported by selected models.
-2 <= x <= 2Text, JSON object, or JSON schema response configuration.
Function tools supported by all listed Seed, DeepSeek, and GLM models. Return the complete assistant message and matching tool results on the next request. See /tool-calling for examples.
Supported values:
fast— prioritize lower latency when supportedauto— let the provider choose the service tierdefault— use standard processing
fast, auto, default Response
A JSON chat completion when stream is false, or an SSE stream when
stream is true.