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

# Portrix API Rate Limits, Quotas, and Usage Controls

> Learn about rate limits in Portrix — requests per minute, tokens per minute, and per-model quotas. See how to handle 429 errors and increase your limits.

Portrix enforces rate limits to ensure fair access and platform stability across all users. Understanding these limits helps you design resilient applications that degrade gracefully under load rather than failing unexpectedly.

## Types of limits

Portrix applies three categories of limits to your API key:

* **Requests per minute (RPM):** The maximum number of individual API calls you can make per minute. Each call to `/v1/chat/completions`, `/v1/embeddings`, or any other endpoint counts toward this limit.
* **Tokens per minute (TPM):** The total number of tokens — input plus output — consumed across all requests in a rolling one-minute window.
* **Daily token quota:** The total number of tokens you can consume in a 24-hour period, determined by your plan. This resets at midnight UTC.

When you exceed any of these limits, the API returns a `429 Too Many Requests` response.

## Limits by plan

The following table shows representative limits for each Portrix plan. Your actual limits are displayed in real time on the **Usage** page in the dashboard.

| Plan       | Requests per minute | Tokens per minute | Daily token quota |
| ---------- | ------------------: | ----------------: | ----------------: |
| Free       |                  60 |           100,000 |           500,000 |
| Pro        |                 600 |         1,000,000 |        10,000,000 |
| Enterprise |              Custom |            Custom |            Custom |

<Note>
  Limits shown above are representative defaults. Your specific limits may vary based on your plan configuration. Always check the dashboard for your exact quotas.
</Note>

## Checking your usage

To view your current usage and remaining quota:

1. Go to [app.portrix.ai](https://app.portrix.ai) and sign in.
2. Navigate to **Usage** in the left sidebar.
3. Select a time range to view RPM, TPM, and token consumption over time.

The Usage page also breaks down consumption by model and API key, making it easy to identify which parts of your application are driving the most traffic.

## Handling rate limit errors

When you hit a rate limit, Portrix returns a `429` status code with a `Retry-After` header indicating how many seconds to wait before retrying. Implement exponential backoff in your application to handle these responses gracefully.

<CodeGroup>
  ```python Python theme={null}
  import time
  import random
  import openai

  client = openai.OpenAI(
      api_key="YOUR_PORTRIX_KEY",
      base_url="https://api.portrix.ai/v1",
  )

  def chat_with_backoff(messages, model="openai/gpt-4o", max_retries=5):
      for attempt in range(max_retries):
          try:
              response = client.chat.completions.create(
                  model=model,
                  messages=messages,
              )
              return response
          except openai.RateLimitError as e:
              if attempt == max_retries - 1:
                  raise
              # Exponential backoff with jitter
              wait = (2 ** attempt) + random.uniform(0, 1)
              print(f"Rate limited. Retrying in {wait:.1f}s...")
              time.sleep(wait)
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "YOUR_PORTRIX_KEY",
    baseURL: "https://api.portrix.ai/v1",
  });

  async function chatWithBackoff(messages, model = "openai/gpt-4o", maxRetries = 5) {
    for (let attempt = 0; attempt < maxRetries; attempt++) {
      try {
        const response = await client.chat.completions.create({
          model,
          messages,
        });
        return response;
      } catch (err) {
        if (err.status !== 429 || attempt === maxRetries - 1) {
          throw err;
        }
        // Exponential backoff with jitter
        const retryAfter = parseInt(err.headers?.["retry-after"] ?? "1", 10);
        const wait = Math.max(retryAfter, 2 ** attempt) * 1000 + Math.random() * 1000;
        console.log(`Rate limited. Retrying in ${(wait / 1000).toFixed(1)}s...`);
        await new Promise((resolve) => setTimeout(resolve, wait));
      }
    }
  }
  ```
</CodeGroup>

## Increasing limits

If you need higher limits than your current plan provides, you have two options:

* **Upgrade your plan:** Go to **Settings > Billing** in the dashboard and select a higher tier. Limits increase immediately upon upgrade.
* **Enterprise plan:** For custom RPM, TPM, or daily quota requirements, contact the Portrix team at [support@portrix.ai](mailto:support@portrix.ai) to discuss an Enterprise plan tailored to your usage patterns.

## Provider-level limits

In addition to Portrix's own limits, every upstream provider (OpenAI, Anthropic, Google, etc.) enforces their own rate limits on API traffic. When Portrix routes a request through its shared keys, these provider-level limits apply to the shared pool across all Portrix users.

If you add your own provider API keys (see [Providers](/configuration/providers)), your requests use your dedicated quota with that provider, giving you full control over your provider-level limits.

<Tip>
  Use Portrix's fallback routing to automatically switch providers when you hit a rate limit on one model. For example, configure `anthropic/claude-3-5-haiku` as a fallback for `openai/gpt-4o-mini` so traffic continues flowing even during a provider outage or throttling event.
</Tip>
