{
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "你好克劳德"
}
],
"stream": true
}curl --location -g --request POST 'http://api.example.com/v1/messages' \
--header 'x-api-key: sk-xxx' \
--header 'anthropic-version: 2023-06-01' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "你好克劳德"
}
],
"stream": true
}'{
"model": "claude-sonnet-4-5-20250929",
"id": "msg_01DJFovBUFqxZGnTpWePpYs6",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "你好!很高兴见到你。有什么我可以帮助你的吗?"
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 14,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 0
},
"output_tokens": 29,
"service_tier": "standard"
}
}