Home / Use cases / byok-proxy-with-billing
BYOK proxy with built-in billing — one key, every provider
The problem
You want a unified billing pipeline across OpenAI, Anthropic, Brave, Replicate, ElevenLabs, etc. — but you do NOT want to resell anyone's tokens (TOS hell).
What Spawnpay does
Spawnpay's proxy is BYOK passthrough. Each end-user brings their own provider key in X-Provider-Key. Spawnpay charges them $0.001 per upstream 2xx and forwards the body 1:1. Zero reselling. Full unified receipts.
Code
curl -X POST https://spawnpay.ai/api/proxy\
-H 'Authorization: Bearer spk_live_...'\
-H 'Content-Type: application/json'\
-H 'X-Provider-Key: $OPENAI_API_KEY' \
-d '{ "provider": "openai", "path": "/v1/chat/completions", "method": "POST", "body": { "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "hi" } ] }}'
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.