API to manage Imgix resources including sources and assets. All calls to the Imgix Management API require an API key. To create a key, navigate to the API Keys view in your Dashboard. Any user can create an API key, but a user will only be able to create a key that has permissions equal to or less than the user’s own permissions. Account Admins can update user permissions on the Users page or read more about permissions here. Imgix supports the following permissions for use with the Management API:
The API will return JSON-formatted errors when it encounters an unsuccessful operation. Instead of a data
attribute that would be returned on successful requests, the API response will instead have an errors
attribute. The value of errors
will be a List of individual Error objects that contain the following fields:
Error Fields | Description |
---|---|
detail | Detailed description of the error |
id | Unique identifier of the request. Support may be able to troubleshoot further with this id |
status | HTTP Status code (see table below) |
title | Type of error |
Error Status Code | Description |
---|---|
400 | Bad request / validation failed (e.g. missing a required field) |
401 | Unauthorized (e.g. your API key or authenication method is invalid) |
404 | Not Found (e.g. requesting a non-existent object) |
405 | Method not allowed (e.g. trying to POST on a GET endpoint) |
429 | Rate limit exceeded. Slow down or contact Support if you need higher limits. |
500 | Internal Server Error |
Our APIs have variable rate limits depending on the endpoint. To ensure that requests complete and do not return a rate limiting error, we recommend throttling requests to the Management API based on the following rate limits provided.
We return a 429 Too Many Requests
error to new API requests if the rate limit is exceeded for any given endpoint. Once that happens, we will reject new requests to that endpoint until rate limiting subsides. The rate limits are listed below:
Imgix API | Rate Limit |
---|---|
default rate limit | 4 per second |
update source | 60 per hour |
create source | 60 per hour |
get asset | 10 per second |
refresh asset | 10 per minute |
upload v1 | 2 per second |
purge asset | 10 per second |