Info API
Supported formats, AI models, limits and versions of this container.
From 1.1.0-rc.6. https://imgcompress.example.com stands for your instance.
Supported formats, AI models, limits and versions of this container.
From 1.1.0-rc.6. https://imgcompress.example.com stands for your instance.
Versions, limits and switched-on features
Needs the API key when PUBLIC_API_KEY is set. Operation ID: info.
When: Call once at start to read the limits and switched-on features (e.g. notifications_enabled before offering notify).
What this container allows: upload limit (MAX_UPLOAD_SIZE_MB), output size limit for AI upscaling, how long results are kept, and whether the API key, storage management and notifications are on.
bashcurl -fsS https://imgcompress.example.com/api/v1/info \ -H "Authorization: Bearer $PUBLIC_API_KEY"
| Status | Meaning | Content |
|---|---|---|
| 200 | Container settings. | application/json |
| 401 | PUBLIC_API_KEY is set and the request is neither from the web UI nor carries the key. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
Info)#| Field | Type | Required | Description |
|---|---|---|---|
api_version | string | yes | |
app_version | string | null | no | Release of the container, null in dev builds. |
public_api_enabled | boolean | no | ENABLE_PUBLIC_API. |
auth_required | boolean | yes | PUBLIC_API_KEY is set. |
storage_management_enabled | boolean | no | |
notifications_enabled | boolean | no | NOTIFY_URL is set. |
limits | object | yes | |
limits.max_upload_size_mb | integer | yes | Largest request body (MAX_UPLOAD_SIZE_MB). |
limits.max_output_megapixels | integer | no | Largest AI upscaling output. |
limits.max_fit_dimension | integer | no | Largest fit_width/fit_height. |
limits.result_retention_seconds | integer | no | How long idle results are kept. |
Input and output formats
Needs the API key when PUBLIC_API_KEY is set. Operation ID: formats.
When: Call before uploading to check a file type, and for the values of format.
supported_formats: file extensions the container reads (70+, from Pillow plus the PDF, PSD, SVG and HEIC pipelines). verified_formats: the ones tested in CI. preview_unsupported_formats: inputs POST /preview cannot render (they still convert). output_formats: values for the format field.
bashcurl -fsS https://imgcompress.example.com/api/v1/formats \ -H "Authorization: Bearer $PUBLIC_API_KEY"
| Status | Meaning | Content |
|---|---|---|
| 200 | Format lists. | application/json |
| 401 | PUBLIC_API_KEY is set and the request is neither from the web UI nor carries the key. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
Formats)#| Field | Type | Required | Description |
|---|---|---|---|
supported_formats | array of string | yes | |
verified_formats | array of string | yes | |
preview_unsupported_formats | array of string | no | |
output_formats | array of string | yes | One of: "jpeg", "png", "ico", "avif", "webp", "pdf". |
Background removal model
Needs the API key when PUBLIC_API_KEY is set. Operation ID: removeBackgroundModel.
When: Optional. Shows which model remove_background=true uses.
The bundled rembg model used for remove_background=true. Runs offline in the container.
| Status | Meaning | Content |
|---|---|---|
| 200 | Model name. | application/json |
| 401 | PUBLIC_API_KEY is set and the request is neither from the web UI nor carries the key. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
RemoveBackgroundModel)#| Field | Type | Required | Description |
|---|---|---|---|
model_name | string | yes |
AI upscaling models
Needs the API key when PUBLIC_API_KEY is set. Operation ID: upscaleModels.
When: Call before upscaling: values for upscale_model and whether each is installed.
The bundled Real-ESRGAN models (values for upscale_model) and whether each one is installed in this image.
| Status | Meaning | Content |
|---|---|---|
| 200 | Model status. | application/json |
| 401 | PUBLIC_API_KEY is set and the request is neither from the web UI nor carries the key. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
UpscaleModels)#| Field | Type | Required | Description |
|---|---|---|---|
models | array of object | yes | |
models[].id | string | yes | One of: "general", "general-denoise-medium", "general-denoise-low", "anime". |
models[].model_name | string | no | |
models[].available | boolean | yes |