PI402 mainnet seller

Pay for inference by the token, with bitcoin.

This is a live seller. There are no accounts and no API keys. Your first request gets an HTTP 402 with a Lightning invoice, you pay it, and the same request goes through. The seller speaks both L402 and MPP (the Payment HTTP auth scheme), so any client that supports either can pay.

Model

deepseek-v4-1-flash OpenAI-compatible chat completions · 1M token context · served through Venice

Price

USD / MtokUSD / tokensats / tokenmsats / token
input$0.375$0.000000375……
output$1.50$0.0000015……

Fetching the BTC/USD rate…

The seller's cost is $0.30 input and $1.20 output per million tokens, plus a 25% margin. Dollar prices are fixed. The bitcoin price follows the market, so the sats figures above use the current spot rate. A request is metered in whole millisatoshis and rounded up.

The first request buys a bundle of 500,000 tokens. Later requests draw it down until it runs out, and a bundle stays usable for 30 days. The 402 response shows the exact invoice amount before you pay.

Connect with Pi

  1. Install the extension in Pi.

    pi install npm:@lightninglabs/pi-402
  2. Point it at this seller and start Pi.

    export L402_PROXY_URL="https://pi402.roasbeef.computer/api/v1"
    pi
  3. Fund the built-in wallet over Lightning, then pick the model.

    /fund 10000
    /model pi402/deepseek-v4-1-flash
    # prompt as usual. /balance and /receipts show what you spent

This is mainnet and the payments are real. pi402 asks before it pays anything above your per-request limit.

Or call it directly

An unpaid request returns a challenge for each scheme:

curl -i https://pi402.roasbeef.computer/api/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"deepseek-v4-1-flash","messages":[{"role":"user","content":"hi"}]}'
# HTTP/2 402, with a WWW-Authenticate challenge carrying a Lightning invoice