bfl-api
यह क्या करती है
यह स्किल BFL FLUX इमेज API की डेवलपर गाइड है। जो डेवलपर अपने ऐप में AI इमेज जनरेशन या संपादन जोड़ना चाहते हैं, उनके लिए यह है।
कब इस्तेमाल करें
- ✓जब आप पहली बार ऐप को BFL FLUX इमेज API से जोड़ रहे हों।
- ✓जब आपके इमेज कामों को इंतज़ार, दोबारा प्रयास या rate limits और त्रुटियाँ संभालनी हों।
- ✓जब डेटा के ठिकाने के लिए आपको क्षेत्रीय endpoint चुनना हो।
Skill का लिंक
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/bfl-api/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मुझे दिखाइए कि अपने ऐप में FLUX इमेज जनरेशन कैसे जोड़ूँ, जिसमें परिणाम का इंतज़ार करना भी शामिल हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
गाइड बताती है कि API कुंजी कैसे जाँचें, अनुरोध कैसे भेजें, काम पूरा होने तक कैसे इंतज़ार करें और इमेज कैसे डाउनलोड करें। इसमें क्षेत्रीय endpoints और आम त्रुटि कोड भी शामिल हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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/ |
अक्सर पूछे जाने वाले सवाल
क्या इमेज के लिंक स्थायी हैं?
नहीं। परिणाम के लिंक अस्थायी हैं, इसलिए इमेज तैयार होते ही डाउनलोड कर लें।
कौन से क्षेत्र उपलब्ध हैं?
एक global endpoint है, और डेटा के ठिकाने के लिए EU और US endpoints भी हैं।
क्या इसमें कोड उदाहरण हैं?
हाँ। इसमें Python और TypeScript के उदाहरण शामिल हैं।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2643
- लाइसेंस
- AGPL-3.0
- अपडेट की गई
- 28/10/2026
कमेंट
- …
इस repository की और skills
3d-asset-generation
75kकैटलॉग, टेक्स्ट या इमेज से 3D टूल और अंतिम जोड़ के लिए Blender का उपयोग करके दृश्य के लिए 3D वस्तुएँ बनाने का तरीका चुनने में मदद करती है।
acestep
75kखुले ACE-Step संगीत जनरेटर से वीडियो के लिए बैकग्राउंड संगीत, गाने, जिंगल और stems बनाने में मदद करती है।
agents
75kElevenLabs से वॉइस AI सहायक बनाने में मदद करती है, जैसे ग्राहक सेवा बॉट और इंटरएक्टिव आवाज़ वाले पात्र।
ai-video-gen
75kटेक्स्ट विवरण या संदर्भ इमेज से AI वीडियो क्लिप बनाने में मदद करती है, कई वीडियो जनरेशन सेवाओं में से चुनकर।
मिलती-जुलती skills
gifgrep
394kयह आपके एजेंट को GIF लाइब्रेरी में खोजने, नतीजों का पूर्वावलोकन करने, GIF डाउनलोड करने, और उससे एक फ़्रेम या फ़्रेम्स की शीट निकालने देती है।
meme-maker
394kयह आपके एजेंट को मीम टेम्पलेट चुनने, अपने कैप्शन जोड़ने और मीम को SVG या PNG इमेज के रूप में बनाने देती है।
ios-icon-gen
280kआपके एजेंट को iOS ऐप्स के लिए icons बनाने देता है। यह Apple symbols या दूसरे स्रोतों के आइकन इस्तेमाल करके सही files बनाता है।