Kimi K3 API

OpenAI-compatible Kimi K3 access for apps, agents, and automation. Use chat completions, streaming, tool calling, JSON outputs, image input, user API keys, and dollar-based billing.

OpenAI compatibleKimi K3 modelStreaming SSETool callingJSON response_formatImage inputUser API keysDollar billing

API usage

Start with this Kimi K3 API request

Use your user API key as a Bearer token. The primary endpoint is OpenAI-compatible and accepts the model id kimi-k3.

Base URL

https://api.viddiai.com/v1

Chat Completions

POST /v1/chat/completions

Model

kimi-k3

API key

Create it in Settings > Security

Minimal curl example

curl https://api.viddiai.com/v1/chat/completions \
  -H "Authorization: Bearer wk_your_user_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "messages": [
      {"role": "user", "content": "Write a short product launch email."}
    ]
  }'

OpenAI SDK example

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.KIMI_API_KEY,
  baseURL: "https://api.viddiai.com/v1"
});

const completion = await client.chat.completions.create({
  model: "kimi-k3",
  messages: [
    { role: "user", content: "Explain Kimi K3 API billing in one paragraph." }
  ]
});

console.log(completion.choices[0]?.message?.content);

Token pricing

Kimi K3 API pricing is built for high-volume agent work

Pay from your API balance only when tokens are used. Kimi K3 is priced at roughly 1/2.2 of Fable 5 while targeting performance closer to Fable 5 for coding, agent, and reasoning-heavy workflows.

Closer to Fable 5 performance, priced for everyday usage

Use Kimi K3 for code generation, tool-calling agents, JSON extraction, long-form drafting, and multimodal prompts when you want premium-model quality without premium-model token cost.

Usage

Uncached input

Kimi K3

$4.50 / 1M tokens

vs Fable 5

About 1/2.2 of Fable 5

Usage

Cached input

Kimi K3

$0.45 / 1M tokens

vs Fable 5

About 1/2.2 of Fable 5 cached input

Usage

Output

Kimi K3

$22.50 / 1M tokens

vs Fable 5

About 1/2.2 of Fable 5

Fable 5 reference pricing: $10 input and $50 output per 1M tokens.
API recharge is dollar balance. There is no credits conversion.

What is the Kimi K3 API

A production-ready Kimi K3 API relay with accounts, recharge, usage tracking, and OpenAI-compatible requests

The Kimi K3 API gives developers a simple gateway for Kimi K3. Instead of sharing one provider key, every user can create their own API key, recharge a separate API dollar balance, and call an OpenAI-compatible endpoint.

API balance is separate from website generation credits. Chat requests are billed from the API balance in dollars, so subscriptions, yearly credits, one-time web credits, and API usage do not get mixed together.

How to use the Kimi K3 API

Create an account, add API balance, generate a key, then call the OpenAI-compatible endpoint from your own app.

The fastest setup is: recharge balance first, create a key second, then test with curl or the OpenAI SDK.

Step 1

Recharge API balance in USD

Open Pricing, choose the API tab, and add API balance from $9 to $200. The balance is stored separately from website generation credits.

Step 2

Generate your user API key

Go to Settings > Security, create a Kimi K3 API key, and copy it immediately. The full key is shown only once. Use it as a Bearer token in every request.

Step 3

Call the OpenAI-compatible endpoint

Send requests to https://api.viddiai.com/v1/chat/completions with model kimi-k3. The alternate path https://api.viddiai.com/api/v1/chat/completions is also supported.

Step 4

Track usage and balance

Open Settings > Profile to see current API balance, total recharged, total used, request count, and recent API activity. Settings > Security also shows API keys and recent balance events.

API recharge

Add Kimi K3 API balance in USD

Recharge from $9 to $200 and use the balance only for Kimi K3 API calls. Website generation credits and API spending stay separate.

API balance

$9

Use until this API balance is spent.

API balance

$20

Use until this API balance is spent.

API balance

$50

Use until this API balance is spent.

API balance

$100

Use until this API balance is spent.

API balance

$200

Use until this API balance is spent.

Kimi K3 API features

Everything needed for a basic API relay product: keys, balance, billing, compatibility, streaming, and account visibility.

The Kimi K3 API gateway is designed for developers who need OpenAI-style requests with per-user access control and transparent dollar billing.

01

OpenAI-compatible Chat Completions

Use /v1/chat/completions with the same request shape developers already know from OpenAI-compatible clients.

02

Realtime streaming

Streaming responses are forwarded as SSE chunks as they arrive. The relay captures the final usage chunk and charges after the stream finishes.

03

Tool calling support

