{
"model": "claude-3-5-sonnet-20241022",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
curl --location --request POST 'https://api.wenwen-ai.com/v1/messages' \
--header 'x-api-key: {YOUR_API_KEY}' \
--header 'content-type: application/json' \
--data-raw '{
"model": "claude-3-5-sonnet-20241022",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}'
{
"id": "chatcmpl-0f8b6c6e-6f17-4dec-a6fd-aba277e7119b",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! I'm here to help you with your coding tasks. How can I assist you today? Whether you need help with creating new code, debugging existing code, or have any programming-related questions, I'm ready to help!"
}
],
"stop_reason": "end_turn",
"model": "claude-3.5-sonnet",
"usage": {
"input_tokens": 10,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 46
}
}