POST /v1/shrink-from-url

Like /v1/shrink but the gateway fetches the original from a URL instead of you uploading it. Useful for headless ETL pipelines and CDN-fronted assets.

Request

POST /v1/shrink-from-url HTTP/1.1
Authorization: Bearer img_live_...
Content-Type: application/json
 
{
  "url": "https://example.com/photo.jpg",
  "options": { "qualityTier": "balanced", "output": "webp" }
}

?async=true and Idempotency-Key work the same as on /v1/shrink.

SSRF guard

Refused with 400 blocked_private_address for URLs that resolve to:

  • 127.0.0.0/8, ::1
  • 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
  • 169.254.0.0/16 (link-local)
  • fc00::/7 (IPv6 ULA)

Schemes other than http/https are rejected with unsupported_scheme.