Browse this guide
Connect your AI development tools
Pick a guide, copy the complete setup block, and paste it to get started. Claude Code, Codex, VS Code, and MiniMax-M3 all use your Ani Router key.
Terminal
Claude Code CLI
Connect through the Anthropic Messages protocol for chat, tool use, and streaming.
Read guideTerminal
Codex CLI
Connect to Ani Router through the native Responses API with streaming, reasoning items, and tool calls.
Read guideEditor
VS Code
Add Claude or GPT models through the Custom Endpoint in VS Code Chat.
Read guideAni Router
MiniMax M3
Use only your Ani Router key to call MiniMax-M3 from Claude Code or an OpenAI-compatible client.
Read guideBefore you start
There are only three steps: create a key, choose a client, and copy the full setup block. Replace YOUR_KEY with your real key and leave everything else unchanged.
Protect your key
Available
Claude Code CLI
There are only two steps: replace YOUR_KEY with your Ani Router key, then paste the complete block into a terminal. No Claude subscription is required, and do not append /v1/messages to the base URL.
macOS / Linux / WSL: copy everything
# 1) Install Claude Code (macOS / Linux / WSL)
curl -fsSL https://claude.ai/install.sh | bash
# 2) Add the Ani Router configuration
export ANTHROPIC_BASE_URL="https://demo.octopusrotuer.com/api/proxy"
export ANTHROPIC_AUTH_TOKEN="sk-anirouter-YOUR_KEY"
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
# 3) Launch
claude --version
claude --model claude-sonnet-4-6Windows: copy everything
# 1) Install Claude Code (Windows PowerShell)
irm https://claude.ai/install.ps1 | iex
# 2) Add the Ani Router configuration
$env:ANTHROPIC_BASE_URL="https://demo.octopusrotuer.com/api/proxy"
$env:ANTHROPIC_AUTH_TOKEN="sk-anirouter-YOUR_KEY"
$env:CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"
$env:CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"
# 3) Launch
claude --version
claude --model claude-sonnet-4-6What does success look like?
Optional: save it permanently
Merge these fields into your user-level config so future sessions only need the claude command. If the file already exists, merge instead of overwriting it, and never put the key in project-level config.
{
"model": "claude-sonnet-4-6",
"env": {
"ANTHROPIC_BASE_URL": "https://demo.octopusrotuer.com/api/proxy",
"ANTHROPIC_AUTH_TOKEN": "sk-anirouter-YOUR_KEY",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6"
}
}Why pin the model and compatibility mode?
Read more: Claude Code installation · LLM gateway
Ani Router available
Codex CLI
Codex supports custom model providers. Save the configuration once, add your Ani Router key, and use GPT-5.4 through the native Responses API.
1. Save the Codex configuration
Merge this into your user-level configuration. If the file already exists, add or replace only these fields and keep your other settings.
model = "gpt-5.4"
model_provider = "anirouter"
[model_providers.anirouter]
name = "Ani Router"
base_url = "https://demo.octopusrotuer.com/api/proxy"
env_key = "ANIROUTER_API_KEY"
wire_api = "responses"2. Install, add the key, and launch
# 1) Install Codex (macOS / Linux / WSL)
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# 2) Add your Ani Router API key
export ANIROUTER_API_KEY="sk-anirouter-YOUR_KEY"
# 3) Launch
codex --version
codex# 1) Install Codex (Windows PowerShell)
irm https://chatgpt.com/codex/install.ps1 | iex
# 2) Add your Ani Router API key
$env:ANIROUTER_API_KEY="sk-anirouter-YOUR_KEY"
# 3) Launch
codex --version
codex3. Verify the connection
Official Codex custom provider documentation · Responses API streaming events
Available
VS Code
VS Code 1.122+ includes Custom Endpoint support. Paste the configuration once to add both Claude Sonnet 4.6 and GPT-5.4; personal BYOK use does not require a GitHub sign-in or Copilot subscription.
- 1Press Cmd/Ctrl + Shift + P and run Chat: Manage Language Models.
- 2Choose Add Models → Custom Endpoint and let VS Code open chatLanguageModels.json.
- 3Replace the file contents with the complete block below, change only YOUR_KEY, and save.
- 4Return to the Chat model picker and select Claude Sonnet 4.6 or GPT-5.4. If they do not appear, run Developer: Reload Window.
[
{
"name": "Ani Router",
"vendor": "customendpoint",
"apiKey": "sk-anirouter-YOUR_KEY",
"apiType": "messages",
"models": [
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
"url": "https://demo.octopusrotuer.com/api/proxy/v1/messages",
"toolCalling": true,
"streaming": true,
"maxInputTokens": 180000,
"maxOutputTokens": 20000
},
{
"id": "gpt-5.4",
"name": "GPT-5.4",
"url": "https://demo.octopusrotuer.com/api/proxy/chat/completions",
"apiType": "chat-completions",
"toolCalling": true,
"streaming": true,
"maxInputTokens": 240000,
"maxOutputTokens": 32000
}
]
}
]Verify the connection
Key and feature notes
VS Code Custom Endpoint documentation · VS Code 1.122 release notes
Ani Router available
MiniMax M3
MiniMax-M3 provides a one-million-token context window. Through Ani Router, you do not need a MiniMax account or key. One Ani Router key works with Claude Code and OpenAI-compatible clients.
Use your Ani Router key
1. Create an Ani Router key
Create a key in the dashboard and make sure its team can access MiniMax-M3. Replace every YOUR_KEY below with this Ani Router key.
Open Ani Router API keys2. Verify with one command
Replace YOUR_KEY with your Ani Router key and paste the whole block. A content array containing text confirms the key, team access, and MiniMax-M3 route are working.
# Call MiniMax-M3 through Ani Router
curl "https://demo.octopusrotuer.com/api/proxy/v1/messages" \
-H "Authorization: Bearer sk-anirouter-YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"max_tokens": 1000,
"messages": [
{"role": "user", "content": "Reply only with: connected"}
]
}'3. Use MiniMax-M3 in Claude Code
Merge these fields into your user-level configuration, replace only YOUR_KEY, and fully restart Claude Code. Keep the base URL at the Ani Router gateway root; do not append /v1/messages.
{
"env": {
"ANTHROPIC_BASE_URL": "https://demo.octopusrotuer.com/api/proxy",
"ANTHROPIC_AUTH_TOKEN": "sk-anirouter-YOUR_KEY",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
"ANTHROPIC_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3"
}
}Verify Claude Code
Existing OpenAI SDK: use Chat Completions
For an existing OpenAI SDK integration, set the base URL to the Ani Router gateway root, use an Ani Router key, and select MiniMax-M3. Use the curl command below to verify the Chat Completions path first.
# Call through the Ani Router OpenAI-compatible endpoint
curl "https://demo.octopusrotuer.com/api/proxy/chat/completions" \
-H "Authorization: Bearer sk-anirouter-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"messages": [
{"role": "user", "content": "Reply only with: connected"}
]
}'MiniMax M3 invocation guide · MiniMax OpenAI protocol reference
Verify setup
Verify the key, model, and endpoint with a minimal request before opening the client. This separates gateway issues from client configuration issues.
curl "https://demo.octopusrotuer.com/api/proxy/v1/messages" \
-H "Authorization: Bearer sk-anirouter-YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 32,
"messages": [{"role": "user", "content": "Reply only with: connected"}]
}'curl "https://demo.octopusrotuer.com/api/proxy/responses" \
-H "Authorization: Bearer sk-anirouter-YOUR_KEY" \
-H "content-type: application/json" \
-d '{
"model": "gpt-5.4",
"input": "Reply only with: connected"
}'- Claude Code: run
/statusand check the gateway and authentication source. - VS Code: select the new model in Chat and send a short message.
- Codex: run
/statusand confirm the provider is anirouter and the model is gpt-5.4. - MiniMax: run the Anthropic curl in its guide first, then confirm the client model is
MiniMax-M3.
Troubleshooting
401 / Unauthorized
Confirm the key starts with sk-anirouter- and is active. Claude uses ANTHROPIC_AUTH_TOKEN, Codex uses ANIROUTER_API_KEY, and VS Code needs the real value in apiKey.
Model not found
For Claude, use a Claude ID from the model list. For Codex, confirm gpt-5.4 is active, its API Format is Responses, and the key team can access it.
Claude 400 / Extra inputs are not permitted
Confirm CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 is set, then fully exit and restart Claude Code.
Model missing in VS Code
Upgrade to VS Code 1.122+, confirm chatLanguageModels.json is a top-level array, then run Developer: Reload Window. Enterprise policy may also disable BYOK.
Codex 404 / provider error
Use only the Ani Router gateway root as base_url; do not append /responses manually. Make sure the deployed gateway includes the Responses endpoint, set ANIROUTER_API_KEY, and fully restart Codex.
MiniMax-M3 is temporarily unavailable
Check only the Ani Router key: make sure it is active, its team can access MiniMax-M3, and its limit is not exhausted. Do not enter a MiniMax provider key. Retry later or contact an administrator if the upstream is busy or concurrency-limited.
Next step
Create your first API key
Create separate keys for devices or projects, set limits, then copy them into your local config.
Open API keys