Limits
Request rate and size limits
Number of requests
It’s possible to call the model 600 times per minute. Requests that involve reading only, such as key, balance, request records, and video status, are counted separately. This means that the maximum number of requests per minute is 1,200. If this number is exceeded, it will be indicated by 429 and also by the Retry-After header, along with the time remaining until the request is completed (in seconds). The remaining number of requests for each request’s x-ratelimit-remaining header will be displayed, allowing for a reduction in speed before reaching the limit.
Size
| Subject/Object | Restrictions |
|---|---|
| Entire request | 20MB |
| Text/Message: A combination of messages and tools. | 400KB |
| Images | /chat/completions: 10 images; /messages: 20 images. The images sent as part of the address are 3.75MB per image. |
| Document (PDF) | / Messages: 5 items |
| Embedded Inputs | In total, 256 items at a time. That’s 400KB in total. You can get fewer items per model. If there are too many inputs, please divide them and send them separately. |
| models | 5 items |
| n | 4 |
Time and Length
- One of the requests needs to be completed within 60 minutes. If it exceeds that time limit, a 408 error will be reported.
- If a request doesn’t complete within 60 seconds, a response with status 200 is sent first, to ensure that the intermediate connection isn’t disconnected. After that, JSON is sent. The space before the JSON doesn’t affect its readability. If this approach fails, the status will be 200, and the message will be sent via
error. In this case,x-alprouter-held: 1will be added to the response header. For requests that take longer to complete, it’s recommended to usestream: truefor receiving the response. - If you don’t enter
max_tokens, then the length of the path that can be created with the 32,768 token and the remaining credits will be minimized. - The maximum length that can be generated for each model is indicated by the “max_output_tokens” value in the model list.
Credits
When sending requests, we set a maximum amount that can be transferred. If the remaining balance in the credit or key is less than this maximum amount, an error of 402 will occur. Additionally, if there are multiple requests sent at the same time, the maximum amount available for each request will also increase accordingly.
If the limits need to be increased, please also indicate the amount of the substance that is to be used, along with help@alpsoft.io.