Home / Use cases / cohere-embedding-paywall

Bill per Cohere embedding — production-grade rate gate

The problem

Embeddings run in batches of thousands. A single misconfigured pipeline can spike usage 100x in minutes.

What Spawnpay does

Route Cohere through Spawnpay proxy. Use the paywall SDK with `perCall` cap to bound max embedding batch size by USDC cost.

Code

curl -X POST https://spawnpay.ai/api/proxy\
  -H 'Authorization: Bearer spk_live_...'\
  -H 'Content-Type: application/json'\
  -H 'X-Provider-Key: $COHERE_API_KEY' \
  -d '{  "provider": "cohere",  "path": "/v1/embed",  "method": "POST",  "body": {    "texts": [      "hi"    ],    "model": "embed-english-v3.0"  }}'
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