Pay with your BSV wallet, per token.
Open a channel straight from your BRC-100 wallet, then run a real inference. No account, no card — the payment is a BSV micropayment your wallet signs.
Have a channel? Gate an output and get a signed receipt — try attestation ↓
Tick Search the web for answers that use live info regardless of a model's training cutoff. It is off by default for cheaper, training-only replies.
Needs a BRC-100 wallet (e.g. the BSV browser / Metanet). No wallet? The payment step will tell you.
Buy inference by the token. No subscription. No account.
An OpenAI-compatible gateway that meters every token and settles in BSV micropayments. Point your existing SDK at one URL, drop in a wallet, and pay only for what you use, switching models per request.
Every call is metered per token and settled in BSV, with the on-chain settlement reference returned in the response, so you can verify exactly what you paid.
Subscriptions bill the month. Agents spend by the token.
A monthly plan locks you to one provider and one price. But an autonomous agent makes thousands of calls across many models, and the right model changes by the request. Per-token settlement lets the market move at the speed the work actually moves.
Prepay a month, per provider
A new model ships and you add another monthly bill. Card fees, minimums, and an account that can be frozen or rate-limited without recourse.
Pay per token, switch instantly
Drop your bill to zero between calls. Fund a channel once, then draw it down token by token — and route to a better or cheaper model the next second.
Four steps, one of them on-chain.
One on-chain transaction per token would cost more than the token. So the chain settles only when a channel opens; every token after that is drawn off-chain, instantly.
Open a channel
Fund a prepaid balance with one BSV payment. An HTTP 402 response tells your wallet exactly what to pay.
Call the API
Use the OpenAI SDK unchanged. Your channel is your API key — no signup, no dashboard.
Meter per token
Every request is priced in satoshis and drawn from your balance the moment it completes.
Verifiable receipt
Each charge returns a signed breakdown (wholesale, margin, service fee), and receipts anchor to BSV in an OP_RETURN, Merkle-batched, so an audit trail is timestamped and tamper-evident on-chain.
Don’t trust the bill. Check it.
Every call returns a receipt the broker signs. From the text you sent and got back, you can recompute the token count, recompute the charge from the published rate, and confirm your running balance adds up. No account, and no need to ask us.
The count is yours to recompute
Tokens are a published function of the exact bytes exchanged. Run the same meter over your prompt and the answer, and the numbers must match the receipt. The charge is a fixed formula over those numbers and the signed rate.
Even the thinking is on the receipt
Reasoning models are billed for thinking you never see. When a call has it, the receipt says so: hidden tokens are signed, separate fields taken from the provider’s own usage report, and never more than the output limit you set.
Signed by a key you pin
Receipts are signed with the key published at /v1/receipt-key. The open-source verifier refuses any receipt that isn’t signed by the key you pinned, and any chain of receipts that skips, repeats, or spends past what you funded.
Check a receipt in your browser → · Read the receipt spec · See our receipt roots re-checked on the Proof Wall · @bsvkey/x402-bsv-client
Change one line: the base URL.
Anything built on the OpenAI SDK works here. Your channel id and secret are the API key; model "auto" lets the broker route to the cheapest capable model.
from openai import OpenAI client = OpenAI( base_url="https://inference.bsvkey.com/v1", # the only change api_key="<channelId>:<channelSecret>", # your BSV channel ) resp = client.chat.completions.create( model="auto", # or a specific model messages=[{"role": "user", "content": "Explain per-token billing."}], ) print(resp.choices[0].message.content) print(resp.x_bsv["charge"]) # {totalSats, wholesaleSats, marginSats, rakeSats}
No channel yet? Any request answers with HTTP 402 and a payment request your BRC-100 wallet can pay automatically. Fund once, then spend per token.
Drop it into your agent (MCP).
Give any MCP-capable agent — Claude Code, Claude Desktop, Codex, OpenCode — a pay-per-token inference tool that talks to this gateway. Your agent buys Claude or Grok by the token and settles in BSV. Five tools: list_models infer channel_balance open_channel x402_infer — the last pays per call over x402 (no channel).
# Claude Code — one line: claude mcp add bsvkey-inference --env BSVKEY_API_KEY=<channelId>:<channelSecret> -- npx -y @bsvkey/inference-mcp # or any MCP host (Claude Desktop, Codex, ...) — mcp.json: { "mcpServers": { "bsvkey-inference": { "command": "npx", "args": ["-y", "@bsvkey/inference-mcp"], "env": { "BSVKEY_API_KEY": "<channelId>:<channelSecret>" } } } }
No key needed to browse — list_models returns live prices. Fund a channel once with the widget at the top, paste the key, and your agent pays per token. Published on npm as @bsvkey/inference-mcp. Portable skill file: /mcp/SKILL.md; no-npm fallback: /mcp/server.js.
Or pay per call with x402 — one line.
This gateway speaks x402, the open HTTP-402 payment standard for AI agents (backed by Coinbase, Cloudflare, Visa, Mastercard, Google). We implement the BSV settlement scheme — so an agent pays for a single inference in BSV, no account and no channel. The payment builder is on npm; it handles the whole 402 handshake for you.
# install the BSV x402 payment builder npm i @bsvkey/x402-bsv-client @bsv/sdk // pay for one inference in BSV — the 402 handshake is handled for you import { fetchWithX402, readSettlement, verifyX402ReceiptFull } from '@bsvkey/x402-bsv-client'; const body = { model: 'grok-4.3', messages: [{ role: 'user', content: 'Say hi in 3 words' }] }; const res = await fetchWithX402( 'https://inference.bsvkey.com/v1/x402/chat/completions', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) }, { wif: process.env.BSV_WIF } // a funded BSV key — pays the quoted sats ); const data = await res.json(); const answer = data.choices[0].message.content; const paid = readSettlement(res); // your payment: { success, transaction: <txid>, payer } // data.receipt is the signed delivered receipt. Check it against the key you // pinned (fetch it once from /v1/receipt-key and store it) and YOUR txid. const check = await verifyX402ReceiptFull(data.receipt, { expectedSigner: process.env.BSVKEY_RECEIPT_KEY, settlementRef: paid.transaction, messages: body.messages, completion: answer, }); console.log(answer, paid.transaction, check.ok); // ok = pinned key, your payment, this exact answer
No channel, no login: the client builds and signs a BSV payment for the quoted amount, retries with the X-PAYMENT header, and returns the answer — the on-chain settlement txid comes back in X-PAYMENT-RESPONSE. Discover the endpoint at /v1/x402; facilitator at /v1/x402/verify and /v1/x402/settle. Published on npm as @bsvkey/x402-bsv-client.
Every x402 call also returns a signed delivered receipt (bsvkey.x402-receipt/1) alongside the answer: it binds a hash of the exact completion to the settlement transaction, signed by the key you pin at /v1/receipt-key. So you can verify, offline and a session late, that this response was delivered for this payment, without asking the gateway.
Prefer USDC? The same gateway also settles in USDC on Base through Coinbase's x402 facilitator, at /v1/x402/base/chat/completions. Any standard x402 v2 client (the whole Coinbase and Base agent ecosystem) pays for one inference with the stablecoin it already holds, no BSV required, and settlement lands on-chain in the payer's own USDC. It is the same OpenAI-compatible request, priced identically, with a $0.01 minimum per call. Standard x402 v2 flow: the requirements come back in the PAYMENT-REQUIRED header, the client pays with PAYMENT-SIGNATURE, and the settlement txid returns in PAYMENT-RESPONSE. Discover it with a GET to that URL.
Try it free on testnet first.
Run the whole x402 handshake with free BSV testnet coins before you spend real ones. The testnet endpoint quotes a real price, takes a real signed testnet payment, broadcasts it, and returns a signed delivered receipt you can check. The reply is a sandbox message rather than a model call, so testnet coins never buy real inference. Change one URL to go live.
# 1. make a testnet key, then fund its address from a BSV testnet faucet # (testnet addresses start with m or n) node --input-type=module -e "import {PrivateKey} from '@bsv/sdk'; const k=PrivateKey.fromRandom(); console.log(k.toWif(), k.toAddress([0x6f]))" # 2. run the same code as above against the testnet URL, paying with that key https://inference.bsvkey.com/v1/x402/testnet/chat/completions # -> model "sandbox:grok-4.3", a testnet txid in X-PAYMENT-RESPONSE, a signed receipt # 3. go live: drop "/testnet" from the URL and pay with a mainnet key
The client reads the network from the 402, so the same @bsvkey/x402-bsv-client code pays on testnet with no other change. Paste the response into the receipt checker to see every check pass, including the testnet transaction on WhatsOnChain.
Prove the output met the contract, not just that it was paid for.
The same signed receipt that meters a call can also attest to what the call produced. Turn it on and you get four kinds of offline-verifiable receipt, all signed by the one key you already pin (GET /v1/receipt-key): a compliance receipt that gates an output against a frozen contract of deterministic conditions, a preregistration receipt that commits that contract before you run so the bar cannot move afterward, an authority receipt that proves a capability travelled an authorized chain of custody, and a closure receipt that proves a coarse metric still predicts the real outcome before you bill on it. It is off by default: existing callers see no change, and the endpoints answer only when you opt in.
# 1) commit the contract BEFORE you run (preregistration) curl -s https://inference.bsvkey.com/v1/attest/prereg \ -H "authorization: Bearer <channelId>:<channelSecret>" \ -H "content-type: application/json" \ -d '{"contract":{"id":"summary-v1","conditions":[ {"id":"has_price","type":"contains","arg":"$"}, {"id":"no_todo","type":"not_contains","arg":"TODO"}]}}' # -> { contractHash, receipt } the planHash is committed on the record # 2) gate an output against that SAME frozen contract curl -s https://inference.bsvkey.com/v1/attest/verify \ -H "authorization: Bearer <channelId>:<channelSecret>" \ -H "content-type: application/json" \ -d '{"contract":{ ...same... },"artifact":"The total price is $42.00."}' # -> { contractHash, matchesPrereg: true, receipt } signed by the key you pin
The load-bearing link: a compliance receipt's contractHash equals the preregistration planHash for the same contract (both are sha256 of the canonical contract), so the gate provably checked the plan you committed, not an abridged brief. Conditions are deterministic (contains, not_contains, regex, min_len, equals, json_has), so there is no model in the verification loop. Verify offline by recovering the signer and comparing it to the pinned key. Prereg and verify each draw a flat add-on fee from your channel; authority verification at /v1/attest/authority/verify is a free read. Try it live in the box below.
Gate an output against a frozen contract and get a signed compliance receipt, verified right here in your browser against the pinned key. It uses the same wallet and channel as the Try it box at the top: set up your wallet there once, then run checks here. Each check draws the small flat fee.
Have an API? Charge for it in BSV — per call.
Drop a paywall in front of any HTTP API and agents pay per request in BSV — no accounts, no cards, genuinely sub-cent. It's the same x402 rail that runs this gateway, packaged so you keep 100% of the revenue at your own address. No billing to build; nothing for your customers to sign up for.
# drop-in gateway — front any existing API, no code changes to it npm i @bsvkey/x402-paywall import { createPaywallServer } from '@bsvkey/x402-paywall'; createPaywallServer({ origin: 'https://your-api.example', // your existing API, untouched payTo: '<your BSV address>', // where the money lands — you keep 100% priceUsd: 0.002, // per call, USD-pinned, settled in BSV }).listen(8080); // http://localhost:8080/* is now your API, paywalled in BSV.
Monetize any endpoint with pay-per-call BSV settlement. Use the open-source toolkit @bsvkey/x402-paywall to self-host, or let us run it: BSVKey Paywall Cloud is the hosted SaaS tier. Create an endpoint, set your price in USD, receive settlement in BSV. Non-custodial: the money goes straight to your address. Starter $29/mo (1 endpoint, 100k calls/month), Growth $129/mo (5 endpoints, 2M calls/month), Scale $499/mo (unlimited). Toolkit source →
Not a mockup. We ran the whole loop on mainnet — an agent paid a $0.001 (tenth-of-a-cent) call and it settled in BSV, no account, no card. That's the point USDC-on-Base can't reach: below the ~1¢ floor, sub-cent for real. See the settlement on-chain →
Retail price, in satoshis per 1,000 tokens.
No monthly minimum — a request that costs a fraction of a satoshi is billed a fraction of a satoshi. Volume discounts available: tell us what you need below.
| Model | Input / 1k | Output / 1k | Typical call* | Tier |
|---|---|---|---|---|
| Live prices load here — or see inference.bsvkey.com/v1/pricebook | ||||
1 BSV = … · prices are pulled live from the running broker and track the rate — this table is never stale. Fiat is a live FX estimate.
* Typical call = 500 tokens in + 500 tokens out, metered on a channel. Thinking models also bill their hidden reasoning, shown on the receipt. Price any call size, with live x402 quotes →
Doing real volume? Let’s set you up.
Prepaid channels work out of the box with no minimum. For committed volume, custom margins, invoicing, a dedicated endpoint, or other settlement assets, tell us what you need.
Discoverable, not gatekept.
The service and its live price book are published to a BSV overlay topic, so any wallet or agent can find it trustlessly — no central directory deciding who is listed.
# publish this broker's offer to the overlay topic $ npm run advertise → Published offer to topic tm_bsv_inference # any client resolves the topic to find live offers $ npm run discover • BSV Inference Broker (mainnet) endpoint: https://inference.bsvkey.com/v1/chat/completions markup: 0.9 service fee → 1LdqUbdZ…82cv models: claude-sonnet-5@114,151sat/1k, claude-haiku-4-5@57,076sat/1k …
Machine-readable for agents and tools: the full API is described by an OpenAPI spec at /openapi.json (auto-integrate, generate a client, or feed it to an agent framework), and the x402 payment manifest at /.well-known/x402 advertises how to pay. No SDK required.
Compute is global. Payment should be too.
Pay-per-token settlement in BSV moves value across borders in seconds — no monthly commitment, no account to be locked out of, and fees low enough that reselling inference stays profitable at the margin.
This is the business under the API: buy inference wholesale, resell it metered per token, settle instantly on BSV, and keep the margin. The rails scale to millions of transactions per second — the ceiling is your sales, not the chain.
Inscribed on-chain — and it points the way home.
A copy of this page lives permanently on BSV, so it can’t be taken down or altered. If a domain is ever blocked, this record still resolves — and tells you how to reach the live service.
Permanent on-chain copy
Live endpoint
https://inference.bsvkey.com/v1
If that endpoint is unreachable, resolve the current one trustlessly from the BSV overlay topic:
tm_bsv_inference
Questions, answered.
Can I pay in USDC or XRP instead of BSV?
Yes. The same inference is sold on three rails, and the caller picks: BSV at /v1/x402/chat/completions (native, sub-cent per call), USDC on Base at /v1/x402/base/chat/completions (settled through Coinbase's x402 facilitator, $0.01 minimum), or XRP on the XRP Ledger at /v1/x402/xrp/chat/completions (a signed XRP payment per call; try it in your browser). Same models, same request, same answer, only the settlement asset differs.
Do I need an account or a login?
No account, no signup, no card. With x402 you pay per call: your client library runs the payment handshake and gets the answer back. You do need a funded wallet on the rail you choose, a BSV key for the BSV rail, or a self-custody wallet holding USDC on Base for the USDC rail.
Is this for AI agents or for people?
Built for agents and apps. x402 is the open HTTP-402 payment standard, so an agent's client library discovers the price, pays, and retrieves the completion automatically, with no human in the loop. There is also a browser Try-it box on this page for people who want to pay from a BSV wallet by hand.
Which models can I call?
Claude (Haiku 4.5, Sonnet 5, Opus 5, Opus 5.5, Fable 5.1) and xAI Grok. Ask for a specific model, or use auto / cheapest / best and the router picks one. Optional web search is available and priced per search.
Is it really OpenAI-compatible?
Yes. It speaks the OpenAI chat-completions shape, so in most SDKs you change one line, the base URL, and keep your existing code. The full API is published as an OpenAPI spec at /openapi.json, so agents and tools can auto-integrate.
How do I know I was billed fairly?
Every call returns a signed usage receipt you can verify offline: recompute the meter and recover the signer against the one key you pin (GET /v1/receipt-key). Metering is auditable, not trust-me. The x402 settlement itself is on-chain, its transaction id comes back with the response.
How do I know I got what I paid for?
Each x402 call also returns a signed delivered receipt (bsvkey.x402-receipt/1): its signed body binds a hash of the exact answer (outputDigest) to the settlement transaction, under the same key you pin at GET /v1/receipt-key. So you can verify, offline and a session late, that this exact response was delivered for that payment, without asking the broker. It attests delivery, not that the output is correct.
Can I get a fixed price before I call?
Yes. POST /v1/quote with a job manifest (model, the most input and output tokens you will send and accept, and your budget) and the broker returns a signed quote: the exact rate card and a hard ceiling in satoshis. Send it back as x_bsv_quote on /v1/chat/completions and that one call runs on the quoted model and rates and is never billed above the ceiling. When the call starts, the ceiling is held on your channel: other calls cannot spend it, and as soon as the call settles you are charged the actual amount and the rest is free again. If your channel cannot cover the ceiling, the call is refused before anything runs and the quote stays usable. A quote is good for one call, expires after about five minutes, and if you asked with your channel key it can only be used by that channel. Web search is not available on quoted calls, because its cost cannot be known in advance.
What does a job settlement prove, and what does it not?
A quoted call returns a signed bsvkey.job-settlement/1 that links your manifest, the quote and the usage receipt. Checked offline against the key at GET /v1/receipt-key, it proves the broker signed the terms, billed you on the quoted rates, stayed under the ceiling, and counted tokens you can recount from the exact text. It states plainly what it does not prove: which hardware ran the job (a hosted model gives no attestation) and whether the answer is correct. A signed receipt for a wrong answer is still a receipt for a wrong answer.
Where do I find my API key?
Your channel is your API key. After you open a channel with Pay and run, click copy API key next to the channel balance; it copies channelId:channelSecret for the OpenAI SDK, curl, or the MCP server. Treat it like a password: anyone holding it can spend the channel.
Who holds the money in my channel?
You choose when you open it. A standard channel is a payment from your wallet to BSVKey for inference you will use: the satoshis go to BSVKey's own address, and the prepaid balance is kept in BSVKey's ledger, not in your browser, and drawn down per call with a signed receipt for each. A non-custodial channel (tick non-custodial (beta) before Pay and run, or use /v1/nc/* from code) keeps your deposit on the Bitcoin BSV blockchain in an output that needs both your signature and BSVKey's to move. Before anything is sent you receive a refund signed by BSVKey that returns the deposit after about seven days if BSVKey never settles; keep a copy with save refund. After each call your wallet checks the signed receipt and signs for exactly that running total, and BSVKey can only ever settle a total you signed. Close and settle sends what you used to BSVKey and the rest of the deposit back to you straight away. The design was tested on mainnet on 12 October 2026.
What do I need for a non-custodial channel?
A wallet loaded in this page (paste a recovery phrase or WIF, or create one), because your browser signs for each call; wallets connected through BRC-100 are not supported for it yet. The minimum deposit is 10,000 sat and a deposit cannot be topped up: when it runs out, the page settles the channel and opens a new one. Whatever a call adds in whole satoshis must be signed for before the next call runs, and a channel stops taking calls about a day before its refund unlocks so it can be settled in time. Settling or refunding costs a 50 sat network fee, taken from the deposit.
What if BSVKey disappears while my non-custodial channel is open?
Your deposit is not lost. The refund you saved when you opened the channel is a complete, signed transaction that pays the deposit, less the 50 sat fee, back to your wallet. Once the chain passes the block number inside it (about seven days after opening), broadcast it with any BSV broadcast service. Calls you already signed for are part of BSVKey's settlement only if BSVKey settles first; if it never does, the refund returns everything.
Can a call cost less than one satoshi?
Yes, on a non-custodial channel. There each call is charged exactly, in thousandths of a satoshi, with no rounding up per call. Your wallet signs whole satoshis as the running total passes each one, and the last fraction is settled once when you close, rounded to the nearest satoshi (half up). Every receipt shows the exact charge (bsvkey.usage-receipt/4), so you can recompute it from the token counts and rates it carries. A standard channel still charges whole satoshis per call, rounded up, with a one-satoshi minimum.
Why does the wallet use a fixed network fee?
The wallet pays 100 satoshis per kilobyte, the current published mining fee. Looking the rate up live would mean letting this page, which can hold your recovery phrase, talk to another outside server, so we fix it instead; a typical channel payment costs a few dozen satoshis in network fees.
Why three rails, and when should I use each?
BSV is the low-cost native rail with true sub-cent fees, best for high-frequency, tiny payments and prepaid channels. USDC on Base lets the large Coinbase and Base agent ecosystem pay with the stablecoin it already holds. XRP lets anyone holding XRP pay per call, settled on the XRP Ledger in a few seconds. Same product on all three.
How do I pay in XRP?
Open inference.bsvkey.com/xrp.html, load an XRP wallet (paste the seed or import a backup file from xrp.bsvkey.com), ask your question, and confirm one payment. Agents use POST /v1/x402/xrp/chat/completions: the 402 quotes the exact drops, a destination tag, and a signed quote; the agent signs one XRP Payment for exactly that and retries. The MCP server's xrp_infer tool does all of this for you.
How is the XRP price set?
From the XRP Ledger itself. We read the XRP/RLUSD pool and order book on the ledger and use the lower of the two XRP prices, so a bad read can only make a call cost slightly more, never less. The USD price of each call is the same on every rail; only the conversion differs.
Why can't I spend all the XRP in my wallet?
The XRP Ledger keeps a 1 XRP reserve locked in every account, so you can spend only what is above it, less a tiny network fee. The page shows your spendable amount before you pay and refuses a call you cannot cover.
Is my XRP seed safe on the pay page?
The seed stays in the page's memory only. It is never stored or sent; only the signed payment leaves your browser, and the page may connect only to public XRP Ledger nodes. The server checks your signed payment before broadcasting it, so a wrong or short payment is refused before it reaches the ledger.
What if the model fails after I pay in XRP?
Payments are checked before they are broadcast, so most problems are refused with nothing spent. If the payment settles and the model then fails, you get the settlement transaction ID. There is no automatic refund: email embryospace@gmail.com with that ID.