Home / Use cases / perplexity-api-billing

Perplexity API with USDC billing — agent-ready search

The problem

Perplexity's pay-per-call pricing is great, but you still need a way to gate end-user spend on your tool.

What Spawnpay does

Wrap Perplexity calls in the Spawnpay paywall. End-user pays USDC, you pass through Perplexity costs + your margin.

Code

curl -X POST https://spawnpay.ai/api/proxy\
  -H 'Authorization: Bearer spk_live_...'\
  -H 'Content-Type: application/json'\
  -H 'X-Provider-Key: $PERPLEXITY_API_KEY' \
  -d '{  "provider": "perplexity",  "path": "/chat/completions",  "method": "POST",  "body": {    "model": "sonar",    "messages": [      {        "role": "user",        "content": "hi"      }    ]  }}'
60-SEC QUICKSTART → PLAYGROUND → TOP UP USDC →

What you get with $7 free credit

Every new spk_ wallet starts with $7. That covers 7,000 proxy calls, 1,400 cloud-scrapes, or 700 screenshots — enough to verify Spawnpay fits your workflow before topping up.

See also