Integration guides

Choose a client and configuration tool.

API access: check the scope first

AI Port provides API access for Codex, Claude Code and your own applications. Before connecting, check the platform key’s authorized provider and exact model ID, and use the setup guide to confirm that the selected protocol and model capabilities support your intended use.

Keys can have separate budgets, but share one account wallet. Saving configuration does not establish a working connection; available models and capabilities depend on the current catalog, key permissions and setup guide.

CC Launcher · claude-code

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

# After saving aiport-claude using the compatible custom URL fields
cc-launcher launch aiport-claude -- --model claude-example

CC Switch · claude-code

real_compatibility_pending

Add AI Port as a custom provider on the target client page, select Direct mode, save and switch. Save active work before restarting a daemon.

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

export ANTHROPIC_BASE_URL="https://api.aiport.example"
export ANTHROPIC_AUTH_TOKEN="<AI_PORT_KEY>"
export ANTHROPIC_MODEL="claude-example"

CC Switch CLI · claude-code

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

cc-switch --app claude provider add
cc-switch --app claude provider list
cc-switch start claude <provider-id>

CC Switch CLI · codex

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

cc-switch --app codex provider add
cc-switch --app codex provider list
cc-switch start codex <provider-id>

CC Switch · codex

real_compatibility_pending

Add AI Port as a custom provider on the target client page, select Direct mode, save and switch. Save active work before restarting a daemon.

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

model = "openai-example"
model_provider = "aiport"
[model_providers.aiport]
name = "AI Port"
base_url = "https://api.aiport.example/v1"
wire_api = "responses"
env_key = "AI_PORT_API_KEY"
# Set AI_PORT_API_KEY=<AI_PORT_KEY> in the actual client process environment

CCS · claude-code

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

ccs api create aiport-claude --target claude --base-url https://api.aiport.example
ccs config
ccs aiport-claude --target claude

CCS · codex

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

ccs api create aiport-codex --target codex --base-url https://api.aiport.example/v1
ccs config
ccs aiport-codex --target codex

Claude Code Router · api

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

# Field checklist, not executable configuration
AI Port upstream: https://api.aiport.example/v1
Upstream protocol: Chat Completions
Upstream model: openai-example
Upstream credential: <AI_PORT_KEY>
Local gateway: http://127.0.0.1:3456
Local auth: <LOCAL_GATEWAY_AUTH>
Routing: one AI Port model, no automatic fallback
curl https://api.aiport.example/v1/chat/completions \
 -H 'Authorization: Bearer <AI_PORT_KEY>' -H 'Content-Type: application/json' \
 -d '{"model":"openai-example","messages":[{"role":"user","content":"Hello"}],"stream":true}'
curl https://api.aiport.example/v1/responses -H 'Authorization: Bearer <AI_PORT_KEY>' -H 'Content-Type: application/json' -d '{"model":"openai-example","input":"Hello"}'
curl https://api.aiport.example/v1/messages -H 'x-api-key: <AI_PORT_KEY>' -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' -d '{"model":"claude-example","max_tokens":128,"messages":[{"role":"user","content":"Hello"}]}'

Claude Code Router · claude-code

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

# Field checklist, not executable configuration
AI Port upstream: https://api.aiport.example
Upstream protocol: Messages
Upstream model: claude-example
Upstream credential: <AI_PORT_KEY>
Local gateway: http://127.0.0.1:3456
Local auth: <LOCAL_GATEWAY_AUTH>
Routing: one AI Port model, no automatic fallback

Claude Code Router · codex

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

# Field checklist, not executable configuration
AI Port upstream: https://api.aiport.example/v1
Upstream protocol: Responses
Upstream model: openai-example
Upstream credential: <AI_PORT_KEY>
Local gateway: http://127.0.0.1:3456
Local auth: <LOCAL_GATEWAY_AUTH>
Routing: one AI Port model, no automatic fallback

Manual · api

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

curl https://api.aiport.example/v1/chat/completions \
 -H 'Authorization: Bearer <AI_PORT_KEY>' -H 'Content-Type: application/json' \
 -d '{"model":"openai-example","messages":[{"role":"user","content":"Hello"}],"stream":true}'
curl https://api.aiport.example/v1/responses -H 'Authorization: Bearer <AI_PORT_KEY>' -H 'Content-Type: application/json' -d '{"model":"openai-example","input":"Hello"}'
curl https://api.aiport.example/v1/messages -H 'x-api-key: <AI_PORT_KEY>' -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' -d '{"model":"claude-example","max_tokens":128,"messages":[{"role":"user","content":"Hello"}]}'

Manual · claude-code

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

export ANTHROPIC_BASE_URL="https://api.aiport.example"
export ANTHROPIC_AUTH_TOKEN="<AI_PORT_KEY>"
export ANTHROPIC_MODEL="claude-example"

Manual · codex

real_compatibility_pending

Configure this client's endpoint, protocol, key and actual model using the template; configure other clients separately.

Save and restart the target client. Verify the resolved provider and model. Disable fallback and automatic model changes.

Only with explicit authorization and budget, send a short request containing no project code. Copy/download never sends requests.

Reconcile the request ID, model, fixed tier, individual attempts and charges in Usage and billing.

Verify streaming, tools, images, search, files, cancellation and recovery. External MCP requires separate authorization and billing.

model = "openai-example"
model_provider = "aiport"
[model_providers.aiport]
name = "AI Port"
base_url = "https://api.aiport.example/v1"
wire_api = "responses"
env_key = "AI_PORT_API_KEY"
# Set AI_PORT_API_KEY=<AI_PORT_KEY> in the actual client process environment