Imgix

Learn how to use Imgix with Composio

Overview

SLUG: IMGIX

Description

imgix is a real-time image processing and delivery service that enables developers to optimize, transform, and deliver images efficiently.

Authentication Details

generic_api_key
stringRequired

Connecting to Imgix

Create an auth config

Use the dashboard to create an auth config for the Imgix toolkit. This allows you to connect multiple Imgix accounts to Composio for agents to use.

1

Select App

Navigate to Imgix.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Imgix Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4imgix_auth_config_id = "ac_YOUR_IMGIX_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Imgix for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, imgix_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Imgix toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Imgix Auto Optimization

Description

Apply automatic image optimizations using imgix's auto parameter. Use this tool to automatically optimize images for web delivery. Common use cases: - Reduce file sizes with 'compress' for faster page loads - Auto-select modern formats (AVIF/WebP) with 'format' based on browser support - Enhance image quality with 'enhance' (adjusts brightness, contrast, saturation) - Remove red-eye from portrait photos with 'redeye' Multiple options can be combined (e.g., ['compress', 'format']) for cumulative optimizations. The 'true' option is a convenient shorthand that applies 'enhance' automatically. Note: This tool works with the imgix Rendering API and requires a valid imgix source domain. For testing, use 'assets.imgix.net' with paths like 'examples/kingfisher.jpg'.

Action Parameters

auto
arrayRequired
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Blend Overlay

Description

Tool to overlay an image, text, or color onto a base image using imgix blending parameters. Use after specifying the base image URL and blend parameters to composite layers.

Action Parameters

base_image_url
stringRequired
blend
blend64
blend_align
blend_alpha
blend_color
blend_crop
blend_fit
stringDefaults to clip
blend_h
blend_mode
stringDefaults to overlay
blend_pad
blend_size
blend_w
blend_x
blend_y

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Imgix Blend Align

Description

Tool to align the overlay relative to the base image when blending. Use after constructing a base Imgix URL to specify horizontal and vertical alignment (e.g., 'left,top').

Action Parameters

horizontal
stringDefaults to center
image_url
stringRequired
vertical
stringDefaults to middle

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Blend Color Over Image

Description

Tool to blend a solid color over an image using CSS keyword or hex. Use when you need to apply color overlay transformations to an existing image URL.

Action Parameters

blend_alpha
blend_color
stringRequired
blend_mode
image_url
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Imgix Blend X Position

Description

Position an overlay image horizontally on a base image using imgix's blend-x parameter. Use this tool when you need to place an overlay (image or color) at a specific horizontal offset from the left edge of the base image. This is useful for creating watermarks, badges, or composite images where precise positioning is required. Note: The blend-x parameter only affects image overlays. Color overlays always cover the entire image regardless of this setting.

Action Parameters

blend
stringRequired
blend_x
integer
image_url
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Draw Image Border

Description

Tool to draw a border around an image. Use when you need to overlay a border without resizing.

Action Parameters

color
stringRequired
image_path
stringRequired
source_domain
stringRequired
width
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Adjust Image Brightness

Description

Tool to adjust image brightness. Use when you need to modify an image's brightness level (−100 to 100) by supplying your source domain and asset path.

Action Parameters

asset_path
stringRequired
bri
number
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CANCEL_UPLOAD_SESSION

Description

Tool to cancel an Imgix Asset Manager upload session. Use when you need to abort an in-progress or abandoned upload flow and clean up the session.

Action Parameters

session_id
stringRequired
source_id
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CH

Description

Tool to opt in to Client Hints. Use when you want Imgix URLs to adapt based on browser headers (Width, DPR, Save-Data).

Action Parameters

ch
arrayRequired
image_path
stringRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CLOSE_UPLOAD_SESSION

Description

Tool to close an Imgix Asset Manager upload session after the client uploads to the presigned URL. Use after uploading a file to expedite asset processing. Closing is strongly recommended by imgix.

Action Parameters

session_id
stringRequired
source_id
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Extract Image Color Palette

Description

Tool to specify how many colors to return when extracting a color palette. Use when you need to control palette size and format.

Action Parameters

colors
integerDefaults to 6
image_path
stringRequired
palette
stringDefaults to json
prefix
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Adjust Image Contrast

Description

Tool to adjust image contrast. Use when you need to modify an image's contrast level (−100 to 100).

Action Parameters

asset_path
stringRequired
con
number
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CREATE_UPLOAD_SESSION

Description

Tool to create an Imgix Asset Manager upload session and return a presigned URL for client-side upload. Use when you need to upload a new image to a storage-backed imgix Source without requiring external hosting. Client performs HTTP PUT of file bytes to the presigned URL, then calls IMGIX_CLOSE_UPLOAD_SESSION to finalize.

Action Parameters

origin_path
stringRequired
source_id
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CROP

Description

Tool to control cropping alignment and behavior using Imgix's 'crop' parameter.

