0xatd/cheaptokens-skills/venice-billing
Claude Code and agent skill by 0xatd/cheaptokens-skills
- community
Checking that the SKILL.md file is still in the repository.
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)
Install
npx vskill@latest install 0xatd/cheaptokens-skills/venice-billingSKILL.md
The same SKILL.md was published earlier as 0xatd/cheaptokens-skills/venice-billing.
Venice Billing
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).
Currency / priority
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/balance
canConsume: falsemeans both DIEM and USD buckets are empty on this endpoint —canConsumehere ishasPositiveDiemBalance || usdBalance > 0and does not factor in bundled credits (which are consulted during the actual request ingetConsumableBalanceForRequest).consumptionCurrencyis"DIEM","USD", ornull(when neither applies).balances.diemisnullif not staking.diemEpochAllocationis the ceiling for the current epoch —balances.diem / diemEpochAllocation= remaining fraction.
GET /billing/usage
Paginated per-request ledger.
Query parameters
| 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. |
Accept header
application/json(default) — paginated JSON.text/csv— downloadsbilling-usage.csv(setsContent-Disposition).
Response (JSON)
Response headers: x-pagination-{limit,page,total,total-pages}.
Fields
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;requestIdis theidreturned on the original/chat/completionsresponse.
GET /billing/usage-analytics
Aggregated summary for dashboards. Cached 10 minutes.
Query parameters (choose one approach)
lookback=Nd—7d,30d, up to90d. Default7d.- OR
startDate=YYYY-MM-DD+endDate=YYYY-MM-DD— both required if either is given.
Response (selected keys)
byDate/byModelDaily/byKeyDailyare pre-shaped for time-series charts.topModels/topKeyNamesgive top-8 names for legend rendering.apiKeyId: nullinbyKeymeans the usage originated from Venice's web app.
Recipes
Abort before calling inference if balance is empty
Monthly CSV export
Paginate via page=1,2,3,... until page > totalPages.
Top-models chart
Errors
| 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. |
Gotchas
- This is Beta — field names may shift. Validate against
swagger.yamlperiodically. currencyvalues include legacyVCU— useDIEMinstead in new code.inferenceDetailsisnullfor non-inference SKUs (e.g. subscription charges).- The analytics endpoint is cached 10 min — sudden spikes lag in the dashboard by that window.
byModelDaily.dateis a Unix milliseconds integer;byDate.dateis a `YYYY-MM-DD` string. Don't mix them.- Usage entries from the Venice web app have
apiKeyId: null— don't drop them when reconciling. - For x402 (wallet) balance, don't use this endpoint — use
GET /x402/balance/{walletAddress}.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/venice-billing/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0xatd/cheaptokens-skills/venice-billing)