{
"model": "MiniMax-M3",
"messages": [
{
"role": "user",
"content": "旧金山现在天气怎么样?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state/country, e.g. San Francisco, US"
}
},
"required": [
"location"
]
},
"description": "Get the current weather for a given location."
}
}
]
}curl --location '/v1/chat/completions' \
--header 'Authorization: Bearer {{sk-xxx}}' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-M3",
"messages": [
{
"role": "user",
"content": "旧金山现在天气怎么样?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state/country, e.g. San Francisco, US"
}
},
"required": [
"location"
]
},
"description": "Get the current weather for a given location."
}
}
]
}'{
"id": "066b13db03518f86c2e3c9b073c04272",
"choices": [
{
"finish_reason": "tool_calls",
"index": 0,
"message": {
"content": "<think>\nThe user is asking about the current weather in San Francisco. I should use the get_weather tool to fetch this information.\n</think>\n我来帮你查询旧金山的当前天气。",
"role": "assistant",
"name": "MiniMax AI",
"tool_calls": [
{
"id": "call_function_p4iiqtpnh5bj_1",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"San Francisco, US\"}"
},
"index": 0
}
],
"audio_content": ""
}
}
],
"created": 1780211931,
"model": "MiniMax-M3",
"object": "chat.completion",
"usage": {
"total_tokens": 477,
"total_characters": 0,
"prompt_tokens": 411,
"completion_tokens": 66,
"prompt_tokens_details": {
"cached_tokens": 114
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"output_sensitive_int": 0,
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}