routing-rules.yaml
to the right subscription bridge (Claude Code, ChatGPT, Copilot, M365 Copilot, Codex) or local Ollama.
/v1/chat/completions
OpenAI-compatible · works with `openai` SDK
curl https://llm-gateway.context-x.org/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4.6",
"messages": [{"role": "user", "content": "hi"}]
}'
/v1/messages
Anthropic-compatible · works with `@anthropic-ai/sdk`
curl https://llm-gateway.context-x.org/v1/messages \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4.6",
"messages": [{"role": "user", "content": "hi"}],
"max_tokens": 1024
}'
/v1/completion
native — full caller-tracking + compression options
curl https://llm-gateway.context-x.org/v1/completion \
-H "Content-Type: application/json" \
-d '{
"caller": "my-app",
"task_type": "generic_qa",
"input": "your prompt here",
"options": { "compression": { "enabled": true, "mode": "auto" } }
}'
/v1/models
list every model the gateway can route to
curl https://llm-gateway.context-x.org/v1/models
| Model alias | Bridge | Subscription used | Port | Status |
|---|---|---|---|---|
claude-sonnet-4.6, claude-haiku, claude-opus | claude-bridge | Claude Code Max (OAuth) | 3250 | — |
gpt-4o, gpt-4.1, gpt-5.x | openai-bridge | ChatGPT Plus / Pro | 3251 | — |
copilot-gpt-4o, copilot-claude-3.7 | copilot-bridge | GitHub Copilot | 3252 | — |
codex-mini, gpt-5.1-codex-mini | codex-bridge | OpenAI Codex CLI | 3253 | — |
m365-copilot | m365-copilot-bridge | Microsoft 365 Copilot | 3257 | — |
qwen2.5:3b / 7b / 14b / 32b, magatama:32b, magatama-coder | ollama (Mac Studio) | local — no cost | 11434 | — |