Skip to content
exoticrouter.com ↗

Quickstart

An account, a key and one request. The gateway speaks the APIs your SDK already speaks, so the only new thing is its address.

  1. Create an account. Credit is prepaid and there is no subscription: add some on the Billing page.
  2. Create a key on the API keys page.
  3. Keep the key out of your code. The samples on these pages read it from the environment, as EXOTIC_API_KEY.
Shell
export EXOTIC_API_KEY="sk-er-..."
PowerShell
$env:EXOTIC_API_KEY = "sk-er-..."

This is a Chat Completions request, the format most tools and SDKs speak. Every text model in the catalogue answers it. With the OpenAI SDK, the base URL is https://api.exoticrouter.com/v1.

cURL
curl https://api.exoticrouter.com/v1/chat/completions \
-H "Authorization: Bearer $EXOTIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5-5",
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'
Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.exoticrouter.com/v1",
api_key=os.environ["EXOTIC_API_KEY"],
)
reply = client.chat.completions.create(
model="anthropic/claude-sonnet-5-5",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.exoticrouter.com/v1",
apiKey: process.env.EXOTIC_API_KEY,
});
const reply = await client.chat.completions.create({
model: "anthropic/claude-sonnet-5-5",
messages: [{ role: "user", content: "Say hello in five words." }],
});
console.log(reply.choices[0].message.content);

A model is named by its id, lab/model. Swap anthropic/claude-sonnet-5-5 for openai/gpt-6.2-astra, google/gemini-4-neon or any other id from the models page and the same request goes to that model.

Set stream to true and the answer arrives piece by piece, as server-sent events, exactly as the OpenAI API sends them.

Python
stream = client.chat.completions.create(
model="anthropic/claude-sonnet-5-5",
messages=[{"role": "user", "content": "Write a haiku about glass."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
TypeScript
const stream = await client.chat.completions.create({
model: "anthropic/claude-sonnet-5-5",
messages: [{ role: "user", content: "Write a haiku about glass." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
cURL
curl -N https://api.exoticrouter.com/v1/chat/completions \
-H "Authorization: Bearer $EXOTIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5-5",
"stream": true,
"messages": [{"role": "user", "content": "Write a haiku about glass."}]
}'

The gateway also speaks Anthropic’s and Google’s own APIs, so their SDKs work too. Each takes the gateway’s address as its base URL and the same key.

SDK Base URL Models
OpenAI https://api.exoticrouter.com/v1 Every model
Anthropic https://api.exoticrouter.com The Claude models
Gemini https://api.exoticrouter.com The Gemini models