Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json

BytePlus chat completions request body.

model
enum<string>
required

Model name. Supported BytePlus chat models include dola-seed-2-1-turbo-260628

Available options:
dola-seed-2-1-turbo-260628
Example:

"dola-seed-2-1-turbo-260628"

messages
object[]
required

Message list. This document exposes four roles: system, user, assistant, tool. messages[].content supports plain text.

Minimum array length: 1
stream
boolean
default:true

Whether to enable streaming output. When true, the response content type is text/event-stream.

stream_options
object

Additional options for streaming response. Only effective when stream=true.

max_completion_tokens
integer

Maximum length of the model response, in tokens.

response_format
object

Controls the answer format (Beta).

frequency_penalty
number
default:0

Frequency penalty. The higher the value, the more it suppresses repetitive expressions.

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Presence penalty. The higher the value, the more it encourages the model to introduce new topics.

Required range: -2 <= x <= 2
temperature
number
default:1

Sampling temperature. Lower values make the output more stable, higher values make it more creative.

Required range: 0 <= x <= 2
top_p
number
default:0.95

Nucleus sampling parameter. Usually used as an alternative to temperature.

Required range: 0 <= x <= 1
tools
object[]

List of function tool definitions available for the model to call.

parallel_tool_calls
boolean

Whether to allow the model to initiate multiple tool calls in parallel.

tool_choice

Tool calling strategy. Can be a string mode or an object specifying a specific function.

Available options:
none,
auto,
required

Response

Success. Returns JSON in non-streaming mode; SSE event stream in streaming mode.

BytePlus chat completions success response.

id
string

Response ID.

object
string

Object type, e.g., chat.completion.

created
integer

Unix timestamp.

model
string

The actual model name used.

choices
object[]
usage
object

Token usage statistics.