1
Get a project key
Sign in to the Velobase Dashboard, open your
project, and create an API key under Keys. It looks like
vb_live_…. This
is your backend key; never ship it to a browser or mobile client.2
Fund an end-customer
A model call needs a funded customer wallet. Create/fund one with your app’s
own user id:
amount is integer credits: 1 USD = 1,000,000 credits, so this deposits $5.00.
The customer is created on first deposit. In production you call this from your
backend after the user pays you, using the payment event id as the
idempotency_key.3
Make a billed model call
Point the OpenAI SDK at Velobase and tag the call with the customer to bill:The call debits
user_123’s wallet and returns the cost on the response
headers. If you see 402 insufficient_balance, the customer wallet is empty;
if you see 402 byok_key_required, the model has no upstream provider key
attached yet (fix it in the dashboard’s Models section).4
Check the balance
available figure dropped by the call’s cost. Or read it through a
Python / JavaScript
SDK.5
Reconcile usage
Every call shows up in usage with its cost, tokens, and transaction id:Match each row’s
transaction_id to the x-velobase-transaction-id you got
back from the call. That is the full loop: charge per customer, per call, fully
reconcilable.Where to go next
OpenAI-Compatible Gateway
Streaming, billing headers, per-project models, and the Copy-for-AI prompt.
Depositing Credits
Amount units, wallet categories, and idempotency.