Limitations & Rate Limit
Max request size¶
The max request size depends on the endpoint:
| Endpoint | Max request size |
|---|---|
| Smartscan (synchronous annotate) | 10485760 Bytes (10 MiB) |
| Autosuggest suggest, datasets and models | 10485760 Bytes (10 MiB) |
| Smartscan Async (transactions) | 104857600 Bytes (100 MiB) |
| Smartscan feedback | 15728640 Bytes (15 MiB) |
| Product Types | 15728640 Bytes (15 MiB) |
Over REST, requests bigger than the max request size result in a 413 response. Over gRPC, they fail with RESOURCE_EXHAUSTED.
Note
The limit applies to the decoded request, not to the raw body you send. Documents are carried base64-encoded in JSON, and base64 is about 33% larger than the bytes it encodes - so a 10 MiB document is still within the limit even though its JSON body is around 13 MiB.
Rate limiting¶
All projects of the API will be by default limited to:
- a sustained rate of 400 requests per rolling minute
- a burst capacity of 15 requests
The burst capacity is a bucket that lets you exceed the sustained rate momentarily. It refills at the sustained rate, so bursting does not raise your overall budget of 400 requests per rolling minute.
These limits are enforced per endpoint. As an example, exhausting the limits on endpoint A will not affect rate limits on endpoint B.
To adjust the rate limits please reach out to the support.
Every authenticated API response will return the following rate limit headers:
x-ratelimit-limit: The burst capacity available to the current API token. This reflects the capacity of the burst bucket, so it reads one higher than the configured burst value.
x-ratelimit-remaining: The number of burst requests left.
retry-after: If you have been ratelimited based on the above headers, this indicates how many seconds until you are allowed to send traffic again. and always -1 if the action was allowed.
x-ratelimit-reset: The number of seconds until the limit will reset to its maximum capacity.