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

# Rate Limits

export const DynamicRPMList = () => {
  if (typeof document === "undefined") {
    return null;
  } else {
    let attempts = 0;
    const maxAttempts = 50;
    const formatAmount = num => {
      if (typeof num === "number") {
        return num.toLocaleString();
      }
      return num || "-";
    };
    const interval = setInterval(() => {
      const clientComponent = document.getElementById("dynamic-rpm-list");
      if (clientComponent && window.myrouterRemoteData.llmModels.status === 'loaded') {
        const modelList = window.myrouterRemoteData.llmModels.data.filter(model => {
          return Boolean(model.rpm);
        });
        const allModels = modelList.map(model => {
          const t1 = (model.quota_items || []).find(item => item.tier === "T1") || ({});
          const t2 = (model.quota_items || []).find(item => item.tier === "T2") || ({});
          const t3 = (model.quota_items || []).find(item => item.tier === "T3") || ({});
          const t4 = (model.quota_items || []).find(item => item.tier === "T4") || ({});
          const t5 = (model.quota_items || []).find(item => item.tier === "T5") || ({});
          return `
            <tr>
              <td rowspan="2" style="vertical-align: middle; max-width: 230px">${model.id}</td>
              <td>RPM</td>
              <td>${formatAmount(t1.rpm)}</td>
              <td>${formatAmount(t2.rpm)}</td>
              <td>${formatAmount(t3.rpm)}</td>
              <td>${formatAmount(t4.rpm)}</td>
              <td>${formatAmount(t5.rpm)}</td>
            </tr>
            <tr>
              <td>TPM</td>
              <td>${formatAmount(t1.tpm)}</td>
              <td>${formatAmount(t2.tpm)}</td>
              <td>${formatAmount(t3.tpm)}</td>
              <td>${formatAmount(t4.tpm)}</td>
              <td>${formatAmount(t5.tpm)}</td>
            </tr>
          `;
        }).join('');
        clientComponent.innerHTML = `
          <table class="table table-big">
            <thead>
              <tr>
                <th>Model</th>
                <th></th>
                <th>T1</th>
                <th>T2</th>
                <th>T3</th>
                <th>T4</th>
                <th>T5</th>
              </tr>
            </thead>
            <tbody>
              ${allModels}
            </tbody>
          </table>
        `;
        clearInterval(interval);
      }
      attempts++;
      if (attempts >= maxAttempts) {
        clearInterval(interval);
      }
    }, 200);
    return <div id="dynamic-rpm-list"></div>;
  }
};

## Understanding Rate Limits

Rate limits define the number of API requests that can be made within a specific time period, helping optimize API usage.

* Prevent API abuse and misuse
* Ensure fair resource allocation
* Maintain API performance and reliability
* Protect service stability

## Default Rate Limits

Each account has default rate limits when calling models, measured in RPM (requests per minute per model) and TPM (tokens per minute per model). Rate limits vary by account tier, as shown in the table below.

<table class="table table-big">
  <thead>
    <tr>
      <th class="min-w-10">Quota Tier</th>
      <th>Qualification (USD)</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>T1</td>
      <td>Highest single-month top-up amount in the last 3 calendar months \< \$50</td>
    </tr>

    <tr>
      <td>T2</td>
      <td>\$50 ≤ Highest single-month top-up amount in the last 3 calendar months \< \$500</td>
    </tr>

    <tr>
      <td>T3</td>
      <td>\$500 ≤ Highest single-month top-up amount in the last 3 calendar months \< \$3000</td>
    </tr>

    <tr>
      <td>T4</td>
      <td>\$3000 ≤ Highest single-month top-up amount in the last 3 calendar months \< \$10000</td>
    </tr>

    <tr>
      <td>T5</td>
      <td>\$10000 ≤ Highest single-month top-up amount in the last 3 calendar months</td>
    </tr>
  </tbody>
</table>

Default rate limits (RPM / TPM) for each tier:

<DynamicRPMList />

## Avoiding Rate Limit Triggers

If the number of your API requests exceeds the rate limit, the API will return:

* HTTP status code: 429 (Too Many Requests).
* The response body will contain rate limit exceeded information.

To avoid triggering rate limits, you can take the following measures:

* Implement request throttling in your application.
* Use exponential backoff when retrying.
* Monitor your API usage.

## Handling 429 Errors

If you receive a 429 error, you can try the following:

* **Retry later**: Wait for a period before retrying your request.
* **Optimize requests**: Reduce request frequency.
* **Increase rate limits**: If you need higher rate limits, please contact us.
