bfl-api
Qué hace
Esta skill es una guía para desarrolladores de la API de imágenes BFL FLUX. Es para desarrolladores que quieren agregar generación o edición de imágenes con IA a su propia app.
Cuándo usarla
- ✓Cuando conectas una app a la API de imágenes BFL FLUX por primera vez.
- ✓Cuando tus trabajos de imagen necesitan esperar, reintentar o manejar límites de solicitudes y errores.
- ✓Cuando necesitas elegir un punto final regional por residencia de datos.
Link de la skill
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/bfl-api/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Muéstrame cómo agregar la generación de imágenes con FLUX a mi app, incluyendo cómo esperar el resultado.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La guía explica cómo revisar tu clave de API, enviar una solicitud, esperar a que el trabajo termine y descargar la imagen. Cubre los puntos finales regionales y los códigos de error comunes.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
BFL API Integration Guide
Use this skill when integrating BFL FLUX APIs into applications for image generation, editing, and processing.
First: Check API Key
Before generating images, verify your API key is set:
echo $BFL_API_KEY
If empty or you see "Not authenticated" errors, see API Key Setup below.
Important: Image URLs Expire in 10 Minutes
Result URLs from the API are temporary. Download images immediately after generation completes - do not store or cache the URLs themselves.
When to Use
- Setting up BFL API client
- Implementing async polling patterns
- Handling rate limits and errors
- Configuring webhooks for production
- Selecting regional endpoints
- Building production-ready integrations
Quick Reference
Base Endpoints
| Region | Endpoint | Use Case |
|---|---|---|
| Global | https://api.bfl.ai |
Default, automatic failover |
| EU | https://api.eu.bfl.ai |
GDPR compliance |
| US | https://api.us.bfl.ai |
US data residency |
Model Endpoints & Pricing
Credit pricing: 1 credit = $0.01 USD. FLUX.2 uses megapixel-based pricing (cost scales with resolution).
FLUX.2 Models
| Model | Path | 1st MP | +MP | 1MP T2I | 1MP I2I | Best For |
|---|---|---|---|---|---|---|
| FLUX.2 [klein] 4B | /v1/flux-2-klein-4b |
1.4c | 0.1c | $0.014 | $0.015 | Real-time, high volume |
| FLUX.2 [klein] 9B | /v1/flux-2-klein-9b |
1.5c | 0.2c | $0.015 | $0.017 | Balanced quality/speed |
| FLUX.2 [pro] | /v1/flux-2-pro |
3c | 1.5c | $0.03 | $0.045 | Production, fast turnaround |
| FLUX.2 [max] | /v1/flux-2-max |
7c | 3c | $0.07 | $0.10 | Maximum quality |
| FLUX.2 [flex] | /v1/flux-2-flex |
5c | 5c | $0.05 | $0.10 | Typography, adjustable controls |
| FLUX.2 [dev] | - | - | - | Free | Free | Local development (non-commercial) |
Pricing formula:
(firstMP + (outputMP-1) * mpPrice) + (inputMP * mpPrice)in cents
FLUX.1 Models
| Model | Path | Price/Image | Best For |
|---|---|---|---|
| FLUX.1 Kontext [pro] | /v1/flux-kontext |
$0.04 | Image editing with context |
| FLUX.1 Kontext [max] | /v1/flux-kontext-max |
$0.08 | Max quality editing |
| FLUX1.1 [pro] | /v1/flux-pro-1.1 |
$0.04 | Standard T2I, fast & reliable |
| FLUX1.1 [pro] Ultra | /v1/flux-pro-1.1-ultra |
$0.06 | Ultra high-resolution |
| FLUX1.1 [pro] Raw | /v1/flux-pro-1.1-raw |
$0.06 | Candid photography feel |
| FLUX.1 Fill [pro] | /v1/flux-pro-1.0-fill |
$0.05 | Inpainting |
Tip: All FLUX.2 models support image editing via the
input_imageparameter - no separate editing endpoint needed. Use bfl.ai/pricing calculator for exact costs at different resolutions.
Image Input for Editing
Preferred: Use URLs directly - simpler and more convenient than base64.
Single image editing:
curl -X POST "https://api.bfl.ai/v1/flux-2-pro" \
-H "x-key: $BFL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Change the background to a sunset",
"input_image": "https://example.com/photo.jpg"
}'
Multi-reference editing:
curl -X POST "https://api.bfl.ai/v1/flux-2-pro" \
-H "x-key: $BFL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "The person from image 1 in the environment from image 2",
"input_image": "https://example.com/person.jpg",
"input_image_2": "https://example.com/background.jpg"
}'
The API fetches URLs automatically. Both URL and base64 work, but URLs are recommended when available.
Multi-Reference I2I
FLUX.2 models support multiple input images for combining elements, style transfer, and character consistency:
| Model | Max References |
|---|---|
| FLUX.2 [klein] | 4 images |
| FLUX.2 [pro/max/ |
Preguntas frecuentes
¿Los enlaces de imagen duran?
No. Los enlaces de resultado son temporales, así que la imagen debe descargarse justo cuando esté lista.
¿Qué regiones hay disponibles?
Hay un punto final global, además de puntos finales de la UE y de EE. UU. para la residencia de datos.
¿Incluye ejemplos de código?
Sí. Incluye ejemplos en Python y TypeScript.
Detalles
Descripción original del autor
BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.
repo: calesthio/OpenMontage
Popularidad
- Estrellas en GitHub
- 75 mil
- Posición en el ranking
- #2643
- Licencia
- AGPL-3.0
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
3d-asset-generation
75 milAyuda a tu agente a elegir cómo crear objetos 3D para una escena, usando catálogos, herramientas de texto o imagen a 3D, y Blender para el ensamblado final.
acestep
75 milAyuda a tu agente a crear música de fondo, canciones, jingles y stems para un video usando el generador de música abierto ACE-Step.
agents
75 milAyuda a tu agente a construir asistentes de voz con IA usando ElevenLabs, como bots de atención al cliente y personajes de voz interactivos.
ai-video-gen
75 milAyuda a tu agente a generar clips de video con IA a partir de una descripción de texto o una imagen de referencia, eligiendo entre varios servicios.
Skills parecidas
gifgrep
394 milPermite que tu agente busque GIF en bibliotecas, vea una vista previa de los resultados, descargue un GIF y extraiga un fotograma fijo o una hoja de contacto de fotogramas.
meme-maker
394 milPermite que tu agente elija una plantilla de meme, añada tus propios textos y cree el meme como imagen SVG o PNG.
ios-icon-gen
280 milPermite a tu agente generar iconos para apps de iOS. Usa símbolos de Apple u otras fuentes para crear los archivos correctos.