API reference

API reference

Base URL: https://atmorouter.dev/v1. Inference endpoints require an ar- key.

POST /v1/chat/completions

FieldTypeNotes
modelstringRequired. A model id from /v1/models.
messagesarrayRequired. Standard OpenAI message objects with role and content.
streambooleanOptional. Server-sent events when true.
max_tokensintegerOptional. Upper bound on generated tokens.
temperaturenumberOptional. Passed through to the upstream model.
top_pnumberOptional. Passed through.
stopstring | arrayOptional. Stop sequences.
tools / tool_choicearray | stringOptional. Function calling, where the upstream model supports it.
json
{
  "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.

EndpointMethodPurpose
/api/dashboard/registerPOSTStart signup with an email address. A verification link follows; the password is set when it is completed.
/api/dashboard/loginPOSTAuthenticate and receive a session with user id and token.
/api/dashboard/keysGET / POSTList or create API keys.
/api/dashboard/keys/{id}DELETERevoke a key.
/api/dashboard/usageGETRequest log, filtered by range.
/api/dashboard/usage-statsGETAggregates: requests, tokens, cost, saved vs official.
/api/dashboard/catalogGETFull model catalogue with prices and discounts.
/api/dashboard/balanceGETCurrent balance.
/api/dashboard/deposit/infoGETAvailable deposit methods and parameters.
/api/dashboard/topup/qrisPOSTCreate a QRIS invoice.
/api/dashboard/deposit/epusdt/createPOSTCreate a hosted USDT/USDC checkout order.
/api/public/statsGETAggregate public stats. No authentication.