From upload to embed in three calls
Authenticate with a bearer key, upload once, and get back ready-to-serve variants.
curl -X POST https://swiftimg.com/v1/images \
-H "Authorization: Bearer $SWIFTIMG_KEY" \
-F file=@photo.jpg \
-F title="Sunset" \
-F tags="travel,sunset"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/…" }
# ]
# }<!-- Embed the optimized display variant -->
<img src="https://i.swiftimg.com/variants/9fK2/display.webp"
alt="Sunset" loading="lazy" />What you get
REST API & API keys
A small, predictable JSON API. Create scoped API keys from your account and authenticate with a bearer token.
On-the-fly transforms
Request resized, reformatted variants on demand. Ship a single source and serve the right size everywhere.
Signed URLs
Hand out time-limited, tamper-proof links to private assets without proxying bytes through your own servers.
Custom domains
Serve assets from your own hostname. Business plans add white-label delivery across multiple domains.
Fast global delivery
Fast, global delivery to visitors anywhere in the world — with flat pricing that doesn't spike with your traffic.
oEmbed & auto variants
Every upload gets WebP variants and a /v1/oembed endpoint, so embeds and link previews just work.
Core endpoints
| Method | Path | What it does |
|---|---|---|
POST | /v1/images | Upload an image, GIF, or video |
GET | /v1/images/:id | Metadata, tags & variants |
GET | /v1/images/mine | Your uploads |
DELETE | /v1/images/:id | Delete an asset |
GET | /v1/search?q= | Full-text search |
GET | /v1/gifs/search?q= | Public GIF search |
GET | /v1/gifs/trending | Trending GIFs |
GET | /v1/oembed?url= | oEmbed for a share page |
POST | /v1/keys | Create 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.
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.
# 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 pasteFrom 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.
{
"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.
{
"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.