DEVELOPER DOCS

Integrate in five minutes

OpenAI, Anthropic Messages, Responses and Gemini compatible. Change only the API key, base URL and model name.

01

Send your first request

Create an API key in the dashboard, then run:

Shell
curl https://api.kimiseek.app/v1/chat/completions \
  -H "Authorization: Bearer $KIMISEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [{"role":"user","content":"Hello"}],
    "stream": true
  }'
02

Authentication

Use a Bearer token for every request. Keys start with ks- and can be copied from the dashboard key list.

Security

Never expose an API key in browser code or a public repository.

03

Use the official OpenAI SDK

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.KIMISEEK_API_KEY,
  baseURL: "https://api.kimiseek.app/v1",
});

const response = await client.chat.completions.create({
  model: "qwen3.7-plus",
  messages: [{ role: "user", content: "Analyze this code" }],
});

Change only model to switch providers. Every request routes through Alibaba Cloud Model Studio.

04

Claude Code and Codex

Claude Code uses the Anthropic Messages compatibility endpoint.

Shell · Claude Code
export ANTHROPIC_BASE_URL="https://api.kimiseek.app"
export ANTHROPIC_AUTH_TOKEN="ks-your-key"
export ANTHROPIC_MODEL="deepseek-v4-pro"

claude

Codex uses the Responses API and reads KIMISEEK_API_KEY from the environment.

TOML · Codex
model = "qwen3.7-max"
model_provider = "kimiseek"

[model_providers.kimiseek]
name = "KimiSeek"
base_url = "https://api.kimiseek.app/v1"
env_key = "KIMISEEK_API_KEY"
wire_api = "responses"
Gemini protocol

generateContent and streamGenerateContent are supported; pass the key with x-goog-api-key.

05

Streaming

Set stream: true for standard SSE. Usage is read when the stream ends.

Error codes

400Invalid request or model name401Invalid API key or exhausted quota402Insufficient CNY balance503Model channel unavailable

CNY billing

Input, cached input and output tokens are multiplied by their rates and settled entirely in CNY.

Documentation | KimiSeek