API Reference

Base URL: …. Gateway auth is Authorization: Bearer nxr_live_…. Platform endpoints use the session cookie. Errors always follow {error:{message,type,code}} with an X-Request-Id header.

MethodPathDescription
GET/v1/modelsList models available to your API key (OpenAI shape).
POST/v1/chat/completionsChat completion, OpenAI-compatible. stream=true for SSE.
POST/v1/embeddingsEmbeddings — 400 when no configured provider supports them.
GET/v1/usageYour usage totals (API key auth).
GET/api/modelsPublic model catalog with pricing.
GET/api/statusPublic provider health.
POST/api/auth/registerDISABLED — returns 403. Registration is Google sign-in only; use POST /api/auth/google.
POST/api/auth/loginLogin — sets the HttpOnly nexora_session cookie (7 days).
GET/api/auth/meCurrent user.
POST/api/auth/logoutRevoke the session and clear the cookie.
GET/api/keysList your API keys (masked). Create returns the full key once.
POST/api/keysCreate an API key.
DELETE/api/keys/{id}Revoke an API key.
GET/api/walletWallet balance.
GET/api/wallet/transactionsWallet transactions (paginated).
POST/api/wallet/deposit-requestManual deposit request (admin review). method must be manual.
POST/api/wallet/redeem-promoRedeem a promo code (once per user).
GET/api/usage?range=24h|7d|30d|customUsage totals, per-model breakdown, daily series.
GET/api/usage/requestsPaginated request log.
POST/api/playground/chatSession-auth chat through the gateway (same billing).

Billing

Cost = input_tokens / 1,000,000 × input price + output_tokens / 1,000,000 × output price, using the model's published pricing. The amount is deducted from your wallet after a successful response. The gateway checks your balance is at least $0.0001 before forwarding; insufficient balance returns 402. If a provider reports no usage, tokens are recorded as 0 and no charge is made. Rate limit: 60 requests/min per API key (429 with Retry-After). Zero providers: /v1/models returns an empty list and chat returns 503 no_provider.