⛓️Limits

Some API endpoints, which are expensive to run, may have limits. These limitations are subject to change often. When changes occur, updates will be made on this page to reflect the new limits.

If you'd like to get rid of API limits, consider upgrading!

Get Limits

GET /limits

This endpoint lets you get a list of rate limits for specific endpoints and their features. The number value associated with a limit is the number of milliseconds you must wait between requests.

Headers

Name
Value

Content-Type

application/json

Response

{
  "llm": {
    "gpt-3.5-turbo-16k": 15000,
    "gemini-pro": 15000,
    "claude-3-sonnet": {
      "premium": 5000,
      "free": -1,
    },
    "gpt-4": { "premium": 5000, "free": -1 },
  },
  "sdxl": 20000,
  "playground": 90000,
  "dalle": 120000,
  "whisper": 600000,
  "tts": 60000,
}

Note: Some models have premium limits (usually low). If a limit is -1 that means it cannot be used!

Example: Fetching and Updating Rate Limits

To get specific rate limits and update them every hour automatically, you can use the following example code. This script fetches the rate limits, updates them every hour, and saves the updated values to be referenced later if needed.

This script performs an initial fetch of the rate limits and then sets an interval to automatically update the limits every hour.

Last updated