> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to imgix

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.

**Authentication:** Bearer Token
**Categories:** Media, Design
**Tools:** 14: 6 read, 8 write, 0 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=IMGIX)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".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](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "imgix"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_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 call
   result = actions.execute_tool(
       tool_input={},
       tool_name="imgix_reports_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their imgix credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'imgix_asset_get',
  toolInput: {
    origin_path: '<origin_path>',
    source_id: '<source_id>',
  },
  connector: 'imgix',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="imgix_asset_get",
    tool_input={
        "origin_path": "<origin_path>",
        "source_id": "<source_id>",
    },
    connection_name="imgix",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `imgix_asset_get`

Get Asset · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `origin_path` (`string`, required): Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.

Example input: `{"origin_path":"<origin_path>","source_id":"<source_id>"}`

### `imgix_assets_list`

List Assets · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `categories` (`string`, optional): Comma-separated categories; all must match. Example: Summer Photos.
- `colors` (`string`, optional): Dominant color as a hex code without #. Example: 8ca091.
- `cursor` (`string`, optional): Cursor from the previous page's cursor.next. Example: 40.
- `face_count` (`string`, optional): Number of faces, or a range such as 1:3, 1: or :2. Example: 1:.
- `keyword` (`string`, optional): Search across path, name, description and other fields. Example: logo.
- `limit` (`integer`, optional): Number of assets per page. Example: 20.
- `media_kind` (`string`, optional): Only assets of this kind. Example: IMAGE. One of: `IMAGE`, `ANIMATION`, `DOCUMENT`, `VECTOR`.
- `origin_path` (`string`, optional): Only the asset at this origin path. Example: marketing/logo.png.
- `sort` (`string`, optional): Sort field: date_created, date_modified or file_size; prefix with - for descending. Example: -date_created.
- `tags` (`string`, optional): Comma-separated machine-learning tags; all must match. Example: Dog.

Example input: `{"source_id":"<source_id>"}`

### `imgix_report_get`

Get Report · Read-only

Get one report with its period, completion flag and download file URLs. Returns the report object. Get IDs from imgix_reports_list.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `report_id` (`string`, required): ID of the report. Example: 5f7676862528f12b1bfbf65b.

Example input: `{"report_id":"<report_id>"}`

### `imgix_reports_list`

List Reports · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `completed` (`boolean`, optional): Only completed (true) or in-progress (false) reports. Example: true.
- `page_number` (`integer`, optional): Page number, starting at 0. Example: 0.
- `page_size` (`integer`, optional): Number of items per page (at least 1). Example: 20.
- `report_type` (`string`, optional): Only reports of this type. Example: image_analytics. One of: `cdn_logs`, `credit_analytics_daily`, `credit_analytics_mtd`, `image_analytics`, `mild_errors`, `source_analytics`.
- `sort` (`string`, optional): Sort field: period_end, period_start, report_key or report_type; prefix with - for descending. Example: -period_end.

Example input: `{}`

### `imgix_source_get`

Get Source · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `fields` (`string`, optional): Comma-separated Source fields to return, dot notation for nested ones. Example: name,deployment_status.

Example input: `{"source_id":"<source_id>"}`

### `imgix_sources_list`

List Sources · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fields` (`string`, optional): Comma-separated Source fields to return, dot notation for nested ones. Example: name,deployment_status,deployment.imgix_subdomains.
- `filter_enabled` (`boolean`, optional): Only enabled (true) or disabled (false) Sources. Example: true.
- `filter_name` (`string`, optional): Only Sources with this name. Example: marketing-images.
- `filter_subdomain` (`string`, optional): Only Sources using this imgix.net subdomain. Example: my-unique-domain.
- `filter_type` (`string`, optional): Only Sources of this type. Example: s3. One of: `azure`, `gcs`, `s3`, `webfolder`, `webproxy`, `s3_compatible`.
- `page_number` (`integer`, optional): Page number, starting at 0. Example: 0.
- `page_size` (`integer`, optional): Number of items per page (at least 1). Example: 20.
- `sort` (`string`, optional): Sort field: date_deployed, enabled or name; prefix with - for descending. Example: -date_deployed.

Example input: `{}`

### `imgix_asset_add`

Add Asset from Origin · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `origin_path` (`string`, required): Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.

Example input: `{"origin_path":"<origin_path>","source_id":"<source_id>"}`

### `imgix_asset_publish`

Publish Asset · Write

Publish an asset that was unpublished with imgix_asset_unpublish, so its URL serves again. Returns the result.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source_id` (`string`, required): ID of the Source the asset belongs to. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `url` (`string`, required): Full imgix URL of the asset. Example: https://assets.imgix.net/examples/bridge.jpg.

Example input: `{"source_id":"<source_id>","url":"<url>"}`

### `imgix_asset_refresh`

Refresh Asset · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `origin_path` (`string`, required): Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.

Example input: `{"origin_path":"<origin_path>","source_id":"<source_id>"}`

### `imgix_asset_unpublish`

Unpublish Asset · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source_id` (`string`, required): ID of the Source the asset belongs to. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `url` (`string`, required): Full imgix URL of the asset. Example: https://assets.imgix.net/examples/bridge.jpg.

Example input: `{"source_id":"<source_id>","url":"<url>"}`

### `imgix_asset_update`

Update Asset · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `origin_path` (`string`, required): Path of the asset relative to the Source, for example luke.jpg or marketing/logo.png. Example: luke.jpg.
- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `categories` (`array`, optional): Categories that organise the asset; replaces the current list. Example: ["Summer Photos", "Pet Photos"]
- `custom_fields` (`object`, optional): Custom fields and values; replaces the current set. Example: {"Photographer": "Molly", "SKU": "1234"}
- `description` (`string`, optional): Description of the asset. Example: Photo of Luke for the summer campaign.
- `name` (`string`, optional): Display name of the asset (does not change its path). Example: Luke at the beach.
- `tags` (`object`, optional): Tags with confidence values from 0 to 1. Example: {"Dog": 1}

Example input: `{"origin_path":"<origin_path>","source_id":"<source_id>"}`

### `imgix_purge`

Purge Image · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `url` (`string`, required): 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_id` (`string`, optional): Source ID of the parent images; required when sub_image is true. Example: 5d46fb3bd596f100018e123f.
- `sub_image` (`boolean`, optional): true when url is a sub-image used as a mark or blend. Example: false.

Example input: `{"url":"<url>"}`

### `imgix_source_create`

Create Source · Write

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

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `deployment` (`object`, required): 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"]}
- `name` (`string`, required): Display name of the Source (does not affect how assets are served). Example: marketing-images.
- `enabled` (`boolean`, optional): false creates the Source disabled. Defaults to true. Example: true.

Example input: `{"deployment":{"type":"webfolder","webfolder_base_url":"https://www.example.com/images/","imgix_subdomains":["example-marketing"]},"name":"<name>"}`

### `imgix_source_update`

Update Source · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source_id` (`string`, required): ID of the imgix Source. Get it from imgix_sources_list. Example: 5d46fb3bd596f100018e123f.
- `deployment` (`object`, optional): 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"}}
- `enabled` (`boolean`, optional): true to serve traffic, false to disable the Source (non-cached assets then return 410). Example: true.
- `name` (`string`, optional): New display name. Example: marketing-images.
- `upload_credentials` (`object`, optional): 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"}

Example input: `{"source_id":"<source_id>"}`

## Related

Other Media connectors ([all 65](/agentkit/connectors/?category=media)):

- [Spotify](/agentkit/connectors/spotify/): Scalekit connector, OAuth, 47 tools
- [Reddit](/agentkit/connectors/reddit/): Scalekit connector, OAuth, 105 tools
- [Diarize](/agentkit/connectors/diarize/): Scalekit connector, Access token, 3 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
