Flux CLI
A command-line tool for AI image generation and editing using Flux through the AceDataCloud platform.
Features
- Text-to-Image Generation — Generate images from text prompts with multiple Flux models
- Image Editing — Edit existing images using text descriptions (kontext models)
- Task Management — Query status, batch check, and poll for completion
- Multiple Models — flux-dev, flux-pro, flux-kontext-pro, flux-kontext-max, flux-2-flex, flux-2-pro, flux-2-max, flux-2-klein
- Rich Output — Beautiful terminal formatting with
--jsonfor scripting
Installation
pip install flux-pro-cli
Quick Start
# Set your API token
export ACEDATACLOUD_API_TOKEN=your_token_here
# Generate an image
flux generate "A majestic mountain landscape at golden hour, photorealistic"
# Generate with a specific model
flux generate "Cyberpunk city with neon lights" -m flux-2-pro
# Generate with aspect ratio (ultra/kontext models)
flux generate "Minimalist logo of a phoenix" -m flux-2-max -s 16:9
# Generate multiple images
flux generate "A red car" --count 2
# Edit an existing image
flux edit "Add sunglasses to the person" --image-url https://example.com/photo.jpg
# Edit with max context model
flux edit "Change background to sunset beach" --image-url https://example.com/img.png -m flux-kontext-max
# Check task status
flux task abc123-def456
# Wait for task completion
flux wait abc123 --interval 5 --timeout 300
# Batch check multiple tasks
flux tasks task-1 task-2 task-3
Commands
| Command | Description |
|---|---|
generate |
Generate an image from a text prompt |
edit |
Edit an existing image with a text prompt |
task |
Query a single task status |
tasks |
Query multiple tasks at once |
wait |
Wait for a task to complete |
models |
List available Flux models |
aspect-ratios |
List available aspect ratios |
config |
Show current configuration |
Models
| Model | Type | Size Input | Notes |
|---|---|---|---|
flux-dev |
Dev | Pixels | Fast, good balance (default) |
flux-pro |
Pro | Pixels | Higher quality |
flux-kontext-pro |
Kontext | Aspect ratio | Best for editing/style transfer |
flux-kontext-max |
Kontext | Aspect ratio | Max context for complex edits |
flux-2-flex |
Flux 2 | Pixels | Fast Flux 2 generation |
flux-2-pro |
Flux 2 | Pixels | Higher quality Flux 2 generation |
flux-2-max |
Flux 2 | Pixels | Maximum quality Flux 2 generation |
flux-2-klein |
Flux 2 | Pixels | Compact Flux 2 generation |
JSON Output
All commands support --json for machine-readable output:
flux generate "A red car" --json | jq '.task_id'
flux task abc123 --json | jq '.data[0].image_url'
Configuration
| Environment Variable | Description | Default |
|---|---|---|
ACEDATACLOUD_API_TOKEN |
API authentication token | (required) |
ACEDATACLOUD_API_BASE_URL |
API base URL | https://api.acedata.cloud |
FLUX_REQUEST_TIMEOUT |
Request timeout in seconds | 1800 |
You can also use a .env file or pass --token directly.
Docker
docker compose run flux-cli generate "A beautiful sunset"
Development
# Install with dev dependencies
pip install -e ".[all]"
# Run tests
pytest
# Run linter
ruff check .
ruff format --check .
License
MIT License - see LICENSE for details.
Links
FLUX 3 video
Save a JSON request such as {"action":"generate","mode":"t2v","prompt":"Waves at sunset","duration":5,"generate_audio":false} in request.json, then run flux video --request-file request.json. The request is validated before submission. Use i2v with keyframes, v2v with start_video, or draft_enhance with an owned platform draft_task_id. Draft availability is temporary.
Use flux video-edit --request-file edit.json with video and prompt, or flux video-upscale --request-file upscale.json with input_video, optional upscale_factor (1.5–3) and creativity (0/1). Upscale charges depend on actual output MP-seconds and frame rate. Commands output JSON and default to asynchronous submission; use flux task/flux wait to retrieve final video delivery. Set async=false in the request to wait synchronously.
All video operations use POST /flux/videos: action=generate (default), action=edit, or action=upscale. Generation additionally uses mode=t2v/i2v/v2v/draft_enhance. Each operation accepts only its own fields. The CLI utility commands and MCP utility tools set their matching action automatically.
The unified flux video --request-file request.json command also accepts editing and upscaling JSON when action is set explicitly. The video-edit and video-upscale commands remain convenient ways to submit those actions to the same endpoint.
Metadata
Release files for flux-pro-cli 2026.10.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flux_pro_cli-2026.10.1.0.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flux_pro_cli-2026.10.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.0 kB
Release files / flux_pro_cli-2026.10.1.0.tar.gz
| Download URL | flux_pro_cli-2026.10.1.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4de5e3aa06ae568210571814c6062d203d4a065d5d5b600990363f0af0777b4
|
|
BLAKE2b-256 checksum How to use checksums |
b17c9b32367d10254801ca31d02681bbe33224a316fbc575ba6a08181b565a7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / flux_pro_cli-2026.10.1.0-py3-none-any.whl
| Download URL | flux_pro_cli-2026.10.1.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba59309cf8455d1a2eddc88605d82edeac0941b98115b26c871a2c8e5c4e25a6
|
|
BLAKE2b-256 checksum How to use checksums |
2a748086f3cb3174370148b18138f26c84b6ccdc9549ddf342d1d78c563ce70a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|