//Image API

One API to generate, host & transform images.

Upload a file or generate one from a prompt, serve it from a global CDN, and transform it — resize, crop, reformat, recolor — by changing the URL. JavaScript SDK & REST API, one credit for everything.

npm i visionfly·or call the REST API

The whole API

A handful of endpoints. Everything returns a live, optimized CDN URL.

POST/v1/uploadUpload a file → optimized CDN URL
POST/v1/generateGenerate from a prompt → optimized CDN URL
POST/v1/remove-bgRemove the background → transparent URL
GET/{id}?w=&format=&fit=Transform on the fly, edge-cached

Three lines to a live URL

JavaScript SDK — or call the REST API from anything.

1import { VisionFly } from "visionfly";
2
3const vf = new VisionFly("vf_live_...");
4const image = await vf.upload("photo.png");
5console.log(image.url);
6// https://img.visionfly.ai/photo.webp
transform by changing the URL
https://img.visionfly.ai/elephant.webp?w=400&format=avif

Every variant is one GET request, cached at the edge after the first hit. Transforms are always free.

URL parameters

Mix and match — they compose, and the result is edge-cached.

wwidth (px)
hheight (px)
fitcover · contain · crop
formatwebp · avif · jpeg · png
qquality 1–100
bgbackground color
blur0–100
dprdevice pixel ratio

One credit. Everything.

Storage, bandwidth, transforms, and AI all draw from one pool. Generous free tier, then pay only for what you use — we bill overage and let you cap it, never suspend you.

Build with one image API.