Get your API key
- Sign in to the Velobase Dashboard.
- Create a project if you haven’t already.
- Go to Keys and generate a new key.
vb_live_is a project key. Use it server-side and tell Velobase who to bill with theX-Velobase-Customer: <user-id>header.vb_customer_is a customer-scoped key. It carries its own customer binding, so no header is needed.
Fund a customer wallet
Add funds to a customer’s wallet. If the customer does not exist yet, Velobase creates them automatically.Amounts use explicit unit fields:
amount_usd, amount_cents, or amount_credits, where 1 USD = 100 cents = 1,000,000 credits. Prefer amount_usd.Make a model call
Point your OpenAI or Anthropic SDK at Velobase forwards the request upstream, settles the real token cost against the customer’s wallet, and returns per-call billing details in the response headers:
https://api.velobase.io/v1 and pass X-Velobase-Customer to say which wallet to bill. Velobase is model-agnostic: live models include deepseek/deepseek-v4-pro (supports streaming) and the anthropic/claude-* family such as anthropic/claude-opus-4.8, anthropic/claude-sonnet-4.6, and anthropic/claude-haiku-4.5 (served on Bedrock, non-streaming). More are available via upstreams.x-velobase-cost-centsandx-velobase-cost-credits: what this call cost.x-velobase-balance-credits: the wallet balance after the call.x-velobase-transaction-id: the ledger transaction for this call.
You can list available models with
GET /v1/models and review aggregated spend with GET /v1/usage.Bill work you price yourself (optional)
For work that is not a model call (for example image generation or a fixed-price feature), use the billing ledger primitives directly. Charge a customer in two ways:
- Use direct deduction when the cost is known upfront.
- Use staged deduction when the final cost is only known after execution.
- Option A: Direct deduction
- Option B: Staged deduction
Use this for fixed-price operations such as image generation or a known API call cost.This deducts $0.20 immediately.
SDKs
Prefer a typed client? Install the Velobase billing SDK and pin the version:Next steps
Funding wallets
Wallet categories, validity periods, and balance breakdown.
Direct deduction
Charge immediately when cost is known.
Staged deduction
Freeze first, then settle the actual cost.
API reference
Complete endpoint reference.