Встройте AI Fashion Editor на ваш сайт или используйте через API.
<!-- 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>| Тариф | RPM | Генераций/день |
|---|---|---|
| Free | — | 3 |
| Starter ($29/mo) | 10 | 30 |
| Pro ($59/mo) | 30 | 100 |
| Enterprise | 100 | Безлимит |
Все эндпоинты возвращают JSON в едином формате:
// Успех
{ "success": true, "data": { "jobId": "...", "status": "queued" } }
// Ошибка
{ "success": false, "error": "Rate limit exceeded" }
// Результат задачи (GET /api/jobs/:id)
{
"success": true,
"data": {
"status": "completed",
"result": {
"imageUrl": "https://cdn.../result.png"
}
}
}