Skip to content

Update rate-limits.mdx #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions fern/docs/pages/rate-limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ Retry-After: 30

The `Retry-After` response header can be used to determine the number of seconds left before the user’s rate limit window expires.

The user’s current rate limit quota and usage can be inspected in a request’s response headers:

| Header | Description |
| :--- | :--- |
| X-Ratelimit-Limit | The user’s total rate limit units for the current window. |
| X-Ratelimit-Remaining | The user’s remaining rate limit units for the current window. |
| X-Ratelimit-Reset | The time at which the rate limit window resets, in seconds from the Unix epoch. |

The following provides an example of response header values:

```
X-Ratelimit-Limit: 1000
X-Ratelimit-Remaining: 900
X-Ratelimit-Reset: 1720636800
```

<Callout intent="info">
All APIs have the same weight when applying rate limiting, and there is no preference given to any individual API. However, this is subject to change in the future.
</Callout>
Loading