Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Venice billing and usage analytics - GET /billing/balance, GET /billing/usage (paginated per-request ledger, JSON or CSV), and GET /billing/usage-analytics (aggregated by date/model/key). Covers the DIEM/USD/BUNDLED_CREDITS consumption priority and building dashboards. (Beta)
.claude/skills/sediman-agent-venice-billing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 71% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 141% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 249% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 166% | 0% |
Three read-only endpoints for account-level billing and analytics. All are under a Beta tag — schema/behavior may change.
| Endpoint | Purpose | |---|---| | GET /billing/balance | Current canConsume flag, remaining DIEM & USD, epoch allocation. | | GET /billing/usage | Paginated per-request ledger. JSON or CSV. | | GET /billing/usage-analytics | Aggregated breakdowns: by date, model, API key. |
All require Bearer auth (not x402 — for wallet balances, use venice-x402). GET /billing/balance and GET /billing/usage require an ADMIN key — an INFERENCE key gets 401. GET /billing/usage-analytics works on any authenticated key (scoped to the account behind the key).
Venice debits from, in order:
DIEM — staked credits (reset per epoch).BUNDLED_CREDITS — included in some Pro plans.USD — prepaid fiat balance.VCU) — deprecated legacy DIEM.consumptionCurrency on /billing/balance reports the current currency being consumed.
GET /billing/balancebashcurl https://api.venice.ai/api/v1/billing/balance \ -H "Authorization: Bearer $VENICE_API_KEY"
json{ "canConsume": true, "consumptionCurrency": "DIEM", "balances": { "diem": 90.5, "usd": 25 }, "diemEpochAllocation": 100 }
canConsume: false means both DIEM and USD buckets are empty on this endpoint — canConsume here is hasPositiveDiemBalance || usdBalance > 0 and does not factor in bundled credits (which are consulted during the actual request in getConsumableBalanceForRequest).consumptionCurrency is "DIEM", "USD", or null (when neither applies).balances.diem is null if not staking.diemEpochAllocation is the ceiling for the current epoch — balances.diem / diemEpochAllocation = remaining fraction.GET /billing/usagePaginated per-request ledger.
bashcurl "https://api.venice.ai/api/v1/billing/usage?limit=200&page=1&sortOrder=desc¤cy=USD&startDate=2026-04-01T00:00:00Z&endDate=2026-04-21T23:59:59Z" \ -H "Authorization: Bearer $VENICE_API_KEY" \ -H "Accept: application/json"
| Param | Notes | |---|---| | currency | USD / VCU / DIEM / BUNDLED_CREDITS. | | startDate / endDate | ISO 8601 datetime. | | limit | 1–500. Default 200. | | page | Default 1. | | sortOrder | asc / desc on createdAt. Default desc. |
application/json (default) — paginated JSON.text/csv — downloads billing-usage.csv (sets Content-Disposition).json{ "warningMessage": "DIEM (formerly VCU) has been renamed...", "data": [ { "timestamp": "2026-04-20T12:34:56Z", "sku": "zai-org-glm-5-1-llm-output-mtoken", "units": 0.000227, "pricePerUnitUsd": 2.8, "amount": -0.06356, "currency": "DIEM", "notes": "API Inference", "inferenceDetails": { "requestId": "chatcmpl-...", "promptTokens": 339, "completionTokens": 227, "inferenceExecutionTime": 2964 } } ], "pagination": { "limit": 200, "page": 1, "total": 1000, "totalPages": 5 } }
Response headers: x-pagination-{limit,page,total,total-pages}.
sku — billing line item (model + unit type + format).units — for LLMs, millions of tokens (e.g. 0.000227 = 227 tokens).pricePerUnitUsd — rate; for DIEM, DIEM ≈ USD so this doubles as reference.amount — negative for debit.inferenceDetails — present for inference SKUs; requestId is the id returned on the original /chat/completions response.GET /billing/usage-analyticsAggregated summary for dashboards. Cached 10 minutes.
bashcurl "https://api.venice.ai/api/v1/billing/usage-analytics?lookback=7d" \ -H "Authorization: Bearer $VENICE_API_KEY"
lookback=Nd — 7d, 30d, up to 90d. Default 7d.startDate=YYYY-MM-DD + endDate=YYYY-MM-DD — both required if either is given.json{ "lookback": "7d", "byDate": [{ "date": "2026-04-20", "USD": 0.5, "DIEM": 10.25 }, ...], "byModel": [ { "modelName": "GLM 5.1", "unitType": "tokens", "modelType": "LLM", "totalUsd": 0.4, "totalDiem": 12.5, "totalUnits": 50000, "breakdown": [ { "type": "Output", "usd": 0.3, "diem": 10, "units": 35000 }, { "type": "Input", "usd": 0.1, "diem": 2.5, "units": 15000 } ] } ], "byModelDaily": [ { "date": 1705276800000, "GLM 5.1": 5.5, "Claude Opus 4.7": 3.2 } ], "byModelDailyUsd": [...], "topModels": ["GLM 5.1", "Claude Opus 4.7"], "byKey": [ { "apiKeyId": "key_abc123", "description": "Production Key", "totalUsd": 0.8, "totalDiem": 15, "totalUnits": 75000 }, { "apiKeyId": null, "description": "Web App", "totalUsd": 0, "totalDiem": 4, "totalUnits": 25000 } ], "byKeyDaily": [...], "byKeyDailyUsd": [...], "topKeyNames": [...] }
byDate / byModelDaily / byKeyDaily are pre-shaped for time-series charts.topModels / topKeyNames give top-8 names for legend rendering.apiKeyId: null in byKey means the usage originated from Venice's web app.tsconst { canConsume } = await fetch(`${base}/billing/balance`, { headers }).then(r => r.json()) if (!canConsume) throw new Error('Venice balance exhausted — top up before continuing')
bashcurl "https://api.venice.ai/api/v1/billing/usage?startDate=2026-04-01T00:00:00Z&endDate=2026-04-30T23:59:59Z&limit=500" \ -H "Authorization: Bearer $VENICE_API_KEY" \ -H "Accept: text/csv" \ -o billing-april.csv
Paginate via page=1,2,3,... until page > totalPages.
tsconst a = await fetch(`${base}/billing/usage-analytics?lookback=30d`, { headers }).then(r => r.json()) // chart(a.byModelDaily, { series: a.topModels, xField: 'date' })
| Code | Meaning | |---|---| | 400 | Bad params (startDate without endDate, calendar range > 90 days). lookback=100d is silently clamped to 90 days rather than rejected. | | 401 | Auth failed, or INFERENCE key used on /billing/balance or /billing/usage (ADMIN required). | | 500 | Internal error. | | 504 | Analytics query timed out — shorten lookback or date range. |
swagger.yaml periodically.currency values include legacy VCU — use DIEM instead in new code.inferenceDetails is null for non-inference SKUs (e.g. subscription charges).byModelDaily.date is a Unix milliseconds integer; byDate.date is a YYYY-MM-DD string. Don't mix them.apiKeyId: null — don't drop them when reconciling.GET /x402/balance/{walletAddress}.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,325 | 9,048 | -32% | 1 | 1 | 0% | 2,468 | 4,217 | +71% | 0 | 0 | — |
case-02 | fail→pass | 8,159 | 4,195 | -49% | 1 | 1 | 0% | 1,356 | 3,272 | +141% | 0 | 0 | — |
case-03 | fail→pass | 16,328 | 6,086 | -63% | 1 | 1 | 0% | 3,025 | 3,594 | +19% | 0 | 0 | — |
case-04 | fail→pass | 17,767 | 4,095 | -77% | 1 | 1 | 0% | 915 | 3,189 | +249% | 0 | 0 | — |
case-05 | pass→pass | 8,405 | 3,500 | -58% | 1 | 1 | 0% | 1,278 | 3,111 | +143% | 0 | 0 | — |
case-06 | fail→pass | 7,579 | 3,410 | -55% | 1 | 1 | 0% | 1,111 | 2,951 | +166% | 0 | 0 | — |
case-07 | fail→pass | 10,577 | 2,038 | -81% | 1 | 1 | 0% | 1,488 | 2,820 | +90% | 0 | 0 | — |
case-08 | fail→pass | 14,545 | 5,002 | -66% | 1 | 1 | 0% | 2,073 | 3,337 | +61% | 0 | 0 | — |
case-09 | pass→pass | 5,868 | 2,607 | -56% | 1 | 1 | 0% | 954 | 2,989 | +213% | 0 | 0 | — |
case-10 | pass→pass | 8,649 | 2,557 | -70% | 1 | 1 | 0% | 1,444 | 2,969 | +106% | 0 | 0 | — |
case-11 | fail→pass | 11,439 | 3,520 | -69% | 1 | 1 | 0% | 1,765 | 3,077 | +74% | 0 | 0 | — |
case-12 | fail→pass | 8,157 | 2,889 | -65% | 1 | 1 | 0% | 1,133 | 2,976 | +163% | 0 | 0 | — |
case-13 | fail→pass | 9,184 | 2,553 | -72% | 1 | 1 | 0% | 1,552 | 2,937 | +89% | 0 | 0 | — |
case-14 | pass→pass | 8,870 | 2,842 | -68% | 1 | 1 | 0% | 1,275 | 2,917 | +129% | 0 | 0 | — |
case-15 | pass→pass | 7,407 | 2,233 | -70% | 1 | 1 | 0% | 1,302 | 2,910 | +124% | 0 | 0 | — |
case-16 | pass→pass | 9,144 | 1,477 | -84% | 1 | 1 | 0% | 1,321 | 2,730 | +107% | 0 | 0 | — |
case-17 | fail→pass | 5,630 | 2,368 | -58% | 1 | 1 | 0% | 932 | 2,862 | +207% | 0 | 0 | — |
case-18 | pass→pass | 11,362 | 4,131 | -64% | 1 | 1 | 0% | 1,723 | 3,128 | +82% | 0 | 0 | — |
case-19 | fail→pass | 9,553 | 1,746 | -82% | 1 | 1 | 0% | 1,332 | 2,794 | +110% | 0 | 0 | — |
case-20 | fail→pass | 14,899 | 4,363 | -71% | 1 | 1 | 0% | 2,466 | 3,256 | +32% | 0 | 0 | — |
case-21 | pass→pass | 10,112 | 6,751 | -33% | 1 | 1 | 0% | 1,764 | 3,813 | +116% | 0 | 0 | — |
case-22 | pass→pass | 10,454 | 6,802 | -35% | 1 | 1 | 0% | 1,538 | 3,580 | +133% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.