BSV Inference
Try it

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.

Search the web is ON by default, so answers use live info regardless of a model's training cutoff. Untick it for cheaper, training-only replies.

Needs a BRC-100 wallet (e.g. the BSV browser / Metanet). No wallet? The payment step will tell you.

Pay-per-token inference · settled on BSV

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.

The mismatch

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.

Today

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.

Here

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.

How it works

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.

01

Open a channel

Fund a prepaid balance with one BSV payment. An HTTP 402 response tells your wallet exactly what to pay.

02

Call the API

Use the OpenAI SDK unchanged. Your channel is your API key — no signup, no dashboard.

03

Meter per token

Every request is priced in satoshis and drawn from your balance the moment it completes.

04

Verifiable receipt

Each charge returns a breakdown — wholesale, margin, service fee — you can anchor on-chain for audit.

Quickstart

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.

quickstart.py
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.

Agent tool

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).

mcp.json
# 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.

x402 · agent payments

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.

agent.js
# 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 } from '@bsvkey/x402-bsv-client';

const res = await fetchWithX402(
  'https://inference.bsvkey.com/v1/x402/chat/completions',
  { method: 'POST', headers: { 'content-type': 'application/json' },
    body: JSON.stringify({ model: 'grok-4.3', messages: [{ role: 'user', content: 'Say hi in 3 words' }] }) },
  { wif: process.env.BSV_WIF }        // a funded BSV key — pays the quoted sats
);

const data = await res.json();
console.log(data.choices[0].message.content);   // the answer
console.log(readSettlement(res));               // { success, transaction: <on-chain txid>, ... }

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.

For API providers

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.

provider.js
# 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 →

Price book

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 — send us a message below for volume deals.

Show amounts in
Model Input / 1k Output / 1k 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.

Volume accounts

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.

Overlay discovery

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.

discover
# 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 …
A global market for compute

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.

Permanent record

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

bsvkey.com/#site=inference

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