Flux Kontext
Génération et retouche d'images avancées avec les modèles Flux Kontext
Fonctionnalités
- Génération d'image à partir de texte
- Transfert de style
- Édition d'image
- Sortie haute fidélité
Tarification
| Model | Credits |
|---|---|
| flux-kontext-pro | 2 (~$0.02) |
| flux-kontext-max | 4 (~$0.04) |
Point de terminaison
POST
/api/v1/images/generateParamètres
| Paramètre | Type | Obligatoire | Description |
|---|---|---|---|
| model | string | Obligatoire | "flux-kontext-pro" or "flux-kontext-max" |
| type | string | Facultatif | "text-to-image" or "image-to-image" (default: text-to-image) |
| prompt | string | Obligatoire | Text description |
| image_urls | string[] | Facultatif | Input image URLs or base64 for editing/style transfer |
| input_image | string | Facultatif | Deprecated. Alias for image_urls[0] |
| image_size | string | Facultatif | Output image size (e.g. 1024x1024) |
Exemple de Demande
{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}Exemple de réponse
{
"success": true,
"data": {
"task_id": "task_flux123",
"credits_used": 2,
"remaining_credits": 498
}
}Exemples de Code
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-kontext-pro",
"type": "image-to-image",
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"]
}'