Authorization: Bearer ********************{
"max_tokens": 1024,
"messages": [
{
"content": "Hello, world",
"role": "user"
}
],
"model": "claude-sonnet-5",
"stream": false,
"system": [
{
"text": "Today's date is 2024-06-01.",
"type": "text"
}
],
"temperature": 1,
"thinking": {
"type": "adaptive"
},
"tools": [
{
"input_schema": {
"type": "object",
"properties": {
"location": "bar",
"unit": "bar"
},
"required": [
"location"
]
},
"name": "name"
}
],
"top_k": 5,
"top_p": 0.7
}curl --location 'https://api.mixrouter.com/v1/messages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"max_tokens": 1024,
"messages": [
{
"content": "Hello, world",
"role": "user"
}
],
"model": "claude-sonnet-5",
"stream": false,
"system": [
{
"text": "Today'\''s date is 2024-06-01.",
"type": "text"
}
],
"temperature": 1,
"thinking": {
"type": "adaptive"
},
"tools": [
{
"input_schema": {
"type": "object",
"properties": {
"location": "bar",
"unit": "bar"
},
"required": [
"location"
]
},
"name": "name"
}
],
"top_k": 5,
"top_p": 0.7
}'{
"container": null,
"content": [
{
"text": "Hi there! How can I help you today?",
"type": "text"
}
],
"context_management": null,
"diagnostics": null,
"id": "msg_011CfJZKjUJZXfZnCXYKgDXv",
"model": "claude-sonnet-5",
"role": "assistant",
"stop_details": null,
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 0
},
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"inference_geo": "not_available",
"input_tokens": 48,
"output_tokens": 14,
"output_tokens_details": {
"thinking_tokens": 0
},
"service_tier": "standard"
}
}