Billing API
Read your credit balance, your usage by day and model, and your invoices. These routes only read.
Purchasing is not available. LVNG has no checkout yet: nothing can be bought and no card is ever charged. The payment-method and auto-reload routes still answer but do nothing, so they are not listed here. To change your plan, contact support.
Base path: /api/v2/billing
Balance & Usage
Your current credit balance, burn rate, and usage data for charts.
/api/v2/billing/balanceAuthenticatedYour credit balance, your plan's tier, and the burn rate (average credits per hour over the last 24 hours). included_credits and purchased_credits are always 0 today: LVNG does not split the balance yet.
Request
curl -X GET "https://api.lvng.ai/api/v2/billing/balance" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"success": true,
"data": {
"balance": 4250,
"included_credits": 0,
"purchased_credits": 0,
"tier": "free",
"burn_rate_per_hour": 12.5,
"updated_at": "2026-04-01T12:00:00.000Z"
}
}/api/v2/billing/usage-chartAuthenticatedUsage by day and by model for your first workspace, for the dates you give.
Query Parameters
startstringrequiredStart date in ISO 8601 format.
endstringrequiredEnd date in ISO 8601 format.
granularitystringAggregation granularity: "day" (default) or "week".
Request
curl -X GET "https://api.lvng.ai/api/v2/billing/usage-chart" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"success": true,
"data": {
"daily_usage": [
{ "date": "2026-03-01", "credits": 45.20, "requests": 120 },
{ "date": "2026-03-02", "credits": 38.10, "requests": 95 }
],
"model_breakdown": [
{ "model": "claude-sonnet-5-5", "credits": 520, "requests": 1800 },
{ "model": "claude-haiku-4-5-20251001", "credits": 85, "requests": 3200 }
]
}
}Invoices
List your invoices and download one as JSON.
/api/v2/billing/invoicesAuthenticatedYour invoices, newest period first. The list is empty when no invoice has been issued to you.
Request
curl -X GET "https://api.lvng.ai/api/v2/billing/invoices" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"success": true,
"data": []
}/api/v2/billing/invoices/:id/downloadAuthenticatedDownloads one of your invoices as a JSON file (Content-Disposition: attachment) with invoice_id, period_start, period_end, subscription_amount, credits_included, credits_used, overage_credits, overage_amount, total_amount, status and created_at. Answers 404 when the invoice does not exist or is not yours.
Path Parameters
idstringrequiredUUID of the invoice.
Request
curl -X GET "https://api.lvng.ai/api/v2/billing/invoices/{id}/download" \
-H "Authorization: Bearer YOUR_API_KEY"Response 404
{
"error": "NotFound",
"message": "Invoice not found"
}