Docs

Integrations

Kunavo speaks two wire formats every serious client already supports, so integration is a base URL and a key rather than an SDK. Here is the per-client setup.

本文档为英文版。如果你需要中文版的接入指引,看:中文指南 — 在中国稳定调用 Claude / GPT / Gemini

Kunavo is an independent, OpenAI-compatible AI API gateway: one API key and one pay-as-you-go balance reach Claude, Gemini, GPT and image, video and audio models, with no per-provider account required. There is no Kunavo SDK to install: any client with a base-URL field works. Point an OpenAI-compatible client at https://api.kunavo.com/v1, or an Anthropic-style client at https://api.kunavo.com, and pass a Kunavo key.

The two conventions disagree about /v1 on purpose: the OpenAI SDK wants it in base_url, and the Anthropic clients append /v1/messages themselves so they want the origin alone. Getting this backwards is the most common setup failure — see the ANTHROPIC_BASE_URL page. Each page below states which form that client wants, and the date its configuration was last checked against the client's own documentation.

Coding agents, editors and CLIs

Every one of these has a field for a custom provider, and every one of them treats "OpenAI-compatible" or "Anthropic" as a protocol rather than a vendor — which is why a Claude model id typed into an OpenAI-compatible provider is the intended combination, not a workaround.

Claude CodeAnthropic

Two environment variables — ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN — move Claude Code onto pay-as-you-go without changing the install.

Kilo CodeOpenAI

Providers → Custom provider → OpenAI Compatible, base URL with /v1, and the Claude model id typed in — Kilo Code never learns which vendor is behind it.

Roo CodeOpenAI

Pick the OpenAI Compatible provider, paste the base URL and key, and set the model's context window and max output so Roo Code's own budgeting is right.

ClineOpenAI

Cline's OpenAI Compatible provider takes a base URL, a key and a model id, plus the per-model prices it uses to show a running session cost.

Codex CLIOpenAI

A [model_providers.kunavo] block in ~/.codex/config.toml with env_key, so the key stays in the environment and never in the config file.

opencodeOpenAI

One provider block in opencode.json — @ai-sdk/openai-compatible for chat completions, @ai-sdk/openai when you want the /v1/responses surface.

Claude Code RouterAnthropic

CCR is a desktop app now, not a config.json: add Kunavo as a custom API endpoint, then let its routing rules send each request class to a different model.

ZedOpenAI

A language_models.openai_compatible block in settings.json declares the endpoint and its models; the key goes in the Agent Panel UI, never in the file.

ContinueOpenAI

Continue's `openai` provider names a protocol, not a vendor: give it an apiBase and each model — chat, edit, autocomplete — is one entry in config.yaml.

AiderOpenAI

OPENAI_API_BASE plus OPENAI_API_KEY, then `aider --model openai/<id>` — the prefix is what routes the id to your endpoint instead of Aider's provider table.

CC SwitchAnthropic

Add Kunavo as a Custom Configuration: service root as the endpoint, ANTHROPIC_AUTH_TOKEN as the auth field, Anthropic Messages native — so the Claude Code side needs no local routing.

Claude Agent SDKAnthropic

No base_url option exists — the SDK spawns the Claude Code CLI and passes your whole environment through, so ANTHROPIC_BASE_URL routes it, or ClaudeAgentOptions(env=...) does it per client.

Chat clients and self-hosted UIs

Desktop apps and self-hosted front-ends, where the draw is one key and one balance behind a single model picker rather than an account per vendor.

Anything else

A client not listed here almost certainly still works. The test is whether it lets you change the endpoint: if it has a "base URL", "custom endpoint" or "OpenAI-compatible provider" setting, Kunavo drops in. Start with the quickstart, then chat completions or the Messages API depending on which format the client speaks. Model ids come from GET /v1/models, which is also what populates the model dropdown in clients that have one — and the full machine-readable contract is the OpenAPI 3.1 description, which most client generators and agent frameworks can consume directly.