API Documentation
Intégrez notre outil de traitement d'images dans vos propres applications.
Endpoint
POST /api/process
Paramètres
| Paramètre | Type | Description |
|---|---|---|
| image | File | Fichier image (PNG, JPG, WebP, max 10MB) |
| tool | string | Outil : restore, colorize, upscale, denoise, ou enhance |
Exemple (fetch)
const formData = new FormData()
formData.append('image', file)
formData.append('tool', 'restore')
const resp = await fetch('https://votre-site.com/api/process', {
method: 'POST',
body: formData
})
const data = await resp.json()
// { imageUrl: "...", provider: "Replicate" }Réponse
{
"imageUrl": "https://...",
"provider": "Replicate",
"remaining": 5
}