Skip to main content
POST

Authorizations

Authorization
string
header
required

A workspace API key beginning with gengen_live_.

Body

application/json

OpenAI-compatible chat completion request. Additional BytePlus Chat API fields are forwarded to the provider and remain model-dependent.

model
string
required

Supported GENGEN text generation model ID.

Minimum string length: 1
Example:

"seed-2-0-lite-260428"

messages
object[]
required
Minimum array length: 1
stream
boolean
default:false

Return Server-Sent Events instead of one JSON completion.

stream_options
object
max_tokens
integer | null

Maximum answer length in tokens. Do not combine with max_completion_tokens.

Required range: x >= 1
max_completion_tokens
integer | null

Maximum answer plus reasoning length for supported reasoning models.

Required range: x >= 1
thinking
object
reasoning_effort
string | null

Provider-specific reasoning depth for supported models.

temperature
number | null

Sampling temperature. Model-specific restrictions can apply.

Required range: 0 <= x <= 2
top_p
number | null

Nucleus sampling threshold. Model-specific restrictions can apply.

Required range: 0 <= x <= 1
stop

One stop sequence or up to four stop sequences.

frequency_penalty
number | null

Repetition penalty supported by selected models.

Required range: -2 <= x <= 2
presence_penalty
number | null

Presence penalty supported by selected models.

Required range: -2 <= x <= 2
response_format
object

Text, JSON object, or JSON schema response configuration.

tools
object[] | null

Function tools available to the model.

tool_choice
parallel_tool_calls
boolean
service_tier
enum<string>

Supported values:

  • fast — prioritize lower latency when supported
  • auto — let the provider choose the service tier
  • default — use standard processing
Available options:
fast,
auto,
default

Response

A JSON chat completion when stream is false, or an SSE stream when stream is true.

id
string
required
object
string
required
Example:

"chat.completion"

model
string
required
choices
object[]
required
created
integer<int64>

Unix timestamp in seconds.

service_tier
string
usage
object
moderation_hit_type
string | null