For Agents
Generate images from text, edit images with FLUX Kontext, inpaint and outpaint, poll for asynchronous results, check credits, and list fine-tunes with the Black Forest Labs FLUX API.
Use for: Generate an image from a text prompt, Edit an existing image with a prompt, Inpaint a masked region of an image, Expand an image beyond its original borders
Not supported: Does not host generated images long term, generate video, or manage billing. Use for FLUX image generation, editing, and result retrieval only.
The Black Forest Labs FLUX API generates and edits images with the FLUX.2, FLUX.1, and Kontext model families. It runs text-to-image generation, prompt-based image editing, inpainting, and outpainting, all as asynchronous tasks that you submit and then poll for a result. It also reports remaining credits and lists the fine-tuned models on an account.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Black Forest Labs FLUX API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fblackforestlabs.ai%2Fblackforestlabs" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fblackforestlabs.ai%2Fblackforestlabs" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Black Forest Labs FLUX API.
Generate images from text prompts with FLUX models
Edit existing images with FLUX Kontext models
Inpaint a masked region and outpaint to expand an image
Poll for asynchronous generation results
Check the remaining API credits on an account
List fine-tuned models and read their details
Patterns agents use Black Forest Labs FLUX API for, with concrete tasks.
★ AI agent image generation
An AI agent producing visual content can generate images from prompts and retrieve them once ready. Through Jentic the agent searches by intent and the API key never enters its prompt context, so a content assistant can call FLUX directly and hand back finished images.
Use Jentic to search 'generate an image with FLUX', call POST /v1/flux-2-pro with a prompt, then poll GET /v1/get_result until the image is ready.
Prompt-based image editing
A creative tool edits an existing image from a natural-language instruction using the Kontext models. The agent submits the source image with the instruction and polls for the edited output, keeping the edit loop fully programmatic.
Submit an edit via POST /v1/flux-kontext-pro with a source image and instruction, then poll GET /v1/get_result for the edited image.
Inpaint and outpaint
An image pipeline fills a masked region or extends the canvas beyond the original frame. The agent calls the fill or expand model and retrieves the result, automating retouching and canvas extension without a manual editor.
Fill a masked area via POST /v1/flux-pro-1.0-fill, or extend the canvas via POST /v1/flux-pro-1.0-expand, then retrieve the output with GET /v1/get_result.
Credit and fine-tune management
An operations agent monitors an account's remaining credits and the fine-tuned models available to it. This keeps generation workflows from stalling on an empty balance and tracks which custom models are in use.
Call GET /v1/credits to check the remaining balance and GET /v1/my_finetunes to list the account's fine-tuned models.
17 endpoints — the black forest labs flux api generates and edits images with the flux.
METHOD
PATH
DESCRIPTION
/v1/flux-2-pro
Generate an image with FLUX.2 Pro
/v1/flux-kontext-pro
Edit an image with FLUX Kontext Pro
/v1/flux-pro-1.0-fill
Inpaint a masked region
/v1/flux-pro-1.0-expand
Outpaint to expand an image
/v1/get_result
Poll for a generation result
/v1/credits
Check remaining credits
/v1/my_finetunes
List fine-tuned models
/v1/delete_finetune
Delete a fine-tune
/v1/flux-2-pro
Generate an image with FLUX.2 Pro
/v1/flux-kontext-pro
Edit an image with FLUX Kontext Pro
/v1/flux-pro-1.0-fill
Inpaint a masked region
/v1/flux-pro-1.0-expand
Outpaint to expand an image
/v1/get_result
Poll for a generation result
/v1/credits
Check remaining credits
/v1/my_finetunes
List fine-tuned models
/v1/delete_finetune
Delete a fine-tune
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Black Forest Labs FLUX API by hand means sending your x-key header to api.bfl.ai, submitting a generation task, and polling for the result yourself. Through Jentic you install once, import FLUX from the API Directory, store the key once, and your agent calls it.
Permission scoping
FLUX addresses each model as its own operation and carries the prompt in the request body, so a rule bounds which operations your agent may call. You can allow only the generation and result-polling operations, so deleting a fine-tune is not included unless you add it.
Credential isolation
Your Black Forest Labs API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'generate an image' or 'edit an image', and Jentic returns the matching FLUX operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Black Forest Labs FLUX API through Jentic.
Is there a Black Forest Labs FLUX MCP server?
You don't need an MCP server to give your agent FLUX. Jentic connects it directly from the API Directory: import it, store your key once, and your agent calls the generation, edit, and result operations. That keeps your agent's context free of an extra server's tool definitions.
What authentication does the Black Forest Labs FLUX API use?
It authenticates with an API key sent in the x-key header, per its OpenAPI spec. Through Jentic the key is stored encrypted by your own instance and injected at call time, so it never reaches the agent's context.
Can I generate images asynchronously with the Black Forest Labs FLUX API?
Yes. Generation is asynchronous: POST /v1/flux-2-pro (or another FLUX model) submits a task, and GET /v1/get_result polls until the image is ready to download.
What are the rate limits for the Black Forest Labs FLUX API?
The OpenAPI spec does not specify rate limits. Check the Black Forest Labs documentation at https://docs.bfl.ml for current limits and any active-task caps.
How do I generate an image through Jentic?
Search Jentic for 'generate an image with FLUX', load the input schema, and execute POST /v1/flux-2-pro, then poll GET /v1/get_result. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the Black Forest Labs FLUX API?
Yes. Write a rule that allows only the generation and result-polling operations, so the agent can create and fetch images and nothing else, and every call it makes is logged. Deleting a fine-tune stays out unless you add that operation.
GET STARTED