Base URL:
https://api.velobase.io/v1, the OpenAI SDK expects the /v1
suffix. Auth: Authorization: Bearer <project-key> (a vb_live_… key). A
project key bills the customer named in the header. You can also issue a
customer-scoped vb_customer_… key that carries its own customer, so no header
is needed. Who to bill: the X-Velobase-Customer: <your-user-id> header.Available models
Call any of these by itsmodel id through the OpenAI-compatible endpoint.
Prices are what your customer’s wallet is charged, per million tokens.
model | Streaming | Input ($/1M) | Output ($/1M) |
|---|---|---|---|
deepseek/deepseek-v4-pro | Yes | $0.49 | $0.96 |
anthropic/claude-haiku-4.5 | No | $1.10 | $5.50 |
anthropic/claude-sonnet-4.6 | No | $3.30 | $16.50 |
anthropic/claude-opus-4.5 | No | $5.50 | $27.50 |
anthropic/claude-opus-4.6 | No | $5.50 | $27.50 |
anthropic/claude-opus-4.7 | No | $5.50 | $27.50 |
anthropic/claude-opus-4.8 | No | $5.50 | $27.50 |
GET /v1/models for the live list your project can route. More models open
up as upstreams are connected. Claude models route through Bedrock and are
non-streaming for now, so pick a DeepSeek model when you need streaming.
Copy for AI
Paste this into your AI coding assistant (Cursor, Claude Code, etc.) and it can wire up the integration in one shot:Make a call
Per-call billing headers
Every non-streaming response carries the billing result on its headers, so you can show cost and balance without a second request:| Header | Meaning |
|---|---|
x-velobase-cost-cents | Cost of this call, in cents |
x-velobase-cost-credits | Same cost, in credits (1 USD = 100 cents = 1,000,000 credits) |
x-velobase-balance-credits | The customer wallet’s remaining balance after this call, in credits |
x-velobase-transaction-id | Ties this call to a usage row and ledger entry |
Streaming
Streaming is supported for OpenAI-protocol models (for exampledeepseek/deepseek-v4-pro). The billing result arrives as a velobase object
on the final stream frame, before [DONE]. Request it with
stream_options: { include_usage: true }.
Fund the customer first
A model call needs a funded customer wallet, otherwise it returns402 insufficient_funds. Top one up before (or right after) you create the user:
Two wallets
Official (Velobase-routed) models debit two ledgers on each call:- The customer wallet, your own pricing units, what you charge your end-user.
- The project wallet, real money you prepaid Velobase via Stripe.
402 project_balance_insufficient regardless of the customer
wallet. Customer deposits are virtual record-keeping and never move real money.
Reconcile usage
GET /v1/usage returns one row per call with cost_cents,
upstream_cost_cents, token counts, model, customer_id, and
transaction_id. Join it to the x-velobase-transaction-id from each response
to reconcile spend per customer.
Next steps
JavaScript SDK
Deposits, balances and billing primitives from Node/TypeScript.
Python SDK
The same control-plane operations from Python.