The FLUX API is provided by PiAPI and is designed to integrate Black Forest Labs' open-source visual generation models into developer products. The API covers the FLUX.1-Pro, FLUX.1-Schnell, and FLUX.1-Dev models in the FLUX.1 series; PiAPI currently mainly provides the Flux-dev API and Flux-schnell API.
In terms of main capabilities, the FLUX API supports text-to-image generation and is the first to offer image-to-image generation functionality. Developers can use the seed parameter to control randomness, specify the number of images generated each time via the num_outputs parameter (default 1 image), and adjust the aspect ratio of output images via the aspect_ratio parameter. The API uses an asynchronous call design and supports a 'submit then poll' task mode. Advanced features include LoRA, ControlNet, inpainting/outpainting (inpaint/outpaint), redux-variation, and Kontext, but these features require a Creator or higher subscription plan.
In terms of usage, developers need to register a PiAPI workspace and obtain an API key; free credits are granted upon registration. Then, following the API documentation, POST the first task and poll the task until the result is ready. Before formal integration, you can experiment with prompts and parameter settings in the Playground. Billing uses a pay-per-image model with no subscription required, and supports manual or automatic top-up. For batch generation, contact Discord for quotes and timelines.
Applicable scenarios include batch generation of custom images for websites, frontends, applications, or projects, as well as image generation needs in fields such as entertainment, education, product design, and scientific visualization.
In terms of limitations, the FLUX.1-Schnell model uses the Apache 2.0 license, and images generated by it can be used for commercial purposes; while images generated by the FLUX.1-Dev model cannot be used commercially, because BFL restricts the model to non-commercial use. PiAPI does not provide refunds, but new users can receive free credits for trial upon registration.