Quick start
The API key is shown once after creation. Copy it immediately, store it in server-side configuration, and never place it in client-side JavaScript, mobile app bundles or public repositories.
export K3NOVA_API_KEY="k3_live_your_key_here"
Open API
Create a server API key in the Open API panel, store it in a private environment variable, then call the model endpoints with the Authorization: Bearer header.
The API key is shown once after creation. Copy it immediately, store it in server-side configuration, and never place it in client-side JavaScript, mobile app bundles or public repositories.
export K3NOVA_API_KEY="k3_live_your_key_here"
Use the models endpoint to confirm that your key works before sending a chat request.
curl https://k3nova.com/api/v1/models \
-H "Authorization: Bearer $K3NOVA_API_KEY"
For a simple JSON response, set stream to false. Streaming responses are also supported for server clients that can read event streams.
curl https://k3nova.com/api/v1/chat/completions \
-H "Authorization: Bearer $K3NOVA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3",
"stream": false,
"temperature": 1,
"top_p": 1,
"max_completion_tokens": 512,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": ["END"],
"n": 1,
"user": "server-user-123",
"messages": [
{
"role": "user",
"content": "Write a concise launch checklist for a new API integration."
}
]
}'
This example is for Node.js or another private server runtime. Keep K3NOVA_API_KEY outside browser code.
const response = await fetch("https://k3nova.com/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.K3NOVA_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "kimi-k3",
stream: false,
temperature: 1,
top_p: 1,
max_completion_tokens: 512,
messages: [
{ role: "user", content: "Summarize this support ticket in three bullets." }
]
})
});
if (!response.ok) {
throw new Error(await response.text());
}
const data = await response.json();
console.log(data.choices?.[0]?.message?.content || data);
The chat endpoint accepts the common OpenAI-style controls below. Unknown fields are ignored by the gateway.
| Field | Use |
|---|---|
| model | Use one of the IDs returned by /api/v1/models. |
| messages | Send recent user and assistant turns. |
| stream | Set to false for JSON or true for event streams. |
| temperature | The current model service accepts 1. Other values return a clear parameter error instead of a provider 502. |
| top_p | The neutral value 1 is accepted for client compatibility. Non-neutral values return a clear parameter error because the current model service rejects this field. |
| max_tokens | Legacy token cap. It maps to the model's active max-token field. |
| max_completion_tokens | Completion token cap for models that use the newer field. |
| presence_penalty | Presence penalty, clamped from -2 to 2. |
| frequency_penalty | Frequency penalty, clamped from -2 to 2. |
| stop | A stop string or up to four stop strings. |
| n | Number of choices requested from the model service. |
| user | Your private user identifier for provider-side abuse monitoring. |
Each key has its own daily Agent credits cap. API calls also use the account plan allowance, so a request can stop when the key, plan, rate gate, provider configuration or remaining allowance is not ready.
| Status | Meaning | Next step |
|---|---|---|
| 401 | The Bearer token is missing, invalid or revoked. | Create a new key and update the private environment variable. |
| 402 | The account does not have active plan access for protected calls. | Review the pricing page and activate the plan before retrying. |
| 429 | The key or account has reached a rate or daily allowance limit. | Wait for the reset window or lower request volume. |
| 503 | API access or the model service is not configured for the current environment. | Check runtime status before sending production traffic. |