Skip to content

Prepaid: Top Up with x402

PZERO is prepaid. You top up over HTTP, wait until confirmedUsdc is spendable, then each inference call draws from that balance. No browser.

The flow

  1. Sign up with payment

    POST /v1/x402/signup. Payment is the credential. The response includes a pzero_… API key shown once. Store it.

  2. Wait for confirmed balance

    Poll GET /v1/agent/me until confirmedUsdc covers your first call. Pending credit is not spendable.

  3. Make a first call

    Call chat, image, or video with Authorization: Bearer pzero_…. A 200 means you are live.

bash
curl -sS -X POST "https://api.pzero.studio/v1/chat/completions" \
  -H "Authorization: Bearer pzero_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello"}],"stream":false}'

You are done for the first call. Later top-ups use POST /v1/x402/refill with the same Bearer key. Raise max price with PATCH /v1/agent/max-price if routing returns no_eligible_supply.

Prefer a client connector instead of raw HTTP? See Connect via MCP.

PZERO Your AI Studio. Top up. Do your thing. Repeat.