Reference

API reference

The public surface is intentionally small: one model endpoint, a catalog, and account introspection. Everything else lives in the console.

Base URL & authentication

All endpoints live at https://api.projectares.ai. Pass your key in the x-api-key header (or as a Bearer token). Keys are prefixed sk-ares- and can be created for a personal account or an organization — usage is billed to the key's account.

x-api-key: sk-ares-YOUR_KEY # or Authorization: Bearer sk-ares-YOUR_KEY
POST/v1/messages

The industry-standard Messages protocol — including streaming via "stream": true (SSE), system prompts, prompt caching via cache_control, and multi-turn conversations. Project Ares routes from the model ID and returns every response in the same shape, so one client handles every model.

Optional Ares extensions: "speed": "fast" (or header x-ares-speed: fast) requests the priority lane — quicker responses, billed at 2× (standard billing applies automatically when a model can't run fast). Cache reads bill at 10% of input; cache writes at 125% (1-hour caches at 200%).

{ "model": "claude-sonnet-5", "max_tokens": 1024, "stream": true, "system": "You are terse.", "messages": [{"role": "user", "content": "Why is the sky dark at night?"}] }
GET/v1/models

Every model on the platform with lifecycle metadata: { id, display_name, family, status, context_window, retiresAt?, replacement? }. Deprecated models keep working but carry a sunset date and a suggested replacement (also surfaced per-request via the x-ares-deprecation header); retired models fail loudly with the fix in the error. Requires auth.

GET/pricing

Public, no auth: what every model costs, in credits and USD per million tokens, including cache rates and the fast-lane multiplier. This is generated from the same table the meter bills with — it cannot disagree with your ledger.

GET/catalog

The curated model catalog: { models: [{ id, label, group }] }. Public, no auth. Build your model picker from this — when Project Ares enables a new model it appears here immediately.

GET/me

Introspect the calling key: email, plan, and credits — your currently available usage in micro-USD (1,000,000 = $1.00).

GET/status

Liveness and the number of available models. Useful for health checks.

Errors

Every error — whatever happens behind the gateway — arrives in ONE Ares taxonomy. You never see, and never need to handle, another vendor's error format.

StatusTypeMeaning
400invalid_request_errorThe request itself is malformed — the message says what to fix
401authentication_errorMissing, revoked, or unknown key
402billing_errorTrial ended, allowance used and balance empty, or spend limit reached
404not_found_errorThat model doesn't exist or isn't available — see /v1/models
429rate_limit_errorOver 120 requests/minute on one account, or global throttle
502api_errorThe model service is temporarily unavailable — retry with backoff
529overloaded_errorThe model is temporarily overloaded — retry in a moment

Error bodies always look like {"type":"error","error":{"type":"…","message":"…"}} — so existing SDK retry logic works unchanged. Mid-stream failures arrive as an SSE error event in the same shape.

Rate limits

Streaming responses are metered from the final usage frame. If your client disconnects mid-stream, you're still billed for tokens the provider generated.