Upload media from URL
POST/media/upload-from-url
One-call alternative to the 3-step upload flow. Pass a public URL, the server fetches the bytes, stores them on Cloudflare Images, and returns a ready-to-attach media_id. Image-only (JPEG, PNG, GIF, WebP, HEIC, HEIF). 25 MB cap. SSRF-protected (private/loopback addresses rejected). For videos or local files, use POST /media/upload.
Request
Responses
- 200
- 400
- 401
- 413
- 415
- 429
Media imported and ready to attach
Invalid request parameters
Missing or invalid API key
Invalid request parameters
Invalid request parameters
Rate limit exceeded
Response Headers
X-RateLimit-Limit
Request limit per window
X-RateLimit-Remaining
Remaining requests in current window
X-RateLimit-Reset
Unix timestamp when the window resets
Retry-After
Seconds to wait before retrying