Action Parameters

ar
crop
Required
fit
Defaults to crop
fp-x
fp-y
fp-z
h
image_path
stringRequired
source_domain
stringRequired
w

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_CS

Description

Tool to set or strip output color space/profile on an Imgix image. Use when optimizing compatibility and file size (e.g., cs=strip for smaller metadata).

Action Parameters

cs
image_path
stringRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_DL

Description

Download an asset from an Imgix source with optional custom filename. Use this tool when you need to: - Download images or assets from an Imgix CDN source - Force a specific download filename (via 'dl' parameter) - Download assets with special character filenames (via 'dl64' parameter) The asset is fetched from the Imgix CDN and returned as a downloadable file reference. If neither 'dl' nor 'dl64' is specified, the original filename from the path is used.

Action Parameters

dl
dl64
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Adjust Image DPI

Description

Tool to embed DPI (dots-per-inch) metadata for print output on an Imgix-rendered image. Use when preparing images for print to set accurate DPI. Supports JPEG and PNG only.

Action Parameters

asset_path
stringRequired
dpi
integerRequired
fm
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Device Pixel Ratio

Description

Tool to set device pixel ratio for an Imgix image. Use when rendering at specific display densities to ensure correct sharpness. Example: 'dpr=2&w=500&h=300' doubles resolution relative to dimensions.

Action Parameters

asset_path
stringRequired
dpr
numberDefaults to 1
h
source
stringRequired
w

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Imgix URL Expiration

Description

Tool to append an expiration parameter to an Imgix URL so it returns 404 after a given time. Use when you want the image URL to stop serving beyond a specific UNIX timestamp.

Action Parameters

expires
integerRequired
path
stringRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_FIT

Description

Tool to control how an image fits target dimensions after resizing. Use when specifying width, height, and fit behavior.

Action Parameters

faceindex
facepad
fit
stringRequired
h
Required
image_path
stringRequired
source_domain
stringRequired
w
Required

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_FM

Description

Tool to choose output file format for the rendered asset. Use after specifying the asset path when you need to convert its format.

Action Parameters

fm
stringRequired
lossless
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Force Aspect Ratio

Description

Tool to force a target aspect ratio on an Imgix image. Use when a specific W:H frame is needed after choosing fit=crop or fit=fill. Example: 'ar=16:9&fit=crop&w=800' yields a 16:9, 800px-wide URL.

Action Parameters

ar
stringRequired
crop
fill
fill_color
fit
stringRequired
h
path
stringRequired
source_domain
stringRequired
w

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_GET_UPLOAD_SESSION_STATUS

Description

Tool to retrieve the status of an Imgix Asset Manager upload session. Use when you need to check the current state (PENDING/CLOSED/COMPLETE/CANCELED) of an upload session for polling or verification after client PUT and/or after closing.

Action Parameters

session_id
stringRequired
source_id
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_H

Description

Tool to set output image height in pixels or as a ratio of the source height. Use after constructing an Imgix URL to adjust only height.

Action Parameters

asset_path
stringRequired
h
Required
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Adjust Image Highlights

Description

Tool to adjust highlight tonal mapping (−100 to 0). Use when preserving detail in bright areas of an image.

Action Parameters

asset_path
stringRequired
high
number
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_LIST_SOURCES

Description

Tool to list all Sources for an account. Use when you need to retrieve and paginate through sources with optional sorting and filtering.

Action Parameters

fields[sources]
filter[deployment.azure_bucket]
filter[deployment.bucket_name]
filter[deployment.custom_domains]
filter[deployment.gcs_bucket]
filter[deployment.imgix_subdomains]
filter[deployment.region]
filter[deployment.s3_bucket]
filter[deployment.storage_provider]
filter[deployment.type]
filter[deployment.webfolder_base_url]
filter[enabled]
filter[name]
page[number]
page[size]
sort

Action Response

data
arrayRequired
error
included
jsonapi
objectRequired
meta
objectRequired
successful
booleanRequired

Tool Name: Set Watermark Base URL

Description

Tool to set the base URL prepended to the watermark image path. Use when you need to host watermark assets on a custom domain or CDN.

Action Parameters

image_path
stringRequired
mark_base
stringRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Watermark Fit Mode

Description

Tool to set how a watermark fits its target dimensions. Use when applying a watermark and you need control over fitting behavior (e.g., selecting 'scale'). For 'crop', ensure 'mark-w' and 'mark-h' are also provided.

Action Parameters

image_url
stringRequired
mark_fit
stringDefaults to clip

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Imgix Mark Height

Description

Tool to set watermark height on an Imgix URL in pixels or as a ratio of the watermark source. Use when adjusting overlay height while preserving aspect ratio.

Action Parameters

image_url
stringRequired
mark
stringRequired
mark-h
Required

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_MARK_PAD

Description

