Kode supports 25+ AI providers and ships with its own gateway atDocumentation Index
Fetch the complete documentation index at: https://docs.trykode.xyz/llms.txt
Use this file to discover all available pages before exploring further.
api.trykode.xyz for unified, zero-friction access to the best models across OpenAI, Anthropic, DeepSeek, Google, and OpenRouter. You configure your provider once — in kode.json or via environment variables — and Kode handles routing, streaming, and key management automatically.
The Kode Gateway
The Kode Gateway is the default provider. It is a routing layer that sits in front of multiple upstream providers and exposes a single OpenAI-compatible endpoint. You authenticate with one key (KODE_LLM_API_KEY) and the gateway handles dispatch to the right upstream model.
The gateway is pre-configured in every kode init output:
.kode/kode.json
kode.json. You do not need individual provider keys when using the gateway.
Gateway tiers
| Tier | How to activate | Rate limit | Models |
|---|---|---|---|
| Lite (free) | No key required — use "public" | 20 requests / day / IP | deepseek-v4-flash, nvidia/nemotron-3-nano-30b-a3b:free |
| Pro | Set KODE_PRO_API_KEY | Unlimited | deepseek-v4-pro, deepseek-r1, and all Lite models |
The Lite tier is rate-limited at the gateway level. When you exceed 20
requests per day, the gateway returns a rate limit error explaining that your
daily Lite quota has been reached. Set
KODE_PRO_API_KEY or upgrade at
trykode.xyz/pricing to remove the limit.Using a direct provider
If you prefer to call a provider’s API directly — bypassing the Kode Gateway — setmodel in kode.json to the provider/model string for your chosen model and export the corresponding API key environment variable.
Set the model in kode.json
Edit
.kode/kode.json and set the model field to the provider/model
string. For example, to use Claude Sonnet 4.6 directly via Anthropic:.kode/kode.json
Supported model strings
Use these strings in themodel and small_model fields of your kode.json:
| Provider | Model string | Notes |
|---|---|---|
| Anthropic | anthropic/claude-sonnet-4-6 | Default — recommended for most tasks |
| Anthropic | anthropic/claude-haiku-4-5 | Fast and cheap; default small_model |
| OpenAI | openai/gpt-4o | Powerful, widely supported |
| OpenAI | openai/o3-mini | Fast reasoning model |
google/gemini-2.0-flash | Fast and cost-effective | |
| Groq | groq/llama-3.3-70b-versatile | Very fast inference via Groq hardware |
| DeepSeek | deepseek/deepseek-v4-flash | Fast reasoning, strong coding |
| DeepSeek | deepseek/deepseek-r1 | Deep chain-of-thought reasoning |
Provider management CLI
The TypeScript CLI layer exposesproviders and models subcommands for managing credentials and browsing available models. These commands are forwarded automatically from the kode binary:
Credentials
Models
Credentials stored via
kode providers login are saved to
~/.kode/auth.json. Environment variables (e.g. ANTHROPIC_API_KEY) are
detected automatically by kode providers list and shown alongside stored
credentials. Environment variables always take precedence over stored
credentials at runtime.Pointing Kode at a local model
You can run Kode against any OpenAI-compatible local inference server — Ollama, LM Studio, llama.cpp, vLLM, and others all work. Override the endpoint and model via environment variables:Related
kode.json reference
Full reference for all model, engine, and permission settings.
Environment Variables
Complete list of environment variables including all provider key names.