POST /v1/srcset
One upload, N optimized variants at different widths — wire straight
into <img srcset>.
Request
POST /v1/srcset?widths=320,640,1280 HTTP/1.1
Authorization: Bearer img_live_...
Content-Type: image/jpeg
X-Options: {"output":"webp","quality":80,"qualityTier":"balanced"}
<binary image bytes>Query
| Param | Default | Notes |
|---|---|---|
widths | 320,640,1024 | Comma-separated. 16…8192. Up to 6 widths. |
X-Options is the same shape as /v1/shrink, minus resize (overridden
per variant: fit=inside, withoutEnlargement=true).
Response
{
"variants": [
{ "width": 320, "jobId": "...", "status": "completed", "outputBytes": 6312, "ratio": 0.81, "downloadUrl": "..." },
{ "width": 640, "jobId": "...", "status": "completed", "outputBytes": 18430, "ratio": 0.74, "downloadUrl": "..." },
{ "width": 1280, "jobId": "...", "status": "completed", "outputBytes": 58111, "ratio": 0.65, "downloadUrl": "..." }
]
}Cost
One token per variant. So ?widths=320,640,1024 is 3 tokens if all
three are new. Cache-hits cost nothing.