Skip to main content

FLUX.1 API - the state-of-the-art image generation model API!

The open sourceFLUX.1 suite of models (FLUX.1-Pro, FLUX.1-Schnell, and FLUX.1-Dev) from the Black Forest Labsare state-of-the-art text-to-image generative AI model. And now PiAPI is providing Flux-dev API and Flux-schnell API for developers around world at peak performance and cost effective rates!

Est. $0.0015 / image

Our Pricing Plans

Pay per image, no subscription required

Flux-Schnell API

$0.0015 /image

  • 1–4 images per generation
  • Super-resolution: $0.0015/image

Flux-dev API

$0.015 /image

  • Super-resolution: $0.015/image

Flux-dev-advanced

$0.02 /image

  • LoRA · ControlNet · inpaint / outpaint · redux-variation · Kontext
  • Needs Creator or higher subscription plan

Features

Image-to-Image Generation!

PiAPI will be the first to offer image-to-image generation for the FLUX APIs - allow developers and users greater flexibility when generating visuals for a variety use cases.

Seed parameter supported

Num_outputs is a useful parameter that can be used to control the number of outputs to generate. If left unused, the API will use 1 output as the default value.

Aspect_ratio parameter supported

Developers can use this parameter to vary the aspect ratios of output images, making the outputs more suitable in a variety of different use cases!

Asynchronous API Calls

The API will be designed to allow for asynchronous calls, allowing developers to "submit and forget" tasks, and fetch for the task when completed.

Accelerated Hardware Infrastructure

Our accelerated hardware infrastructure is specifically optimized for latent diffusion model inference work, ensuring workloads to be executed with maximum efficiency and minimum latency.

Custom Inference Frameworks

Our custom inference framework used for latent diffusion model workloads focus on optimized runtime performance and resource management, preventing bottlenecks from traditional framework.

Bulk Generation Available

The perfect generation option for developers to populate their websites/frontend/apps/projects with large quantity of custom pictures from custom prompts. Contact us on Discord with your prompts and we will get back to you with a pricing and a timeline!

Simple and Flexible Payment Plans

Our Pay-as-you-go option allows developers to test the API with free credits, and purchase credits for consumption, and manually or automatically top-up their credits as their usage varies.

Commercial Use

Given the Apache2.0 license of the FLUX.1-schnell model, all images generated from our API using that model will be available for commercial use as needed by the developers or the end-users.

Integrate in Minutes

Create your API key

Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.

Top up credits

Add credits on the billing page when you are ready to scale beyond the free tier.

Call the API

POST your first task following the API docs, then poll the task until the result is ready.

Iterate in the playground

Prototype prompts and settings in the the playground above before wiring them into your product.

curl -X POST 'https://api.piapi.ai/api/v1/task' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "Qubico/flux1-schnell",
    "task_type": "txt2img",
    "input": {
      "prompt": "A cat sitting on a windowsill watching rain fall outside, soft lighting, cozy and peaceful mood.",
      "width": 1024,
      "height": 1024
    }
  }'

# → { "task_id": "9d5a…", "status": "pending" }

Frequently asked questions

What is the FLUX API?

The FLUX API are offered by PiAPI based on the FLUX.1-dev model and FLUX.1-schnell model. Given our accelerated hardware infrastructure and custom-developed inference framework, PiAPI is able provide APIs for these two models at very market competitive costs while maintaining performance and minimizing latency!

What type of images can I generate with FLUX.1 API?

With the recent ELO score information for the FLUX-dev and FLUX-schnell model both exceeding than that of Midjourney, the possibility of using API for image generation is quite endless. It is expected that it would be significantly impacting industries ranging from entertainment, education, product design all the way to scientific visualization.

Can I use images generated from the FLUX-dev API for commercial purposes?

Given the Apache2.0 license of the FLUX.1-schnell model, all images generated from our API using that model will be available for commercial use as needed by the developers or the end-users. However, images generated from the API for FLUX.1-dev model will not be available for commercial use since BFL has limited that model to non-commercial use only.

Are there refunds?

No, we do not offer refunds. But when you first sign up for an account on PiAPI's Workspace, you will be given free credits to try our API before making payments!

How can I get in touch with your team?

Please email us at support@piapi.ai - we'd love to talk more regarding our product offering!

More questions? See the API docs.

Our blog

Flux API