Skip to content
Getting startedKimi API

Kimi API

Three generation surfaces plus a free token count, four exact model IDs, streaming, and transparent billing.

Kimi uses the same universal gd-… key, Guard API address, and shared USD balance as Claude. No separate Kimi key is required.

Connection

ParameterValue
Base URLhttps://api.guardrelay.ai/v1
AuthorizationAuthorization: Bearer gd-…
Model catalogGET /v1/models
GenerationPOST /v1/chat/completions, POST /v1/messages, POST /v1/responses
Token count (free)POST /v1/messages/count_tokens
File uploadPOST /v1/files
Web searchPOST /v1/kimi/search
Page fetchPOST /v1/kimi/fetch

Four Kimi models

ModelAPI IDContext window
Kimi K3k31,048,576 tokens
Kimi K3-256Kk3-256k262,144 tokens
Kimi K2.7 Codekimi-for-coding262,144 tokens
Kimi K2.7 Code HighSpeedkimi-for-coding-highspeed262,144 tokens

Kimi server prompt

Kimi has an independent server-prompt entitlement and option; changes do not affect Claude, Composer or Grok. A prompt applies only with an active entitlement, enabled option and suitable text. Otherwise the request proceeds without it.

Minimal request

bash
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $GUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "k3",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 128
  }'

SDKs and reference

Python · OpenAI SDKReady example and Base URLNode.js · OpenAI SDKReady example and Base URLChat CompletionsRequest fields and exampleFiles, search, and pagesUploading a document, input_file, search and fetchStreaming and usageWhy usage may appear twicePrices and reserveLive rates and hold formulaErrorsCodes and safe retry guidance

Documentation sections

On this page