Limits
Each PixelBin organization has some limits on the functioning and use of PixelBin features.
These limits are non-adjustable and cannot be changed for each user or organization. These limits are per organization.
General limits
Name | Value |
---|---|
Max file limits allowed for bulk download of originals | 15000 files or 30GB total size |
Max file limits allowed for bulk transformations | 5000 files or 10GB total size |
Max number of transformations in a preset | 15 |
Max datasources (including default datasource) | 20 |
Max zones (including default zone) | 50 |
Max tokens | 50 |
Upload limits
Certain limitations apply based on the type of file uploaded, such as restrictions on image transformation dimensions, which are a limitation of the underlying image format.
Size limits
File type limits
All PixelBin transformation capabilities are geared toward image files, but in general, any file type can be uploaded, managed, and delivered.
Some files, however, cannot be used with PixelBin. This is done to safeguard our service and users from potentially hazardous files, executable files, or formats used to propagate malware.
Transformation limits
The constraints on images are also determined by the type of transformations that will be made to them.
Transformation limits are also applicable in transformation results at every step.
For example, when using the t.resize(...)~erase.bg()
chained transformation, the result of the t.resize
transformation cannot exceed the limits mentioned above, otherwise, the erase.bg
transformation will throw an error.
Multi-page images
PixelBin has limited support for transforming TIFF (multi-page) images.
The
tiff
file format is only supported by Basic transformations.If a tiff image is processed, an error is thrown if the transformation is performed on more than 10 pages, as shown.
Cannot process TIFF images with pages above 10.
When converting a tiff file to another image format, only the first page is converted; the rest are discarded.
Credits are calculated according to the number of pages transformed.
For instance, if you have 5 credits and use the
0.004 credits are consumed for all basic transformations present in a patternt.flip()~t.flop()
transformation pattern on a tiff image with10
pages, then you will have 4.96 credits remaining after the transformation.Transformation Pattern Remaining Credits Calculation - 5 - After t.flip()~t.flop()
4.96 5 - (10 x 0.004) Similarly, if you use
t.toFormat
anywhere in the transformation chain, you will only use one basic transformation credit, regardless of the number of pages in the image.So, for a tiff image with
10
pages,t.toFormat(f:webp)~t.flip()
ort.resize(w:400)~t.toFormat(f:jpeg)
ort.toFormat(f:png)
will consume only 0.004 credits, as shown.Transformation Pattern Remaining Credits Calculation - 5 - After t.toFormat(f:webp)~t.flip()
4.996 5 - (1 x 0.004) After t.resize(w:400)~t.toFormat(f:jpeg)
4.992 4.996 - (1 x 0.004) After t.toFormat(f:png)
4.988 4.992 - (1 x 0.004)
Rate limits
PixelBin enforces rate limits to ensure fair usage of its services. Rate limits are applied to individual transformations within a request for an interval of 1 minute
, and exceeding these limits will result in a 429 (Too Many Requests)
response status code.
Cached requests are not rate limited.
You are not charged any credits for rate limited requests.
Transformation rate limits
Name | Value |
---|---|
AI Background Generator | 5 per minute |
AI Transformations & Addons | 300 per minute |
Basic Transformations | No rate limit |
Rate limit Response headers
Response will also contain the following headers if use any transformation that has rate limits. You can use these headers to stay within the rate limits.
Header | Description |
---|---|
X-RateLimit-Limit | Rate limit for the set of transformations in the request |
X-RateLimit-Remaining | Minimum number of tokens remaining for the set of transformations in the request |
X-RateLimit-Interval | The amount of time in seconds which is used as the rate limit window |
X-RateLimit-Reset | Unix timestamp when rate limit will reset |
Retry-After | In case you exceed the rate limit, this header specifies the amount of time in seconds after which you can retry the request |
Example
We are starting off with 5 rate limit tokens for the AI Background Generator and 300 rate limit tokens for all AI Transformations and Addons.
The rate limit tokens consumed when you request the PixelBin URL https://cdn.pixelbin.io/v2/your_cloud_name/generate.bg()~t.flop()~ic.crop()~generate.bg()/sample-image.jpeg
for the first time is as follows:
Name | Consumed | Reason |
---|---|---|
AI Transformations & Addons | 3 | 1 x ic.crop + 2 x generate.bg |
AI Background Generator | 2 | 2 x generate.bg |
The response headers for the above request will be:
Header | Value |
---|---|
X-RateLimit-Limit | 5 |
X-RateLimit-Remaining | 3 |
X-RateLimit-Interval | 60 |
AI Background Generator consumes rate limit tokens for itself as well as AI Transformations & Addons, while Intelligent Crop consumes rate limit tokens only for AI Transformations & Addons. This is because AI Background Generator has its own specific rate limit and is also rate limited by the overall AI Transformations & Addons rate limit.
Any subsequent requests to the same URL will not consume any rate limit tokens as long as the request is served from cache.
You made another request to the PixelBin URL https://cdn.pixelbin.io/v2/your_cloud_name/generate.bg()~generate.bg()~generate.bg()/sample-image2.jpeg
after 1 second, the rate limit tokens consumed would be as follows:
Name | Consumed | Reason |
---|---|---|
AI Transformations & Addons | 3 | 3 x generate.bg |
AI Background Generator | 3 | 3 x generate.bg |
and the response headers for the above request will be:
Header | Value |
---|---|
X-RateLimit-Limit | 5 |
X-RateLimit-Remaining | 0 |
X-RateLimit-Interval | 60 |
Rate limit tokens were consumed because the request was not served from cache. Any subsequent requests to the same URL will not consume any rate limit tokens if they are served from cache.
You follow up the above request with a request to PixelBin URL https://cdn.pixelbin.io/v2/your_cloud_name/generate.bg()~generate.bg()/sample-image3.jpeg
after 1 second, the rate limit tokens for this request would be as follows:
Name | Consumed | Reason |
---|---|---|
AI Transformations & Addons | 2 | 2 x generate.bg |
AI Background Generator | 2 | 2 x generate.bg |
And since the request was rate limited, the response headers for the above request will be:
Header | Value |
---|---|
X-RateLimit-Limit | 5 |
X-RateLimit-Remaining | 0 |
X-RateLimit-Interval | 60 |
X-RateLimit-Reset | 1695282553372 |
Retry-After | 58 |
The status code of the response will be 429 (Too Many Requests)
. You can retry the same request after amount of time specified in the Retry-After
header has elapsed or at the unix timestamp specified in the X-RateLimit-Reset
header.