LLM Chat API
Generate text and chat with our proprietary AI models that deliver ChatGPT-level performance at a fraction of the cost.
The Sonna Chat API is fully compatible with the OpenAI Chat Completion format, making it a drop-in replacement for your existing workflows.
Quick Start
Endpoint
POST https://sonna.web.id/api/v1/chat/completions
Authentication
curl -X POST https://sonna.web.id/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sonna-chat-v1",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'
Request Parameters
Response
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I am Sonna AI. How can I assist you today?"
},
"finish_reason": "stop"
}]
}
Any questions? Email us at
hello@sonna.ai