Documentation

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/add tops up in beta without a card (simulated ledger).

Check balance

GET /v1/balance

curl -s https://api.flopex.ai/v1/balance \
  -H 0

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 0 \
  -H 1 \
  -d 2

Usage summary

GET /v1/usage with optional start_time and end_time query parameters (ISO-8601).

curl -s 0 \
  -H 1

Transaction history

GET /v1/transactions returns credits, debits, refunds, and adjustments with before/after balances.

curl -s https://api.flopex.ai/v1/transactions \
  -H 0

Cost on every inference response

  • billing.cost_usd — what you paid for this call
  • billing.balance_remaining_usd — wallet after the charge
  • billing.cost_display — human-readable amount (e.g. $0.000004)
  • billing.cost_per_million_tokens_usd — effective rate for the billed tokens