anthropic-version。{
"model": "claude-3-opus-20240229",
"messages": [
{
"role": "user",
"content": "string"
}
],
"system": "string",
"max_tokens": 1,
"temperature": 0,
"top_p": 0,
"top_k": 0,
"stream": true,
"stop_sequences": [
"string"
],
"tools": [
{
"name": "string",
"description": "string",
"input_schema": {}
}
],
"tool_choice": {
"type": "auto",
"name": "string"
},
"thinking": {
"type": "enabled",
"budget_tokens": 0
},
"metadata": {
"user_id": "string"
}
}curl --location -g --request POST 'http://api.example.com/v1/messages' \
--header 'anthropic-version;' \
--header 'x-api-key;' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "claude-3-opus-20240229",
"messages": [
{
"role": "user",
"content": "string"
}
],
"system": "string",
"max_tokens": 1,
"temperature": 0,
"top_p": 0,
"top_k": 0,
"stream": true,
"stop_sequences": [
"string"
],
"tools": [
{
"name": "string",
"description": "string",
"input_schema": {}
}
],
"tool_choice": {
"type": "auto",
"name": "string"
},
"thinking": {
"type": "enabled",
"budget_tokens": 0
},
"metadata": {
"user_id": "string"
}
}'{
"id": "string",
"type": "message",
"role": "assistant",
"content": [
{
"type": "string",
"text": "string"
}
],
"model": "string",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}