Billing & Usage
Wallet system
- Flopex uses prepaid wallet credits per API key.
- $10 free starting balance at signup (configurable by the operator).
- Each successful inference debits actual token usage (markup inclusive).
- When balance is insufficient for the conservative pre-check, the API returns
insufficient_balance(HTTP 402). POST /v1/balance/addtops up in beta without a card (simulated ledger).
Check balance
GET /v1/balance
curl -s https://api.flopex.ai/v1/balance \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Example response:
{
"object": "balance",
"current_balance_usd": 9.85
}Add balance
POST /v1/balance/add with JSON body:
{
"amount_usd": 25.00
}curl -X POST https://api.flopex.ai/v1/balance/add \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"amount_usd": 25.00}'
Usage summary
GET /v1/usage with optional start_time and end_time query parameters (ISO-8601).
curl -s "https://api.flopex.ai/v1/usage?start_time=2026-04-01T00:00:00Z&end_time=2026-04-30T23:59:59Z" \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Transaction history
GET /v1/transactions returns credits, debits, refunds, and adjustments with before/after balances.
curl -s https://api.flopex.ai/v1/transactions \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Cost on every inference response
billing.cost_usd— what you paid for this callbilling.balance_remaining_usd— wallet after the chargebilling.cost_display— human-readable amount (e.g.$0.000004)billing.cost_per_million_tokens_usd— effective rate for the billed tokens