March 20262 min readJohan Bretonneau

How to Get Your BFL API Key for Flux Image Generation
Direct access to FLUX.1 and FLUX.2 models from Black Forest Labs

Step-by-step guide to create your BFL API key from api.bfl.ai, understand the full Flux model lineup, and start generating with the best open-source image models.

Black Forest Labs (BFL) is the team that built and open-sourced the Flux model family. Their API at api.bfl.ai gives you direct access to the full Flux lineup - from the fast Schnell model to the premium Ultra tier - without going through an intermediary marketplace. If you are serious about image generation quality, this is the key you want.

Prerequisites

  • A free account on api.bfl.ai
  • A payment method (free credits available on signup, then pay-as-you-go)

Step-by-step: creating your API key

  1. Go to api.bfl.ai and click "Sign up"
  2. Create your account and verify your email, then log in
  3. Click the menu in the top right corner of the dashboard
  4. Select "API Keys"
  5. Click "Generate new key"
  6. Copy the key immediately - it starts with bfl_ and is shown once

Store it in a .env file right away. You will not be able to retrieve it again from the dashboard.

What this key unlocks

BFL's API covers the complete Flux model family - each tier targeting a different balance of speed, quality, and cost:

  • FLUX.1 [schnell] - the fastest Flux variant, ideal for rapid prototyping and high-volume pipelines. Free tier available
  • FLUX.1 [dev] - balanced quality and speed, good for development and staging
  • FLUX.1 [pro] - production-grade quality at $0.05 per image at 1MP. Recommended for client-facing output
  • FLUX.1 [pro] Ultra - highest quality in the FLUX.1 family, up to 4MP resolution, at $0.06 per image
  • FLUX.2 [pro] - the next generation, best quality-to-price ratio at $0.03 per megapixel
  • FLUX.2 [max] - premium tier with multi-reference control, at $0.07 per megapixel. Use when you need to condition generation on multiple reference images

The pricing model is per megapixel, which makes FLUX.2 particularly competitive at higher resolutions compared to flat per-image pricing.

Why BFL directly instead of a marketplace

Platforms like fal.ai also offer Flux models, but going through BFL's own API has specific advantages:

  • First access to new models - BFL releases FLUX.2 variants on their own platform before third-party marketplaces
  • Direct pricing - no intermediary margin
  • More control over parameters - the BFL API exposes options that marketplace wrappers sometimes restrict

For anything beyond simple text-to-image, connecting directly to the source is the right move.

Free tier and pricing

BFL provides limited free credits on signup. After that:

  • FLUX.1 [schnell]: free tier available, then very low cost per image
  • FLUX.1 [pro]: $0.05 per image at 1MP
  • FLUX.1 [pro] Ultra: $0.06 per image at up to 4MP
  • FLUX.2 [pro]: $0.03 per MP
  • FLUX.2 [max]: $0.07 per MP

Security - the essentials

  • Never commit your bfl_ key to version control
  • Use environment variables - .env locally, secrets manager in production
  • One key per environment - development, staging, and production should each have their own key

Using this key with HiWay2LLM

Bring your BFL key to HiWay2LLM to route Flux requests alongside all your other models. You get unified cost tracking across BFL, Stability AI, OpenAI, Anthropic, and 200+ other providers - with a single OpenAI-compatible endpoint and automatic fallback routing when a provider is unavailable.

Bring my key to HiWay2LLM →

Connect in 30 seconds

Share

Was this useful?

Comments

Be the first to comment.