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
}
}
Creates a model response for the given chat conversation.
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
}
}
Use the following format for authentication: Bearer <your api key>
200
The response is of type object
.