AuraX API Documentation

This documentation outlines the available endpoints for the AuraX's API, their functionalities, required parameters, and credit consumption.

Authentication

All API endpoints require authentication via an API key. Include the following headers in every request:

  • x-api-key — Your unique API key.
  • x-key-id — The ID of your API key.

Endpoints

1. Virtual Try-On (VTO)

POST /api/ai/vto

Creates a new Virtual Try-On task by combining a person image with a garment image. This endpoint is asynchronous and returns a taskId. Track progress with Get Task Status.

Credits: 3 per request

Body Parameters

  • personImage (string, required) — Base64 encoded person image.
  • garmentImage (string, required) — Base64 encoded garment image.
  • productType (string, required) — Type of product. Must be one of: GARMENT, DRESS, OUTFIT, FOOTWEAR, BAG, JEWELLERY, EYEWEAR, BEAUTY, OTHER.
  • garmentStrength (number, required) — Complexity of the garment. Must be 1, 2, or 3.
  • maskBase64 (string, optional) — Base64 encoded mask of the garment area in the person image.
  • prompt (string, optional) — A text description to guide the try-on.
  • runWithPrompt (boolean, optional, default: false) — Set to `true` to have the VTO consider the `prompt`.

2. Image Generation

POST /api/ai/image-generation

Creates a new image generation task. This endpoint is asynchronous and returns a taskId.

Credits: 1 per request

Body Parameters

  • prompt (string, required) — Text prompt for generation.
  • productType (string, required) — Type of product. Must be one of: GARMENT, DRESS, OUTFIT, FOOTWEAR, BAG, JEWELLERY, EYEWEAR, BEAUTY, OTHER.
  • maskBase64 (string, optional) — Base64 encoded image of product for shape accuracy.
  • width (number, optional, default: 1024, max: 2048) — Image width.
  • height (number, optional, default: 1024, max: 2048) — Image height.

3. Product Description

POST /api/ai/product-description

Generates a product description from an image. This is synchronous and returns text directly.

Credits: 0.25 per request

Body Parameters

  • image (file, required) — Image file to upload.
  • productType (string, required) — Type of product. Must be one of: GARMENT, DRESS, OUTFIT, FOOTWEAR, BAG, JEWELLERY, EYEWEAR, BEAUTY, OTHER.

4. Get Task Status

GET /api/ai/task/:id

Retrieves status of an asynchronous task.

Parameters

  • id (string, required) — Task ID.

5. Get Task Status (Stream)

GET /api/ai/task/:id/stream

Subscribes to live task updates via Server-Sent Events (SSE).

Parameters

  • id (string, required) — Task ID.

6. Get Image

GET /images/:imageId

Retrieves image by its ID.

Parameters

  • imageId (string, required) — Image ID.