POST
/
messages
Chat Completions
curl --request POST \
  --url https://api.siliconflow.cn/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "Pro/moonshotai/Kimi-K2-Instruct",
  "messages": [
    {
      "role": "user",
      "content": "What opportunities and challenges will the Chinese large model industry face in 2025?"
    }
  ],
  "max_tokens": 8192
}'
{
  "id": "<string>",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "id": "<string>",
      "input": {},
      "name": "<string>",
      "type": "tool_use"
    }
  ],
  "model": "<string>",
  "stop_reason": "end_turn",
  "stop_sequence": "<string>",
  "usage": {
    "input_tokens": 2095,
    "output_tokens": 503
  }
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer <your api key>

Body

application/json

Response

200
application/json

200

The response is of type object.