š New Models Available: grok-4 now live!
ā Explore New Features
{
"model": "cometapi-3-7-sonnet",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
curl --location --request POST 'https://api.cometapi.com/v1/messages' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "cometapi-3-7-sonnet",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}'
{
"id": "chatcmpl-a1568ee22c7a4f31848f3dc16c2f3",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! It's nice to meet you. I'm Claude, an AI assistant. How can I help you today? Feel free to ask me anything you'd like - I'm happy to assist with a wide range of topics and tasks."
}
],
"model": "claude-3-5-sonnet-20240620",
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 3,
"output_tokens": 52,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}