> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Black Forest Labs

> Black Forest Labs provides hosted FLUX models for generating and editing images and videos, polling asynchronous results, managing fine-tunes, and checking project credits.

![Black Forest Labs logo](https://mintcdn.com/composio-preview/6S5R4NszqpnVIZRD/images/toolkits/bfl.svg?fit=max\&auto=format\&n=6S5R4NszqpnVIZRD\&q=85\&s=3f47fecbd68375464fcbf001e74e17fa)

* **Category:** media generation
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 14
* **Triggers:** 0
* **Slug:** `BFL`
* **Version:** 20261101\_00
* **Instant:** Supported on the latest version. Support varies by tool.

## Tools

> [accordion] Deblur Image
>
> **Slug:** `BFL_DEBLUR_IMAGE`
>
> Submit a paid asynchronous deblurring of an authorized image. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting.
>
> #### Input Parameters
>
> **seed** `integer`
>
> Optional deterministic seed for reproducibility.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **image** `string` *required*
>
> Authorized base64 image or HTTP(S) image URL to restore. Use only media you own or are authorized to process.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 5 (least strict). Keep the default unless authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Edit Video
>
> **Slug:** `BFL_EDIT_VIDEO`
>
> Submit a paid asynchronous prompt-directed edit of an authorized source video. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting for or downloading the result.
>
> #### Input Parameters
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **video** `string` *required*
>
> Authorized HTTP(S) video URL or base64 MP4 to edit. Use only media you own or are authorized to transform.
>
> **prompt** `string` *required*
>
> Specific edit instruction for the source video.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 4, subject to stricter provider harm-class caps.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Erase Image Object
>
> **Slug:** `BFL_ERASE_IMAGE_OBJECT`
>
> Submit a paid asynchronous removal of a masked object from an authorized image. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting for or downloading the result.
>
> #### Input Parameters
>
> **mask** `string` *required*
>
> Same-size authorized black-and-white mask as base64 or an HTTP(S) image URL. White selects removal and black preserves pixels.
>
> **seed** `integer`
>
> Optional deterministic seed for reproducible output.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **image** `string` *required*
>
> Authorized base64 image or HTTP(S) image URL to edit. Use only media you own or are authorized to transform.
>
> **dilate\_pixels** `integer`
>
> Pixels by which to expand the white mask to cover object edges.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 5 (least strict). Keep the default unless authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Fine-Tuned Image
>
> **Slug:** `BFL_GENERATE_FINETUNED_IMAGE`
>
> Submit a paid asynchronous FLUX fine-tuned image generation using an existing LoRA. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting for or downloading the result.
>
> #### Input Parameters
>
> **seed** `integer`
>
> Optional deterministic seed; omit for a random seed.
>
> **prompt** `string`
>
> Text description of the image to generate.
>
> **finetune\_id** `string` *required*
>
> LoRA name to use; for a shared LoRA use org-id/lora-name.
>
> **aspect\_ratio** `string`
>
> Output aspect ratio between 21:9 and 9:21.
>
> **image\_prompt** `string`
>
> Optional authorized image as base64 used to guide or remix the result. Use only media you own or are authorized to process.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 6 (least strict). Keep the default unless the use case is authorized and policy-compliant.
>
> **finetune\_strength** `number`
>
> LoRA influence from 0 (none) to 2; 1 represents full influence.
>
> **prompt\_upsampling** `boolean`
>
> Allow BFL to expand the prompt for more creative output.
>
> **image\_prompt\_strength** `number`
>
> Blend strength of image\_prompt relative to the text prompt.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate or Edit FLUX.2 Klein Image
>
> **Slug:** `BFL_GENERATE_OR_EDIT_FLUX_2_KLEIN_IMAGE`
>
> Submit a paid asynchronous FLUX.2 Klein image generation or authorized reference-image edit with the stable 4B or 9B model. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting for or downloading the result.
>
> #### Input Parameters
>
> **seed** `integer`
>
> Optional deterministic seed; omit for a random seed.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **model** `string ("klein_4b" | "klein_9b")`
>
> Klein model size. Use klein\_4b for lower cost and latency, or klein\_9b when higher model capacity is needed.
>
> **width** `integer`
>
> Output width in pixels; 0 lets BFL choose, otherwise use at least 64.
>
> **height** `integer`
>
> Output height in pixels; 0 lets BFL choose, otherwise use at least 64.
>
> **prompt** `string` *required*
>
> Text description of the image or requested edits.
>
> **input\_images** `array`
>
> Optional ordered authorized reference images, each an HTTP(S) URL or base64 image. Omit for text-only generation. Use only media you own or are authorized to process.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 5 (least strict). Keep the default unless the use case is authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate or Edit Image
>
> **Slug:** `BFL_GENERATE_OR_EDIT_IMAGE`
>
> Submit a paid asynchronous FLUX 3 image generation or authorized reference-image edit; some connections support text-to-image only. Returns a task ID and exact polling URL without waiting for or downloading the result; moderation may end the task without media, and result URLs expire quickly.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** From \$0.041 per image (768²) up to \$0.607 (\~4K²); varies with size.
>
> #### Input Parameters
>
> **images** `array`
>
> Optional authorized reference images, each an HTTP(S) URL or base64 image. Omit for text-only generation. Use only media you own or are authorized to process.
>
> **prompt** `string` *required*
>
> Free-form description of the image or edits to make.
>
> **grounding** `boolean`
>
> Allow external web and image search grounding. Set false when the request must not use external research.
>
> **resolution** `string ("768sq" | "1k" | "1.5k" | "2k" | "4k")`
>
> Equal-pixel-area output resolution tier; exact dimensions depend on the aspect ratio, and higher tiers generally cost more.
>
> **aspect\_ratio** `string ("auto" | "21:9" | "2:1" | "16:9" | "3:2" | "7:5" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "5:7" | "2:3" | "9:16" | "1:2" | "9:21")`
>
> Output aspect ratio. auto follows prompt or reference-image framing when possible.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 4 (least strict). Keep the default unless the use case is authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Video
>
> **Slug:** `BFL_GENERATE_VIDEO`
>
> Submit a paid asynchronous FLUX 3 video task from text, authorized keyframes, a source video, or a prior draft cache. Returns a task ID and exact polling URL without waiting for outputs; some connections require a fixed duration, exclude draft enhancement, and cap request prices at \$2.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** Starts at \$0.06 per output second for HD drafts; full-render price varies by mode and resolution. Eligible fixed-duration requests have a published price of at most \$2.
>
> #### Input Parameters
>
> **mode** `string ("text_to_video" | "image_to_video" | "continue_video" | "enhance_draft")`
>
> Video workflow: generate from text, animate keyframes, continue a source clip, or render a saved draft cache at full quality.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **draft** `boolean`
>
> Generate a faster preview whose result includes a short-lived draft\_cache URL for later full-quality enhancement. Requires resolution hd.
>
> **prompt** `string`
>
> Video description. Required except in enhance\_draft mode.
>
> **duration** `string`
>
> Whole output seconds or auto. Text/image modes allow 5-20; continue\_video allows 5-15. Not used for enhance\_draft.
>
> **keyframes** `array`
>
> One to ten authorized image URLs/base64 values. Use either all plain images or all \[seconds, image] pairs in strictly increasing order from 0 to 20 seconds. Three or more plain images require an integer duration. Required for image\_to\_video. Use only media you own or are authorized to animate.
>
> **resolution** `string ("hd" | "fhd" | "qhd" | "uhd")`
>
> Output resolution tier. Higher tiers use an upscaling finish and generally cost more; enhance\_draft defaults to fhd.
>
> **draft\_cache** `string`
>
> Base64 .bin bundle downloaded from a prior draft result, or its still-valid HTTPS URL. Required for enhance\_draft; preserve this provider-generated bundle unchanged.
>
> **start\_video** `string`
>
> Authorized HTTP(S) URL or base64 MP4 to continue from its final frames. Required for continue\_video.
>
> **aspect\_ratio** `string ("auto" | "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "9:21")`
>
> Output aspect ratio for text/image/continue modes.
>
> **generate\_audio** `boolean`
>
> Generate synchronized audio in text/image/continue modes.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 4 (least strict); BFL caps some harm classes below this value. Keep the default unless authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Credit Balance
>
> **Slug:** `BFL_GET_CREDITS`
>
> Return the connected BFL project's current credit balance so funds can be checked before a paid generation or editing request.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Fine-Tune
>
> **Slug:** `BFL_GET_FINETUNE`
>
> Return details for one BFL fine-tune by ID; an absent or inaccessible fine-tune is reported as not found without distinguishing access denial.
>
> #### Input Parameters
>
> **finetune\_id** `string` *required*
>
> Fine-tune name or ID returned by List Fine-Tunes.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Generation Result
>
> **Slug:** `BFL_GET_GENERATION_RESULT`
>
> Fetch one status update for an asynchronous BFL task using its exact returned polling URL or task ID. Returns pending, moderation, error, not-found, and ready states without looping, downloading media, or incurring a new generation charge.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** \$0 per request
>
> #### Input Parameters
>
> **task\_id** `string`
>
> A polling target is required. Set task\_id only when polling\_url is omitted. This ID is polled on the configured BFL API origin; use it only when the exact polling\_url is unavailable.
>
> **polling\_url** `string`
>
> A polling target is required. Set polling\_url only when task\_id is omitted. Use the exact polling\_url returned by a BFL submission; it is preferred because regional tasks may not resolve on the global host. Only an HTTPS BFL API polling URL with the fixed /v1/get\_result path is accepted.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Fine-Tunes
>
> **Slug:** `BFL_LIST_FINETUNES`
>
> Return the fine-tune IDs created by the user in one unpaginated response.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Outpaint Image
>
> **Slug:** `BFL_OUTPAINT_IMAGE`
>
> Submit a paid asynchronous expansion of an authorized image onto a canvas of at most 4,194,304 pixels; fast mode requires base64, while high mode also accepts HTTP(S) URLs. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting for or downloading the result.
>
> #### Input Parameters
>
> **mode** `string ("high" | "fast")`
>
> Quality and speed trade-off: high favors fidelity and accepts base64 or HTTP(S) input images; fast reduces latency for simpler backgrounds and textures but requires a base64 input image.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **width** `integer` *required*
>
> Target canvas width in pixels. Width multiplied by height must not exceed 4,194,304 pixels.
>
> **height** `integer` *required*
>
> Target canvas height in pixels. Width multiplied by height must not exceed 4,194,304 pixels.
>
> **prompt** `string`
>
> Experimental text guidance for the expanded region; the source image remains the primary signal.
>
> **auto\_crop** `boolean`
>
> Crop source pixels outside the canvas instead of failing.
>
> **input\_image** `string` *required*
>
> Authorized source image to expand. Use base64 for either mode; HTTP(S) URLs are supported only in high mode. Use only media you own or are authorized to transform.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 5 (least strict). Keep the default unless authorized and policy-compliant.
>
> **reference\_offset\_x** `integer`
>
> Left offset of the source on the target canvas; negative values are allowed. Omit to center horizontally.
>
> **reference\_offset\_y** `integer`
>
> Top offset of the source on the target canvas; negative values are allowed. Omit to center vertically.
>
> **disable\_prompt\_upsampling** `boolean`
>
> Skip image-aware prompt expansion for lower latency, potentially reducing quality.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Upscale Video
>
> **Slug:** `BFL_UPSCALE_VIDEO`
>
> Submit a paid asynchronous upscale for the first 20 seconds of an authorized video, with an optional content prompt and 1.5x–3x scale target; BFL charges per output megapixel-second. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting.
>
> #### Input Parameters
>
> **user** `string`
>
> Optional opaque end-user identifier; do not send personal data.
>
> **prompt** `string`
>
> Optional content description that steers enhanced detail; leave empty for neutral upscaling.
>
> **creativity** `integer ("0" | "1")`
>
> 0 preserves the source closely; 1 permits creative detail enhancement.
>
> **input\_video** `string` *required*
>
> Authorized base64 MP4 up to 50 MB or HTTP(S) video URL, at most 2560x1440 per frame. Only the first 20 seconds are upscaled. Use only media you own or are authorized to process.
>
> **upscale\_factor** `number`
>
> Requested scale factor from 1.5 to 3. Output preserves the source aspect ratio and is capped at 13.75 megapixels per frame.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 4, subject to stricter provider harm-class caps.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Virtual Try-On
>
> **Slug:** `BFL_VIRTUAL_TRY_ON`
>
> Submit a paid asynchronous virtual try-on using authorized person and garment images. Returns the task ID and exact polling URL, with a quoted cost when available, without waiting.
>
> #### Input Parameters
>
> **seed** `integer`
>
> Optional deterministic seed.
>
> **user** `string`
>
> Optional opaque end-user identifier for provider-side attribution; do not send personal data.
>
> **prompt** `string` *required*
>
> Try-on instruction. For a direct garment transfer, use 'TRY-ON: The person of image 1 wearing the garments of image 2.'; add only non-deceptive styling context.
>
> **person\_image** `string` *required*
>
> Authorized image of the person, as an HTTP(S) URL or base64. Obtain consent from the depicted person and do not use for deceptive impersonation or sensitive decisions.
>
> **garment\_image** `string` *required*
>
> Authorized garment image as an HTTP(S) URL or base64.
>
> **output\_format** `string ("jpeg" | "png" | "webp")`
>
> Generated image format.
>
> **safety\_tolerance** `integer`
>
> Moderation tolerance from 0 (strictest) to 5. Keep the default unless authorized and policy-compliant.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
