K3Nova

Open API

Use Kimi K3 Open API from your server

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.

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="k3_live_your_key_here"

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.

FieldUse
modelUse one of the IDs returned by /api/v1/models.
messagesSend recent user and assistant turns.
streamSet to false for JSON or true for event streams.
temperatureThe current model service accepts 1. Other values return a clear parameter error instead of a provider 502.
top_pThe 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_tokensLegacy token cap. It maps to the model's active max-token field.
max_completion_tokensCompletion token cap for models that use the newer field.
presence_penaltyPresence penalty, clamped from -2 to 2.
frequency_penaltyFrequency penalty, clamped from -2 to 2.
stopA stop string or up to four stop strings.
nNumber of choices requested from the model service.
userYour 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.

StatusMeaningNext step
401The Bearer token is missing, invalid or revoked.Create a new key and update the private environment variable.
402The account does not have active plan access for protected calls.Review the pricing page and activate the plan before retrying.
429The key or account has reached a rate or daily allowance limit.Wait for the reset window or lower request volume.
503API 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.