Buy inference

Keys, spend limits, the buyer node and SDK setup. This page is part of the P2P AI chapter of the TokenOS documentation.

Embeddings and audio transcription

The same routing, sessions and receipts cover two non-chat routes. /v1/embeddings reaches sellers that mark a service embedding and is billed on usage.prompt_tokens at the seller's input price (no output tokens). /v1/audio/transcriptions reaches sellers marked audio and is billed per minute of audio — the catalog shows $ / min for those models. Send the file as multipart (what every OpenAI SDK does); the gateway or your buyer node converts it to JSON with a base64 file for the encrypted hop, and the seller rebuilds the upload for its engine. Both sides read the duration the engine returns ( verbose_json , used automatically for JSON formats; text / srt / vtt pass through and fall back to the audio size at ≈128 kbps), so buyer and seller metering agree. Files up to 25 MB. The TokenOS reference provider offers whisper-1 , whisper-large-v3-turbo and bge-m3 so the routes work before any independent seller lists a speech or embedding model; both routes need a key (they are not quoted over x402).

Routing and controls

What protects you

Cost

Hosted gateway and x402 pay-per-request

Cannot run a node — a serverless function, a hosted agent, or a one-off script? Point the SDK at https://tokenos.ai/api/p2p/v1 with your tos_ key as the API key. TokenOS runs a buyer node for you with the same sellers, routing and session caps; your key pays from your credits. The trade-off is explicit: on the hosted path your prompts pass through the TokenOS gateway on their way to the seller, whereas the local node is relay-free.

Agents without a TokenOS account pay per request with x402 : the first call answers 402 with a PAYMENT-REQUIRED challenge whose USDC amount is quoted for that exact request (prompt size plus the max_tokens cap at the cheapest trusted peer). Pay it in USDC on Solana and retry the identical body with the transaction signature — or let an x402 v2 client sign the challenge. The resource is described at /api/p2p/v1/x402 and carries the x402 Bazaar discovery metadata, so agent marketplaces (Coinbase Bazaar, Agentic.Market) can index it.

An x402 quote covers the whole output cap, whether or not the model uses it, so set max_tokens (or max_output_tokens ) deliberately. The same quote logic applies to /v1/messages (Anthropic shape — system counts toward the prompt) and /v1/responses ( input , instructions , tools ). Key holders are never quoted: they pay exactly the metered usage like a local node.

Enterprise tier

Teams that need an availability target, priority routing and a named support channel can ask for the Enterprise tier at /p2p/enterprise (pricing per agreement). TokenOS flags the tos_ keys you choose as enterprise : the first-session cap with a new seller is lifted, the hosted gateway reserves 100-credit session holds instead of 10 (fewer settle round-trips), failover tries five sellers instead of three, Proof-of-Model-verified and bonded sellers are preferred within a 25% price band with trust breaking ties before price, up to 50 keys per wallet, and every gateway response carries x-tokenos-tier: enterprise . Your own daily / monthly / total spend limits stay in force. Enterprise wallets also see a monthly SLA availability report in the buyer console (hosted gateway and reference seller, measured from the same one-minute status samples as /status ; GET /api/p2p/enterprise/sla?month=YYYY-MM ), and every session in the list carries receipt chips — enterprise priority, verified, bonded, reference seller — recorded when the session was reserved. The SLA (99.9% monthly for the hosted gateway and the reference seller, with service credits) and the support channel (Sev-1 response within an hour, 24×7) are written into the agreement — nothing about the protocol, the sellers or their posted prices changes.

Protocol details — session flow, SpendingAuth and receipt formats, public API: protocol docs .

Cheapest offer for the requested model first, then higher trust. Unscored (“new”) peers are eligible unless you set --min-trust.

Budget per session (default 10). The first session with a seller you have never used is capped at 10 credits regardless.

Force a specific seller for the node or for one request (header).

Indexer-only discovery, for networks that block outbound UDP.

Daily, monthly and total credit limits per key; the node returns 402 spend_limit_reached when one is hit. Revoke a key at any time.

$0.10 of provider usage; bought with USDC or $TOS (the $TOS pack is cheaper)

Exactly what the seller announced, converted at $0.10 per credit — visible in the catalog with the savings vs the vendor list price

4%, deducted from the seller side — nothing is added on top of the buyer price

Refunded to your balance when the session settles or closes

Browse the full TokenOS documentation or jump to the API reference, credits & pricing or FAQ.

About TokenOS

TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.

Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.