Quick start
- Open the app and connect your wallet.
- Have NOTE: deposit into a vault to earn it, or mint it with USDC.
- Under Developers, create a key. Copy it; it is shown once.
- Point any OpenAI SDK at Prism's base URL with your key. The base URL is published at launch.
from openai import OpenAI
client = OpenAI(base_url=PRISM_BASE_URL, api_key=PRISM_KEY)
reply = client.chat.completions.create(
model="anthropic/claude-haiku-5.5",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)Anything that speaks the OpenAI chat format works the same way: LangChain, the Vercel AI SDK, LlamaIndex, and tools that take a custom base URL.
API keys
Create keys in the app under Developers. Give each app or environment its own key, so you can see what each one spends and turn one off without touching the others.
Each wallet can have up to 20 keys. Keys are stored only as hashes, so a key cannot be shown again. Keys can call models but cannot manage the account or move NOTE. Keep them on your server, never in a browser bundle.
Models
Use any model id from the list endpoint. It returns every model OpenRouter serves, from OpenAI, Anthropic, Google, DeepSeek, xAI, Meta, Mistral and more, with their prices per token.
curl $PRISM_BASE_URL/modelsAuto routing
Set model to auto and the router picks the cheapest model that can handle each request: quick questions go to a fast model, code to a stronger one, hard reasoning to the top tier.
Auto routing is for wallets holding at least 1,000 $PRISM. The response says what was picked in the x-prism-model and x-prism-tier headers. Send x-route-floor: mid or top to start from a stronger tier.
Routing only
Already have your own OpenAI, Anthropic or OpenRouter account? Keep it. Send Prism the request you are about to make and it names the model to use; you call that model yourself, with your own key. Prism never sees your provider key or the reply. Each decision is a flat $0.0002, whatever the request's size, and no $PRISM is needed. Overview and savings calculator.
const pick = await fetch(PRISM_BASE_URL + "/route", {
method: "POST",
headers: { Authorization: "Bearer " + PRISM_ROUTE_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ messages, models: { fast: "gpt-5.4-mini", mid: "gpt-5.5", top: "gpt-5.5-pro" } }),
}).then(r => r.json());
const reply = await openai.chat.completions.create({ messages, model: pick.model }); // your own keyRequest
Response
Requests
POST /chat/completions takes the standard OpenAI body. Streaming, tools, JSON mode and images pass straight through to the model.
Agents pay their way
An agent does not need to borrow your key. It can use its own Solana wallet to sign in, hold its own NOTE, and even fund itself.
Agents over MCP
Prism runs a remote MCP server, so Claude, Cursor and other agents can call any model with your NOTE: for a second opinion, to hand off to a cheaper model, or to reach one they do not have.
claude mcp add --transport http prism $PRISM_BASE_URL/mcp \
--header "Authorization: Bearer $PRISM_KEY"Billing
Every request is paid from your NOTE. You are charged for the tokens the model actually used, at the provider's price plus a 5% service fee. Every charge shows in the app with tokens, cost, time and which key made it. Routing-only decisions cost a flat $0.0002 each ($0.20 per 1,000), since no model runs on Prism's side.
Errors
Errors use the OpenAI shape, {"error": {"message", "type", "code"}}, so existing SDK error handling keeps working.
Rate limits
Each wallet can make up to 120 requests a minute across all its keys. Each wallet keeps its 5 newest agent sign-ins.