Image Transformations
Picsha AI's delivery pipeline relies on ultra-fast runtime transformations. You never need to pre-generate crops or thumbnails—simply request the exact dimensions you need, and the Edge cache will cache the resultant image indefinitely.
The Render Endpoint
The global edge rendering endpoint is:
GET /v1/assets/:assetId/render
Standard Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
wt | int | No | Target width in pixels |
ht | int | No | Target height in pixels |
fit | enum | No | How the image fits the bounds: cover, contain, fill, inside |
pos | enum | No | Crop position: center, entropy, attention, top, bottom |
fmt | enum | No | Force image format: webp, jpeg, png, avif |
q | int | No | Quality out of 100 (Default: 85) |
Smart Cropping
One of our flagship features is AI-driven smart cropping!
If you request fit=cover alongside a bizarre aspect ratio (like wt=300&ht=900), Picsha's AI will detect the subject of the image (or human faces) and automatically pivot the crop window (pos=entropy or pos=attention) to guarantee the subject is perfectly centered.
Watermarks
You can seamlessly blend external image URLs over your base image.
?wm_url=https://your-domain.com/logo.png&wm_pos=bottom-right
Generative AI Capabilities
Picsha seamlessly bridges the gap between classic image optimization and modern Agentic AI workflows. We leverage Generative AI models underneath the hood of our globally cached delivery API to instantly modify pixels on the edge.
Background Removal
To effortlessly strip the background from any subject (such as a person, product, or car), simply pass ?bg_rem=true to your Render endpoint!
GET /v1/assets/:assetId/render?bg_rem=true
Note: Background removal relies on machine learning inference. Once the computation completes, the resultant transparent PNG is permanently cached at the edge to guarantee hyper-fast future requests.
Background Replacement
Instead of simply removing the background, you can instantly replace it with a perfectly matched solid hex color.
GET /v1/assets/:assetId/render?bg=FF0000
This query effortlessly extracts the subject and blends it seamlessly onto a brilliant red background.
Magic Imaging Model Interface (MIMI)
You can provide freeform natural language instructions directly to the API to perform complex edits, color grading, and generative augmentations in one shot.
GET /v1/assets/:assetId/render?mimi=make it look like a moody cinematic shot