> ## Documentation Index
> Fetch the complete documentation index at: https://docs.venice.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# Rate Limits

> Venice API rate limits per model and tier, how to look them up, the headers that expose capacity, and handling 429s.

Rate limits vary by model and tier. The `/api_keys/rate_limits` endpoint returns the current limits for each model on your key:

> [card] [View Your Limits](https://docs.venice.ai/api-reference/endpoint/api_keys/rate_limits.md?playground=open)
>
> Interactive playground

> [card] [Rate Limit Logs](https://docs.venice.ai/api-reference/endpoint/api_keys/rate_limit_logs.md?playground=open)
>
> See which requests hit limits

```bash theme={"system"}
curl https://api.venice.ai/api/v1/api_keys/rate_limits \
  -H "Authorization: Bearer $VENICE_API_KEY"
```

## Limits by Model Type

### Text, Embedding, and Image Models

Text, embedding, and image models (including upscale and inpaint) each have their own limits. In the `/api_keys/rate_limits` response, `data.rateLimits` has one entry per model, and each entry's `rateLimits` lists an `amount` for each limit `type`: `RPM` (requests per minute), `TPM` (tokens per minute), or `RPD` (requests per day). To check a single model:

```bash theme={"system"}
curl -s https://api.venice.ai/api/v1/api_keys/rate_limits \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  | jq '.data.rateLimits[] | select(.apiModelId == "venice-uncensored-1-2")'
```

Limits can change, so read them from the API rather than hardcoding them. Inference responses also carry the applied limit and your remaining capacity in the `x-ratelimit-*` [response headers](#response-headers).

### Speech and Transcription Models

Every speech and transcription model allows 60 requests per minute, or 120 on a Partner key.

### Video and Music Models

Video, music, and voice-changer queue and retrieve requests are subject to per-account request limits. Handle `429` responses with backoff, and poll retrieve endpoints at a modest interval rather than in a tight loop. Jobs are billed per generation against your credit balance, so price a job first with [`POST /video/quote`](https://docs.venice.ai/api-reference/endpoint/video/quote), [`POST /audio/quote`](https://docs.venice.ai/api-reference/endpoint/audio/quote), or [`POST /audio/voice-changer/quote`](https://docs.venice.ai/api-reference/endpoint/audio/voice-changer/quote).

## Handling Errors

Failed requests (500, 503, 429) should be retried with exponential backoff.

For 429 errors on inference endpoints, the `x-ratelimit-reset-requests` header gives the latest time, as a Unix timestamp in milliseconds, by which the request window has fully cleared. Waiting until then is always safe; retrying earlier may also succeed.

```javascript theme={"system"}
const reset = Number(response.headers.get('x-ratelimit-reset-requests'));
const waitMs = Math.max(0, reset - Date.now());
await new Promise((resolve) => setTimeout(resolve, waitMs));
```

### Error Budgets

Two further limits protect the API against clients that retry into a wall. Both are counted per model per API key, and both return `429`. Failed requests are counted in fixed 30-second windows:

| Budget | Threshold | Applies to |
| :- | -: | :- |
| Failed requests | 50 per 30s | All endpoints |
| Unsupported feature requests | 200 per 30s | `/chat/completions`, `/responses` |

The second budget counts requests that ask a model for a feature it does not support — for example requesting vision or tool calling from a model without that capability. Exceeding either budget appears in [rate limit logs](https://docs.venice.ai/api-reference/endpoint/api_keys/rate_limit_logs.md) as `FAILED_REQUESTS` or `UNSUPPORTED_FEATURE_REQUESTS`.

The response body's `error` field names the threshold that tripped. For the failed-request budget it reads:

```
Too many failed attempts (> 50) resulting in a non-success status code. Please wait 30 seconds and try again. See https://docs.venice.ai/api-reference/rate-limiting for more information.
```

## Response Headers

Inference responses (chat completions, responses, image, audio, and embeddings) include these headers. They are not sent on models, API key, billing, or x402 routes, and the same applies to the `x-venice-balance-*` headers.

| Header | Description |
| :- | :- |
| `x-ratelimit-limit-requests` | Max requests allowed in current window |
| `x-ratelimit-remaining-requests` | Requests remaining in current window |
| `x-ratelimit-reset-requests` | Unix timestamp in milliseconds by which the current window has fully cleared (request time plus the full window length, regardless of usage) |
| `x-ratelimit-limit-tokens` | Max tokens allowed per minute |
| `x-ratelimit-remaining-tokens` | Tokens remaining in current minute |
| `x-ratelimit-reset-tokens` | Unix timestamp in milliseconds when the token limit resets |

The failed-request budget has its own headers, sent on every response to a request made with an API key, including `401` responses:

| Header | Description |
| :- | :- |
| `x-ratelimit-remaining` | Failed requests remaining in the current 30-second window |
| `x-ratelimit-resets` | Unix timestamp in milliseconds when the current 30-second window resets |

The `/crypto/rpc/{network}` endpoint uses its own limits and its own `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers, which are set only on 429 responses. Unlike the millisecond headers above, `X-RateLimit-Reset` is a Unix timestamp in seconds. See [Crypto RPC](https://docs.venice.ai/api-reference/endpoint/crypto/rpc.md) for details.

## Partner Tier

Partner keys have their own limits for each model. Call `GET /api_keys/rate_limits` with a Partner key to see them.

If you're consistently hitting your rate limits and your usage patterns show **sustained demand over time**, reach out to discuss partner access: [support@venice.ai](mailto:support@venice.ai).

Partner tier limits can be adjusted based on your specific needs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.