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.
1. Choose a planProtected model calls require active plan access on k3nova.com.
2. Create a keyOpen the workspace, select Open API, name the key and set an optional daily Agent credits cap.
3. Call from a serverSend the key as a Bearer token from backend code or a private command-line environment.
export K3NOVA_API_KEY="<k3nova-server-api-key>"
Connect K3Nova to Buzz
Buzz users can run K3Nova as a channel agent without sharing their Buzz private key with k3nova.com. The customer creates or chooses a Buzz agent identity inside their own Buzz community, adds that agent to the target channel, creates a K3Nova server API key, then runs the bridge from a private machine or server.
export BUZZ_RELAY_URL="https://your-buzz-relay.example"
export BUZZ_PRIVATE_KEY="<customer-buzz-agent-private-key>"
export BUZZ_CHANNEL_ID="your-channel-id"
export K3NOVA_API_KEY="$K3NOVA_API_KEY"
npm run buzz:bridge
The bridge listens for @K3Nova in the selected channel, sends the thread context to /api/v1/chat/completions, and posts the answer back to the same Buzz thread. The machine-readable setup manifest is available at /api/integrations/buzz/manifest.
Private by default: keep BUZZ_PRIVATE_KEY in the customer's own environment. K3Nova only needs the server API key used by the bridge.
List available models
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"
Create a chat completion
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."
}
]
}'
JavaScript fetch example
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);
Chat parameters
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. |
Errors and limits
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. |
Security note: rotate a key immediately if it appears in logs, screenshots, browser code, public commits or a shared chat.