venice-admin
Venice AI 帐户管理 - 检查余额、查看使用历史记录并管理 API 密钥。需要管理 API 密钥。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~sabrinaaquino-venice-admincURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~sabrinaaquino-venice-admin/file -o sabrinaaquino-venice-admin.md# Venice Admin
Manage your Venice AI account - check balance, view usage history, and manage API keys.
**⚠️ Important:** These endpoints require an **Admin API key**, not a regular inference key. Create one at [venice.ai](https://venice.ai) → Settings → API Keys → Create Admin Key.
**API Base URL:** `https://api.venice.ai/api/v1`
## Setup
1. Create an **Admin API key** from [venice.ai](https://venice.ai) → Settings → API Keys
2. Set the environment variable:
```bash
export VENICE_API_KEY="your_admin_api_key_here"
```
---
## Check Balance
View your current DIEM and USD balances.
```bash
uv run {baseDir}/scripts/balance.py
```
**Output includes:**
- Whether you can consume (has balance)
- Current consumption currency (DIEM or USD)
- DIEM balance and epoch allocation
- USD balance
---
## View Usage History
View detailed usage history with filtering and pagination.
```bash
uv run {baseDir}/scripts/usage.py
```
**Options:**
- `--currency`: Filter by currency: `DIEM`, `USD`, `VCU` (default: `DIEM`)
- `--start-date`: Start date filter (ISO format: `2024-01-01`)
- `--end-date`: End date filter (ISO format: `2024-12-31`)
- `--limit`: Results per page (default: `50`, max: `200`)
- `--page`: Page number (default: `1`)
- `--sort`: Sort order: `asc` or `desc` (default: `desc`)
- `--format`: Output format: `json` or `csv` (default: `json`)
- `--output`: Save to file instead of stdout
**Examples:**
```bash
# Last 50 DIEM transactions
uv run {baseDir}/scripts/usage.py
# USD usage in January 2024
uv run {baseDir}/scripts/usage.py --currency USD --start-date 2024-01-01 --end-date 2024-01-31
# Export to CSV
uv run {baseDir}/scripts/usage.py --format csv --output usage.csv
```
---
## List API Keys
View all your API keys.
```bash
uv run {baseDir}/scripts/api_keys_list.py
```
**Output includes:**
- Key ID and name
- Key type (Admin, Inference, etc.)
- Creation date
- Last used date
- Rate limits
---
## Runtime Note
This skill uses `uv run` which automatically installs Python dependencies (httpx) via [PEP 723](https://peps.python.org/pep-0723/) inline script metadata. No manual Python package installation required - `uv` handles everything.
---
## Security Notes
- **Admin keys have elevated permissions** - protect them carefully
- Admin keys can view billing info and manage other keys
- Never commit admin keys to version control
- Consider using inference-only keys for production workloads
## API Reference
| Endpoint | Description | Auth Required |
|----------|-------------|---------------|
| `GET /billing/balance` | Check DIEM/USD balance | Admin key |
| `GET /billing/usage` | View usage history | Admin key |
| `GET /api_keys` | List all API keys | Admin key |
Full API docs: [docs.venice.ai](https://docs.venice.ai)
---
## 中文说明
# Venice Admin
管理你的 Venice AI 帐户 —— 检查余额、查看使用历史记录并管理 API 密钥。
**⚠️ 重要:** 这些端点需要**管理 API 密钥**,而非普通推理密钥。在 [venice.ai](https://venice.ai) → Settings → API Keys → Create Admin Key 创建一个。
**API Base URL:** `https://api.venice.ai/api/v1`
## 设置
1. 从 [venice.ai](https://venice.ai) → Settings → API Keys 创建**管理 API 密钥**
2. 设置环境变量:
```bash
export VENICE_API_KEY="your_admin_api_key_here"
```
---
## 检查余额
查看你当前的 DIEM 和 USD 余额。
```bash
uv run {baseDir}/scripts/balance.py
```
**输出包括:**
- 是否可以消费(有余额)
- 当前消费货币(DIEM 或 USD)
- DIEM 余额和周期分配额
- USD 余额
---
## 查看使用历史记录
查看带过滤和分页的详细使用历史记录。
```bash
uv run {baseDir}/scripts/usage.py
```
**选项:**
- `--currency`:按货币过滤:`DIEM`、`USD`、`VCU`(默认:`DIEM`)
- `--start-date`:开始日期过滤(ISO 格式:`2024-01-01`)
- `--end-date`:结束日期过滤(ISO 格式:`2024-12-31`)
- `--limit`:每页结果数(默认:`50`,最大:`200`)
- `--page`:页码(默认:`1`)
- `--sort`:排序顺序:`asc` 或 `desc`(默认:`desc`)
- `--format`:输出格式:`json` 或 `csv`(默认:`json`)
- `--output`:保存到文件而非标准输出
**示例:**
```bash
# Last 50 DIEM transactions
uv run {baseDir}/scripts/usage.py
# USD usage in January 2024
uv run {baseDir}/scripts/usage.py --currency USD --start-date 2024-01-01 --end-date 2024-01-31
# Export to CSV
uv run {baseDir}/scripts/usage.py --format csv --output usage.csv
```
---
## 列出 API 密钥
查看你所有的 API 密钥。
```bash
uv run {baseDir}/scripts/api_keys_list.py
```
**输出包括:**
- 密钥 ID 和名称
- 密钥类型(Admin、Inference 等)
- 创建日期
- 最后使用日期
- 速率限制
---
## 运行时说明
此 skill 使用 `uv run`,它会通过 [PEP 723](https://peps.python.org/pep-0723/) 内联脚本元数据自动安装 Python 依赖(httpx)。无需手动安装 Python 包 —— `uv` 会处理一切。
---
## 安全说明
- **管理密钥拥有更高权限** —— 请谨慎保护
- 管理密钥可以查看账单信息并管理其他密钥
- 切勿将管理密钥提交到版本控制
- 对于生产工作负载,考虑使用仅推理密钥
## API 参考
| Endpoint | Description | Auth Required |
|----------|-------------|---------------|
| `GET /billing/balance` | 检查 DIEM/USD 余额 | Admin key |
| `GET /billing/usage` | 查看使用历史记录 | Admin key |
| `GET /api_keys` | 列出所有 API 密钥 | Admin key |
完整 API 文档:[docs.venice.ai](https://docs.venice.ai)