Integration
Two base URLs and one key. Everything below assumes you already have a key from the console.
Endpoints
| Protocol | Base URL |
|---|---|
| OpenAI | https://api.shuntio.com/v1 |
| Anthropic | https://api.shuntio.com |
Send the key as Authorization: Bearer sk-…
Claude Code
Claude Code reads these two variables at startup. Add them to your shell profile to make them persist across sessions.
export ANTHROPIC_BASE_URL="https://api.shuntio.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY — the latter is validated against Anthropic and rejected.
Codex CLI
Add a provider to ~/.codex/config.toml, then run Codex with that profile.
[model_providers.shuntio]
name = "shuntio"
base_url = "https://api.shuntio.com/v1"
env_key = "SHUNTIO_API_KEY"
[profiles.shuntio]
model_provider = "shuntio"
model = "your-model-id"export SHUNTIO_API_KEY="sk-your-key"
codex --profile shuntioKeep the profile name and the provider name distinct; they are separate keys in the file.
OpenAI SDK
The only change is base_url. Request and response shapes are untouched.
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.shuntio.com/v1",
api_key="sk-your-key",
)Node.js
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.shuntio.com/v1',
apiKey: process.env.SHUNTIO_API_KEY,
});curl
curl https://api.shuntio.com/v1/chat/completions \
-H "Authorization: Bearer $SHUNTIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-id",
"messages": [{ "role": "user", "content": "ping" }]
}'Cursor, Cherry Studio, and other clients
Any client that accepts a custom OpenAI-compatible endpoint needs the same three values.
| Base URL | https://api.shuntio.com/v1 |
| API key | sk-… |
| Model | any id from /models.json |
Verify
This should list the models your key can reach.
curl -s https://api.shuntio.com/v1/models \
-H "Authorization: Bearer $SHUNTIO_API_KEY"If something fails
Start from the status code:
401— the key is missing, mistyped, or revoked. Check that the header isAuthorization: Bearer sk-…- anything else: the console request log records the exact upstream response for that call, which is more reliable than guessing from the status.