Complete API Reference
Base URL: https://api.anoman.io. All authenticated endpoints require the Authorization: Bearer anm-sk-... header.
OpenAI-compatible
/v1/ — OpenAI-compatible
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/chat/completions | Main endpoint. Supports stream:true (SSE) and batch-eligible requests (returns 202 + poll_url). |
POST | /v1/completions | Legacy text completions passthrough. |
GET | /v1/models | Model catalog. Each model includes: tier, provider, batch_support, provider_multiplier, tier_multiplier. |
POST | /v1/embeddings | Embeddings passthrough to provider. |
Anthropic-compatible
/anthropic/ — Anthropic Messages API
| Method | Endpoint | Description |
|---|---|---|
POST | /anthropic/v1/messages | Full Anthropic Messages API proxy. Streaming supported. Set ANTHROPIC_BASE_URL=https://api.anoman.io/anthropic. |
Public (no auth)
/public/v1/
| Method | Endpoint | Description |
|---|---|---|
GET | /public/v1/pricing | Model pricing at 0% markup. No auth. ISR 1h. |
GET | /public/v1/status | System status, provider health, active incidents. No auth. ISR 60s. |
GET | /public/v1/models | Public model catalog (is_public=true). No auth. |
Anoman-native
API Keys
| Method | Endpoint | Description |
|---|---|---|
POST | /anoman/v1/keys | Create virtual API key. |
GET | /anoman/v1/keys | List keys for authenticated customer. |
DELETE | /anoman/v1/keys/{id} | Revoke key. |
PATCH | /anoman/v1/keys/{id} | Update key name, budget, or guardrail_overrides. |
Traces & Agent Sessions
| Method | Endpoint | Description |
|---|---|---|
GET | /anoman/v1/traces | List traces with filters (model, date, routing_mode, cache_hit). |
GET | /anoman/v1/traces/{id} | Trace detail with spans. |
GET | /anoman/v1/sessions | List agent sessions (filterable by agent_id, status). |
GET | /anoman/v1/sessions/{id}/actions | Action timeline for a session. |
Usage & Billing
| Method | Endpoint | Description |
|---|---|---|
GET | /anoman/v1/usage | Usage stats (tokens, cost, requests) for current period. |
GET | /anoman/v1/usage/by-model | Usage breakdown by model. |
GET | /anoman/v1/usage/savings | Cache savings and batch savings breakdown. |
GET | /anoman/v1/usage/batch-economics | Batch rate, savings, and SLA compliance. |
GET | /anoman/v1/usage/rate-limits | Per-customer token-cap usage by model tier class plus RPM/TPM burst-guard status. |
Batch Jobs
| Method | Endpoint | Description |
|---|---|---|
GET | /anoman/v1/batch/{job_id} | Poll batch job. Returns 202 (processing) or 200 (complete) with full chat completion result. |
GET | /anoman/v1/batch | List all batch jobs for API key. |
DELETE | /anoman/v1/batch/{job_id} | Cancel a queued job. |
Burst Credits
| Method | Endpoint | Description |
|---|---|---|
POST | /anoman/v1/burst/activate | Buy temporary rate limit boost (2x/5x/10x for 1h/4h/24h). Deducted from prepaid balance. |
GET | /anoman/v1/burst/status | Check active burst for current key. |
DELETE | /anoman/v1/burst/deactivate | Cancel active burst (no refund). |
GET | /anoman/v1/burst/pricing | Available burst options for current tier. |
Policies
| Method | Endpoint | Description |
|---|---|---|
POST | /anoman/v1/policies | Create agent policy. |
GET | /anoman/v1/policies | List policies. |
PUT | /anoman/v1/policies/{id} | Update policy (tool rules, budget limits). |
DELETE | /anoman/v1/policies/{id} | Delete policy. |
MCP Governance
| Method | Endpoint | Description |
|---|---|---|
POST | /anoman/v1/mcp/servers | Register MCP server — discovers tools via tools/list. |
GET | /anoman/v1/mcp/servers/{id}/tools | List tools exposed by an MCP server. |
PATCH | /anoman/v1/mcp/tools/{tool_id} | Update tool policy_mode (allow/deny/require_approval) and rate_limit_per_min. |
GET | /anoman/v1/mcp/invocations | MCP tool invocation audit log. |
Anomalies & Audit
| Method | Endpoint | Description |
|---|---|---|
GET | /anoman/v1/anomalies | List detected anomalies with severity and detection_method. |
POST | /anoman/v1/anomalies/{id}/ack | Acknowledge anomaly. |
GET | /anoman/v1/audit/events | SOC2 audit log — cursor-paginated, NDJSON export available. |
Live Feed (SSE)
| Method | Endpoint | Description |
|---|---|---|
GET | /anoman/v1/events/stream | SSE stream. Events: request, blocked, batch_enqueued, batch_completed, batch_escalated, anomaly, provider_issue. |
SSO (Enterprise)
| Method | Endpoint | Description |
|---|---|---|
POST | /anoman/v1/sso/connections | Register SAML IdP (Enterprise). Returns metadata_url for IdP setup. |
GET | /anoman/v1/sso/connections | List SSO connections. |
DELETE | /anoman/v1/sso/connections/{id} | Deactivate SSO connection. |
Error codes
Standard error responses
| HTTP | Code | Meaning |
|---|---|---|
| 401 | auth_invalid | Invalid or missing API key. |
| 402 | budget_exceeded | Monthly budget exhausted. |
| 402 | token_quota_exceeded | Weekly or monthly token cap hit for a model tier class. |
| 403 | policy_violation | Tool call blocked by policy. |
| 403 | guardrail_triggered | Content blocked by guardrail. |
| 429 | rate_limit_exceeded | RPM or TPM burst guard tripped. |
| 429 | concurrent_limit_exceeded | Per-key inflight cap hit. |
| 503 | provider_unavailable | All providers failed after retries. |
Response headers
X-Anoman-* transparency headers
| Header | Example value |
|---|---|
X-Anoman-Guardrail-Injection | pass score=0.12 |
X-Anoman-Guardrail-Pii | masked 3 entities |
X-Anoman-Guardrail-Content | pass |
X-Anoman-Cache | none | provider | response |
X-Anoman-Region | ID | SG |
X-Anoman-Tier | starter | pro | payg | enterprise |
X-Anoman-Burst-Active | true | false |
X-Anoman-Guardrail-Master | disabled (when all guardrails bypassed) |
X-Anoman-Inflight-Cap | 150 (on 429) |