This is provided as part of the Flux API from PiAPI. available models:
Qubico/flux1-dev
Qubico/flux1-schnell
Qubico/flux1-dev-advanced Check Flux with LoRA and Controlnet to learn how to send Flux with LoRA and Controlnet task. Check Flux with Redux and Fill to learn how to send Flux with variation, inpaint and out paint task.
Below is an example of a text-to-image request and response.
Request
Header Params
Body Params application/json
Example
{"model":"Qubico/flux1-dev","task_type":"txt2img","input":{"prompt":"a little cat","width":1024,"height":1024}}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.piapi.ai/api/v1/task' \
--header'X-API-Key;' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "Qubico/flux1-dev",
"task_type": "txt2img",
"input": {
"prompt": "a little cat",
"width": 1024,
"height": 1024
}
}'