v1

latestOpenAPI 3.0.0MIT2026-07-14738120.4 KB
Chat Completions

Chat Completions

Creates a model response for the given chat conversation.

post/chat/completions

Request body

model'deepseek-ai/DeepSeek-V2-Chat' | 'deepseek-ai/DeepSeek-Coder-V2-Instruct' | 'deepseek-ai/DeepSeek-V2.5' | 'Qwen/Qwen2.5-72B-Instruct-128K' | 'Qwen/Qwen2.5-72B-Instruct' | 'Qwen/Qwen2-VL-72B-Instruct' | 'Qwen/Qwen2.5-32B-Instruct' | 'Qwen/Qwen2.5-14B-Instruct' | 'Qwen/Qwen2.5-7B-Instruct' | 'Qwen/Qwen2.5-Math-72B-Instruct' | 'Qwen/Qwen2.5-Coder-7B-Instruct' | 'Qwen/Qwen2-72B-Instruct' | 'Qwen/Qwen2-7B-Instruct' | 'Qwen/Qwen2-1.5B-Instruct' | 'Qwen/Qwen2-57B-A14B-Instruct' | 'TeleAI/TeleChat2' | '01-ai/Yi-1.5-34B-Chat-16K' | '01-ai/Yi-1.5-9B-Chat-16K' | '01-ai/Yi-1.5-6B-Chat' | 'THUDM/chatglm3-6b' | 'THUDM/glm-4-9b-chat' | 'Vendor-A/Qwen/Qwen2-72B-Instruct' | 'Vendor-A/Qwen/Qwen2.5-72B-Instruct' | 'internlm/internlm2_5-7b-chat' | 'internlm/internlm2_5-20b-chat' | 'OpenGVLab/InternVL2-Llama3-76B' | 'OpenGVLab/InternVL2-26B' | 'meta-llama/Meta-Llama-3.1-405B-Instruct' | 'meta-llama/Meta-Llama-3.1-70B-Instruct' | 'meta-llama/Meta-Llama-3.1-8B-Instruct' | 'meta-llama/Meta-Llama-3-8B-Instruct' | 'meta-llama/Meta-Llama-3-70B-Instruct' | 'google/gemma-2-27b-it' | 'google/gemma-2-9b-it' | 'Pro/Qwen/Qwen2.5-7B-Instruct' | 'Pro/Qwen/Qwen2-7B-Instruct' | 'Pro/Qwen/Qwen2-1.5B-Instruct' | 'Pro/Qwen/Qwen2-VL-7B-Instruct' | 'Pro/01-ai/Yi-1.5-9B-Chat-16K' | 'Pro/01-ai/Yi-1.5-6B-Chat' | 'Pro/THUDM/chatglm3-6b' | 'Pro/THUDM/glm-4-9b-chat' | 'Pro/internlm/internlm2_5-7b-chat' | 'Pro/OpenGVLab/InternVL2-8B' | 'Pro/meta-llama/Meta-Llama-3-8B-Instruct' | 'Pro/meta-llama/Meta-Llama-3.1-8B-Instruct' | 'Pro/google/gemma-2-9b-it' required

The name of the model to query.

streamboolean

If set, tokens are returned as Server-Sent Events as they are made available. Stream terminates with data: [DONE]

max_tokensinteger

The maximum number of tokens to generate.

stopstring[]

A list of string sequences that will truncate (stop) inference text output.

temperaturenumber float

Determines the degree of randomness in the response.

top_pnumber float

The top_p (nucleus) parameter is used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities.

top_knumber float
frequency_penaltynumber float
ninteger

Number of generations to return

Example request

{
  "model": "deepseek-ai/DeepSeek-V2.5",
  "messages": [
    {
      "role": "user",
      "content": "SiliconCloud推出分层速率方案与免费模型RPM提升10倍,对于整个大模型应用领域带来哪些改变?"
    }
  ],
  "max_tokens": 512,
  "temperature": 0.7,
  "top_p": 0.7,
  "top_k": 50,
  "frequency_penalty": 0.5,
  "n": 1,
  "response_format": {
    "type": "json_object"
  }
}

Response

200

idstring
createdinteger
modelstring
object'chat.completion'

Example response

{
  "choices": [
    {
      "message": {
        "role": "assistant"
      }
    }
  ]
}