Quickstart

Quickstart

AtmoRouter speaks both the OpenAI Chat Completions API and the Anthropic Messages API. If your code already talks to either one, you only change two things: the base URL and the key. Everything else is identical: request shape, streaming format, response fields.

1. Create an account and a key

Sign up, then open Dashboard → API Keys and create a key. The full secret is shown once. Store it somewhere safe. Keys look like ar- followed by 48 hex characters.

2. Add balance

Deposit USDC on Solana or pay with QRIS under Dashboard → Deposit. Balance is consumed per token; there is no subscription and no minimum monthly spend. A request is rejected with HTTP 402 when your balance reaches zero.

3. Make your first call

python
from openai import OpenAI

client = OpenAI(
    base_url="https://atmorouter.dev/v1",
    api_key="ar-xxxxxxxxxxxx",
)

response = client.chat.completions.create(
    model="cbcn/glm-5.3",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)
print(response.usage)
bash
curl https://atmorouter.dev/v1/chat/completions \
  -H "Authorization: Bearer ar-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cbcn/glm-5.3",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Every response carries an X-Atmorouter-Cost header with the exact amount deducted for that request, so you can reconcile spend without polling the dashboard.

4. Check what you were charged

Open Dashboard → Usage logs. Every request is listed with input tokens, output tokens, latency and cost, plus how much you saved versus the model's official list price.