Function-style tool definitions and tool call responses are supported, making the API usable for agents, workflows, and structured app logic.

04

Structured JSON outputs

Use response_format to request JSON object responses for extraction, classification, routing, and application data generation.

05

Image input compatibility

Base64 data image input is supported. Public image URLs are fetched by the gateway and converted before being sent upstream.

06

Separate API dollar balance

API usage is charged from API balance, not website credits. This keeps subscription credits and API spending cleanly separated.

Kimi K3 API examples

Use these request patterns for the most common Kimi K3 API jobs.

Streaming with usage

Set stream to true. The gateway requests stream_options.include_usage from upstream so the final usage chunk can be used for exact billing.

Endpoint: POST /v1/chat/completions
Request option: stream: true
Billing: charged after final usage is received

Streaming with usage

const stream = await client.chat.completions.create({
  model: "kimi-k3",
  stream: true,
  stream_options: { include_usage: true },
  messages: [{ role: "user", content: "Count from 1 to 5." }]
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

Tool calling

Pass OpenAI-style tools and let Kimi K3 return tool_calls when it decides an external function should be used.

Use tools with function schemas
Read choices[0].message.tool_calls
Send the tool result back in the next turn

Tool calling

const completion = await client.chat.completions.create({
  model: "kimi-k3",
  messages: [{ role: "user", content: "What is the weather in Tokyo?" }],
  tools: [{
    type: "function",
    function: {
      name: "get_weather",
      description: "Get weather for a city",
      parameters: {
        type: "object",
        properties: { city: { type: "string" } },
        required: ["city"]
      }
    }
  }]
});

JSON response_format

Use response_format when your application needs parseable JSON instead of prose.

Best for extraction and classification
Use response_format: { type: "json_object" }
Validate the returned JSON in your application

JSON response_format

const completion = await client.chat.completions.create({
  model: "kimi-k3",
  response_format: { type: "json_object" },
  messages: [{
    role: "user",
    content: "Return JSON with keys ok and summary."
  }]
});

Image input

Send OpenAI-style image_url content parts. Base64 data URLs are supported directly. Public image URLs are fetched and converted by the gateway.

Use content parts with type image_url
Base64 data URLs work directly
Public image URLs are limited by the gateway fetch size

Image input

const completion = await client.chat.completions.create({
  model: "kimi-k3",
  messages: [{
    role: "user",
    content: [
      { type: "text", text: "Describe this image in one sentence." },
      { type: "image_url", image_url: { url: "https://example.com/image.jpg" } }
    ]
  }]
});

Billing and account rules

API recharge is a simple dollar balance. Users recharge, call the API, and pay only for actual Kimi K3 usage.

01

Recharge range

API balance packages currently start at $9 and go up to $200. Users can recharge from the API tab on the Pricing page.

02

Input token rate

Kimi K3 input billing is $4.50 per 1M uncached input tokens.

03

Cached input rate

Cached input billing is $0.45 per 1M cached input tokens.

04

Output token rate

Output billing is $22.50 per 1M output tokens.

05

Exact usage calculation

The gateway reads upstream usage, separates cached and uncached prompt tokens when available, adds output tokens, calculates the exact dollar cost, and writes one usage transaction.

06

Balance visibility

Users can see current balance, total recharged, total used, API request count, and recent transactions in Settings > Profile.

Kimi K3 API FAQ

Everything developers need to know before using the Kimi K3 API gateway.

What is the Kimi K3 API endpoint?

Use https://api.viddiai.com/v1/chat/completions. The alternate path https://api.viddiai.com/api/v1/chat/completions is also supported.

Which model id should I use?

Use kimi-k3. The gateway also accepts a few common aliases and normalizes them to kimi-k3 upstream.

Where do users create API keys?

Users create API keys in Settings > Security. The full key is shown only once, and only a hash is stored.

How does API recharge work?

Users recharge a separate API dollar balance from the API tab on Pricing. This balance is not the same as website generation credits.

How is streaming billed?

Streaming responses are forwarded in realtime. After the final usage chunk arrives, the gateway calculates the exact cost and records the usage transaction asynchronously.

Does the API support tool calling?

Yes. OpenAI-style tools are supported and Kimi K3 can return tool_calls in the assistant message.

Does the API support response_format?

Yes. response_format with JSON object output has been tested and is supported for structured responses.

Does image input work?

Yes. Base64 data image input works directly. Public image URLs are fetched and converted by the gateway before calling upstream.

Build with Kimi K3

Use Kimi K3 from your app with a user API key and exact dollar billing

Recharge API balance, create a key, and call the OpenAI-compatible Kimi K3 endpoint from your backend, agent, workflow, or product.