Authorization: Bearer ********************
{
"stream": false,
"messages": [
{
"role": "user",
"content": "北京今天天气怎么样"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location"
]
}
}
}
],
"max_tokens": 1000,
"temperature": 0.8,
"model": "claude-3-7-sonnet-20250219"
}
curl --location --request POST 'https://zzzzapi.com/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"stream": false,
"messages": [
{
"role": "user",
"content": "北京今天天气怎么样"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location"
]
}
}
}
],
"max_tokens": 1000,
"temperature": 0.8,
"model": "claude-3-7-sonnet-20250219"
}'
{
"stream": false,
"messages": [
{
"role": "user",
"content": "北京今天天气怎么样"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location"
]
}
}
}
],
"max_tokens": 1000,
"temperature": 0.8,
"model": "claude-3-7-sonnet-20250219"
}