The imgix connector lets your AI agent act in each user's imgix account. Each user connects their own imgix access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 14 tools.
- Tools
- 14
- What they doRead · write · destructive
- 6 · 8 · 06 read8 write0 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the imgix connection
In AgentKit > Connections, create an imgix connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'imgix'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize imgix:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'imgix_reports_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "imgix"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize imgix:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="imgix_reports_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their imgix credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolimgix_asset_getGet one asset's details: size, content type, dimensions, dominant colors, tags, faces, content warnings, categories and custom fields.Read-onlyGet Asset
Get one asset's details: size, content type, dimensions, dominant colors, tags, faces, content warnings, categories and custom fields. Returns the asset object. Get paths from imgix_assets_list.
Inputs
origin_pathstringrequired- Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
imgix_assets_listList the assets of a Source in the Asset Manager, filtered by keyword, categories, tags, media kind, path, color or face count, with sorting and cursor paging.Read-onlyList Assets
List the assets of a Source in the Asset Manager, filtered by keyword, categories, tags, media kind, path, color or face count, with sorting and cursor paging. Returns asset objects with path, size, type and metadata. Use imgix_asset_get for one asset.
Inputs
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
categoriesstring- Comma-separated categories; all must match. Example: Summer Photos.
colorsstring- Dominant color as a hex code without #. Example: 8ca091.
cursorstring- Cursor from the previous page's cursor.next. Example: 40.
face_countstring- Number of faces, or a range such as 1:3, 1: or :2. Example: 1:.
keywordstring- Search across path, name, description and other fields. Example: logo.
limitinteger- Number of assets per page. Example: 20.
media_kindstring- Only assets of this kind. Example: IMAGE.one of
IMAGEANIMATIONDOCUMENTVECTOR origin_pathstring- Only the asset at this origin path. Example: marketing/logo.png.
sortstring- Sort field: date_created, date_modified or file_size; prefix with - for descending. Example: -date_created.
tagsstring- Comma-separated machine-learning tags; all must match. Example: Dog.
imgix_report_getGet one report with its period, completion flag and download file URLs.Read-onlyGet Report
Get one report with its period, completion flag and download file URLs. Returns the report object. Get IDs from imgix_reports_list.
Inputs
report_idstringrequired- ID of the report. Example: 5f7676862528f12b1bfbf65b.
imgix_reports_listList the account's daily analytics reports (image analytics, source analytics, credit analytics, CDN logs, mild errors), filtered by type and sorted.Read-onlyList Reports
List the account's daily analytics reports (image analytics, source analytics, credit analytics, CDN logs, mild errors), filtered by type and sorted. Returns report objects with period and download file URLs. Most report types are Enterprise-only.
Inputs
completedboolean- Only completed (true) or in-progress (false) reports. Example: true.
page_numberinteger- Page number, starting at 0. Example: 0.
page_sizeinteger- Number of items per page (at least 1). Example: 20.
report_typestring- Only reports of this type. Example: image_analytics.one of
cdn_logscredit_analytics_dailycredit_analytics_mtdimage_analyticsmild_errorssource_analytics sortstring- Sort field: period_end, period_start, report_key or report_type; prefix with - for descending. Example: -period_end.
imgix_source_getGet one Source with its deployment settings (type, bucket or base URL, subdomains, custom domains, cache TTLs, default params) and deployment status.Read-onlyGet Source
Get one Source with its deployment settings (type, bucket or base URL, subdomains, custom domains, cache TTLs, default params) and deployment status. Returns the Source object. Get IDs from imgix_sources_list.
Inputs
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
fieldsstring- Comma-separated Source fields to return, dot notation for nested ones. Example: name,deployment_status.
imgix_sources_listList the imgix Sources (image origins such as S3, GCS, Azure, web folder or web proxy) on the account, with filters and sorting.Read-onlyList Sources
List the imgix Sources (image origins such as S3, GCS, Azure, web folder or web proxy) on the account, with filters and sorting. Returns Source objects with ID, name, enabled flag, deployment settings and status. Use imgix_source_get for one Source.
Inputs
fieldsstring- Comma-separated Source fields to return, dot notation for nested ones. Example: name,deployment_status,deployment.imgix_subdomains.
filter_enabledboolean- Only enabled (true) or disabled (false) Sources. Example: true.
filter_namestring- Only Sources with this name. Example: marketing-images.
filter_subdomainstring- Only Sources using this imgix.net subdomain. Example: my-unique-domain.
filter_typestring- Only Sources of this type. Example: s3.one of
azuregcss3webfolderwebproxys3_compatible page_numberinteger- Page number, starting at 0. Example: 0.
page_sizeinteger- Number of items per page (at least 1). Example: 20.
sortstring- Sort field: date_deployed, enabled or name; prefix with - for descending. Example: -date_deployed.
imgix_asset_addQueue an existing file at the Source's origin to be added to the Asset Manager.WriteAdd Asset from Origin
Queue an existing file at the Source's origin to be added to the Asset Manager. Returns 202 with an empty body; poll imgix_asset_get for the result. Use imgix_asset_refresh for an asset that changed at origin.
Inputs
origin_pathstringrequired- Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
imgix_asset_publishPublish an asset that was unpublished with imgix_asset_unpublish, so its URL serves again.WritePublish Asset
Publish an asset that was unpublished with imgix_asset_unpublish, so its URL serves again. Returns the result.
- Idempotent
Inputs
source_idstringrequired- ID of the Source the asset belongs to. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
urlstringrequired- Full imgix URL of the asset. Example: https://assets.imgix.net/examples/bridge.jpg.
imgix_asset_refreshRefetch an asset from origin, reprocess it if it changed, and purge it from imgix caches.WriteRefresh Asset
Refetch an asset from origin, reprocess it if it changed, and purge it from imgix caches. Returns the asset. Use imgix_purge to only clear the cache of a rendered URL.
- Idempotent
Inputs
origin_pathstringrequired- Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
imgix_asset_unpublishUnpublish an asset: remove it from the Asset Manager and the imgix CDN (it then returns 404) while keeping the file at origin, for example for a takedown.WriteUnpublish Asset
Unpublish an asset: remove it from the Asset Manager and the imgix CDN (it then returns 404) while keeping the file at origin, for example for a takedown. Returns the result. Use imgix_asset_publish to restore it.
- Idempotent
Inputs
source_idstringrequired- ID of the Source the asset belongs to. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
urlstringrequired- Full imgix URL of the asset. Example: https://assets.imgix.net/examples/bridge.jpg.
imgix_asset_updateUpdate an asset's name, description, categories, custom fields or tags in the Asset Manager; the file at origin is not changed.WriteUpdate Asset
Update an asset's name, description, categories, custom fields or tags in the Asset Manager; the file at origin is not changed. Returns the updated asset. Get paths from imgix_assets_list.
- Idempotent
Inputs
origin_pathstringrequired- Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
categoriesarray- Categories that organise the asset; replaces the current list. Example: ["Summer Photos", "Pet Photos"]
custom_fieldsobject- Custom fields and values; replaces the current set. Example: {"Photographer": "Molly", "SKU": "1234"}
descriptionstring- Description of the asset. Example: Photo of Luke for the summer campaign.
namestring- Display name of the asset (does not change its path). Example: Luke at the beach.
tagsobject- Tags with confidence values from 0 to 1. Example: {"Dog": 1}
imgix_purgePurge an image and all its rendered variants from the imgix cache so the next request fetches it from origin.WritePurge Image
Purge an image and all its rendered variants from the imgix cache so the next request fetches it from origin. For a sub-image used as a mark or blend, set sub_image and source_id to also purge the images that use it. Returns the purge ID. Space purges of the same URL at least 10 seconds apart.
Inputs
urlstringrequired- Full URL of the image to purge, on a domain of this account; query parameters are not needed. Example: https://assets.imgix.net/examples/bridge.jpg.
source_idstring- Source ID of the parent images; required when sub_image is true. Example: 5d46fb3bd596f100018e123f.
sub_imageboolean- true when url is a sub-image used as a mark or blend. Example: false.
imgix_source_createCreate and deploy a new Source that serves images from your storage on an imgix.net subdomain.WriteCreate Source
Create and deploy a new Source that serves images from your storage on an imgix.net subdomain. Returns the Source with its ID and deploying status. The deployment object needs a type, imgix_subdomains and the type's own fields (for example s3_bucket, s3_access_key and s3_secret_key for S3, or webfolder_base_url for a web folder).
Inputs
deploymentobjectrequired- Deployment settings: type (azure, gcs, s3, webfolder, webproxy or s3_compatible), imgix_subdomains (subdomain names without .imgix.net) and the fields the type needs, plus optional cache, custom domain, default params and error image settings. Example: {"type": "webfolder", "webfolder_base_url": "https://www.example.com/images/", "imgix_subdomains": ["example-marketing"]}
namestringrequired- Display name of the Source (does not affect how assets are served). Example: marketing-images.
enabledboolean- false creates the Source disabled. Defaults to true. Example: true.
imgix_source_updateUpdate a Source's name, enabled flag or deployment settings; changes to the deployment trigger a redeploy, and already-rendered images may need imgix_purge.WriteUpdate Source
Update a Source's name, enabled flag or deployment settings; changes to the deployment trigger a redeploy, and already-rendered images may need imgix_purge. Returns the updated Source. Also used to set upload_credentials. Get IDs from imgix_sources_list.
- Idempotent
Inputs
source_idstringrequired- ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
deploymentobject- Deployment fields to change, for example cache_ttl_value, default_params or custom_domains. Changing type needs that type's required fields. Example: {"cache_ttl_value": 31536000, "default_params": {"auto": "compress"}}
enabledboolean- true to serve traffic, false to disable the Source (non-cached assets then return 410). Example: true.
namestring- New display name. Example: marketing-images.
upload_credentialsobject- Write credentials imgix uses to upload to the bucket: type (azure, gcs or s3) plus that provider's keys. Example: {"type": "s3", "s3_access_key": "AKIAEXAMPLE", "s3_secret_key": "wJalrXUtnFEMI/EXAMPLEKEY"}
No tools match.