k402 Compute
A real pay-per-request AI inference endpoint on Kaspa. It speaks OpenAI, so any agent or client points at it unchanged — the only difference is that payment is native: fund a prepaid balance from any Kaspa wallet, and every call draws it down, settled on L1. No account, no card, no key.
Wallet to API in three steps
A real inference endpoint on this hardware. Fund a prepaid balance from any Kaspa wallet, call it like OpenAI, and your usage draws the balance down — settled on-chain in batches.
Fund a prepaid balance
Scan the QR with any Kaspa wallet and send TKAS — no account, no card. You get back a session key.
Open onboarding →Call the API
OpenAI-compatible. Point any client at the base URL and add your session key as one header.
GET /v1/models →Track usage
Watch your balance draw down in real time and see every on-chain settlement.
Open dashboard →from openai import OpenAI
client = OpenAI(
base_url="https://x402-compute.68cxgfyr0.workers.dev/v1",
api_key="unused", # auth is your prepaid session, not a key
default_headers={"X-Session": "YOUR_SESSION_KEY"}, # from the onboarding page
)
resp = client.chat.completions.create(
model="chat", # also: reason · code · embed
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Each call is metered against your prepaid balance (a Kaspa mandate — you can revoke the remainder), and the service draws the accrued amount on-chain in batches. Prototype · testnet-10 · the hosted balance is custodial · not for real value.
What you can call
Four OpenAI-compatible tiers, each priced per request. Pass the tier name as the model.
chat
0.05 KASGeneral chat / assistant
/v1/chat/completionsreason
0.10 KASDeeper reasoning, longer outputs
/v1/chat/completionscode
0.05 KASCode generation & tooling
/v1/chat/completionsembed
0.01 KASText embeddings
/v1/embeddingsTestnet-10 only · unaudited prototype · not for real value. The hosted prepaid balance is custodial (a demo convenience); the trust-minimized version is the per-request k402 escrow described on the Agent Commerce page.