Quickstart
Get started with Synthorai in under 2 minutes.
1. Get your API Key
Sign in and navigate to Console → API Keys. Click "Create key" and copy it immediately — it will only be shown once.
2. Make your first request
Pick the SDK you already use. Both recipes hit the same gateway with the same API key.
Option A — OpenAI SDK
curl https://synthorai.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-5.4-mini",
"messages": [
{"role": "user", "content": "Hello! What can you do?"}
]
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://synthorai.io/v1"
)
response = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content": "Hello! What can you do?"}]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://synthorai.io/v1",
});
const response = await client.chat.completions.create({
model: "gpt-5.4-mini",
messages: [{ role: "user", content: "Hello! What can you do?" }],
});
console.log(response.choices[0].message.content);Option B — Anthropic SDK
curl https://synthorai.io/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 256,
"messages": [
{"role": "user", "content": "Hello! What can you do?"}
]
}'from anthropic import Anthropic
client = Anthropic(
api_key="YOUR_API_KEY",
base_url="https://synthorai.io"
)
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=256,
messages=[{"role": "user", "content": "Hello! What can you do?"}]
)
print(message.content[0].text)import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "YOUR_API_KEY",
baseURL: "https://synthorai.io",
});
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 256,
messages: [{ role: "user", content: "Hello! What can you do?" }],
});
console.log(message.content[0].text);The Anthropic SDK appends /v1/messages internally. Use the gateway origin (no /v1 suffix) as base_url — unlike the OpenAI SDK which takes https://synthorai.io/v1.
3. List available models
curl https://synthorai.io/v1/models \
-H "Authorization: Bearer YOUR_API_KEY" Model IDs follow the format used by the original provider. You can discover the full list with the /v1/models endpoint or visit the Model Catalog page.
Using a tool instead of a raw SDK?
If you're plugging Synthorai into Claude Code, OpenAI Codex CLI, OpenClaw, Cursor, Continue, Aider or any other OpenAI/Anthropic-compatible tool — there's a dedicated setup page for each of the big three, plus a base-URL cheat sheet for everything else.
Authentication
All API requests require an API key passed in the Authorization header.
Bearer Token
Authorization: Bearer YOUR_API_KEY Key Scopes
| Parameter | Type | Description |
|---|---|---|
Read | string | Access model list and usage data only. |
Write | string | Make inference requests (chat, completions). |
Admin | string | Full access including channel and user management. |
Never expose your API key in client-side code or public repositories. Rotate keys immediately if compromised via Console → API Keys.
Key Format
Synthorai keys are prefixed with sk- followed by a random 32-character string. Keys are hashed at rest and cannot be recovered after creation.
Not sure which model to start with? Browse the model price comparison to see every routable model's per-token pricing side by side.