Integration · Official Anthropic CLIOpenAI-compatible · one key · live model catalog
Claude Code

Run the EveryAPI gateway inside Claude Code

Claude Code can send Anthropic Messages requests through EveryAPI by using the documented base URL and an EveryAPI key. `everyapi use claude` injects those settings only into the child process it launches.

01Setup code

One base URL line points Claude Code at EveryAPI

Base URL: https://api.everyapi.ai/v1

terminal
# 1. Install the everyapi CLI (Homebrew / Go install / binary)
brew tap everyapi-ai/tap && brew install everyapi
 
# 2. Log in and link your account (device-code flow, once per machine)
everyapi auth login
 
# 3. Launch Claude Code in one step, with env vars injected automatically
everyapi use claude
 
# This command = exports ANTHROPIC_BASE_URL/AUTH_TOKEN for you
# then execs into your local claude command; settings apply to this child process only
02Steps

From zero to your first call

  1. Install Claude Code itself

    Install the claude command per Anthropic's docs (npm i -g @anthropic-ai/claude-code or brew install). EveryAPI doesn't take over Claude Code's own installation.

    https://docs.anthropic.com/en/docs/claude-code/quickstart

  2. Install the everyapi CLI and log in

    brew tap everyapi-ai/tap && brew install everyapi, then everyapi auth login — the terminal shows a QR code / opens a device-auth confirmation page in the browser, and after you confirm the CLI gets the token locally.

  3. everyapi use claude does it in one command

    The CLI injects ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN into the Claude Code child process it launches. It does not rewrite your shell profile or change later plain `claude` commands.

  4. Need to switch the upstream model?

    Claude Code requests the configured model through the gateway. Available models and routes depend on your EveryAPI account and current channel eligibility.

03Commands

Everyday slash commands in Claude Code

These are built into Claude Code itself and work unchanged through EveryAPI. Type / in the input box to see the full list — these are the ones you will actually reach for.

/helpList every available command and keyboard shortcut.
/modelSwitch models mid-session. Launched via everyapi use claude, the picker shows the live catalog of your EveryAPI key.
/statusSession health at a glance: version, model, connection.
/resumeReopen a previous conversation and continue where you left off.
/clearClear the current conversation history and start fresh.
/compactSummarize the conversation so far to free up context window.
/usageSession token usage and a local cost estimate at list price — actual billing is what the EveryAPI dashboard shows.
/configOpen settings: theme, default model, notifications.
/initGenerate a CLAUDE.md project guide so Claude knows your codebase conventions.
/memoryEdit memory files (CLAUDE.md) — what Claude remembers across sessions.
/mcpManage MCP server connections; everyapi mcp install claude adds EveryAPI's own MCP.
/permissionsManage which tools Claude may use: allow, ask, and deny rules.
/rewindRewind the conversation and/or code to an earlier checkpoint.
/exportExport the conversation as text to a file or the clipboard.
--continueLaunch flag, not a slash command: everyapi use claude -- --continue reopens the most recent conversation in this directory (same as claude -c); use /resume to pick a specific one.
04FAQ

Claude Code × EveryAPI

Do I need a separate Anthropic API key?

No. Set Claude Code's ANTHROPIC_AUTH_TOKEN directly to your EveryAPI sk-everyapi- key, and the gateway handles the upstream credentials for you.

Why doesn't ANTHROPIC_BASE_URL include /v1?

Anthropic's official protocol puts the version number in the URL path segment rather than the base URL (POST /v1/messages). Claude Code builds the path itself, so the base should just be https://api.everyapi.ai. It's OpenAI / Codex that need the /v1.

Can I use an Anthropic OAuth (Claude Pro) subscription instead of an API key?

Claude Pro subscription OAuth goes through Anthropic's desktop / mobile flow, which uses a different endpoint than an API key. A seller on the EveryAPI marketplace can attach their own Claude Pro OAuth, and it's transparent to the buyer going through EveryAPI (see the marketplace docs). The buyer doesn't need to hold any OAuth.

Are Claude Code's /allowed-tools / MCP server settings affected?

Not affected. EveryAPI only proxies LLM inference requests; MCP server / tool configuration is still managed by Claude Code itself. EveryAPI also provides its own MCP server (everyapi mcp install claude) so Claude Code can check your EveryAPI quota / balance in natural language.