Quick Start

Get up and running in minutes

Installation

bash
npm install aurax

# or with yarn
yarn add aurax

# or with pnpm
pnpm add aurax

Initialization

typescript
import { AuraXClient } from 'aurax';

const client = new AuraXClient({
  apiKey: process.env.AURAX_API_KEY!,
  keyId: process.env.AURAX_KEY_ID!,
  baseUrl: "https://backend.aurax.co.in" // optional
});

Code Examples

See the SDK in action

Virtual Try-On

Create realistic virtual try-on experiences with real-time streaming updates.

typescript
// Virtual Try-On Example
const { taskId } = await client.vto({
  personImage: personBase64, // base64 encoded person image
  garmentImage: garmentBase64, // base64 encoded garment image
  productType: "GARMENT",
  garmentStrength: 2, // 1-3, higher = more prominent
  maskBase64: null, // optional mask
  prompt: null, // optional text prompt
  runWithPrompt: false
});

// Stream real-time updates
const eventSource = client.streamTask(taskId, {
  onMessage: (message) => {
    console.log('Status:', message.status);
    if (message.status === 'COMPLETED') {
      console.log('Result:', message.output);
      eventSource.close();
    }
  },
  onError: (error) => {
    console.error('Error:', error);
    eventSource.close();
  }
});

Supported Product Types

Wide range of fashion categories supported

GARMENT
DRESS
OUTFIT
FOOTWEAR
BAG
JEWELLERY
EYEWEAR
BEAUTY
OTHER

API Reference

Complete method documentation

Core Methods

  • vto()Virtual try-on processing
  • imageGeneration()AI image creation
  • productDescription()Description generation

Utility Methods

  • getTask()Get task status
  • streamTask()Stream real-time updates
  • pollTask()Poll until completion
  • getImage()Retrieve image blob