Billing & Wallet — OneHub
Each API request is priced per model, converted to USD, and automatically deducted from your OneHub wallet.
Docs
Docs Quick Start Authentication SDK Setup Available Models Rate Limits Chat Completions Streaming List Models Embeddings Image Generation Text to Speech Speech to Text Billing & Wallet Webhooks ErrorsBilling & Wallet
Wallet basics
- Credits are stored as USD in your wallet (viewable in your dashboard).
- Free models (listed in Available Models) cost $0.
- When your wallet balance is insufficient for a paid model, the request is rejected with
402 Payment Required(see Errors).
Adding credits
Purchase a OneHub Lifetime license ($149) via PayPal to fund your wallet. After payment, contact
support@onehub.design with your account email and amount so credits are applied. Credits are
added via the secured POST /billing/webhook endpoint, which verifies an HMAC-SHA256
signature using your PAYMENT_WEBHOOK_SECRET. You can also top up programmatically:
curl https://<your-deploy>.convex.cloud/billing/webhook \
-X POST \
-H "Content-Type: application/json" \
-H "x-onehub-signature: sha256=<hmac>" \
-d '{
"userId": "USER_ID",
"amount": 100,
"reference": "manual-topup"
}'
Cost calculation
Costs are approximations based on published provider pricing, normalized to per-1M-token rates.
The cost field on each usage log is rounded to 4 decimal places.