Tool to set pixel padding between a watermark and the image edge or between tiled watermarks. Use after configuring watermark URL and alignment to adjust spacing precisely.

Action Parameters

mark-pad
integerDefaults to 5
url
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Watermark Width

Description

Tool to set watermark width. Use when you need to enforce a watermark's width in pixels or as a proportion. Use after specifying watermark source.

Action Parameters

image_url
stringRequired
mark_w
Required

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_MASK

Description

Tool to apply a mask to an image. Use when needing rounded corners, ellipse shapes, or image-based masks.

Action Parameters

corner-radius
image_path
stringRequired
mask
mask-bg
mask64
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_MAX_H

Description

Constrain the maximum height of an imgix image. This tool applies fit=crop along with the max-h parameter to ensure images do not exceed the specified height. Ideal for vertically-scrolling feeds or galleries where user-uploaded images may have unpredictable heights. Returns a downloadable image URL.

Action Parameters

image_path
stringRequired
max-h
integerRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_MAX_W

Description

Tool to set the maximum output width on an Imgix URL. Use when you need to cap width (works only with fit=crop). Call after specifying fit=crop on the URL.

Action Parameters

image_path
stringRequired
max_w
integerRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_PALETTE

Description

Tool to extract a color palette from an image in CSS or JSON form. Use when you need to analyze an image's dominant colors after any transformations.

Action Parameters

colors
integerDefaults to 6
image_path
stringRequired
palette
stringDefaults to json
prefix
signature
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set CSS Palette Prefix

Description

Tool to set class-name prefix for CSS palette output. Use when customizing CSS selectors for color-palette styling.

Action Parameters

colors
Defaults to 6
image_path
stringRequired
palette
stringDefaults to css
prefix
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Output Quality

Description

Tool to set output quality for lossy formats. Use when adjusting image compression quality for lossy image delivery.

Action Parameters

image_path
stringRequired
q
integerDefaults to 75
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_RECT

Description

Tool to select a source-image rectangle region in Imgix before other resizing. Use when you need to crop a specific region (x,y,w,h) of the source image.

Action Parameters

h
Required
image_path
stringRequired
source_domain
stringRequired
w
Required
x
Required
y
Required

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Imgix Rotate

Description

Tool to rotate an image on Imgix. Use when you need to apply a counter-clockwise rotation (0–359°) with optional mode control.

Action Parameters

path
stringRequired
rot
integer
rot-type
source
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_ROT_TYPE

Description

Tool to control rotation behavior when `rot` is applied. Use after applying a `rot` parameter to choose between pivot (show entire image) or straighten (zoom and crop) behavior.

Action Parameters

image_url
stringRequired
rot-type
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Text Overlay

Description

Tool to render a single-line UTF-8 text overlay on an image. Use when you need simple text captions.

Action Parameters

image_url
stringRequired
txt
txt64

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_TXT_ALIGN

Description

Tool to align a text overlay on an Imgix image. Use when you need to position text by specifying vertical (top/middle/bottom) and horizontal (left/center/right) alignment.

Action Parameters

horizontal
stringDefaults to right
image_path
stringRequired
source_domain
stringRequired
vertical
stringDefaults to bottom

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Text Color

Description

Tool to set text overlay color on an Imgix image. Use when customizing text overlays with CSS color keywords or hex codes.

Action Parameters

image_url
stringRequired
txt_color
txt_color64

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Text Font

Description

Tool to choose font family/style for overlay text. Use when customizing text appearance after specifying content. Supports CSS font categories and optional bold/italic flags.

Action Parameters

font
stringRequired
image_path
stringRequired
source_domain
stringRequired
use_base64
boolean

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Set Text Outline Width

Description

Tool to set outline width around overlay text. Use when styling text overlays on images.

Action Parameters

image_url
stringRequired
txt-line
integerRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: Text Outline Color

Description

Apply an outline color to text overlays on Imgix images. The text outline must first be enabled using the txt-line parameter (outline width > 0). This action fetches and returns the rendered image with the specified outline color applied.

Action Parameters

color
stringRequired
encode
boolean
image_url
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_TXT_SHAD

Description

Set text shadow strength for imgix text overlays. The txt-shad parameter controls the drop shadow intensity (0-10) applied to text rendered on images. Note: This parameter only has a visible effect when combined with text overlay parameters (e.g., txt parameter). Use this action to add depth and visibility to text overlays on images.

Action Parameters

image_path
stringRequired
source_domain
stringRequired
strength

Action Response

data
objectRequired
error
successful
booleanRequired

Tool Name: IMGIX_TXT_SIZE

Description

Tool to set text font size in pixels. Use when overlaying text and needing precise control over font size. Specify after defining the text content; default is 12px.

Action Parameters

image_path
stringRequired
size
integerDefaults to 12
source_domain
stringRequired

Action Response

data
objectRequired
error
successful
booleanRequired