Prism402 is an OpenAI-compatible inference router. Calls are metered by the token and paid in USDC on Arc.
Base URL
base url
https://prism402.com/v1
Everything under /v1 follows the OpenAI wire format: POST /v1/chat/completions, POST /v1/embeddings and GET /v1/models. Existing OpenAI SDKs work by changing the base URL.
Two ways to pay
Prepaid key. Deposit USDC once, get a prism_sk_ key, send it as a Bearer token. Each call is charged its exact token cost. Best for apps and anything using an OpenAI SDK.
Pay per call (x402). No key and no account. The first request returns 402 Payment Required with a price; your client signs it and resends. Best for autonomous agents holding their own wallet.
Authentication
http header
Authorization: Bearer prism_sk_...
There are no accounts, emails or passwords. The key is the account, and the wallet that funded it is its owner. Refunds always go back to that wallet.
Where the models run
Every model in the catalog is served on Cloudflare's GPU network (Workers AI). Prism402 adds the payment rail, metering, cache and the public ledger. Prompts are not logged: the ledger keeps model, token counts, charge and time. The only content kept is the response cache (temperature-0 calls, scoped to your key or wallet, deleted after 24 hours).
Open the dashboard, connect a wallet holding USDC on Arc, choose a deposit and sign. The key is shown once, so store it. Prefer a terminal? See Prepaid keys.
2. Chat completions
from openai import OpenAI
client = OpenAI(base_url="https://prism402.com/v1", api_key="prism_sk_...")
reply = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "What is Arc?"}],
)
print(reply.choices[0].message.content)
Streaming works the usual way: pass stream: true. Add stream_options: {"include_usage": true} for the token counts in the final chunk; that chunk also carries a prism object with the exact charge.
3. See what it cost
Every non-streaming response carries the exact charge:
response headers
X-Prism-Charge-USDC: 0.000213
X-Prism-Cache: MISS
Your balance and the last calls are on the dashboard or at GET /v1/keys/me.
A risk read of one token on Arc: contract facts from the chain, pool data from DexScreener, a 0-100 score from published rules and a short model-written summary. Free on the web; $0.002 per call for agents.
With no key, the answer is a 402 for 2000 atomic USDC; pay it like any other x402 call.
What it reads
Check
Field read
Points
Not a standard ERC-20
name / symbol / totalSupply
−40
Upgradeable proxy
EIP-1967 implementation slot
−25
Owner + mint function
owner() + mint selector
−30
Mint function, access unknown
mint selector
−12
Ownership not renounced
owner()
−10
Blacklist functions
blacklist selectors
−20
Changeable taxes
fee setter selectors
−15
Pausable transfers
pause selector
−15
Trading switch
trading toggle selectors
−10
Owner holds >5% / >20%
balanceOf(owner)
−15 / −30
No pool on Arc
DexScreener pairs
−25
Liquidity <$5k / <$1k
liquidity.usd
−15 / −25
≥20 buys and 0 sells in 24h
txns.h24
−40
Market data unreadable
DexScreener
−10
Tokens deployed as EIP-1167 clones (how launchpads usually deploy) are followed to their implementation, so the function table checked is the real one. Grades: 80+ Clean surface, 60+ Caution, 40+ High risk, below that Danger.
A clean surface is not proof of safety. It means none of these switches were found. Holder distribution and deployer history are not checked yet.
Agent scans read DexScreener from our servers; when it rate-limits us, market is null and the market_unavailable flag says so.
A key is minted by an x402 deposit and spends down per call. No login, no account.
Endpoints
POST /v1/keys with {"amount_usd": 5}: x402 deposit, returns a new key
POST /v1/keys/topup: x402 deposit plus Bearer, adds balance
GET /v1/keys/me: balance, totals and recent usage
DELETE /v1/keys/me: revoke the key and book what's left as a refund
Deposits are 1 to 1,000 USDC. The dashboard manages the same keys from the wallet that funded them: sign one free message and every key it owns is listed, with top up and close per key.
Mint from the dashboard
The dashboard runs the whole deposit in your browser wallet: it asks the server for terms, you sign one USDC authorization for exactly the amount you chose, and the key appears. It's kept in your browser only.
amount is atomic USDC (6 decimals). It's a ceiling: your full input (counted generously) plus max_tokens of output at the posted rate.
3. Sign and resend
Sign an EIP-3009 transferWithAuthorization for exactly that amount to payTo, wrap it in an x402 payload, base64 it, and resend the same request with a PAYMENT-SIGNATURE header. The Arcus facilitator verifies it and, once your answer is ready, settles it and pays the gas. You never send a transaction yourself.
4. Get the answer, and the change
The response carries PAYMENT-RESPONSE (the settlement transaction) and X-Prism-Charge-USDC (what the call really cost). The difference between the ceiling and the real charge is booked to your wallet and paid back in batches.
Keep max_tokens close to what you expect: a tight ceiling means less USDC in flight per call. For many calls, a prepaid key is charged exact cost with nothing to refund.
Discovery
Agent directories can read /.well-known/x402: endpoints, models, prices, the settlement asset and the facilitator.
A byte-identical request can be answered from cache without touching a model. A hit is billed at 50% of the normal token charge and returns X-Prism-Cache: HIT.
Deterministic by default. Only requests with temperature: 0 are cached automatically.
Opt in or out per request with the X-Prism-Cache header: on caches at any temperature, off bypasses.
Tenant scoped. Your cache is keyed to your key or paying wallet. A hit never crosses tenants.
Non-streaming only, kept for 24 hours.
Fails open. Any cache problem just sends the request upstream.
Refunds
USDC is owed back to a wallet in three cases:
Change. A pay-per-call ceiling minus the real charge.
Failed deposit. A deposit settled but couldn't be credited.
Key closed. The remaining balance of a revoked key.
Refunds are booked per wallet the moment they're owed (you can see the total on the dashboard) and sent from the treasury in batches. Very small amounts wait until they add up. A paid call that fails before answering is never settled at all.
Empty replies are free
If a model returns no usable text, the charge is waived.
Hold $PRISM in the wallet that owns your key, or that signs your pay-per-call, and every call is billed lower. The threshold and rate are shown on the $PRISM page.
Checked at call time with balanceOf on Arc, cached for ten minutes per wallet.
Applies to chat, embeddings and cache hits. Responses carry X-Prism-Discount-Pct.
On pay-per-call, the ceiling you sign is the undiscounted one; the discount comes back as part of your change.
If Arc can't be read, the call goes through at the normal rate rather than failing.
The router never requires the token. Inference is always payable in USDC, and holding $PRISM doesn't entitle anyone to revenue.