# Shortpixel

ShortPixel is an image optimization and compression service that offers APIs and plugins to enhance website performance by reducing image sizes without compromising quality.

- **Category:** images & design
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 12
- **Triggers:** 0
- **Slug:** `SHORTPIXEL`
- **Version:** 20260312_00

## Tools

### Add CDN Domain

**Slug:** `SHORTPIXEL_ADD_CDN_DOMAIN`

Tool to add a new domain to the ShortPixel CDN system and associate it with your API key. Use when you need to register a domain for CDN services. If the domain already exists without a user, it will be associated with your API key.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to add to the CDN (e.g., example.com or test-domain-example.com) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Bulk Purge ShortPixel Storage

**Slug:** `SHORTPIXEL_BULK_PURGE_STORAGE`

Tool to purge all files stored on ShortPixel storage servers for a domain. Use when you need to remove all stored files for a site in bulk.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The domain whose files will be purged from ShortPixel storage |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check Image Status

**Slug:** `SHORTPIXEL_CHECK_IMAGE_STATUS`

Tool to check the optimization status of an image being processed by ShortPixel. Returns current status of queued images including URLs and size information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | URL of the image to check status for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Clean Up Image

**Slug:** `SHORTPIXEL_CLEAN_UP_IMAGE`

Tool to remove images from the processing queue. Use when you need to optimize another image with the same URL but different contents within the next hour.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urllist` | array | Yes | List of image URLs to remove from the processing queue |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Adaptive Image via CDN

**Slug:** `SHORTPIXEL_GET_ADAPTIVE_IMAGE_CDN`

Tool to optimize images on-the-fly via ShortPixel CDN. Transform images by URL with parameters for width, height, cropping, quality, and format conversion. Returns the optimized image directly without CDN caching.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `crop` | string ("smart" | "center" | "north" | "south" | "east" | "west" | "northeast" | "northwest" | "southeast" | "southwest") | No | Crop style options. |
| `width` | integer | No | Desired width in pixels for the optimized image |
| `height` | integer | No | Desired height in pixels for the optimized image |
| `quality` | string ("lqip" | "lossless" | "glossy" | "lossy") | No | Image quality/compression level options. |
| `image_url` | string | Yes | Absolute URL of the original image to optimize (e.g., 'https://example.com/image.jpg') |
| `keep_exif` | boolean | No | Whether to keep EXIF metadata in the optimized image. False removes metadata for smaller file size. |
| `to_format` | string ("webp" | "avif" | "auto") | No | Output format conversion options. |
| `return_mode` | string ("blank" | "img" | "wait") | No | Return behavior options. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get API Status

**Slug:** `SHORTPIXEL_GET_API_STATUS`

Tool to retrieve the current status of your API key, including available credits. Use when you need to monitor your account usage before making additional API calls.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get CDN Usage Statistics

**Slug:** `SHORTPIXEL_GET_CDN_USAGE`

Tool to retrieve detailed CDN usage statistics for a domain including traffic, API calls, monthly quota, remaining credits, and historical usage breakdown by date. Use when you need to monitor CDN consumption or check quota status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to get CDN usage statistics for (e.g., example.com) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Optimize Images by URL

**Slug:** `SHORTPIXEL_OPTIMIZE_IMAGES_BY_URL`

Tool to optimize images by providing their URLs. Supports batch processing of up to 100 URLs per request with options for lossy, glossy, or lossless compression, resizing, format conversion (WebP/AVIF), and background removal. Use when you need to compress and optimize images accessible online.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `wait` | integer | No | Wait time in seconds (0-30) for optimization before returning. Use 0 to return immediately with scheduled status. Higher values wait for completion. |
| `lossy` | string ("lossless" | "lossy" | "glossy") | No | Image compression type. |
| `resize` | string ("none" | "outer" | "inner" | "smart_crop_ai") | No | Image resize type. |
| `refresh` | integer | No | Re-fetch and re-optimize image from source URL: 0 to use cached version, 1 to force fresh optimization |
| `upscale` | string ("none" | "2x" | "3x" | "4x") | No | Image upscaling factor. |
| `urllist` | array | Yes | Array of image URLs to optimize. Images must be accessible online. Maximum 100 URLs per request. |
| `cmyk2rgb` | integer | No | Convert CMYK color space to RGB: 0 to skip conversion, 1 to convert (default is 1) |
| `bg_remove` | string | No | Background removal options: '1' for transparent background, URL for custom background image, '#rrggbbxx' for color with transparency (xx is alpha in hex) |
| `convertto` | string | No | Format conversion options: '+webp' (add WebP version), '+avif' (add AVIF version), '+webp\|+avif' (add both), 'webp\|avif' (replace with first available), 'jpg', 'png', 'gif' (convert to format) |
| `keep_exif` | integer | No | Preserve EXIF metadata in optimized images: 0 to remove (default), 1 to keep |
| `paramlist` | array | No | Array of custom optimization parameters for each URL, allowing per-image settings. Must match urllist length if provided. |
| `resize_width` | integer | No | Target width in pixels for resizing. Required if resize is specified. |
| `resize_height` | integer | No | Target height in pixels for resizing. Required if resize is specified. |
| `plugin_version` | string | No | 5-character max alphanumeric code identifying your API client |
| `returndatalist` | array | No | Any array to be returned unchanged in the API response for tracking purposes |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Read CDN Domain Status

**Slug:** `SHORTPIXEL_READ_CDN_DOMAIN`

Tool to check the status of a domain and its CDN quota on ShortPixel. Returns a status code indicating credit availability. Use when you need to verify domain accessibility and quota status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to check CDN status and quota (e.g., example.com) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Revoke CDN Domain

**Slug:** `SHORTPIXEL_REVOKE_CDN_DOMAIN`

Tool to revoke a domain association from ShortPixel CDN. Only works if the API key belongs to the current domain owner. Use when you need to remove the association between a domain and the user account.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to revoke from ShortPixel CDN (e.g., example.com) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Set CDN Domain

**Slug:** `SHORTPIXEL_SET_CDN_DOMAIN`

Tool to associate an API key with an existing domain. Unlike add-domain, this does not create a new domain - it only associates a user ID if not already associated. Use when you need to claim unassociated domains.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to associate with the API key (e.g., example.com) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload and Optimize Images

**Slug:** `SHORTPIXEL_UPLOAD_AND_OPTIMIZE_IMAGES`

Tool to upload and optimize images that are not accessible online. Uses multipart form data to upload files directly and applies optimization parameters like compression type, resize options, and format conversion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file1` | object | Yes | First image file to upload and optimize. |
| `file2` | object | No | Second image file to upload and optimize (optional). |
| `lossy` | integer ("0" | "1" | "2") | No | Compression type for image optimization. |
| `resize` | integer ("0" | "1" | "3" | "4") | No | Resize type for image resizing. |
| `convertto` | string | No | Format conversion options: +webp, +avif, or +webp\|+avif |
| `plugin_version` | string | No | 5 character max alphanumeric code for your API client identifier |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
