Check your Algerian Dinar totals and balance through the OpenDunes API.
Every OpenDunes account holds a balance in Algerian Dinars (DA). You top it up via SATIM — CIB or Edahabia cards — and pay per-token as requests complete. Internally all balances are tracked in micro-DA (1 DA = 1,000,000 micro-DA) to avoid floating-point errors.
GET /api/v1/credits returns your lifetime DA totals — everything credited and everything spent:
The live spendable balance also appears in the X-Balance-Available response header (in micro-DA) on every chat completion — so you can monitor it without a separate round-trip.
Fetch your daily activity — one row per day and model:
Each row includes the model slug, prompt/completion token totals, request count, and the DA amount spent. Pass ?date=YYYY-MM-DD to narrow to a single day.
Each request's cost is charged in Algerian Dinars (DA), rounded up to the nearest micro-DA (minimum 1 micro-DA). Model rates are shown in DA per million tokens in the catalog — the DA figure is the total you pay.
When your balance reaches zero, subsequent requests return HTTP 402 with "error": "insufficient_credits". Top up your balance from the dashboard.