bfl-api

Integrate BFL FLUX image generation APIs with polling, webhooks, and rate limiting.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/X-manist/Cohmira --skill bfl-api-x-manist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bfl-api
Source: https://github.com/X-manist/Cohmira/tree/main/src/builtin-plugins/openmontage/.agents/skills/bfl-api
Command: npx skills add https://github.com/X-manist/Cohmira --skill bfl-api-x-manist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, aiohttp, flask, express, axios, and includes references (resource) components.

What problem does it solve? Integrating the BFL FLUX image generation API requires handling asynchronous polling, expiring result URLs, rate limits, regional endpoints, and webhook security, which is error-prone without a structured guide. ## Core Features & Use Cases - Endpoint & Model Reference: Covers all FLUX.2 and FLUX.1 endpoints with pricing, resolution constraints, and multi-reference image editing parameters. - Async Patterns: Provides polling strategies with exponential backoff, webhook integration with HMAC-SHA256 signature verification, and rate limit handling for 24 concurrent requests. - Ready-Made Clients: Includes production-oriented cURL, Python, and TypeScript client examples with retry logic and error classification. - Use Case: A developer building an image generation feature can follow the guide to submit a FLUX.2 request, poll for results, download images before the 10-minute URL expiration, and handle 429 rate limit responses correctly. ## Quick Start Use the bfl-api skill to generate an image with the FLUX.2 pro model and show me how to poll for the result.

Frequently Asked Questions about bfl-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with the BFL FLUX API?

Send a POST request to a model endpoint like /v1/flux-2-pro with your prompt and dimensions, authenticated via the x-key header. The response returns a polling_url which you GET repeatedly until the status is Ready, then download the result image.

How to handle BFL API rate limits and 429 errors?

The standard limit is 24 concurrent in-flight requests. On HTTP 429, read the Retry-After header and retry with exponential backoff, or use a semaphore-based client to cap concurrency proactively.

Should I use polling or webhooks for BFL API results?

Use polling for scripts, CLI tools, and simple integrations since it works everywhere. Use webhooks for production server-to-server workloads where you need immediate notification and want to avoid repeated polling requests.

Why did my BFL generated image URL stop working?

Result URLs from the BFL API expire 10 minutes after generation completes. Download the image immediately when the polling status becomes Ready instead of storing or caching the URL.

Does FLUX.2 support image-to-image editing with multiple reference images?

Yes, all FLUX.2 models accept input_image parameters for editing, with URLs preferred over base64. Klein models support up to 4 reference images, while pro, max, and flex support up to 8.

How do I verify BFL webhook signatures?

When you set a webhook_secret, BFL signs payloads with HMAC-SHA256 in the X-BFL-Signature header. Compute the expected signature over the raw request body and compare it using a constant-time comparison function.