TokenRoute implements the OpenAI /v1/chat/completions interface. If your code already talks to OpenAI, you change two things, the base URL and the API key, and it talks to 446 models instead of one provider’s.
messages, choices, usage, tool calls and the rest of the schema.The base URL becomes https://tokenroute.app/api/v1, the key becomes a TokenRoute key, and the model string can name any model in the catalog.
from openai import OpenAI
client = OpenAI(
base_url="https://tokenroute.app/api/v1",
api_key="sk-tr-...", # your TokenRoute key
)
response = client.chat.completions.create(
model="anthropic/claude-sonnet-4.5", # swap this string for any model
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://tokenroute.app/api/v1',
apiKey: process.env.TOKENROUTE_API_KEY,
})
const response = await client.chat.completions.create({
model: 'openai/gpt-5',
messages: [{ role: 'user', content: 'Hello!' }],
})curl https://tokenroute.app/api/v1/chat/completions \
-H "Authorization: Bearer $TOKENROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'Every model is addressed as provider/model, for example openai/gpt-5, anthropic/claude-opus-4.6, google/gemini-2.5-pro, deepseek/deepseek-chat. Changing provider means changing that string; there is no second SDK, key or invoice. Browse every identifier on the models page.