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

# Rate limits

> How many requests you can make, how to read your remaining allowance, and how to back off.

The Sigmora API allows **100 requests per minute** for each authenticated
caller identity. A key acts as the person who created it, so every key belonging
to the same person shares one allowance, and parallel workers using those keys
draw from the same bucket.

`GET /v1/openapi.json` is not rate limited.

## Response headers

Authenticated responses report where you stand:

| Header | Meaning |
| - | - |
| `x-ratelimit-limit` | Requests allowed in the current window. |
| `x-ratelimit-remaining` | Requests left in the current window. |
| `x-ratelimit-reset` | Seconds until the window resets. |
| `Retry-After` | On a `429`, seconds to wait before retrying. |

## When you exceed the limit

The API answers `429` with the `rate_limited` code:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "success": false,
  "error": "Rate limit exceeded, retry in 1 minute",
  "code": "rate_limited"
}
```

Wait for the number of seconds in `Retry-After`, then retry the same request
with the same `Idempotency-Key`. Pause all work for that identity during the
wait — not just the request that was refused.

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  # -D - prints the response headers, including the rate-limit headers.
  curl -s -D - -o /dev/null https://api.sigmora.org/v1/capabilities \
    -H "Authorization: Bearer $SIGMORA_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  import os
  import time

  import requests

  session = requests.Session()
  session.headers["Authorization"] = f"Bearer {os.environ['SIGMORA_API_KEY']}"

  def get_with_backoff(url: str, attempts: int = 5) -> requests.Response:
      for attempt in range(attempts):
          response = session.get(url, timeout=30)
          if response.status_code != 429:
              return response
          time.sleep(float(response.headers.get("Retry-After", 2**attempt)))
      return response

  response = get_with_backoff("https://api.sigmora.org/v1/capabilities")
  print(response.headers.get("x-ratelimit-remaining"))
  ```

  ```typescript TypeScript theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  async function getWithBackoff(url: string, attempts = 5): Promise<Response> {
    let response!: Response;
    for (let attempt = 0; attempt < attempts; attempt++) {
      response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SIGMORA_API_KEY}` } });
      if (response.status !== 429) return response;
      const seconds = Number(response.headers.get("Retry-After") ?? 2 ** attempt);
      await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
    }
    return response;
  }

  const response = await getWithBackoff("https://api.sigmora.org/v1/capabilities");
  console.log(response.headers.get("x-ratelimit-remaining"));
  ```
</CodeGroup>

## Staying under the limit

* **Use jobs and webhooks instead of tight polling.** Poll a job every 15–30
  seconds, or let [webhooks](/webhooks) tell you when it finishes.
* **Share one limiter across workers.** Workers that use the same key or user
  should coordinate through a shared queue instead of each guessing.
* **Page with larger `limit` values** on list endpoints rather than many small
  pages. See [Pagination](/pagination).
* **Read capabilities once per batch**, not before every call.

Do not spread work across extra keys or users to get around the limit. If you
need sustained throughput above it, contact Sigmora before launch.

## Spending limits

Rate limits are separate from spending. Paid calls also stop when the workspace
runs out of credits (`402 insufficient_credits`) or when a budget policy caps the
user (`402 budget_capped`). See [Pricing & credits](/pricing).


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