<!-- TokenOS docs · P2P AI · Markdown mirror of https://tokenos.ai/docs/p2p-sell · HTML: https://tokenos.ai/docs/p2p-sell · index: https://tokenos.ai/llms.txt -->

# Sell inference without a GPU

You do not need hardware to be a provider. A seller node is a small program that sits in front of something that already answers model requests — an API key you hold, or a model running on your own machine — and sells that capacity at a price you choose. Buyers pay in credits; you receive USDC on Solana for the tokens you actually served.

> **Note — The whole mechanism in one sentence**
> A buyer's request arrives over an encrypted direct connection → your node forwards it to your upstream using your key → both sides count the tokens → the buyer signs the spend → you settle and TokenOS credits your USDC balance, net of the 4% protocol fee.

### Three ways to supply inference

**Spare API quota**

An OpenAI, Anthropic or Google key is enough. Typical sources: unused startup or cloud credits, committed-use or enterprise tiers you don't fully consume, prepaid quota, Azure OpenAI / Bedrock / Vertex allocations.

Your key never leaves your machine; seller.json only references an environment variable.

**A local model**

Ollama, vLLM, LM Studio, llama.cpp server or text-generation-inference on any GPU or Apple-silicon Mac. Point a provider block at the local URL and name the models buyers may request.

Open-weight models carry no resale restriction — you own the capacity outright.

**Both at once**

One seller.json can hold several provider blocks — a cloud key for frontier models next to an open model you run yourself — each with its own prices, concurrency and model names.

### Ten-minute setup

