What is Velobase?
Velobase is an AI gateway that meters and bills every model call to your end-customers. Point your OpenAI- or Anthropic-style SDK athttps://api.velobase.io/v1, add one header for who to bill (X-Velobase-Customer: <user-id>), and every model call is metered against that customer’s wallet. The cost comes back on the response headers (x-velobase-cost-cents, x-velobase-cost-credits, x-velobase-balance-credits). It is the per-customer wallet, ledger, and rate-limit layer OpenRouter leaves you to build. It is also a high-performance billing ledger, so you can meter work you price yourself against the same wallets.
How it works
Get an API key
Sign in at velobase.io/dashboard and generate a key in your project’s Keys section. A project key (
vb_live_) runs server-side and names the customer to bill via the X-Velobase-Customer header; a customer-scoped key (vb_customer_) carries its own customer binding.Fund a customer
Call
POST /v1/customers/deposit with a customer_id and an integer credit amount. Velobase creates the customer automatically if they don’t exist yet.Make a billed model call
Point your OpenAI or Anthropic SDK at
https://api.velobase.io/v1, call POST /v1/chat/completions or POST /v1/messages, and send the X-Velobase-Customer header. The call is billed to that customer’s wallet and the cost comes back on the response headers (x-velobase-cost-cents, x-velobase-cost-credits). For work you price yourself, use direct deduction or the freeze then consume flow.Get started in 5 minutes
Make your first model call, fund a customer wallet, and bill a request end to end.
Key features
Model gateway
Point your OpenAI or Anthropic SDK at Velobase and bill every model call to a customer wallet. Live models include
deepseek/deepseek-v4-pro (streaming) and the anthropic/claude-* family (Bedrock, non-streaming), with more available via upstreams.Customer deposits
Wallet categories, validity windows, and auto-provisioning for customer wallets.
Direct deduction
Charge immediately when the cost is known upfront: image generation, fixed-price APIs.
Staged deduction
Freeze a budget, then settle the actual cost: LLM inference, async tasks.
Immutable ledger
Every wallet change is recorded permanently with a full audit trail.
Billing flows for work you price yourself
Beyond the model gateway, the same wallets back a transaction-based ledger for anything you price yourself. Customer deposits use integer credits viaamount; other billing primitives may use explicit unit fields such as amount_usd, amount_cents, or amount_credits. 1 USD = 100 cents = 1,000,000 credits.
Direct deduction
Fixed cost known upfront via
POST /v1/billing/deductFreeze then consume
Variable cost settled after via
POST /v1/billing/freeze then /v1/billing/consumeDeposits
Top up customer wallets via
POST /v1/customers/depositWhy Velobase?
Why not just use Stripe metered billing?
Why not just use Stripe metered billing?
Stripe is built for subscription and invoice workflows. AI workloads need sub-second credit operations with atomic freeze-and-settle semantics. Velobase handles thousands of concurrent operations per second with zero race conditions and no negative balances.
How does freeze then consume prevent negative balances?
How does freeze then consume prevent negative balances?
When you freeze funds, Velobase atomically reserves them from the wallet’s available balance. No other request can spend those funds while they’re frozen. After the task completes, settle the actual cost and any unused amount is returned automatically.
What happens if my API call fails mid-request?
What happens if my API call fails mid-request?
Every billing operation is idempotent. Retry with the same
transaction_id and Velobase returns the original result without double-charging.Can I use Velobase for non-AI billing?
Can I use Velobase for non-AI billing?
Yes. The direct deduction flow works for any fixed-price operation: game currencies, API rate limits, marketplace points, or anything you bill against a customer wallet.
Explore
Quickstart
First API call in under 5 minutes
API Reference
Complete endpoint reference
MCP Server
AI coding agent integration
Dashboard
Overview, Models, Customers, Keys, Usage, Settings
Idempotency
Prevent double charges
Error Handling
Error codes reference
Links
Website
velobase.io
Dashboard
Console
GitHub
Source & issues