Rate limits
Each Aidge API enforces an account-level QPS (queries per second) limit. If you exceed the limit, the API returns the HTTP 429 status code.
Default QPS limits
|
API |
Default QPS |
Processing mode |
|
Multimodal translation |
||
|
text translation |
10 |
synchronous |
|
document translation |
5 |
asynchronous |
|
image translation (standard) |
5 |
synchronous |
|
image translation (pro) |
5 |
synchronous |
|
video translation |
- |
asynchronous |
|
video inpainting |
- |
asynchronous |
|
language detection |
10 |
synchronous |
|
text correction |
10 |
synchronous |
|
Asset optimization |
||
|
Product Asset Optimization Lite |
2 |
asynchronous |
|
Product Asset Optimization Pro |
2 |
asynchronous |
|
AI-powered image generation |
2 |
asynchronous |
|
smart matting |
5 |
synchronous |
|
smart inpainting |
5 |
synchronous |
|
smart cropping |
5 |
synchronous |
|
smart element recognition |
5 |
synchronous |
|
size chart extraction |
2 |
asynchronous |
|
size chart detection |
5 |
synchronous |
|
product category matching |
2 |
synchronous |
|
product attribute matching |
2 |
synchronous |
|
Others |
||
|
package dimension and weight review |
2 |
asynchronous |
The default QPS limits fall into three tiers: 10 for text translation, language detection, and text correction; 5 for document translation, image translation, smart matting, smart inpainting, smart cropping, smart element recognition, and size chart detection; and 2 for all other APIs. To request a higher QPS quota, contact technical support.
Asynchronous API concurrency
For asynchronous APIs, such as document translation, AI-powered image generation, size chart extraction, Product Asset Optimization Lite, and Product Asset Optimization Pro, the QPS limit applies only to the submission endpoint. Result query endpoints are not rate-limited, but we recommend a polling interval of at least 1 second, preferably 5 seconds.
Recommended polling strategy
import time
def poll_task_result(query_func, task_id, interval=5, max_wait=600):
"""Polls an asynchronous task until it is complete or times out.
All asynchronous jobs are polled through the unified QueryAsyncTaskResult API. The status field is Data.Status,
with possible values of QUEUED, IN_PROGRESS, COMPLETED, or FAILED.
The code below is also backward-compatible with older versions for video translation and video inpainting (features currently on hold), which use Data.TaskStatus with values like submitted, running, finished, or failed.
"""
TERMINAL = {"finished", "failed", "COMPLETED", "FAILED"}
elapsed = 0
while elapsed < max_wait:
result = query_func(task_id)
data = result.get("Data", {})
status = data.get("TaskStatus") or data.get("Status") or ""
if status in TERMINAL:
return result
time.sleep(interval)
elapsed += interval
raise TimeoutError(f"Task {task_id} did not complete within {max_wait} seconds")
Handling rate limit errors
When you receive an HTTP 429 (rate limiting) error:
1. Reduce concurrency.
2. Implement retries with exponential backoff and random jitter.
3. To increase your QPS quota, contact technical support.
Notes
-
QPS limits are enforced at the account level, not per API key.
-
Your plan level determines your QPS limit, and higher-tier plans may include a larger QPS quota.
-
The maximum response time for synchronous APIs is 30 seconds. Set your client-side timeout accordingly.
Next steps
-
Error codes: See the complete list of error codes.
-
Text translation: Get started with text translation.