explaingit

beecho01/bfl-openai-image-proxy

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A small proxy server that makes Black Forest Labs FLUX image generation work with any tool built for the OpenAI images API, including Open WebUI.

Mindmap

mindmap
  root((bfl-openai-image-proxy))
    What it does
      Translates OpenAI requests
      Calls FLUX API
      Returns compatible response
    Image handling
      Downloads immediately
      Base64 or URL format
      Auto cleanup by TTL
    Deployment
      Docker image
      Python direct run
      BFL API key required
    Features
      Model listing
      Optional auth
      Privacy first
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add FLUX image generation to an Open WebUI installation without writing any custom API adapters.

USE CASE 2

Let any tool that supports the OpenAI images API generate images using Black Forest Labs FLUX models.

USE CASE 3

Self-host a private image generation service that logs nothing and cleans up generated files automatically.

What is it built with?

PythonFastAPIDockerhttpxPydanticUvicorn

How does it compare?

beecho01/bfl-openai-image-proxya-bissell/unleash-liteabhiinnovates/whatsapp-hr-assistant
Stars111
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/54/53/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a paid Black Forest Labs API key to call the FLUX generation API.

In plain English

Black Forest Labs makes a family of AI image generation models called FLUX, but their API does not speak the same language as OpenAI's image generation endpoint. Many self-hosted tools, including the popular Open WebUI chat interface, are built to talk to OpenAI-style APIs. This proxy server sits in between: you send it an OpenAI-formatted image request, and it quietly translates that into a FLUX API call, waits for the result, and hands back a response in the format the calling tool expects. The server runs as a small FastAPI application you deploy with Docker. It accepts POST requests at the standard OpenAI images endpoint, maps size values like "1024x1024" to the width and height fields FLUX expects, submits the job to Black Forest Labs, and polls the FLUX API until the image is ready. When it is, the proxy downloads the image immediately and either encodes it as base64 inline in the response or saves it locally and returns a URL pointing to its own server. The download-immediately step matters because FLUX image links expire after ten minutes, so any delay would leave the calling tool with a dead URL. The proxy lists all supported FLUX model names at a /v1/models endpoint, supports friendly model aliases, and includes a /health endpoint for monitoring. Bearer token authentication for the proxy itself is optional. By default nothing is logged, so prompts and generated images stay private. Temporary image files are cleaned up automatically after a configurable time window. The scope is deliberately narrow: text-to-image generation only. FLUX supports editing, in-painting, fine-tune management, and other operations, but this proxy does not implement them, because Open WebUI's image generation feature only needs the basic text-to-image path. Installation is either a pre-built Docker image from GitHub Container Registry or a direct Python setup. A Black Forest Labs API key is the one external dependency.

Copy-paste prompts

Prompt 1
How do I set up bfl-openai-image-proxy with Docker Compose to use FLUX image generation in Open WebUI? Show me the docker-compose.yml and the Open WebUI configuration steps.
Prompt 2
Write a Python script that sends a text-to-image request to a running bfl-openai-image-proxy server using the openai Python library and saves the result as a PNG file.
Prompt 3
What FLUX models does bfl-openai-image-proxy support, and how do I list the available models from a running instance?
Prompt 4
How do I configure bfl-openai-image-proxy to use bearer token authentication and set a custom image TTL of 30 minutes?

Frequently asked questions

What is bfl-openai-image-proxy?

A small proxy server that makes Black Forest Labs FLUX image generation work with any tool built for the OpenAI images API, including Open WebUI.

What language is bfl-openai-image-proxy written in?

Mainly Python. The stack also includes Python, FastAPI, Docker.

How hard is bfl-openai-image-proxy to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is bfl-openai-image-proxy for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub beecho01 on gitmyhub

Verify against the repo before relying on details.