3. Wait for ready
Poll GET /v1/projects/{slug}/uploads/{id} every second or two, or subscribe to the upload.ready webhook. When the session is ready, the file is published: read it with GET /v1/projects/{slug}/files/{fileSlug} and build delivery URLs from its slug (see delivery URLs).
Publishing sanitizes the image: it is re-encoded in the same format (BMP and TIFF become PNG), orientation is applied and embedded metadata is removed. Animated images and HEIC are refused. Size limits: JPEG and PNG images (8 bits per channel) up to 128 megapixels; GIF, TIFF, BMP, lossy WebP without transparency and 16-bit images up to 50 megapixels; lossless WebP up to about 49 megapixels (about 32 with transparency); lossy WebP with transparency up to about 38 megapixels; AVIF up to about 28 megapixels. Larger images are refused as too costly to process.
SVGs are sanitized: scripts, event handlers, external references, animation and editor metadata are removed. SVGs with embedded bitmap images or a DOCTYPE are refused, and so are very complex ones (too many elements, layers, text or styles). The sanitized SVG is stored and served as vector on originals; transforms rasterize it on a grid whose long edge is at least 2048 px (up to 2048 × 2048 in area, default output PNG), and the file's width/height report that grid.
Poll and read the file
curl https://api.img2.site/v1/projects/my-store/uploads/$UPLOAD_ID \
-H "X-Api-Key: $IMG2SITE_API_KEY"
{ "upload_id": "upl_…", "file_slug": "hero", "status": "ready", "ready_at": "…", "error_code": null, … }
# The published file:
curl https://api.img2.site/v1/projects/my-store/files/hero \
-H "X-Api-Key: $IMG2SITE_API_KEY"
{ "file_slug": "hero", "status": "ready", "revision": 1, "width": 2400, "height": 1600,
"url": "https://my-store.i2scd.net/originals/f/hero", … }