Skip to main content
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "doubao-seed-2.0-pro",
  "messages": [
    {
      "role": "user",
      "content": "Please introduce yourself"
    }
  ]
}
'
{
  "id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
  "model": "doubao-seed-2-0-pro-260215",
  "object": "chat.completion",
  "service_tier": "default",
  "created": 1771485416,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! Doubao Seed 2.0 is a next-generation large language model from ByteDance, featuring enhanced reasoning, multimodal understanding, and deep thinking capabilities.",
        "reasoning_content": "<string>",
        "tool_calls": [
          {
            "id": "<string>",
            "type": "function",
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            }
          }
        ]
      },
      "finish_reason": "stop",
      "logprobs": {
        "content": [
          {
            "token": "<string>",
            "bytes": [
              123
            ],
            "logprob": 123,
            "top_logprobs": [
              {
                "token": "<string>",
                "bytes": [
                  123
                ],
                "logprob": 123
              }
            ]
          }
        ]
      },
      "moderation_hit_type": "severe_violation"
    }
  ],
  "usage": {
    "total_tokens": 271,
    "prompt_tokens": 15,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens": 256,
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  }
}

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit the API Key Management Page to get your API Key

Add to request headers:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
enum<string>
default:doubao-seed-2.0-pro
required

Chat model name

  • doubao-seed-2.0-pro: Flagship, strongest overall capability, ideal for complex reasoning and high-quality generation
  • doubao-seed-2.0-lite: Lightweight, faster speed, cost-effective
  • doubao-seed-2.0-mini: Ultra-fast, quickest response, suitable for simple tasks
  • doubao-seed-2.0-code: Code-specialized, optimized for code generation and understanding
Available options:
doubao-seed-2.0-pro,
doubao-seed-2.0-lite,
doubao-seed-2.0-mini,
doubao-seed-2.0-code
Example:

"doubao-seed-2.0-pro"

messages
object[]
required

List of conversation messages, supports multi-turn conversation and multimodal input (text, image, video)

Minimum array length: 1
thinking
object

Control whether the model enables deep thinking mode

Different models may vary in support and default values

stream
boolean
default:false

Whether to stream the response content

  • false: Model generates all content before returning the result at once
  • true: Returns model-generated content incrementally via SSE protocol, ending with a data: [DONE] message. When stream is true, you can set the stream_options field to get token usage statistics
Example:

false

stream_options
object

Options for streaming responses. Can be set when stream is true

max_tokens
integer | null
default:4096

Maximum length of model response (in tokens)

Note:

  • Model response does not include chain-of-thought content (model response = model output - model chain-of-thought)
  • Total output token length is also limited by the model's context length
  • Cannot be set simultaneously with max_completion_tokens
Example:

4096

max_completion_tokens
integer | null

Controls the maximum output length of the model, including both response and chain-of-thought content (in tokens)

Note:

  • Value range: [0, 65536]
  • When configured, the default value of max_tokens becomes ineffective; the model outputs content (response and chain-of-thought) as needed until reaching this value
  • Cannot be set simultaneously with max_tokens
  • Recommended when deep thinking mode is enabled
Required range: 0 <= x <= 65536
Example:

16384

temperature
number | null
default:1

Sampling temperature, controls output randomness

Note:

  • Value range: [0, 2]
  • Lower values (e.g., 0.2): More deterministic, more focused output
  • Higher values (e.g., 0.8): More random, more creative output
  • A value of 0 means the model only considers the token with the highest log probability
  • It is recommended to adjust only temperature or top_p, not both
Required range: 0 <= x <= 2
Example:

0.7

top_p
number | null
default:0.7

Nucleus sampling probability threshold

Note:

  • Value range: [0, 1]
  • The model considers tokens within the top_p probability mass
  • 0.1 means only considering the top 10% of tokens by probability mass
  • Higher values produce more random output, lower values produce more deterministic output
  • It is recommended to adjust only temperature or top_p, not both
Required range: 0 <= x <= 1
Example:

0.9

stop

The model will stop generating when it encounters the string(s) specified in the stop field. The stop string itself will not be included in the output. Up to 4 strings are supported

Note: Deep thinking models do not support this field

Example:
["hello", "weather"]
reasoning_effort
enum<string> | null
default:medium

Limits the amount of thinking effort, reducing thinking depth can improve speed and consume fewer tokens

  • minimal: Disable thinking, answer directly
  • low: Lightweight thinking, prioritizes quick response
  • medium: Balanced mode, balances speed and depth
  • high: Deep analysis, handles complex problems
Available options:
minimal,
low,
medium,
high
Example:

"medium"

response_format
object

Specify the model response format

Supports three formats: text (default), json_object, json_schema

frequency_penalty
number | null
default:0

Frequency penalty coefficient

Note:

  • Value range: [-2.0, 2.0]
  • Positive values penalize new tokens based on their frequency in the text so far, reducing the likelihood of the model repeating the same content verbatim
Required range: -2 <= x <= 2
Example:

0

presence_penalty
number | null
default:0

Presence penalty coefficient

Note:

  • Value range: [-2.0, 2.0]
  • Positive values penalize new tokens based on whether they have appeared in the text so far, increasing the likelihood of the model talking about new topics
Required range: -2 <= x <= 2
Example:

0

logprobs
boolean | null
default:false

Whether to return log probabilities of output tokens

  • false: Do not return log probability information
  • true: Return log probabilities for each output token in the message content

Note: Deep thinking models do not support this field

top_logprobs
integer | null
default:0

Specify the number of most likely tokens to return at each output token position, each with an associated log probability

  • Value range: [0, 20]
  • Can only be set when logprobs is true

Note: Deep thinking models do not support this field

Required range: 0 <= x <= 20
logit_bias
object

Adjust the probability of specified tokens appearing in the model output

Note:

  • Accepts a map where keys are token IDs from the vocabulary and values are bias values
  • Bias value range: [-100, 100]
  • -1 reduces the likelihood of selection, 1 increases the likelihood of selection
  • -100 completely prohibits selection of the token, 100 causes only that token to be selectable

Note: Deep thinking models do not support this field

tools
object[] | null

List of tools to be called; the model response may contain tool call requests

parallel_tool_calls
boolean
default:true

Whether the model response is allowed to contain multiple tool calls for this request

  • true: Allow returning multiple tool calls
  • false: The number of tool calls returned is <= 1
tool_choice

Whether the model response should contain tool calls for this request

String mode:

  • none: Model response does not contain tool calls
  • required: Model response must contain tool calls
  • auto: Model decides whether to include tool calls (default when tools are provided)

Object mode: Specify the scope of tools to be called

Available options:
none,
auto,
required

Response

Chat completion successful

id
string

Unique identifier for this request

Example:

"0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50"

model
string

Actual model name and version used for this request

Example:

"doubao-seed-2-0-pro-260215"

object
enum<string>

Response type, always chat.completion

Available options:
chat.completion
Example:

"chat.completion"

service_tier
enum<string>

Service tier for this request

  • default: Default service tier
  • scale: Used reserved capacity quota
Available options:
default,
scale
Example:

"default"

created
integer

Unix timestamp (in seconds) of when this request was created

Example:

1771485416

choices
object[]

Model output content for this request

usage
object

Token usage for this request