Synrouter Docs
Agent clients
Most agent clients only need a compatible base URL and a Synrouter API key. Use the OpenAI-compatible endpoint for chat-completion clients and the Anthropic-compatible endpoint for Claude-style clients.
Choose the right compatibility mode
OpenAI-compatible clients
Use
https://synrouter.ai/api/v1 for clients that call Chat Completions.Anthropic-compatible clients
Use
https://synrouter.ai/api/anthropic for clients that call Anthropic Messages.OpenAI-compatible environment variables
Many CLI tools and SDK-based agents read OpenAI-compatible settings from environment variables.
bash
1export OPENAI_API_KEY="sk-sr-..."
2export OPENAI_BASE_URL="https://synrouter.ai/api/v1"
Anthropic-compatible environment variables
Claude-style clients should use the Anthropic-compatible base URL.
bash
1export ANTHROPIC_API_KEY="sk-sr-..."
2export ANTHROPIC_BASE_URL="https://synrouter.ai/api/anthropic"
Codex-style provider configuration
If your client supports named model providers, add Synrouter as a provider and route chat requests through the OpenAI-compatible API.
toml
1[model_providers.synrouter]
2name = "Synrouter"
3base_url = "https://synrouter.ai/api/v1"
4api_key = "sk-sr-..."
5wire_api = "chat"
Model selection
Pick a model ID returned by GET /v1/models. Example IDs include deepseek/deepseek-v4-flash and anthropic/claude-sonnet-4.6.