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

# Rate Limits

> Understanding API rate limits and best practices for Gately AI LLM services

<Frame>
  <img src="https://mintcdn.com/taamai-c8c27d6c/6_fKWBPakm0prWJp/images/rate-limits.png?fit=max&auto=format&n=6_fKWBPakm0prWJp&q=85&s=9108ff3e94a23558a471353c56942fca" alt="Rate Limits Overview" width="5760" height="3840" data-path="images/rate-limits.png" />
</Frame>

## Understanding Rate Limits

<Info>
  Each account has a default rate limit of **300 Requests Per Minute (RPM) Per Model**.
</Info>

Rate limits control how frequently users can make requests to our LLM API within specific time periods. These limits help ensure fair resource distribution and maintain service stability.

<CardGroup cols={3}>
  <Card title="Prevent Abuse" icon="shield">
    Protect against API misuse and abuse
  </Card>

  <Card title="Fair Usage" icon="scale-balanced">
    Ensure fair resource distribution
  </Card>

  <Card title="Stability" icon="server">
    Maintain consistent API performance
  </Card>
</CardGroup>

<Frame>
  <img src="https://mintcdn.com/taamai-c8c27d6c/7tpU7wOp-rlopJuB/images/api-logs.png?fit=max&auto=format&n=7tpU7wOp-rlopJuB&q=85&s=4be1fadda36535d14f062ef61b591c25" alt="Rate Limits Overview" width="5760" height="3840" data-path="images/api-logs.png" />
</Frame>

## Rate Limit Details

<AccordionGroup>
  <Accordion title="Default Limits" icon="gauge-high">
    | Limit Type          | Value | Period   |
    | ------------------- | ----- | -------- |
    | Per Model           | 300   | 1 minute |
    | Concurrent Requests | 5     | At once  |
  </Accordion>

  <Accordion title="Rate Limit Response" icon="triangle-exclamation">
    When you exceed the rate limit, you'll receive:

    ```json theme={null}
    {
      "error": {
        "status": 429,
        "message": "Too Many Requests",
        "detail": "Rate limit exceeded. Please try again in {X} seconds"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## Best Practices

<Steps>
  <Step title="Implement Request Throttling">
    Add rate limiting in your application code to stay within limits:

    ```typescript theme={null}
    const rateLimiter = new RateLimiter({
      requests: 300,
      period: '1m'
    });
    ```
  </Step>

  <Step title="Add Exponential Backoff">
    Implement retry logic with increasing delays:

    ```typescript theme={null}
    const backoff = (attempt) => Math.min(1000 * Math.pow(2, attempt), 10000);
    ```
  </Step>

  <Step title="Monitor Usage">
    Track your API usage through our dashboard:
    [View Usage Stats](https://app.gately.ai/dashboard/home)
  </Step>
</Steps>

## Handling Rate Limits

<Note>
  When you receive a 429 error, implement these handling strategies:
</Note>

1. **Retry Later**: Wait for the specified cooldown period
2. **Optimize Requests**: Batch operations when possible
3. **Monitor Usage**: Track your consumption patterns

## Increasing Rate Limits

<CardGroup cols={2}>
  <Card title="Contact Support" icon="discord" href="https://discord.gg/taamcloud">
    Join our Discord community for immediate assistance
  </Card>

  <Card title="Enterprise Needs" icon="building" href="https://calendly.com/admin-taamsoft/30min">
    Book a call with our sales team for custom limits
  </Card>
</CardGroup>

<Warning>
  Repeatedly exceeding rate limits may result in temporary account restrictions. Please monitor your usage and request limit increases if needed.
</Warning>
