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

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["IMGIX"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Imgix Auto Optimization

Description

Tool to apply automatic best-effort image optimizations. Use when you need to compress, enhance, format, or remove redeye via Imgix's auto parameter.

Action Parameters

auto
arrayRequired
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
string
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
string
blend64
string
blend_align
string
blend_alpha
integer
blend_color
string
blend_crop
string
blend_fit
stringDefaults to clip
blend_h
number
blend_mode
stringDefaults to overlay
blend_pad
integer
blend_size
string
blend_w
number
blend_x
integer
blend_y
integer

Action Response

data
objectRequired
error
string
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
string
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
integer
blend_color
stringRequired
blend_mode
string
image_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Imgix Blend X Position

Description

Tool to position the overlay horizontally on an Imgix-rendered image. Use when you need to offset the blend layer by a specified number of pixels from the left edge.

Action Parameters

blend
stringRequired
blend_x
integer
image_url
stringRequired

Action Response

data
objectRequired
error
string
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
string
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
string
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
string
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
string
source_domain
stringRequired

Action Response

data
objectRequired
error
string
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
string
successful
booleanRequired

Tool Name: IMGIX_CROP

Description

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

Action Parameters

ar
string
crop
stringRequired
fit
stringDefaults to crop
fp-x
number
fp-y
number
fp-z
number
h
integer
image_path
stringRequired
source_domain
stringRequired
w
integer

Action Response

data
objectRequired
error
string
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
string
image_path
stringRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: IMGIX_DL

Description

Tool to force asset download. Use when you need to download an Imgix asset with a specific filename.

Action Parameters

dl
string
dl64
string
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
string
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
string
source
stringRequired

Action Response

data
objectRequired
error
string
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
integer
source
stringRequired
w
integer

Action Response

data
objectRequired
error
string
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
string
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
integer
facepad
number
fit
stringRequired
h
integerRequired
image_path
stringRequired
source_domain
stringRequired
w
integerRequired

Action Response

data
objectRequired
error
string
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
boolean
path
stringRequired
source
stringRequired

Action Response

data
objectRequired
error
string
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
string
fill
string
fill_color
string
fit
stringRequired
h
integer
path
stringRequired
source_domain
stringRequired
w
integer

Action Response

data
objectRequired
error
string
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
integerRequired
source
stringRequired

Action Response

data
objectRequired
error
string
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
string
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]
string
filter[deployment.azure_bucket]
string
filter[deployment.bucket_name]
string
filter[deployment.custom_domains]
string
filter[deployment.gcs_bucket]
string
filter[deployment.imgix_subdomains]
string
filter[deployment.region]
string
filter[deployment.s3_bucket]
string
filter[deployment.storage_provider]
string
filter[deployment.type]
string
filter[deployment.webfolder_base_url]
string
filter[enabled]
boolean
filter[name]
string
page[number]
integer
page[size]
integer
sort
string

Action Response

data
arrayRequired
error
string
included
array
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
string
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
string
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
integerRequired

Action Response

data
objectRequired
error
string
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
string
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
integerRequired

Action Response

data
objectRequired
error
string
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
integer
image_path
stringRequired
mask
string
mask-bg
string
mask64
string
source_domain
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: IMGIX_MAX_H

Description

Tool to limit output image height. Use when fit=crop is applied to prevent excessively tall images.

Action Parameters

image_path
stringRequired
max-h
integerRequired
source_domain
stringRequired

Action Response

data
objectRequired
error
string
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
string
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
string
signature
string
source_domain
stringRequired

Action Response

data
objectRequired
error
string
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
integerDefaults to 6
image_path
stringRequired
palette
stringDefaults to css
prefix
string
source_domain
stringRequired

Action Response

data
objectRequired
error
string
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
string
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
integerRequired
image_path
stringRequired
source_domain
stringRequired
w
integerRequired
x
integerRequired
y
integerRequired

Action Response

data
objectRequired
error
string
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
string
source
stringRequired

Action Response

data
objectRequired
error
string
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
string
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
string
txt64
string

Action Response

data
objectRequired
error
string
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
string
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
string
txt_color64
string

Action Response

data
objectRequired
error
string
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
string
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
string
successful
booleanRequired

Tool Name: Text Outline Color

Description

Tool to set outline color for text. Use after enabling txt-line on an Imgix URL.

Action Parameters

color
stringRequired
encode
boolean
image_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: IMGIX_TXT_SHAD

Description

Tool to set text shadow strength for overlay text. Use when you need to apply a drop shadow to text.

Action Parameters

image_path
stringRequired
source_domain
stringRequired
strength
integer

Action Response

data
objectRequired
error
string
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
string
successful
booleanRequired