Guides / 04
Guide 04 · Other model APIs

Choose the port by the client protocol.

OpenAI-compatible clients use localhost:3000. Anthropic-compatible clients, including Claude Code, use localhost:8000.

ADVANCED GUIDEOPENAI STYLE:3000ANTHROPIC STYLE:8000
OpenAI clientlocalhost:3000Claude Codelocalhost:8000upstream
01

Choose by protocol, not by model brand

The local port depends on what language the client speaks. If the tool expects an OpenAI-compatible API, point it to localhost:3000. If the tool expects an Anthropic-compatible API, point it to localhost:8000.

OpenAI-compatible client
OpenAI SDK · Codex-style tools
localhost:3000
OpenAI-compatible endpoint
selected upstream API
Anthropic-compatible client
Claude Code
localhost:8000
Anthropic adapter
selected upstream API
i
Simple rule
OpenAI language goes to 3000. Anthropic language goes to 8000. The upstream model can still be OpenAI, Claude, DeepSeek, Qwen or another provider, depending on the local service configuration.
02

Use localhost:3000 for OpenAI-compatible clients

This route is for Codex, CCSwitch and tools that ask for an OpenAI base URL, OpenAI API key, or an OpenAI-compatible endpoint. AGG now keeps the full step-by-step setup on a dedicated page with the downloadable Windows/Mac kit.

DETAILED ROUTE

Codex + CCSwitch + DeepSeek

Run the Windows executable, open localhost:3000, add a DeepSeek channel, then point CCSwitch Codex to http://localhost:3000/v1.

Open localhost:3000 guide
DOWNLOAD

Local 3000 kit

Includes CCSwitch Windows/Mac package and the API field template.

Download kit
03

Use localhost:8000 for Anthropic-compatible clients

Claude Code speaks Anthropic-style requests. The localhost:8000 route uses claude-api-proxy to translate those requests to an OpenAI-compatible upstream. AGG keeps this as a separate route because the setup, health checks and failure modes are different from CCSwitch.

DETAILED ROUTE

Claude Code + claude-api-proxy

Start the proxy, add an OpenAI provider, set ANTHROPIC_BASE_URL, then verify /api/server and /api/providers.

Open localhost:8000 guide
KEEP SEPARATE

Do not swap the ports

Claude Code uses 8000 unless your 3000 service explicitly supports Anthropic protocol.

!
Do not swap the ports
Claude Code should not be pointed directly at localhost:3000 unless that service explicitly speaks the Anthropic protocol. OpenAI-style clients should not use localhost:8000 unless they have an Anthropic-compatible mode.
04

Verify the correct route before using it

First check the port that matches your client. Then send one small request and confirm the intended upstream provider recorded the usage.

POWERSHELL · ANTHROPIC ROUTE
Invoke-WebRequest http://localhost:8000/api/server
Invoke-WebRequest http://localhost:8000/api/providers
POWERSHELL · OPENAI ROUTE
Invoke-WebRequest http://localhost:3000

Route check

Paste the non-secret response. Remove tokens, account IDs and full keys first.

Route complete

Keep the working proof

Save the chosen port, provider name, model name and non-secret health output for future troubleshooting.

All guides