Flux Kontext
Generación y edición avanzada de imágenes con modelos Flux Kontext
Características
- Generación de texto a imagen
- Transferencia de estilo
- Edición de imágenes
- Salida de alta fidelidad
Precios
| Model | Credits |
|---|---|
| flux-kontext-pro | 2 (~$0.02) |
| flux-kontext-max | 4 (~$0.04) |
Punto de conexión
POST
/api/v1/images/generateParámetros
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| model | string | Necesario | "flux-kontext-pro" or "flux-kontext-max" |
| type | string | Opcional | "text-to-image" or "image-to-image" (default: text-to-image) |
| prompt | string | Necesario | Text description |
| image_urls | string[] | Opcional | Input image URLs or base64 for editing/style transfer |
| input_image | string | Opcional | Deprecated. Alias for image_urls[0] |
| image_size | string | Opcional | Output image size (e.g. 1024x1024) |
Ejemplo de Solicitud
{
"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"]
}Ejemplo de Respuesta
{
"success": true,
"data": {
"task_id": "task_flux123",
"credits_used": 2,
"remaining_credits": 498
}
}Ejemplos de Código
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"]
}'