Analyze API
Endpoints for AI image analysis.
Analyze Images
Start AI analysis for images in a session. Returns a Server-Sent Events (SSE) stream with real-time progress.
Method: POSTPath: /v1/sessions/:sessionId/analyzeAuthentication: Required
Response: text/event-stream (SSE)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | Session ID from the upload step |
images | array | Yes | Array of image objects to analyze |
images[].id | string | Yes | Image ID from the upload response |
images[].uploadPath | string | Yes | Server-side path from the upload response |
images[].originalFilename | string | Yes | Original filename |
SSE Events
| Event | Description |
|---|---|
progress | Fired for each image as analysis begins. Contains imageId, status, current, total. |
result | Fired when an image's analysis completes. Contains imageId and full metadata object. |
error | Fired if an image fails analysis. Contains imageId and error message. |
complete | Fired when all images are processed. Contains status, processed, total. |
Metadata Object
| Field | Type | Description |
|---|---|---|
title | string | Descriptive title |
alt | string | SEO-optimized alt text |
caption | string | Natural-language caption |
description | string | Extended description |
filename | string | Suggested filename (no extension) |
seoTags | string[] | Array of relevant keywords |
Credit Cost
1 credit per image. Credits are deducted by the Flask API gateway before the request is proxied to the analysis engine.
Analyze Single Image
Analyze a single image (non-streaming). Useful for processing one image at a time.
Method: POSTPath: /v1/sessions/:sessionId/analyze-singleResponse: JSON (non-streaming)
