Documentation Index
Fetch the complete documentation index at: https://docs.kymaapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Request body
Array of message objects with role and content.
role: "system", "user", or "assistant"
content: The message text
Sampling temperature (0-2). Lower = more focused, higher = more creative.
Maximum tokens to generate in the response.
Stream response tokens as server-sent events.
Nucleus sampling parameter (0-1).
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1700000000,
"model": "llama-3.3-70b-versatile",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 10,
"total_tokens": 30
}
}
curl https://kymaapi.com/v1/chat/completions \
-H "Authorization: Bearer ky-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.3-70b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'