Introduction

Text

deepseek-flash

Image

Video

词元兽-TokenMons词元兽-TokenMons
Get StartedAPI Reference
DeepSeek

deepseek-flash · Chat completions

Text / DeepSeek / deepseek-flash / Chat completions

POST/v1/chat/completions

Request parameters

Authorization

Add an Authorization header whose value is Bearer followed by your API key.

Authorization: Bearer ****************
Header parameters
Content-TypestringOptional
application/json
AcceptstringOptional
application/json
Body parametersapplication/jsonrequired
modelstringRequired
Model ID, fixed to `deepseek-flash`
messagesarray[object]Required
List of conversation messages; each has `role` (system / user / assistant) and `content`
streamboolOptional
Whether to stream the response (SSE), default `false`
stream_optionsobjectOptional
Streaming options, e.g. `include_usage` to append a usage chunk
temperaturenumberOptional
Sampling temperature; higher is more random
top_pnumberOptional
Nucleus sampling; alternative to `temperature`. Range `0`–`1`
max_tokensintOptional
Maximum number of generated tokens
stoparrayOptional
Stop sequences; output halts when any is produced
logprobsboolOptional
Whether to return log probabilities of the output tokens
top_logprobsintOptional
Number of most likely tokens to return per position (requires `logprobs`)
toolsarrayOptional
Tool / function definitions for function calling
tool_choicestring/objectOptional
Whether and which tool to call: `auto` / `none` / a named tool
response_formatobjectOptional
Constrain the output format, e.g. force a JSON object
Example
{  "model": "deepseek-flash",  "messages": [    {      "role": "user",      "content": "Hi, tell me about yourself"    }  ]}

Request code samples

curl https://api.hotrouter.ai/v1/chat/completions \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "deepseek-flash",    "messages": [      {        "role": "user",        "content": "Hi, tell me about yourself"      }    ]  }'

Response

200 · Success
idstringRequired
Unique id of this response
objectstringRequired
Object type
createdintegerRequired
Creation timestamp (seconds)
modelstringRequired
Model actually used
choicesarray[object]Required
List of generated results
usageobjectRequired
Token usage of this call
Example
{  "id": "chatcmpl-xxx",  "object": "chat.completion",  "created": 1730000000,  "model": "deepseek-flash",  "choices": [    {      "index": 0,      "message": {        "role": "assistant",        "content": "Hi! Nice to meet you…"      },      "finish_reason": "stop"    }  ],  "usage": {    "prompt_tokens": 12,    "completion_tokens": 24,    "total_tokens": 36  }}

DeepSeek V4 Pro

Previous Page

Gemini 4 Argon

Next Page

On this page

Request parametersRequest code samplesResponse
{
  "model": "deepseek-flash",
  "messages": [
    {
      "role": "user",
      "content": "Hi, tell me about yourself"
    }
  ]
}
curl https://api.hotrouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-flash",
    "messages": [
      {
        "role": "user",
        "content": "Hi, tell me about yourself"
      }
    ]
  }'
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "created": 1730000000,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hi! Nice to meet you…"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 24,
    "total_tokens": 36
  }
}