Sessions API

Endpoints for managing image processing sessions.

Overview

Every processing batch creates a session — a temporary workspace that holds uploaded images, analysis results, and exported files. Sessions are identified by a unique sessionId.

Create Session & Upload Images

Upload images to create a new processing session.

Request
Response
curl -X POST \
     -H "X-API-Key: sk-your-key-here" \
     -F "images[][email protected]" \
     -F "images[][email protected]" \
     https://your-api-domain.com/image-forge-api/v1/sessions/upload

Method: POSTPath: /v1/sessions/uploadContent-Type: multipart/form-dataAuthentication: Required

Response Fields

FieldTypeDescription
sessionIdstringUnique session identifier for subsequent API calls
imagesarrayArray of uploaded image records
images[].idstringUnique image ID within the session
images[].originalFilenamestringOriginal filename as uploaded
images[].sizenumberFile size in bytes
images[].widthnumberImage width in pixels
images[].heightnumberImage height in pixels
images[].uploadPathstringServer-side path for the uploaded file

Session Lifecycle

Upload → Analyze → Export → Download → Cleanup
  1. Upload — Creates the session and stores files
  2. Analyze — AI processes images (optional, depending on pipeline mode)
  3. Export — Compresses and converts images
  4. Download — WordPress plugin downloads processed files
  5. Cleanup — Session files are automatically cleaned up after a period of inactivity