Docs
Reference
Every header, error, limit and endpoint, and the SDKs.
Headers
| Header | On | Meaning |
|---|---|---|
| x-antimatter-model | response | The model that answered, after routing and fallback. This is what was billed. |
| x-antimatter-upstream | response | The adapter that served it: openai, anthropic, or openrouter. |
| x-antimatter-byok | response | 1 when your own provider key served it, so no credits were spent. |
| x-antimatter-request-id | response | This site's id for the call, on every answer, errors included. Also sent as x-request-id, which the OpenAI SDKs read. GET /v1/requests/{id} reads it back. |
| x-antimatter-cost-micros | response | What the answer was billed, in micro dollars, never the provider's own charge. A stream cannot know until it ends, so its last chunk carries usage.cost in dollars instead. |
| x-antimatter-cost-breakdown | response | What that charge is made of, in micro dollars, summing to it exactly: input, cached_input, cache_write, output, reasoning, tools, margin (the stated markup on those parts) and other (what no price explains, such as a replayed cached answer). The JSON body carries it as usage.cost_details in dollars, and so does a stream's last chunk. |
| x-antimatter-auto-cache | request, response | on or off. Turns automatic prompt caching on or off for this call, over the key's autoCache policy. On an Anthropic model a prompt start you sent in the last five minutes is marked so the lab serves it from its cache at its cache read rate. Gemini, OpenAI, DeepSeek and Grok cache by themselves. The answer says placed=head, placed=turns, unseen, implicit or none. |
| x-antimatter-hedge | request, response | <ms>; max=<micros>: when the first source sends no byte in that many milliseconds, the same request goes to a second source of the same model at the same price and the first answer wins. The other is cancelled and billed its prompt bound, which must fit under max or nothing is hedged. A key's hedgeMs and hedgeMaxMicros do the same. The answer says sent, armed or off and who won. |
| x-antimatter-coalesced | response | shared: a key with coalesce on rode an identical request of its account already in flight, on one provider call. Each request is billed as if it were alone. |
| x-antimatter-adjusted | response | A parameter changed rather than refused. max_tokens=<n> means max_tokens was lowered to the model's published max output or this site's ceiling. A bare name means the lab could not take it. |
| x-antimatter-overhead-ms | response | The gateway's own time before the request left for the provider, in milliseconds. |
| x-antimatter-upstream-sent | response | 1 on a timeout or hang up that came after the request reached the provider. The provider bills a request it was sent, so this one was billed too. x-antimatter-cost-micros says what. |
| x-ratelimit-limit | response | The key's requests per minute, with x-ratelimit-remaining and x-ratelimit-reset beside it. |
| retry-after | response | Seconds until a full window rolls over, on a 429. |
| x-antimatter-session | request | A label that groups requests in your logs and usage. |
| x-antimatter-cache | request | on to serve a repeated, non streaming request from store. Echoed as hit or miss. |
| x-antimatter-cache-cost-micros | response | On a cache hit, what the hit was billed, in micro dollars; 0 where hits are free. |
| x-antimatter-route | both | Sent, a JSON directive that steers an Autopilot choice: policy, weights, constraints. Answered, the decision: policy, model, scores, pool, and for a task mode its mode, needs and any note. |
| x-antimatter-route-warning | response | What did not apply as sent: an unreadable directive, a fallback not attempted, a max_tokens this key's policy lowered. |
| x-antimatter-fallback | both | Sent, comparable to fall back to the nearest no more expensive model on a failure, or off to override the key. Answered, from, to and why, or none and why. |
| x-antimatter-json | both | Sent, strict on a request with a json_object or json_schema response_format: the answer is parsed and held to the schema before it is handed over, and one that fails is asked for once more with a repair note, then from the comparable when one is set. Every attempt is billed and the hold covers two. On a stream the first byte waits for the check, then the checked answer streams. off overrides a key that does it by policy. Answered, valid, repaired or tool_calls. A final failure is a 422 json_invalid carrying the last answer. |
| x-antimatter-compress | both | Sent, safe to collapse repeated documents and tool results, tidy whitespace outside code fences and place cache breakpoints, aggressive to also replace the older turns with a summary from a cheap model, billed as its own request, or off to override a key that compresses by policy. Answered on every compressed request: the mode, tokens before and after (exact or approximate), saved_micros at the serving model's billed input rate, the actions taken, the summary's model and cost, and why anything asked for did not happen. |
| x-antimatter-private | request | required holds the request to private/ models (see Private inference): a named model that is not one is refused with 403 private_required, Autopilot routes only among them, and the fallback stays inside them. |
| x-antimatter-attestation | response | On an answer a private/ model served: the digest of the enclave attestation it was served under. GET /api/attestations/{digest} hands out the evidence. |
| x-antimatter-resumable | request | 1 on a keyed stream: a dropped connection resumes at GET /v1/streams/{id} instead of paying for the prompt again. The generation runs to its end and is billed in full, once. |
| x-antimatter-stream-id | response | The id to resume a resumable stream with. Every event carries its number as the SSE id. |
| x-antimatter-vector-search | response | On a vector store search: exact (every chunk scored), index (libsql's vector index, approximate) or exact_capped (the index could not answer and a capped exact scan did). |
| x-antimatter-memory | both | Sent on a chat completion, a message or a response, a memory space id (or default): its memories nearest the last user turn go in front of the model in the API's own system field, the request's end user naming whose. Answered: the space, how many were recalled, what the recall cost, and the queued extraction's id. |
| x-antimatter-memory-write | request | 1 on a chat completion, a message or a response: after the answer the conversation is queued for extraction into the space, billed like POST /v1/memories. |
| x-antimatter-file-search | response | On a response that ran file_search: how many rounds of searches the model asked for and how many searches ran. |
| x-antimatter-pii-redacted | response | On a request from a key that redacts personal data (see Redaction): how many values were replaced by placeholders before the request left. Never the values. |
| x-antimatter-pii-kinds | response | Beside x-antimatter-pii-redacted when any were: the kinds and how many of each, as card=1,email=2. |
| x-antimatter-prompt | request | A prompt kept here, instead of the body's prompt field (see Prompts): pmpt_..., pmpt_...@3 or pmpt_...@staging. |
| x-antimatter-prompt-variables | request | Beside x-antimatter-prompt: the prompt's values as a JSON object. |
| x-antimatter-prompt-version | response | On a request that named a prompt: the prompt and the version it was rendered from, as pmpt_...@3. |
Errors
Errors use the OpenAI shape: {"error": {"message", "type", "param", "code"}}. Branch on type. Where they apply, param names the field at fault (messages.0.content) and code the reason (model_not_found, unsupported_parameter). An unknown /v1 path is a JSON 404 and a wrong method a JSON 405.
| type | Status | When |
|---|---|---|
| invalid_request_error | 400, 404, 409 | Bad body or unknown model id, or a prompt that is not found or misses a variable (codes prompt_not_found, prompt_variable_missing and the like); 409 when a suite already has a run in progress, or (code capture_required) when a shadow test or a distillation is asked of a key that keeps no captures, or (code dataset_too_small) when a distillation's window holds too few examples. |
| unsupported_parameter | 400 | An images, audio or ensemble request asks for something that endpoint does not do, such as a stream. |
| request_too_large | 413 | The body is over the size cap. |
| output_expired | 410 | A video, sound or 3D job's file is past its expires_at at the provider; the gateway keeps no copy. |
| authentication_error | 401 | No key, or a revoked or expired key. |
| agent_paused | 403 | An agent's key whose agent its owner paused, or that expired. Refused on every endpoint. |
| agent_model_not_allowed | 403 | An agent's key named a model or autopilot its agent's list does not carry. |
| agent_balance_exhausted | 402 | The agent's own balance cannot cover the request, even with auto refill. Its owner needs to top it up. |
| agent_daily_cap_reached | 429 | The agent's spend and open holds today would pass its daily cap. |
| free_allowance_exhausted | 402 | A keyed account that never deposited has spent the free allowance. |
| insufficient_credits | 402 | A funded account whose balance cannot cover the request's worst case cost. |
| policy_violation | 403 | The model is off this key's allowlist or on its blocklist, the API is not one the key may use, the key lacks the scope, the caller's address is off its IP allowlist, or the account is frozen. |
| permission_error | 403 | The name Anthropic uses on /v1/messages for a key refused as policy_violation above. |
| data_policy_unavailable | 403 | No provider serves the model under this gateway's data policy for its own provider account (see /privacy). It was not sent anywhere else and nothing was charged; a fallback in models is tried next. Pick another model, or bring your own provider key. |
| attestation_unavailable | 503 | A private/ model was requested and no current, verified attestation of its enclave is on record, or the enclave answered with a TLS key no current attestation names. Nothing was sent and nothing was charged; the gateway checks the attestation again at once, so retry in a minute. See /private. |
| private_required | 403 | x-antimatter-private: required was sent and a named model is not a private/ model, or no private model is available to the request here. Name a private/ model, or an autopilot id to route among them. |
| holder_only | 403 | A $ANTI holder only feature, where holder tiers are on: a model still in its holders' window (the error names the tier and the day it opens to everyone; autopilot never routes a non holder to one), or the ensemble. The holder is the account that minted the key. See /token. |
| request_cost_exceeded | 403 | The request's worst case cost is over the per request ceiling on this key, or an ensemble's is over its own max_cost_micros. Lower max_tokens or pick a cheaper model. |
| payment_refused | 403 or 502 | POST /v1/pay/fetch: the service's x402 terms or host break a spending rule, or are terms the gateway does not pay (code says which: host_not_allowed, over_payment_cap, over_max_micros, network_not_allowed, asset_not_usdc, scheme_unsupported, rules_off; 502 terms_unreadable). Nothing was signed and nothing was charged. |
| payment_cap_reached | 429 | POST /v1/pay/fetch: the payment would pass this account's or agent's daily cap for paying services (code daily_cap), or the gateway's own (house_daily_cap). See retry-after. |
| policy_exceeded | 402, 403 or 429 | A per key daily or monthly limit is spent, or an organization's shared balance is empty. |
| not_found_error | 404 | A resumable stream that is not yours or has expired, or a 404 on the Anthropic API. |
| json_invalid | 422 | Strict JSON: every answer failed the JSON check, including the repair. Each attempt is billed, and the error carries the last answer as content. |
| rate_limit_error | 429 | The per key, per IP or per paying wallet window is full. See retry-after. |
| spend_cap_exceeded | 429 | The account's monthly spend cap is reached. |
| api_error | 500 | A fault inside the gateway, or a provider that reported an error inside a 200. |
| byok_unreadable | 500 | Your stored provider key can no longer be decrypted. Save it again. |
| settlement_uncredited | 500 | x402: the payment settled but could not be credited. Nothing was served; claim the transaction as a deposit. |
| unsupported_capability | 501 | The model's provider cannot do what the request needs on that API. |
| upstream_unavailable | 502, 503 | No provider for that model, or every candidate failed. |
| facilitator_unavailable | 502 | x402: the facilitator could not be reached. Nothing was charged; the same payment may be sent again. |
| settlement_unknown | 502 | x402: the settlement could not be read. Nothing was served; if the transfer landed, claim it as a deposit. |
| pricing_unavailable | 503 | The model has no established price, so we refuse it on our own provider accounts. Your own provider key can still serve it. |
| house_cap_reached | 503 | The free daily budget every unfunded account shares is spent. Deposit, or retry after 00:00 UTC. |
| ensemble_failed | 502 | Every member of an ensemble failed. The error lists each member's own error; any member billed after it was sent is in x-antimatter-cost-micros. |
| upstream_timeout | 504 | The provider did not answer in time. |
| service_unavailable | 503 | The gateway's own database is not answering. The request was not served; retry after the time in retry-after. |
| upgrade_required | 426 | A plain request to /v1/realtime, which is a WebSocket; connect with an upgrade. |
| realtime_unavailable | 503 | This site cannot hold a realtime socket (the answer names the relay to use), or realtime has no provider key. |
| realtime_session_limit | 429 | The account already has as many realtime sessions open as it may. |
| realtime_budget_exhausted | error event | Inside a realtime session: what is left of its budget cannot cover the next response's worst case, so the session closes. |
| realtime_session_expired | error event | Inside a realtime session: it reached the most time the gateway holds one open, so the session closes. |
| stream_truncated | in a resumed stream | The resumable stream passed its byte cap; nothing after that point was kept. |
| stream_failed | in a resumed stream | The generation failed before it finished. |
| stream_lost | in a resumed stream | The invocation generating the stream stopped before it finished. |
| stream_expired | in a resumed stream | The stream expired while it was being read. |
Limits
60 requests per minute per key. Chat without a key, including the tester above, gets 10 per minute per IP address, 1024 output tokens, and models priced at most $3 per million tokens, blended. By default max_tokens is 4096. When set, it can go up to the model's own published max output (max_output_tokens on its /v1/models entry), and never above 131072. A larger value is clamped, and x-antimatter-adjusted says so. A request body may be up to 4 MB on the inference endpoints (the platform refuses anything over 4.5 MB before it arrives). Send a large image as a URL instead of inline base64. Limits return 429 with retry-after. A key's own policy at PATCH /api/keys/{id}/policy can lower the output ceiling further, cap what one request can cost, block models and limit the key to some of its wires. A key whose owner holds a $ANTI tier that raises the rate gets more. x-ratelimit-limit on every answer says how many.
Endpoints
Everything under /v1 takes the key, except /v1/models, which is public (one model and the embedding models too), and the four inference endpoints (chat completions, messages, responses and embeddings), which a call with no key can pay for with x402 where it is on. Everything under /api takes the wallet session, is public, or takes the key where the row says so. Every endpoint, with its fields, examples, errors and a way to try it, is in the API reference, read from the OpenAPI document.
| POST/v1/chat/completions | Completions, OpenAI format. |
| POST/v1/messages | Completions, Anthropic format. |
| POST/v1/messages/count_tokens | Anthropic's token counter. An estimate, and it says so: estimate: true. Free. |
| POST/v1/responses | Responses, OpenAI format. Stateless: previous_response_id, store and hosted tools are refused, except file_search where vector stores are on. |
| GET/v1/responses/{id} | A stored response, and DELETE to remove one, where stored responses are on. Not open here. |
| POST/v1/ensemble | One request to several models: every answer with its cost and latency, and one combined answer. See Ensembles. |
| GET/v1/realtime | Realtime voice: OpenAI's Realtime protocol over a WebSocket, metered per response. Funded accounts. See Realtime voice. |
| POST/v1/embeddings | Embeddings. |
| GET/v1/embeddings/models | The embedding models /v1/embeddings serves, with prices. |
| GET/v1/models | The catalog, with prices, context lengths and max output. |
| GET/v1/models/{id} | One model. An unknown id is a JSON 404, code model_not_found, naming up to three you may have meant. |
| GET/v1/streams/{id} | Resume a stream opened with x-antimatter-resumable: 1, after ?after=<n> or Last-Event-ID, in its own format. Kept 10 minutes after its last write. |
| POST/v1/images/generations | Images, OpenAI format. url answers a data: URL. The gateway stores nothing. |
| POST/v1/audio/speech | Text to speech, OpenAI format, billed per character. |
| POST/v1/videos | A video as a job, OpenAI's video object. GET /v1/videos lists them. See Video, music and 3D. |
| GET/v1/videos/{id} | One video job. DELETE removes a finished one's record. |
| GET/v1/videos/{id}/content | The video, streamed from the provider until expires_at. |
| POST/v1/videos/{id}/cancel | Stop a video job. One never made costs nothing. |
| POST/v1/sounds | Music or a sound effect as a job. GET /v1/sounds lists them. |
| GET/v1/sounds/{id} | One sound job. DELETE removes a finished one's record. |
| GET/v1/sounds/{id}/content | The audio, streamed from the provider until expires_at. |
| POST/v1/sounds/{id}/cancel | Stop a sound job. |
| POST/v1/meshes | A 3D model as a job, from words or image_url. GET /v1/meshes lists them. |
| GET/v1/meshes/{id} | One 3D job. DELETE removes a finished one's record. |
| GET/v1/meshes/{id}/content | The GLB file, streamed from the provider until expires_at. |
| POST/v1/meshes/{id}/cancel | Stop a 3D job. |
| POST/v1/stills | One still picture as a job, from words or reference_images. GET /v1/stills lists them. |
| GET/v1/stills/{id} | One still job. DELETE removes a finished one's record. |
| GET/v1/stills/{id}/content | The picture, streamed from the provider until expires_at. |
| POST/v1/stills/{id}/cancel | Stop a still job. |
| POST/v1/studio/quote | What one studio shot would be held at, markup on, with the most it could be. Nothing is made or held. Read scope. |
| POST/v1/studio/jobs | One studio shot, a camera move and a stored picture allowed, billed to the key like /v1/videos. GET ?ids= reads up to 50 of the account's own jobs. |
| POST/v1/studio/projects | A Nova Studio project: the editor's own document, kept on the server. GET lists them (?doc_id= finds one by the editor's id). While video and sound jobs are on. |
| GET/v1/studio/projects/{id} | One project with its document. PUT replaces it naming the version it read (a stale write is 409 version_conflict). DELETE removes it with its stored files and plans. |
| POST/v1/studio/projects/{id}/duplicate | A copy of a project and its stored files. |
| GET/v1/studio/projects/{id}/media | Each asset of the document mapped onto its stored file or job, with the endpoint to fetch it. |
| GET/v1/studio/projects/{id}/events | A project's progress: a JSON page after ?after=, or Server-Sent Events resumed from Last-Event-ID. |
| POST/v1/studio/projects/{id}/plans | A render plan: many shots checked once against the balance at their quoted total, run a few at a time, each its own job and hold. GET lists the project's plans. |
| POST/v1/studio/projects/{id}/plans/quote | What a plan would be held at, one total and each shot. Nothing is made or held. |
| GET/v1/studio/plans/{id} | One plan with its shots. POST /v1/studio/plans/{id}/cancel stops it. Waiting shots are dropped and running ones cancelled. |
| POST/v1/studio/assets | Store a picture, clip or sound, its bytes as the body, its type checked by its bytes. GET lists stored files. While stored media is on. |
| GET/v1/studio/assets/{id} | A stored file's record. DELETE removes it and its bytes. Its bytes at /v1/studio/assets/{id}/content, with byte ranges. A take kept here can be shared by a public link made in the studio (POST /api/studio/shares, signed in), its page at /studio/share/{id}. |
| GET/v1/studio/storage | What the account keeps stored, its caps, and the storage price per GB a day past the free bytes. |
| POST/v1/studio/characters | A character: a name and one to several stored pictures (sa_...) a shot sends as its references to keep a face. GET lists them. A personal account's key. While stored media is on. |
| GET/v1/studio/characters/{id} | One character with its pictures. PATCH takes a new name, a new list of pictures, or both. DELETE removes it and the pictures it keeps. |
| POST/v1/audio/transcriptions | Transcription, OpenAI format, multipart, up to 3.8 MB per file. |
| POST/v1/files | A JSONL batch input file, multipart with purpose batch, or a document for file search with purpose assistants. Read back with /v1/files/{id}/content. |
| POST/v1/vector_stores | A vector store, optionally with file_ids. GET lists them. GET, POST (name, metadata, expires_after) and DELETE /v1/vector_stores/{id} for one. |
| POST/v1/vector_stores/{id}/files | Attach a file with attributes and a chunking strategy. GET lists them by status. GET, POST (attributes) and DELETE /v1/vector_stores/{id}/files/{fileId}. Its chunks at /v1/vector_stores/{id}/files/{fileId}/content. |
| POST/v1/vector_stores/{id}/file_batches | Attach several files at once. GET /v1/vector_stores/{id}/file_batches/{batchId}, its files at /v1/vector_stores/{id}/file_batches/{batchId}/files, POST /v1/vector_stores/{id}/file_batches/{batchId}/cancel to stop it. |
| POST/v1/vector_stores/{id}/search | Search a store: query, filters on attributes, max_num_results, ranking_options.score_threshold. The query embedding is billed. |
| POST/v1/memories | Remember texts as they are, or the facts a model reads from messages, merged against what the space keeps. GET lists a space's memories. While memory is on. |
| POST/v1/memories/search | Search a space by meaning: query, user, filters on metadata, top_k, threshold. The query embedding is billed. |
| GET/v1/memories/{id} | One memory. PATCH changes its words or metadata, DELETE forgets it. /v1/memories/{id}/history lists every ADD, UPDATE and DELETE. |
| POST/v1/memory_spaces | A memory space, optionally for an end user, with its own embedding model. GET lists them. GET, POST and DELETE /v1/memory_spaces/{id} for one. |
| GET/v1/memory_extractions/{id} | A queued extraction: pending, running, completed with its changes, or failed with why, and what it cost. |
| POST/v1/batches | Run a file of requests within 24 hours, each billed as a live call. GET /v1/batches/{id} to follow it, POST /v1/batches/{id}/cancel to stop it. |
| POST/v1/evals | A test suite of your own cases. GET /v1/evals/{id} for its route and evidence. PUT replaces it, DELETE removes it. |
| POST/v1/evals/{id}/runs | Run a suite against models inside a budget. GET /v1/evals/{id}/runs/{runId} for pass rates and the frontier, POST /v1/evals/{id}/runs/{runId}/cancel to stop it. |
| POST/v1/shadow | Replay a sampled share of this key's captured traffic to candidate models and compare. GET lists the key's tests. GET /v1/shadow/{id} reads one. While shadow testing is on. |
| GET/v1/shadow/{id}/report | Per candidate: agreement with its sample count and 95% interval, cost against the original, latency, failures. |
| POST/v1/shadow/{id}/switch | Route this key's requests for the test's model to a candidate. POST /v1/shadow/{id}/revert undoes it. POST /v1/shadow/{id}/stop ends the test. |
| POST/v1/shadow/{id}/auto | Auto savings: {"enabled": true} lets the gateway switch the test to its cheapest ready candidate itself. A weekly report says what the switch saved. Revert takes it back. |
| POST/v1/pay/fetch | Fetch a URL and, when it answers 402 with x402 terms, have the gateway pay them within the spending rules and charge the key's balance. While paying services is on. |
| GET/v1/pay/payments | The key's account's payments, newest first. An agent's own on its key. |
| POST/v1/distill/estimate | The dataset a window of this key's captured traffic of one model would make, and what its training would be held at. Spends nothing. While distillation is on. |
| POST/v1/distill | Starts a distillation. The cost is held from a funded balance, then the training file is uploaded. GET lists the key's. GET /v1/distill/{id} reads one, DELETE removes a finished one. |
| POST/v1/distill/{id}/light | Light the private model antimatter/distilled/<id> for hours you name, held first. POST /v1/distill/{id}/darken puts it out. POST /v1/distill/{id}/cancel stops a training. |
| GET/v1/tools | Every tool on the tools market with its billed price per call and what was measured. Public. While the tools market is on. |
| POST/v1/tools/{server}/{tool}/call | One paid call of a market tool with its arguments. Billed only when the tool answers without an error. |
| POST/mcp/tools | Every market tool behind one MCP endpoint, named server__tool, each call paid by the key. |
| GET/api/attestations | The private inference enclave's verdicts: the current one with its five links and every check, and the newest attempt. Public. While private inference is on. |
| GET/api/attestations/{digest} | One verdict with the evidence it was reached on, to check again anywhere. Public. |
| GET/v1/agents/{id}/identity | An agent's ERC-8004 passport: its registration on the Identity Registry and the newest signed attestation of its record. The owner's key with the agents scope, or the agent's own as self. While agent passports are on. |
| GET/api/agents/id/{slug} | A public passport: the registration file (also at /agents/id/{slug}/agent.json), the EIP-712 attestation with its day evidence, on chain feedback, settled x402 payments. |
| GET/v1/credits | What the key spends: the balance, or the free allowance left. Takes the key. |
| GET/v1/requests/{id} | One of this key's requests by its request id: model, tokens, what it was billed, the error. |
| GET/v1/requests/{id}/proof | The Merkle proof of one of this key's requests, once its day is sealed. See Verifiable receipts. |
| POST/v1/requests/{id}/dispute | Report one of your account's requests that was answered badly, with a reason, for the operator's review. While the marketplace is open. Takes the read scope. |
| POST/v1/agents | Create an agent wallet: a sub balance moved from yours, its own key once, a spend policy. GET lists them. Needs the agents scope. |
| GET/v1/agents/{id} | One agent: balance, spend by day and model, last requests. PATCH its policy or pause it. DELETE returns what is left. |
| POST/v1/agents/{id}/top_up | Move money from your balance to the agent. |
| POST/v1/agents/{id}/drain | Move the agent's money back to you. |
| POST/v1/agents/{id}/rotate_key | A new key for the agent. The old one stops at once. |
| POST/v1/agents/{id}/wallet | Link the wallet an agent funds itself from, proven by its signature. GET ?address= gives the message and its nonce. A wallet of another account is refused. |
| POST/v1/agents/{id}/deposits | Claim a deposit from the agent's proven wallet onto its balance. x402 from it credits it too. |
| PUT/v1/agents/{id}/definition | An agent's definition for hosted runs: model, instructions, tools, limits. GET reads it. See Hosted agent runs. |
| POST/v1/agents/{id}/runs | Start a hosted run of an agent with input. GET lists its runs, GET /v1/agents/{id}/runs/{run} reads one. |
| GET/v1/agents/{id}/runs/{run}/events | A run's events, as JSON or a stream resumed by Last-Event-ID. |
| POST/v1/agents/{id}/runs/{run}/tool_outputs | Answer the client function calls a run waits on. POST /v1/agents/{id}/runs/{run}/cancel stops it. |
| POST/mcp | The hosted MCP server, Streamable HTTP, stateless. Bearer key. See For agents. |
| GET/api/openapi | The whole surface, generated from the code. |
| GET/api/auth/nonce | A nonce to sign. Then POST /api/auth/verify with the signature for a session. |
| GET/api/keys | Your keys. POST makes one. It is shown once. |
| GET/api/credits | Balance, ledger and the deposit addresses. POST /api/credits/deposit claims a transfer, on an EVM network or on Solana. |
| GET/api/x402 | Pay per request with no key, where it is on: a call with no key gets a 402 reply with an x402 price in USDC, and what it does not spend stays on your wallet's balance. |
| GET/api/account/plan | Paid plans, where they are offered, are bought from your credit balance 30 days at a time and raise the per key rate limit. POST subscribes or cancels. |
| GET/api/account/referral | Your referral link and what it has earned, where referral credit is paid. |
| GET/api/account/holder | What your wallet holds of $ANTI on Robinhood Chain, and the holder tier it reaches. |
| PUT/api/account/model-watch | The models to watch for outages: a breaker open on the provider, or the last hour's error rate or median time to first token over the line, sends model.degraded and later model.recovered once each, and a line to a linked Telegram chat. |
| PUT/api/account/low-balance | A low balance threshold. Falling below it sends credits.low_balance once, with a top up link, and a message to a linked Telegram chat. |
| POST/api/provider-keys | Attach your own provider key: OpenRouter, OpenAI, Anthropic, Google, DeepSeek, xAI, Mistral, Groq, Cerebras, Together or Fireworks. |
| GET/api/usage | What you spent, by model and by day. GET /api/logs lists requests. |
| GET/api/presets | Saved defaults, used as preset/<name> in the model field. GET /api/aliases: short names. |
| POST/api/webhooks | budget.threshold, key.created, key.revoked, price.change, alert.triggered, alert.resolved, credits.low_balance, plan.renewed, plan.ended, model.degraded, model.recovered, shadow.candidate_ready, shadow.auto_switched, shadow.savings_report, distill.completed, distill.proof_ready, studio.shot_finished, project.budget_threshold, spend.forecast_over_cap. HMAC signed. |
| GET/api/traces | The flight recorder's spans, one per request. Bodies are kept only when you opt in. |
| POST/api/router/explain | The routing decision for a request, without sending it. Takes the key. |
| GET/api/receipts/commitments | The sealed days: each root, its header, and the margin billed and provider totals imply. Public. |
| GET/api/tokens | A token estimate for a prompt. A heuristic, and it says so. |
| GET/api/health | Liveness, with the database. |
SDKs
Use the official clients. openai (npm and pip) works with the chat, Responses, embeddings, images, audio and batch APIs at the base URL https://useantimatter.com/v1. @anthropic-ai/sdk and anthropic work with the messages API at the base URL https://useantimatter.com. A compatibility suite tests both against the gateway.
Antimatter's own TypeScript, Python and Go SDKs, its CLI, its stdio MCP server and its Vercel AI SDK and LangChain providers are built and not yet published to npm or PyPI. Their install lines will be here when they are.