Billing status endpoint
GET /openai/v1/balance returns billing status for the authenticated key. Quotaflow bills through explicit organization, project, contract, package, or subscription contexts; removed balance-backed contexts are never returned.
A valid key returns 200 OK:
{
"object": "balance",
"currency": "USD",
"billing_subject": "subscription",
"mode": "subscription",
"balance": null,
"remaining": null,
"unlimited": true
}
balance and remaining are numeric only when the key has an explicit key quota, subscription limit, or project budget. They are null for unlimited external or contract billing profiles. Removed balance-backed contexts are never returned.
For project-budget keys, the response uses mode: "project_budget" and may also include allocated and available. The numbers describe the billing allocation attached to the authenticated key. Partner-funded allocations and organization-direct allocations are separate pools; a request only spends from the allocation bound to that key.