Integration

Embed AI Fashion Editor on your site or use it via API.

Quick start

  1. Get an API key in your account
  2. Choose an integration method: widget, SDK or REST API
  3. Add the code to your site
html
<!-- 1. Add the script -->
<script src="https://cdn.fashioneditor.ai/widget/fashion-editor-widget.umd.js"></script>

<!-- 2. Add a container -->
<div id="editor-container"></div>

<!-- 3. Initialize -->
<script>
  const editor = FashionEditor.init({
    apiKey: 'fd_your_api_key_here',
    container: '#editor-container',
    theme: 'dark',      // 'dark' | 'light'
    width: '100%',
    height: '700px',
    onReady: () => {
      console.log('Editor ready');
    },
    onResult: (data) => {
      console.log('Result:', data.imageUrl);
      console.log('Operation:', data.operation);
    },
    onError: (err) => {
      console.error('Error:', err.message);
    },
  });

  // Load an image programmatically
  editor.loadImage('https://example.com/photo.jpg');

  // Clean up when done
  // editor.destroy();
</script>

API limits

PlanRPMGenerations/day
Free3
Starter ($29/mo)1030
Pro ($59/mo)30100
Enterprise100Unlimited

Response format

All endpoints return JSON in a unified format:

// Success
{ "success": true, "data": { "jobId": "...", "status": "queued" } }

// Error
{ "success": false, "error": "Rate limit exceeded" }

// Job result (GET /api/jobs/:id)
{
  "success": true,
  "data": {
    "status": "completed",
    "result": {
      "imageUrl": "https://cdn.../result.png"
    }
  }
}