1. **Install the node** — Node.js ≥ 20 on any laptop, Mac or VPS: `npm i -g tokenos-p2p`.
2. **Create or import an identity** — The peer id is a Solana public key and, unless you register a separate `--payout-wallet`, doubles as your USDC payout wallet. Import the keypair of the wallet you want paid, or create a fresh one.
3. **Run the setup wizard** — `seller setup` probes the usual local ports (Ollama 11434, vLLM 8000, SGLang 30000, llama.cpp 8080, LM Studio 1234 — or `--upstream <url>`), reads each engine's model list and context window, checks the GPU (NVIDIA via nvidia-smi, Apple Silicon unified memory; CPU-only is allowed), maps local names to catalog ids, suggests a price 25% under the vendor list price and writes `~/.tokenos-p2p/seller.json`. Every prompt has a default; `--yes` accepts them all. Prefer a bare file? `seller init` still writes the sample.
4. **Register once** — The wizard ends with `seller register` (name, region, optional payout wallet and email — the one-time uptime checklist plus a Monday digest). Your node is now *pending*: registered but not yet reachable.
5. **Export your key and start** — Set the environment variable your config references (for example `OPENAI_API_KEY`) and run `seller start`. It keeps running in the foreground — use a second terminal for other commands. The node announces itself every 5 minutes and shows up in the catalog.
6. **Probation, then active** — The first 24 hours with a public endpoint are *probation*: uptime is measured from your 5-minute announces and must stay at or above 50%; after that the node is *active*. The state is informational (buyers route on price and trust, never on it) and shows in `seller status`, on your public peer page and in the [provider console](https://tokenos.ai/p2p/provide).
7. **Watch it work** — `seller status` shows your balance, sessions, trust and lifecycle; `seller checks` the Proof-of-Model results; the [provider console](https://tokenos.ai/p2p/provide) shows the same with payout controls.

**terminal**

```
npm i -g tokenos-p2p
tokenos-p2p identity create                       # or: identity import ~/.config/solana/id.json (peer id = default payout wallet)
tokenos-p2p seller setup                          # wizard: detects Ollama / vLLM / SGLang / llama.cpp / LM Studio + your GPU, maps local models to catalog ids,
                                                  #   suggests prices 25% under list, writes ~/.tokenos-p2p/seller.json and registers (--yes = unattended; seller init = bare file)
export OPENAI_API_KEY=sk-…                        # only if you added an API-key upstream; the key stays on this machine (env:OPENAI_API_KEY)
tokenos-p2p seller start                          # keeps running — opens tcp/7882 + ws tcp/7883 (+ udp/7881 for the DHT); port-forward behind NAT

# in a second terminal:
tokenos-p2p network browse --model gpt            # your offer should appear in the catalog within a minute
```

**~/.tokenos-p2p/seller.json — minimal, one API key**

```
{
  "displayName": "my-node", "region": "eu",
  "providers": [
    { "provider": "openai",
      "upstream": { "kind": "openai", "apiKey": "env:OPENAI_API_KEY" },
      "services": ["gpt-5.5", "gpt-6.1-sol"],
      "defaultPricing": { "inputUsdPerMillion": 1.00, "outputUsdPerMillion": 8.00 },
      "maxConcurrency": 4 }
  ]
}
```

Add more upstreams by appending provider blocks — this is how a key and a local model live side by side:

**seller.json — mixed providers (excerpt)**

```
"providers": [
  { "provider": "anthropic", "upstream": { "kind": "anthropic", "apiKey": "env:ANTHROPIC_API_KEY" },
    "services": ["claude-sonnet-5.5"], "defaultPricing": { "inputUsdPerMillion": 2.40, "outputUsdPerMillion": 12.00 }, "maxConcurrency": 4 },
  { "provider": "ollama", "upstream": { "kind": "ollama", "baseUrl": "http://127.0.0.1:11434/v1" },
    "services": ["llama-4-maverick"], "serviceModels": { "llama-4-maverick": "llama4:maverick" },
    "defaultPricing": { "inputUsdPerMillion": 0.10, "outputUsdPerMillion": 0.30 }, "maxConcurrency": 2 },
  { "provider": "vllm", "upstream": { "kind": "vllm", "baseUrl": "http://127.0.0.1:8000/v1" },
    "services": ["bge-m3", "whisper-large-v3-turbo"],
    "serviceCategories": { "bge-m3": "embedding", "whisper-large-v3-turbo": "audio" },
    "servicePricing": { "bge-m3": { "inputUsdPerMillion": 0.005, "outputUsdPerMillion": 0 },
                        "whisper-large-v3-turbo": { "inputUsdPerMillion": 0, "outputUsdPerMillion": 0, "audioUsdPerMinute": 0.00015 } },
    "defaultPricing": { "inputUsdPerMillion": 0.005, "outputUsdPerMillion": 0 }, "maxConcurrency": 2 }
]
```

`serviceCategories` (node 0.5+) sells a service over a different route: `embedding` → `/v1/embeddings`, billed on the engine's `prompt_tokens` at your input price; `audio` → `/v1/audio/transcriptions`, billed per minute of audio via `audioUsdPerMinute` (from the engine's `verbose_json` duration, else the file size at ≈128 kbps — the buyer meters the same bytes, so receipts match). Your node turns the JSON it receives back into the multipart upload engines such as vLLM, faster-whisper or whisper.cpp servers expect. `seller setup` guesses the category from the model name (whisper, bge, e5, nomic, …) and asks for a per-minute price for speech models.

### Upstream presets — where the capacity can come from

Anything that speaks the OpenAI HTTP shape can sit behind a provider block: set `upstream.baseUrl` for any compatible host and map buyer-facing model names to the host's ids with `serviceModels`. `upstream.extraBody` pins request fields on every call (for example a cheaper service tier) so buyers cannot switch them. Pick a preset below and paste it into your seller.json.

presets

Local model

Vendor key

Wholesale host

seller.json · Ollama

```
{
  "displayName": "my-node",
  "region": "eu",
  "providers": [
    {
      "provider": "ollama",
      "upstream": {
        "kind": "ollama",
        "baseUrl": "http://127.0.0.1:11434/v1"
      },
      "services": [
        "llama-4-maverick"
      ],
      "serviceModels": {
        "llama-4-maverick": "llama4:maverick"
      },
      "defaultPricing": {
        "inputUsdPerMillion": 0.1,
        "outputUsdPerMillion": 0.3
      },
      "maxConcurrency": 2
    }
  ]
}
```

Any GPU or Apple-silicon Mac. Your only cost is electricity and hardware you already own.

Open weights you run — no resale restriction.

Price above what the upstream costs you: the difference, net of the 4% protocol fee, is your payment for metered usage. Nothing is guaranteed — buyers route cheapest-first, then by trust. Sample prices are placeholders; the live catalog on /p2p is authoritative.

| Supply tier | Examples | Terms to check | Fit |
| --- | --- | --- | --- |
| Local open weights | Ollama, vLLM, LM Studio, llama.cpp — on your GPU, a Mac or a DeAI Compute node | None: you own the capacity | Best — no vendor dependency, cost is hardware you already run |
| Vendor key with structural discounts | OpenAI Flex / Batch (½ list), Anthropic Batches, Gemini Flex, DeepSeek off-peak, Qwen night regions | Vendor terms restrict serving third parties without authorisation — ask in writing | Large catalog; only with permission; Flex / off-peak suit latency-tolerant buyers |
| Wholesale open-model hosts | DeepInfra, Novita, CoreWeave, Nebius, Together, Fireworks | Reseller clauses vary (DeepInfra: Service Order required) — get it in writing | Cheapest open models; confirm the reseller terms before you list |
| Free / trial tiers | Groq free, Gemini free, Mistral Experiment | Trial terms exclude commercial use; several train on your data | Demo only — never for buyer traffic |

> **Note — Pricing against the catalog**
> The catalog's "savings" column compares every offer with the model maker's list price (for open weights, the price large hosts publish). Price above what your upstream costs you and below that reference; the difference, net of the 4% protocol fee, is what you receive for metered usage. Nothing is guaranteed — buyers route cheapest-first, then by trust.

### Pricing: how buyers pick you

Buyers route **cheapest first, then trust**, per model. The public catalog shows every offer next to the vendor's list price and the savings a buyer gets. You set USD per million input and output tokens (optionally a cached-input price) per service; buyers pay exactly that, converted at $0.10 per credit, and 4% comes off your side at settlement.

| Model (example) | Vendor list price (in / out per 1M) | Your offer (in / out) | Buyer saves | You receive per 1M out, after 4% |
| --- | --- | --- | --- | --- |
| gpt-5.5 | $1.25 / $10.00 | $1.00 / $8.00 | 20% | $7.68 |
| claude-sonnet-5.5 | $3.00 / $15.00 | $2.40 / $12.00 | 20% | $11.52 |
| llama-4-maverick (local) | $0.27 / $0.85 | $0.10 / $0.30 | 64% | $0.288 |

Illustrative numbers from the sample seller.json; list prices change — the live catalog on [/p2p](https://tokenos.ai/p2p) is authoritative.

> **Warning — Be honest with yourself about cost**
> If you pay full list price for your upstream, undercutting that same list price means serving at a loss. Offers that work are backed by capacity that is already cheaper than list: quota you have already paid for and would otherwise waste, discounted or committed-use tiers, cloud credits, or a model running on hardware you own. Everything you receive is payment for metered usage after the protocol fee; there are no token rewards, and running a node does not guarantee traffic.

> **Warning — Check your upstream provider's terms**
> You are responsible for making sure your vendor agreement allows serving third-party requests through your account. Some API terms restrict resale or require that the capacity be part of your own product. Open-weight models you run yourself carry no such restriction.

### What you receive and when

- **Settlement** — Your node settles at 10 minutes idle or 80% of a session budget, and again when the buyer disconnects. Each settlement credits your USD balance net of the 4% fee and refunds the buyer’s unspent hold.
- **Balance** — Visible in the console and `seller status` as available / lifetime USD.
- **Payout** — USDC on Solana, on request, minimum 1 USDC — from the console (Request payout) or `tokenos-p2p seller payout`. Paid immediately by the treasury signer; if it ever queues, an admin releases it and the console shows the transaction.
- **Reporting** — Opt-in Monday digest (sessions, USDC settled, payouts, trust change) and the one-time uptime checklist when you first save an email.

### External endpoint mode — list a URL instead of running a node

If you already run an OpenAI-compatible server (vLLM, SGLang, Ollama behind a tunnel, a cloud host, your own proxy) and do not want to operate a seller node, list its base URL from the [provider console](https://tokenos.ai/p2p/provide). TokenOS's hosted gateway relays buyer traffic to that URL, meters the tokens, signs the receipts itself and settles to your wallet exactly like a node seller — same session ledger, same 4% fee, same USDC payouts, same Proof-of-Model checks.

|  | Seller node (tokenos-p2p) | External endpoint (relayed) |
| --- | --- | --- |
| Setup | npm package, keypair identity, open ports | URL + optional API key in the console; TokenOS probes GET /models |
| Transport | Encrypted direct connection from the buyer node | Hosted gateway → your HTTPS URL (buyer nodes cannot dial you) |
| Receipts | Signed by your node | Signed by TokenOS on your behalf |
| Ranking | Cheapest first, then trust | After independent nodes, before TokenOS’s own supply |
| Trust score | 0–100 | Capped at 70; “relayed” badge on every surface |
| API key | Stays on your machine | Fernet-encrypted at rest, never returned by the API |
| Models | Any upstream kind | Up to 32 text or embedding models, catalog id → your model id |

> **Note — When to prefer which**
> Run a node when you can keep a process online and want the full trust ceiling and direct encrypted sessions. List an endpoint when the server already exists and you only want to sell its spare capacity; pausing the listing or fixing the URL takes one click, and the listing drops out of the catalog automatically while the probe fails.

### Seller bond (optional) — a refundable deposit for routing priority

Any seller — node or relayed — may deposit **20 USDC or the $TOS equivalent** with the P2P treasury from the console. The deposit is refundable, pays nothing, changes no price and is never required to sell. While it is on file the seller carries a **“bonded”** badge on the catalog, its peer page and the leaderboard, and the gateway routes it first whenever its price is within 10% of the cheapest offer for the model.

- **Deposit** — One SPL transfer from the seller wallet to the treasury (USDC or $TOS at the live price); the console submits the transaction signature, TokenOS verifies it on-chain and activates the bond.
- **Release** — Any time, from the console. Badge and priority end immediately; the same asset is returned 7 days later by the treasury signer (cancel within the cooldown to keep the bond).
- **Forfeiture** — Only after a failed Proof-of-Model check (the model announced was not the model served), opened by TokenOS staff. The seller has 48 hours to appeal from the console before a decision; a reinstated bond regains its badge and priority.
- **Vocabulary** — A bond is a deposit held against misrepresentation — it is not a stake, pays no yield or reward and is not an investment.

### Staying competitive

- **Stay online.** Peers leave the catalog 20 minutes after their last announce. Run the node as a service — see [Node operations & uptime](https://tokenos.ai/docs/p2p-uptime).
- **Build trust.** Verify a domain (DNS TXT) or a GitHub repo in `verifications` for up to 20 points immediately; closed, settled sessions add the rest.
- **Set concurrency you can honour.** Requests above `maxConcurrency` get a 429 and the buyer tries the next peer — better than timeouts.
- **Watch the catalog.** `tokenos-p2p network browse` shows every offer per model; price drops appear on the live ticker within seconds.

Full field reference for seller.json, the wire format and the public API: [protocol docs](https://tokenos.ai/p2p/docs). Package source and changelog: [tokenos-p2p on npm](https://www.npmjs.com/package/tokenos-p2p).

---

*P2P AI · TokenOS documentation. Canonical page: https://tokenos.ai/docs/p2p-sell. All docs as Markdown: https://tokenos.ai/llms.txt. Payments on TokenOS are for metered usage only; nothing on this page is investment advice or a promise of income.*
