Set and go
Set ANTHROPIC_BASE_URL to https://api.unioapi.com and ANTHROPIC_AUTH_TOKEN to your UnioAPI key, start claude and chat — no plugin to install.
Claude Code
Claude Code talks to UnioAPI over Anthropic's official Messages API — no plugin or extra program needed. Set the base URL and your key, code with Claude in the terminal, and look up every call afterwards.
export ANTHROPIC_BASE_URL=https://api.unioapi.com
export ANTHROPIC_AUTH_TOKEN="<UNIO_API_KEY>"
# Optional: pick a model; IDs are on the model pages
export ANTHROPIC_MODEL=claude-sonnet-5-5
claudeDon't add /v1 to the base URL. On Windows, set the variables with setx and open a new terminal.
Set ANTHROPIC_BASE_URL to https://api.unioapi.com and ANTHROPIC_AUTH_TOKEN to your UnioAPI key, start claude and chat — no plugin to install.
Claude Code's requests go to POST /v1/messages; tool use, streaming events and anthropic-beta headers all work in the official format.
Claude Code resends its system prompt and tool definitions at every step. Once those stable prefixes hit the prompt cache they're billed at cache-read prices, so long sessions are billed noticeably less.
With Fast turned on in Claude Code, requests carry speed: "fast". Opus 5.5 offers Fast as a generally available tier; models without Fast return 400 and nothing is executed or charged.
The same key works in Codex, Cursor and other tools — or create a dedicated key for Claude Code with its own spend cap and expiry.
Every model call has its own request log with model, tokens, latency and charge, so you can see where a coding task's usage went.
A dedicated key for Claude Code with a spend cap keeps long tasks within budget.
Read the docsInstall Claude Code with npm, then set the base URL and key; on Windows use setx and open a new terminal.
Read the docsSet ANTHROPIC_MODEL and related variables to a Claude model from the model pages; an unlisted default model returns 404.
Read the docsIf you move between several setups, manage them with CC Switch instead of editing environment variables by hand.
Read the docsEvery model call Claude Code makes is settled from its response usage: input, output, cache reads and cache writes are priced separately, and Fast has its own prices. The model pages list current prices.
No. Claude Code appends /v1/messages itself; adding /v1 doubles the path and the request returns 404.
Create an API key, set two environment variables and start claude.