swiftimg

An image CDN & API for developers

Upload, transform, and deliver images and GIFs from your app — fast, with flat pricing that scales with you, not your bill.

Get an API keySee pricing

From upload to embed in three calls

Authenticate with a bearer key, upload once, and get back ready-to-serve variants.

1 · Upload
curl -X POST https://swiftimg.com/v1/images \
  -H "Authorization: Bearer $SWIFTIMG_KEY" \
  -F file=@photo.jpg \
  -F title="Sunset" \
  -F tags="travel,sunset"
2 · Fetch metadata & variants
curl https://swiftimg.com/v1/images/9fK2 \
  -H "Authorization: Bearer $SWIFTIMG_KEY"

# {
#   "id": "9fK2", "title": "Sunset",
#   "width": 4032, "height": 3024, "mime": "image/jpeg",
#   "variants": [
#     { "name": "thumb",   "url": "https://i.swiftimg.com/…" },
#     { "name": "display", "url": "https://i.swiftimg.com/…" }
#   ]
# }
3 · Embed the optimized variant
<!-- Embed the optimized display variant -->
<img src="https://i.swiftimg.com/variants/9fK2/display.webp"
     alt="Sunset" loading="lazy" />

What you get

Core endpoints

MethodPathWhat it does
POST/v1/imagesUpload an image, GIF, or video
GET/v1/images/:idMetadata, tags & variants
GET/v1/images/mineYour uploads
DELETE/v1/images/:idDelete an asset
GET/v1/search?q=Full-text search
GET/v1/gifs/search?q=Public GIF search
GET/v1/gifs/trendingTrending GIFs
GET/v1/oembed?url=oEmbed for a share page
POST/v1/keysCreate an API key

Authenticate with Authorization: Bearer <key>. Create and revoke keys from your account.

TypeScript SDK

A zero-dependency client for Node and the browser. Fully typed.

npm i @swiftimg/sdk
import { createClient, buildTransformUrl } from "@swiftimg/sdk";

const swift = createClient({ apiKey: process.env.SWIFTIMG_KEY });

const img = await swift.upload(
  { data: bytes, filename: "cat.png" },
  { title: "My cat", tags: ["pets"] }
);

// Resized WebP (signed URL in production, Developer plan):
const { url } = await swift.signedUrl(img.id, { w: 640, fmt: "webp" });

Upload from your desktop & scripts

The same API powers screenshot tools and one-line shell helpers — no SDK required.

ShareX

Generate a ShareX custom uploader from your API key and capture straight to swiftimg. Your key is written into the config in your browser — it never touches our servers.

Shell — upload & copy the link
# Drop this in ~/.zshrc or ~/.bashrc
export SWIFTIMG_KEY="sk_…"        # create one in your account
simg() {
  curl -s -X POST https://swiftimg.com/v1/images \
    -H "Authorization: Bearer $SWIFTIMG_KEY" \
    -F file=@"$1" \
  | python3 -c 'import sys,json;print(json.load(sys.stdin)["directUrl"])'
}

# usage: simg shot.png  →  prints the direct link, ready to paste

From your AI tools

The swiftimg MCP server gives Claude Desktop, Cursor, and Continue.dev native tools to upload images, search GIFs, and inspect image metadata as part of an agentic workflow.

MCP server

Six tools — upload_image, search_gifs, trending_gifs, get_image_info, inspect_og, and get_animated_info — available either over HTTP (no install) or via the npm package on stdio. Pass your swiftimg API key as a Bearer token to attribute uploads to your account; without it, uploads run as anonymous and count against the free-tier daily cap.

HTTP (zero-install) — paste into Claude Desktop, Cursor, or any MCP client
{
  "mcpServers": {
    "swiftimg": {
      "url": "https://swiftimg.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

MCP server (stdio)

For airgapped / offline workflows or CI, the same server ships as an npm package. Spawned as a subprocess via npx.

stdio (subprocess) — npm package config
{
  "mcpServers": {
    "swiftimg": {
      "command": "npx",
      "args": ["-y", "@swiftimg/mcp-server"],
      "env": { "SWIFTIMG_API_KEY": "your-key-here" }
    }
  }
}

Machine-readable surface: OpenAPI 3.1 spec · @swiftimg/mcp-server on npm.

Ship faster image delivery today

The Developer plan unlocks the full API, transforms, signed URLs, and a custom domain for $9/mo.