Image resizing
Resize, crop and convert an app's images at /_img (and Next.js's /_next/image) from its own files or allowed https hosts; results cached per team; transformations billed per 1,000.
/v1/apps/{name}/imagesImage settings and usage#
The app's image resizing settings, its limits, this month's transformations and cache hits, the cache against the team's limit, and whether Hobby's free amount is used up (originals are served).
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/apps/my-api/images" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/imagesChange image settings#
Change any of enabled, hosts, widths, qualities, formats and ttl_seconds; live within seconds. Errors 400 image_bad_*, 409 image_limit.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
enabledbooleanhostsstring[]host names (img.example.com) or wildcards (*.example.com); https only, never addresses
widthsinteger[]qualitiesinteger[]0–10 items
formatsstring[]ttl_secondsinteger60–2678400
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/images" \
-H "Authorization: Bearer $KEY" \
-d '{"enabled":true,"hosts":["…"],"widths":[1],"qualities":[1],"formats":["webp"],"ttl_seconds":60}'/v1/apps/{name}/images/usageImage usage by day#
Per day: transformations (billed per 1,000), cache hits, originals served unchanged, bytes in and out.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersdaysintegerquery1–90 · default
30
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/apps/my-api/images/usage" \
-H "Authorization: Bearer $KEY"/v1/apps/{name}/images/cacheClear the image cache#
Forget every cached result of the app; each is made, and counted, again on its next request.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe app's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/images/cache" \
-H "Authorization: Bearer $KEY"/v1/imagesThe team''s image resizing#
Every app's transformations this month and its cache, and the team's cache against its plan limit.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/images" \
-H "Authorization: Bearer $KEY"