Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

venice-billing威尼斯账单

Agent Skill

venice-billing 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

360

周安装

15

GitHub Stars

35

下载量

120
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:venice-billing(威尼斯账单)
来源仓库:https://github.com/veniceai/skills
仓库路径:skills/venice-billing
安装命令:
npx skills add https://github.com/veniceai/skills --skill venice-billing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/veniceai/skills --skill venice-billing

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理时使用。
  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装方式:github,命令为 npx skills add https://github.com/veniceai/skills --skill venice-billing。
  • 建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

SKILL.md

Venice Billing

Three read-only endpoints for account-level billing and analytics. All are under a Beta tag — schema/behavior may change.

EndpointPurpose
GET /billing/balanceCurrent canConsume flag, remaining DIEM & USD, epoch allocation.
GET /billing/usagePaginated per-request ledger. JSON or CSV.
GET /billing/usage-analyticsAggregated 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:

  1. DIEM — staked credits (reset per epoch).
  2. BUNDLED_CREDITS — included in some Pro plans.
  3. USD — prepaid fiat balance.
  4. (VCU) — deprecated legacy DIEM.

consumptionCurrency on /billing/balance reports the current currency being consumed.

GET /billing/balance

curl https://api.venice.ai/api/v1/billing/balance \
  -H "Authorization: Bearer $VENICE_API_KEY"
{
  "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/usage

Paginated per-request ledger.

curl "https://api.venice.ai/api/v1/billing/usage?limit=200&page=1&sortOrder=desc&currency=USD&startDate=2026-04-01T00:00:00Z&endDate=2026-04-21T23:59:59Z" \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Accept: application/json"

Query parameters

ParamNotes
currencyUSD / VCU / DIEM / BUNDLED_CREDITS.
startDate / endDateISO 8601 datetime.
limit1–500. Default 200.
pageDefault 1.
sortOrderasc / desc on createdAt. Default desc.

Accept header

  • application/json (default) — paginated JSON.
  • text/csv — downloads billing-usage.csv (sets Content-Disposition).

Response (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}.

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; requestId is the id returned on the original /chat/completions response.

GET /billing/usage-analytics

Aggregated summary for dashboards. Cached 10 minutes.

curl "https://api.venice.ai/api/v1/billing/usage-analytics?lookback=7d" \
  -H "Authorization: Bearer $VENICE_API_KEY"

Query parameters (choose one approach)

  • lookback=Nd7d, 30d, up to 90d. Default 7d.
  • OR startDate=YYYY-MM-DD + endDate=YYYY-MM-DD — both required if either is given.

Response (selected keys)

{
  "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.

Recipes

Abort before calling inference if balance is empty

const { canConsume } = await fetch(`${base}/billing/balance`, { headers }).then(r => r.json())
if (!canConsume) throw new Error('Venice balance exhausted — top up before continuing')

Monthly CSV export

curl "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.

Top-models chart

const a = await fetch(`${base}/billing/usage-analytics?lookback=30d`, { headers }).then(r => r.json())
// chart(a.byModelDaily, { series: a.topModels, xField: 'date' })

Errors

CodeMeaning
400Bad params (startDate without endDate, calendar range > 90 days). lookback=100d is silently clamped to 90 days rather than rejected.
401Auth failed, or INFERENCE key used on /billing/balance or /billing/usage (ADMIN required).
500Internal error.
504Analytics query timed out — shorten lookback or date range.

Gotchas

  • This is Beta — field names may shift. Validate against 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).
  • The analytics endpoint is cached 10 min — sudden spikes lag in the dashboard by that window.
  • byModelDaily.date is a Unix milliseconds integer; byDate.date is 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}.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.3%
按下载量换算40

Claude

30.1%
按下载量换算36

Cursor

18.56%
按下载量换算22

Gemini CLI

9.58%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills