Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

Rate limits

We have four rate limit tiers for the Rye API:
  • Default - 100 requests/sec
  • Moderate - 20 requests/sec
  • Elevated - 5 requests/sec
  • Strict - 1 request/sec
You can check the following headers to track rate limits:
  1. Ratelimit-Limit: The maximum number of requests that the consumer is permitted to make in a given time window.
  2. Ratelimit-Remaining: The number of requests remaining in the current rate limit window.
  3. Ratelimit-Tier: The rate limit tier for the query or mutation. (Default, Strict, Elevated, Moderate)
  4. Ratelimit-Reset: The time at which the current rate limit window resets in seconds.

Rate limit handling in your code

async function makeRateLimitedRequest(url) { try { const response = await axios.get(url); // Extract rate limit headers const rateLimit = parseInt(response.headers['ratelimit-limit'], 10); const rateLimitRemaining = parseInt(response.headers['ratelimit-remaining'], 10); const rateLimitReset = parseInt(response.headers['ratelimit-reset'], 10) * 1000; // Convert to milliseconds if (rateLimitRemaining === 0) { // If no requests are left, wait until the reset time const waitTime = rateLimitReset - Date.now(); console.log(`Rate limit hit. Waiting ${waitTime} ms...`); await delay(waitTime); } // Return the response data return response.data; } catch (error) { console.error('Error making request:', error); throw error; } } // Usage async function main() { const url = 'https://api.example.com/your-endpoint'; try { const data = await makeRateLimitedRequest(url); console.log('Response data:', data); } catch (error) { console.error('Failed to retrieve data:', error); } } main();
The following queries and mutations are in the Strict tier
If you need a higher rate limit for strict tier, please contact us.
The following queries are in the Elevated tier
Elevated tier's rate limit can not be increased.