header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired
Example
{"model":"claude-sonnet-4-5-20250929","system":[{"type":"text","text":"使用合适的工具完成任务"}],"messages":[{"role":"user","content":"今天(11月11日)上海天气怎么样?"}],"max_tokens":8095,"temperature":1,"tools":[{"name":"get_weather","description":"Get weather information for a specific city and date","input_schema":{"properties":{"city":{"description":"The city name","type":"string"},"date":{"description":"The date for weather forecast","type":"string"}},"required":["city","date"],"type":"object"}}],"thinking":{"type":"disabled"}}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.toiotech.com/v1/messages' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "claude-sonnet-4-5-20250929",
"system": [
{
"type": "text",
"text": "使用合适的工具完成任务"
}
],
"messages": [
{
"role": "user",
"content": "今天(11月11日)上海天气怎么样?"
}
],
"max_tokens": 8095,
"temperature": 1,
"tools": [
{
"name": "get_weather",
"description": "Get weather information for a specific city and date",
"input_schema": {
"properties": {
"city": {
"description": "The city name",
"type": "string"
},
"date": {
"description": "The date for weather forecast",
"type": "string"
}
},
"required": [
"city",
"date"
],
"type": "object"
}
}
],
"thinking": {
"type": "disabled"
}
}'