Skip to main content

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 --json for 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flux_pro_cli-2026.8.17.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flux_pro_cli-2026.8.17.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file flux_pro_cli-2026.8.17.0.tar.gz.

File metadata

  • Download URL: flux_pro_cli-2026.8.17.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for flux_pro_cli-2026.8.17.0.tar.gz
Algorithm Hash digest
SHA256 02e403809cb09b6f7afc9d1d63a5dffe410ce1dd6fd528789e36b4bbddbd263e
MD5 c9b8e2a0036e1023ae5f470a798e093e
BLAKE2b-256 661754d1daafcaab3ad073304d04c397d8f13b1948ab1ca7472e6fc851b9de00

See more details on using hashes here.

File details

Details for the file flux_pro_cli-2026.8.17.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flux_pro_cli-2026.8.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe34d6723bd5c52ee3a1a618ecd5d3beca0edc7392d226800a0987be19f90fb3
MD5 87d3947a304b518086f309da5ef5a4eb
BLAKE2b-256 ec104a72b1cbd3a21fbdcf5c3eac9d195d0252602cf04284f2a47ded60f78baf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page