Developer API Docs
v1.0.0 • Current Release
1. Embedded Widget (Recommended)
The easiest way to integrate emodeAI is via the Drop-In Embedded Widget. Once you subscribe via the Dashboard, you will be granted a unique Merchant ID tag.
<script src="https://emode.style/widget.js"></script><div id="emode-widget-root" data-merchant-id="[YOUR_MERCHANT_ID]"></div>
Place these tags directly on your Shopify Product Liquid templates or React product pages. The widget automatically scrapes the `src` of your main product image if `data-product-image` is omitted.
2. Direct REST API (Headless)
If you want to bypass the widget UI entirely and build your own app, you can POST directly to the generation engine endpoint.
POST
https://emode.style/api/generateRequest Body (JSON):
targetPhotoUrl: The user's headshot/body photo URL.garmentPhotoUrl: The clothing item URL.merchantId: Your API identification key for billing.
3. Rate Limits & Errors
API requests are strictly evaluated against your monthly plan entitlement. If you exceed your limit, the API will reject standard generations:
- 429 Too Many Requests: You have exhausted your plan quota. Please upgrade your tier via the Admin dashboard.
- 400 Bad Request: Malformed URL pathways for imagery. Ensure your photos are publicly resolvable.
- 401 Unauthorized: Missing or inactive merchant ID.