venice-api-keys
Manage Venice API keys. Covers GET/POST/PATCH/DELETE /api_keys, GET /api_keys/{id}, GET /api_keys/rate_limits, GET /api_keys/rate_limits/log, the two-step /api_keys/generate_web3_key wallet flow, INFERENCE vs ADMIN key types, and per-key consumption limits (USD / DIEM).
git clone --depth 1 https://github.com/veniceai/skills /tmp/venice-api-keys && cp -r /tmp/venice-api-keys/skills/venice-api-keys ~/.claude/skills/venice-api-keysSKILL.md
# Venice API Keys
Admin endpoints for managing Bearer API keys. You need an **ADMIN** key (or parent session) to call these. For wallet-only auth, use [`venice-auth`](../venice-auth/SKILL.md) / [`venice-x402`](../venice-x402/SKILL.md) instead.
| Endpoint | Purpose |
|---|---|
| `GET /api_keys` | List your keys (masked). |
| `POST /api_keys` | Create a new key. Response contains the **only copy of the secret**. |
| `PATCH /api_keys` | Update `description`, `expiresAt`, `consumptionLimit`. |
| `DELETE /api_keys?id=...` | Revoke a key. |
| `GET /api_keys/{id}` | Full details for one key (usage, limits, expiration). |
| `GET /api_keys/rate_limits` | Balances + per-model rate-limit tiers for the current key. |
| `GET /api_keys/rate_limits/log` | Last 50 rate-limit breaches. |
| `GET /api_keys/generate_web3_key` | Get a SIWE-style token to sign with a wallet. |
| `POST /api_keys/generate_web3_key` | Authenticate a wallet (holds sVVV) and mint a classic API key. |
Limits: key creation is capped at **20 requests/minute** and **500 active keys per user**.
## Key types
| Type | Can call |
|---|---|
| `INFERENCE` | Inference endpoints plus any route that only requires authentication — e.g. `/chat/*`, `/image/*`, `/audio/*`, `/video/*`, `/embeddings`, `/augment/*`, `/crypto/rpc`, `/characters`, `/api_keys/rate_limits*`, `/support-bot`. Rejected from admin routes listed below with `401`. |
| `ADMIN` | Everything an `INFERENCE` key can do, plus admin-only routes: `POST/PATCH/DELETE /api_keys`, `GET /api_keys` (list), `GET /api_keys/{id}`, `GET /billing/balance`, `GET /billing/usage`. |
A leaf app should almost always use **`INFERENCE`** keys — per-app, per-user, with consumption caps.
## `GET /api_keys`
```bash
curl https://api.venice.ai/api/v1/api_keys \
-H "Authorization: Bearer $ADMIN_KEY"
```
Returns:
```json
{
"object": "list",
"data": [
{
"id": "uuid",
"apiKeyType": "INFERENCE",
"description": "backend prod",
"createdAt": "2025-10-01T12:00:00Z",
"expiresAt": null,
"lastUsedAt": "2026-04-20T10:05:00Z",
"last6Chars": "2V2jNW",
"consumptionLimits": { "usd": 50, "diem": 10 },
"usage": { "trailingSevenDays": { "usd": "4.20", "diem": "0.00" } }
}
]
}
```
The full secret is **never** returned on list — only `last6Chars`.
## `POST /api_keys` — create
```bash
curl https://api.venice.ai/api/v1/api_keys \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"apiKeyType": "INFERENCE",
"description": "backend prod",
"expiresAt": "2026-12-31T23:59:59Z",
"consumptionLimit": { "usd": 50, "diem": 10 }
}'
```
Response includes the **one-time** `apiKey` secret:
```json
{
"success": true,
"data": {
"id": "uuid",
"apiKey": "VENICE_INFERENCE_KEY_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"apiKeyType": "INFERENCE",
"description": "backend prod",
"expiresAt": "2026-12-31T23:59:59Z",
"consumptionLimit": { "usd": 50, "diem": 10 }
}
}
```
**Save it immediately** — Venice won't show the secret again. If you lose it, delete and re-create.
### Required
- `apiKeyType`
- `description`
### Optional
- `expiresAt` — empty string or ISO 8601 date/datetime. Omit for non-expiring.
- `consumptionLimit.usd` / `.diem` — per-epoch caps. Null means no cap on that currency.
- `consumptionLimit.vcu` — **deprecated** (legacy Diem). Use `diem` instead.
## `PATCH /api_keys` — update
```bash
curl -X PATCH https://api.venice.ai/api/v1/api_keys \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "id": "uuid", "description": "renamed", "consumptionLimit": { "usd": 100 } }'
```
Only `description`, `expiresAt`, and `consumptionLimit` are mutable. Pass `"expiresAt": ""` or `null` to remove an expiration.
## `DELETE /api_keys?id=<uuid>` — revoke
```bash
curl -X DELETE "https://api.venice.ai/api/v1/api_keys?id=uuid" \
-H "Authorization: Bearer $ADMIN_KEY"
```
Returns `{"success": true}`. Revocation is immediate.
## `GET /api_keys/{id}` — details
Returns one key's full metadata plus trailing-7-day usage. Useful for an admin dashboard row view.
## `GET /api_keys/rate_limits`
```bash
curl https://api.venice.ai/api/v1/api_keys/rate_limits \
-H "Authorization: Bearer $VENICE_API_KEY"
```
Returns for the calling key:
```json
{
"data": {
"accessPermitted": true,
"apiTier": { "id": "paid", "isCharged": true },
"balances": { "USD": 50.23, "DIEM": 100.023 },
"keyExpiration": "2025-06-01T00:00:00Z",
"nextEpochBegins": "2025-05-07T00:00:00.000Z",
"rateLimits": [
{
"apiModelId": "zai-org-glm-5-1",
"rateLimits": [
{ "type": "RPM", "amount": 100 },
{ "type": "TPM", "amount": 200000 },
{ "type": "RPD", "amount": 10000 }
]
}
]
}
}
```
Use it to:
- Display current balances in-app.
- Warm-gate calls when the relevant model's RPM cap is near.
- Know when the next epoch resets (DIEM, bundled credits).
## `GET /api_keys/rate_limits/log`
Returns the last 50 rate-limit breaches. Response is wrapped as `{ object: "list", data: [...] }`:
```json
{
"object": "list",
"data": [
{ "apiKeyId": "...", "modelId": "zai-org-glm-5-1", "rateLimitType": "RPM",
"rateLimitTier": "paid", "timestamp": "2026-04-20T12:34:56Z" }
]
}
```
Feed these into your monitoring when tuning concurrency.
## Web3 API keys — two-step wallet flow
Lets a wallet that **holds sVVV** mint a classic Bearer API key. No Venice account required.
### 1. `GET /api_keys/generate_web3_key`
```bash
curl https://api.venice.ai/api/v1/api_keys/generate_web3_key
```
Returns `{ success: true, data: { token: "<jwt-ish token>" } }`.
### 2. Sign the token with your wallet, then `POST /api_keys/generate_web3_key`
```ts
import { Wallet } from 'ethers'
const { data: { token } } = await fetch(`${base}/api_keys/generate_web3_key`).then(r => r.json())
const wallet = new Wallet(prHigh-level map of the Venice.ai API - base URL, authentication modes, endpoint categories, response headers, pricing model, error shape, and versioning. Load this first when starting any Venice integration.
Async music / audio-track generation via Venice. Covers the /audio/quote + /audio/queue + /audio/retrieve + /audio/complete lifecycle, lyrics vs instrumental, voice selection, duration, language, speed, model capability probing, and webhook-free polling.
Generate speech from text via POST /audio/speech. Covers TTS models (Kokoro, Qwen 3, xAI, Inworld, Chatterbox, Orpheus, ElevenLabs Turbo, MiniMax, Gemini Flash), voices per family, output formats (mp3/opus/aac/flac/wav/pcm), streaming, prompt/emotion styling, temperature/top_p, and language hints.
Transcribe audio files to text via POST /audio/transcriptions. Covers supported models (Parakeet, Whisper, Wizper, Scribe, xAI STT), supported formats (wav/flac/m4a/aac/mp4/mp3/ogg/webm), response formats (json/text), timestamps, and language hints. OpenAI-compatible multipart.
Venice augmentation endpoints for agent pipelines. Covers POST /augment/text-parser (extract text from PDF/DOCX/XLSX/plain text, multipart, up to 25MB, JSON or plain text response), POST /augment/scrape (fetch a URL and return markdown; blocks X/Reddit), and POST /augment/search (Brave ZDR or anonymized Google; structured title/url/content/date results, up to 20 per query). Privacy (zero data retention), rate limits, and error shapes.
Authenticate to the Venice API with a Bearer API key or with an x402 / SIWE wallet. Covers header formats, the SIWE message fields, TTL and nonce rules, the venice-x402-client SDK, and how to choose between the two modes.
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)
Discover and use Venice public characters (persona-driven system prompts with a bound model). Covers GET /characters (search/filter/sort), /characters/{slug}, /characters/{slug}/reviews, the Character schema, and how to apply a character via venice_parameters.character_slug in chat completions.