API reference
API reference
Base URL: https://atmorouter.dev/v1. Inference endpoints require an ar- key.
POST /v1/chat/completions
| Field | Type | Notes |
|---|---|---|
| model | string | Required. A model id from /v1/models. |
| messages | array | Required. Standard OpenAI message objects with role and content. |
| stream | boolean | Optional. Server-sent events when true. |
| max_tokens | integer | Optional. Upper bound on generated tokens. |
| temperature | number | Optional. Passed through to the upstream model. |
| top_p | number | Optional. Passed through. |
| stop | string | array | Optional. Stop sequences. |
| tools / tool_choice | array | string | Optional. Function calling, where the upstream model supports it. |
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "cbcn/glm-5.3",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help?" },
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 7,
"total_tokens": 16,
"cached_tokens": 0
}
}The usage block is authoritative: billing is computed from those exact counts, not estimated from characters. Unknown request fields are forwarded to the upstream model rather than rejected.
POST /v1/messages
Anthropic Messages API. Same fields as Anthropic's own endpoint (model, max_tokens, messages, system, stream). Authenticate with x-api-key or a bearer token. Base URL for Anthropic clients is https://atmorouter.dev, without /v1.
GET /v1/models
Returns the live catalogue with our per-million-token prices. See the Models section.
Dashboard endpoints
The dashboard is backed by a separate JSON API on the same host. It is intended for the web UI; it is documented here so you can automate account chores if you need to.
| Endpoint | Method | Purpose |
|---|---|---|
| /api/dashboard/register | POST | Start signup with an email address. A verification link follows; the password is set when it is completed. |
| /api/dashboard/login | POST | Authenticate and receive a session with user id and token. |
| /api/dashboard/keys | GET / POST | List or create API keys. |
| /api/dashboard/keys/{id} | DELETE | Revoke a key. |
| /api/dashboard/usage | GET | Request log, filtered by range. |
| /api/dashboard/usage-stats | GET | Aggregates: requests, tokens, cost, saved vs official. |
| /api/dashboard/catalog | GET | Full model catalogue with prices and discounts. |
| /api/dashboard/balance | GET | Current balance. |
| /api/dashboard/deposit/info | GET | Available deposit methods and parameters. |
| /api/dashboard/topup/qris | POST | Create a QRIS invoice. |
| /api/dashboard/deposit/epusdt/create | POST | Create a hosted USDT/USDC checkout order. |
| /api/public/stats | GET | Aggregate public stats. No authentication. |