Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to imgix

Scalekit connector
Open markdown

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

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the imgix connection

    In AgentKit > Connections, create an imgix connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. 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.actions
    const connector = 'imgix'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { 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 call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'imgix_reports_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each 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 to execute_tool
Try in PlaygroundRequest a tool
  • imgix_asset_getGet one asset's details: size, content type, dimensions, dominant colors, tags, faces, content warnings, categories and custom fields.Read-only

    Get 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-only

    List 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-only

    Get 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-only

    List 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-only

    Get 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-only

    List 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.Write

    Add 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.Write

    Publish 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.