> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-9/rate-limit-handling.md).

# Recipe: rate-limit handling

Recipe — rate-limit handling. Pointer to the SDK security guide.

Canonical guide: [`stratix-python/docs/security/rate-limiting.md`](https://github.com/layerlens/stratix-python/blob/main/docs/security/rate-limiting.md).

## Quick reference

The SDK auto-retries 429 with `Retry-After` honored. To handle directly:

```python
import layerlens
try:
 client.evaluations.create(model=model, benchmark=benchmark)
except layerlens.RateLimitError as e:
 retry_after = e.response.headers.get('retry-after')
 print(f"Rate limited. Retry after: {retry_after}s")
```

## See also

* [SDK reference: errors](/more-in-this-section-9/errors-1.md)
* [Cookbook: retry-backoff](/more-in-this-section-9/retry-backoff.md)
