API reference
All OpenAI endpoints under /v1 with identical request and response shapes, plus the Anthropic shape under /anthropic. Listed here are the routes WISPR adds.
Base URLs and auth
- OpenAI shape
https://api.wispr.xyz/v1- Anthropic shape
https://api.wispr.xyz/anthropic- Auth
Authorization: Bearer wispr_sk_…. Routes take your key unless the route says otherwise.- No key
- x402: the request routes answer
402withX-Payment-Required; pay USDC on Base and retry withX-PAYMENT. See Payments. - Errors
{ error: { code, message } }with the typed codes in Errors.
- POST/v1/chat/completions
- POST/v1/images · videos · audio
- GET/v1/trace/:id
- GET/v1/models
- GET/v1/attest
- POST/v1/receipts/verify
- POST/v1/account/register · login
- GET/v1/account
- GET/v1/keys
- GET/v1/usage
- GET/v1/topup/options
- POST/v1/topup/quote
- POST/v1/deposits/redeem
- GET/v1/stake
Requests
POST/v1/chat/completions·/v1/responses·/v1/embeddings
OpenAI shape. Response carries the wispr receipt. With an empty balance, send X-PAYMENT (x402) or receive 402 with the price.
Body fields WISPR reads (chat)
| Field | Type | What it does | Comes back as |
|---|---|---|---|
model | string | a catalogue id, a frontier id, or auto to let CASR pick per shard | the receipt names every model used |
reasoning_effort | low · medium · high | asks the model to think first | message.reasoning; per call, wispr_reasoning |
web_search | true | lets the answering model search | message.annotations: url_citation with url, title and, when the provider quoted the page, snippet |
read_links | true | fetches the pages behind up to 3 links in your last message and adds their text as material before masking and sharding | wispr_links |
curl https://api.wispr.xyz/v1/chat/completions \ -H "Authorization: Bearer $WISPR_KEY" \ -H "Content-Type: application/json" \ -H "X-Wispr-Frontier: deny" \ -d '{ "model": "auto", "reasoning_effort": "high", "messages": [{ "role": "user", "content": "Explain the interactions between these three medications." }] }'
"wispr": { "masked": 4, "shards": [ { "id": 1, "class": "identity", "model": "qwen3.8-27b-uncensored", "host": "wispr-enclave" }, { "id": 2, "class": "financial", "model": "gemma-4-26b-uncensored", "host": "wispr-enclave" }, { "id": 3, "class": "reasoning", "model": "claude", "host": "provider, shard only" } ], "tokens": { "in": 812, "out": 1040 }, "cost_usd": 0.0147, "fee_usd": 0, "attestation": { "enclave": "wispr-casr", "measurement": "sha256:4f1c…a9e0", "quote": "…" }, "signature": "ed25519:…" }
Adapted from the docs example, for a request with frontier models allowed (so not the deny request above): the two private model ids are the catalogue models that run on Phala TDX today. The measurement shown is the docs placeholder; the live one is on the security page.
POST/v1/images/generations·/v1/videos/generations·/v1/audio/speech
Media routes billed per image, per second, per 1K characters. Response carries data and the receipt.
| Field | Type | What it does |
|---|---|---|
enhance | true | On images: expands a prompt under 200 characters with a quick private model first; the prompt used comes back as revised_prompt and the helper call is its own line on the receipt. |
curl https://api.wispr.xyz/v1/images/generations \ -H "Authorization: Bearer $WISPR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "chroma", "prompt": "...", "enhance": true }'
GET/v1/trace/:id·/v1/trace/:id/live
Send X-Wispr-Trace: <32 hex> with a request and poll these while it runs. /trace/:id is the activity trace: stages, models, counts, timings and cost, never text; it is the record the dashboard’s audit window shows. /trace/:id/live is the text next to it: what each model is thinking and writing right now, straight from the provider stream, with placeholders where identifiers were. Both belong to the account that sent the request and are kept in memory for an hour at most.
TRACE=$(openssl rand -hex 16) # 32 hex characters curl https://api.wispr.xyz/v1/chat/completions \ -H "Authorization: Bearer $WISPR_KEY" -H "X-Wispr-Trace: $TRACE" \ -H "Content-Type: application/json" -d @request.json & curl https://api.wispr.xyz/v1/trace/$TRACE -H "Authorization: Bearer $WISPR_KEY"
GET/v1/models
The live catalogue: id, modality, method, precision, price, refusal bar, speed, status, host.
curl https://api.wispr.xyz/v1/models -H "Authorization: Bearer $WISPR_KEY"
GET/v1/attest
Enclave name, code measurement, TDX quote and the sealing public key.
curl https://api.wispr.xyz/v1/attest # raw TDX quote, verify with any TDX tool
{
"enclave": "wispr-casr",
"mode": "tdx",
"measurement": "sha256:b457efe8ba8acf600a42397072eea97e21ff42220b2d8c9de7bc9fba4b8203f5",
"quote": "…",
"public_key": "…",
"receipt_key": "…",
"gateway_receipt_key": "…"
}
POST/v1/receipts/verify
Body: a receipt. Returns signature validity and whether the measurement is a published build.
curl -X POST https://api.wispr.xyz/v1/receipts/verify \
-H "Content-Type: application/json" -d @receipt.json
Account
POST/v1/account/register·/v1/account/login
Email: { email, password }. Anonymous: { username, public_key, signature }; the phrase never leaves the device.
| Way in | Body | Notes |
|---|---|---|
email, password | we store a hash of each | |
| Anonymous | username, public_key, signature | key derived in your browser from the twelve word phrase; see Anonymous |
GET/v1/account
Balance, fee rate, stake status, default model, exit, spend by day.
curl https://api.wispr.xyz/v1/account -H "Authorization: Bearer $WISPR_KEY"
GETPOST/v1/keys·DELETEPATCH/v1/keys/:id
List, create ({ name, budget_usd, cap_usd }, key shown once), revoke, change budgets.
| Field | Type | Meaning |
|---|---|---|
name | string | a label you choose, such as cursor laptop |
budget_usd | number | monthly budget for the key |
cap_usd | number | per request cap |
curl https://api.wispr.xyz/v1/keys \ -H "Authorization: Bearer $WISPR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "cursor laptop", "budget_usd": 25, "cap_usd": 0.50 }'
GET/v1/usage?days=7
Requests, tokens, cost and resharded refusals per day and per model. Counts only.
curl "https://api.wispr.xyz/v1/usage?days=7" -H "Authorization: Bearer $WISPR_KEY"
Money
GET/v1/topup/options
Coins accepted, fee rates, minimums, the deposit address and the top up link.
POST/v1/topup/quote
{ amount_usd, coin }: what you pay, what lands, the fee.
curl https://api.wispr.xyz/v1/topup/quote \ -H "Authorization: Bearer $WISPR_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount_usd": 25, "coin": "usdc" }'
POST/v1/deposits/redeem Planned
{ denomination, proof, publicSignals: [root, nullifierHash, account] }. Verified inside the enclave, nullifier marked, credited minus the fee.
GETPOST/v1/stake Later
Contract and requirement; after staking on chain, POST switches the fee to 0%.
Headers
See Controls for X-Wispr-Shard, X-Wispr-Frontier, X-Wispr-Sensitive, X-Wispr-Exit, X-Wispr-Budget, X-Wispr-Precision, X-Wispr-Plan and X-PAYMENT.
| Header | Direction | Values |
|---|---|---|
X-Wispr-Shard | request | auto · mask · off |
X-Wispr-Frontier | request | allow · deny |
X-Wispr-Sensitive | request | comma list of identity financial medical secrets code |
X-Wispr-Exit Planned | request | auto or eu-fra eu-ams us-iad us-sjc ap-sin ap-tyo |
X-Wispr-Budget | request | max USD for this request |
X-Wispr-Precision | request | bf16 · fp8 |
X-Wispr-Plan | request | fundamentals · split |
X-Wispr-Shield-Private · X-Wispr-Shield-Frontier | request | a catalogue model id, or auto |
X-Wispr-Trace | request | 32 hex characters |
X-PAYMENT | request | the x402 payment |
X-Payment-Required | response, on 402 | scheme, network, asset, amount, payTo |