Developer guidesClient integrations
Browse this guide
Panda Router docs

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 Panda Router key.

Before 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

Never commit API keys to Git. Keep personal config in your home directory, and use ignored local files for project-only secrets.

Available

Claude Code CLI

There are only two steps: replace YOUR_KEY with your Panda 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

Terminal · macOS / Linux / WSL
# 1) Install Claude Code (macOS / Linux / WSL)
curl -fsSL https://claude.ai/install.sh | bash

# 2) Add the Panda Router configuration
export ANTHROPIC_BASE_URL="https://demo.octopusrotuer.com/api/proxy"
export ANTHROPIC_AUTH_TOKEN="sk-panda-router-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-6

Windows: copy everything

PowerShell · Windows
# 1) Install Claude Code (Windows PowerShell)
irm https://claude.ai/install.ps1 | iex

# 2) Add the Panda Router configuration
$env:ANTHROPIC_BASE_URL="https://demo.octopusrotuer.com/api/proxy"
$env:ANTHROPIC_AUTH_TOKEN="sk-panda-router-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-6

What does success look like?

In Claude Code, run /status. It should show the Panda Router base URL, ANTHROPIC_AUTH_TOKEN, and claude-sonnet-4-6. Then ask it to reply only “connected”; a normal reply confirms the setup.

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.

~/.claude/settings.json · Windows: %USERPROFILE%\\.claude\\settings.json
{
  "model": "claude-sonnet-4-6",
  "env": {
    "ANTHROPIC_BASE_URL": "https://demo.octopusrotuer.com/api/proxy",
    "ANTHROPIC_AUTH_TOKEN": "sk-panda-router-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?

Claude Code defaults change over time. Panda Router currently provides claude-sonnet-4-6 and claude-opus-4-6. Compatibility mode disables experimental beta fields that the gateway does not yet fully forward, improving reliability for coding, tool calls, and streaming.

Read more: Claude Code installation · LLM gateway

Panda Router available

Codex CLI

Codex supports custom model providers. Save the configuration once, add your Panda 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.

~/.codex/config.toml · Windows: %USERPROFILE%\\.codex\\config.toml
model = "gpt-5.4"
model_provider = "panda_router"

[model_providers.panda_router]
name = "Panda Router"
base_url = "https://demo.octopusrotuer.com/api/proxy"
env_key = "PANDA_ROUTER_API_KEY"
wire_api = "responses"

2. Install, add the key, and launch

Terminal · macOS / Linux / WSL
# 1) Install Codex (macOS / Linux / WSL)
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# 2) Add your Panda Router API key
export PANDA_ROUTER_API_KEY="sk-panda-router-YOUR_KEY"

# 3) Launch
codex --version
codex
PowerShell · Windows
# 1) Install Codex (Windows PowerShell)
irm https://chatgpt.com/codex/install.ps1 | iex

# 2) Add your Panda Router API key
$env:PANDA_ROUTER_API_KEY="sk-panda-router-YOUR_KEY"

# 3) Launch
codex --version
codex

3. Verify the connection

In Codex, run /status. It should show provider: panda_router and model: gpt-5.4. Then ask it to read the README and summarize it in one sentence without editing files. A successful task confirms the setup.

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.

  1. 1Press Cmd/Ctrl + Shift + P and run Chat: Manage Language Models.
  2. 2Choose Add Models → Custom Endpoint and let VS Code open chatLanguageModels.json.
  3. 3Replace the file contents with the complete block below, change only YOUR_KEY, and save.
  4. 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.
chatLanguageModels.json · Add both models at once
[
  {
    "name": "Panda Router",
    "vendor": "customendpoint",
    "apiKey": "sk-panda-router-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

In Ask mode, send “Reply only with: connected.” Then switch to Agent mode and send “Read the first line of the currently open file. Do not modify it.” If both work, chat and tool calling are connected.

Key and feature notes

For easy copy-paste, the example puts the key in a user-level configuration file. Do not commit this file or put the key in a project. When you add models through the UI, VS Code can store the key in system secret storage. BYOK covers Chat and utility tasks, not inline suggestions, semantic search, or embeddings; enterprise policy may also disable BYOK.

VS Code Custom Endpoint documentation · VS Code 1.122 release notes

Panda Router available

MiniMax M3

MiniMax-M3 provides a one-million-token context window. Through Panda Router, you do not need a MiniMax account or key. One Panda Router key works with Claude Code and OpenAI-compatible clients.

Use your Panda Router key

Every example below uses sk-panda-router-YOUR_KEY and stays behind Panda Router team access, limits, filtering, audit, and billing. Do not create or enter a MiniMax provider key.

1. Create a Panda Router key

Create a key in the dashboard and make sure its team can access MiniMax-M3. Replace every YOUR_KEY below with this Panda Router key.

Open Panda Router API keys

2. Verify with one command

Replace YOUR_KEY with your Panda Router key and paste the whole block. A content array containing text confirms the key, team access, and MiniMax-M3 route are working.

Terminal · Panda Router Messages API
# Call MiniMax-M3 through Panda Router
curl "https://demo.octopusrotuer.com/api/proxy/v1/messages" \
  -H "Authorization: Bearer sk-panda-router-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 Panda Router gateway root; do not append /v1/messages.

~/.claude/settings.json · Windows: %USERPROFILE%\\.claude\\settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://demo.octopusrotuer.com/api/proxy",
    "ANTHROPIC_AUTH_TOKEN": "sk-panda-router-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

Run /status and confirm the base URL points to Panda Router and authentication comes from ANTHROPIC_AUTH_TOKEN. Run /model and confirm MiniMax-M3 is active.
Existing OpenAI SDK: use Chat Completions

For an existing OpenAI SDK integration, set the base URL to the Panda Router gateway root, use a Panda Router key, and select MiniMax-M3. Use the curl command below to verify the Chat Completions path first.

Terminal · OpenAI-compatible API
# Call through the Panda Router OpenAI-compatible endpoint
curl "https://demo.octopusrotuer.com/api/proxy/chat/completions" \
  -H "Authorization: Bearer sk-panda-router-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.

Verify the Claude endpoint
curl "https://demo.octopusrotuer.com/api/proxy/v1/messages" \
  -H "Authorization: Bearer sk-panda-router-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"}]
  }'
Verify the Codex Responses endpoint
curl "https://demo.octopusrotuer.com/api/proxy/responses" \
  -H "Authorization: Bearer sk-panda-router-YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "input": "Reply only with: connected"
  }'
  • Claude Code: run /status and check the gateway and authentication source.
  • VS Code: select the new model in Chat and send a short message.
  • Codex: run /status and confirm the provider is panda_router 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-panda-router- and is active. Claude uses ANTHROPIC_AUTH_TOKEN, Codex uses PANDA_ROUTER_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 Panda Router gateway root as base_url; do not append /responses manually. Make sure the deployed gateway includes the Responses endpoint, set PANDA_ROUTER_API_KEY, and fully restart Codex.

MiniMax-M3 is temporarily unavailable

Check only the Panda 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