Skip to main content
Use ShortPixel through Corsair: one client, typed API calls, local DB sync. Get the API key at shortpixel.com > Account > API key. A Free key has 100 credits a month; one optimized image costs one credit, extra WebP/AVIF copies and AI options (upscale, background removal) cost more, and an Adaptive Images (CDN) fetch can cost one too. ShortPixel answers most errors with HTTP 200 and a negative Status.Code. Per-image codes (-102 invalid URL, -201/-202 invalid image, …) stay in the result. Account codes become errors: -401/-402 bad key (401), -403 quota used up (402), -404 queue full (429), -500 maintenance (503); none of these is retried. Optimizing, uploading and purging are marked destructive because they spend credits or delete stored copies. Image URLs and file bytes are not stored; the local database keeps the last read-domain status per CDN domain. What you get:
  • 16 typed API operations
  • 1 synced entity (domains) for fast .search() / .list()

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Check the plan and credits left
domains.add
See the full list on the API page.

Query synced data

Synced entities support tenant.shortpixel.db.<entity>.search() and .list(): domains. See Database for filters and operators.

What’s next

API reference

Every shortpixel.api.* operation with input and output types.

Database

Synced entities, search filters, and operators.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.