Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
prithivMLmods 
posted an update Nov 8
Post
3526
FLUX 1.1 [pro] Ultra : API - { 4x Higher Image Resolutions }
Upto - 4 Megapixels, 10 seconds per sample. { Hi - Res }

{ Blog Post ⛵ } : https://huggingface.co/blog/prithivMLmods/flux-pro-endpoint

Endpoint Creation Step by Step: 🧵
-> Sign up to { api.bfl.ml } & get your api's: https://api.bfl.ml/auth/profile
-> File Structure:
flux_image_generation/
├── .env
├── generate_image.py
└── requirements.txt

-> Step 0: Add Your API Key to an Environment File
{ .env }
BFL_API_KEY=your_actual_api_key_here

-> Step 1: Install Required Libraries
{ requirements.txt }
requests
python-dotenv

-> Step 2: Setup the Python Script
{ generate_image.py} - https://github.com/PRITHIVSAKTHIUR/Flux-API/blob/main/generate_image.py

-> Step3: Install the requirements & Run the Script
pip install -r requirements.txt

python generate_image.py

-> Polling: The script polls the API every 0.5 seconds until the image generation result is ready. That's it the script also checks for a successful response after submitting the request.

For more visit:
🔺for script: https://github.com/PRITHIVSAKTHIUR/Flux-API/tree/main
🔺bfl doc: https://docs.bfl.ml/quick_start/gen_image/#__tabbed_1_2

Endpoints for image generation: 🧵
-> /flux-pro-1.1-ultra
-> /flux-pro-1.1
-> /flux-pro
-> /flux-dev

Each ID has 50 free credits available for use, based on the cost per image sample generated by the model.

.
.
.
@prithivMLmods 🤗

Old man

·

a717677a-6fd5-445a-baf4-3cd81cadf4c9.jpeg