Skip to main content

Flux CLI

A command-line tool for AI image generation and editing using Flux through the AceDataCloud platform.

Get your Ace Data Cloud API key

  1. Open Ace Data Cloud → Applications. Sign in, or register an account first.
  2. Find General application. If it has not been created, choose Initialize General Application. A general key can use the services available to your account; a dedicated application's key is limited to its service. Check the required service/model access and current pricing.
  3. Copy the API Key from the application card, or open Keys / Manage Keys → Create to create a separate key for this integration. Give it a recognizable name so you can revoke or rotate it independently.
  4. When creating a key, review Expiration Time, Set Usage Limitation, and Allowed APIs. Enable only the restrictions you need, allow the operations you will call, then click Create and copy the token from the key list. Task lookup does not grant permission to submit a generation. Confirm the application's balance can cover your first request; any trial allowance is whatever your account currently displays.
  5. Copy only the token value, without quotation marks, spaces, or Bearer . An API Key / API Token field expects this raw value; only a manually configured HTTP Authorization header needs the Bearer prefix. A platform-... account-management token cannot replace a generation API key.

Copy an application API key or open Manage Keys

Create a separately named key with optional restrictions

Save the key in the client's credential store or the environment variable shown below. Never put it in a prompt, shared workflow, screenshot, or Git commit. If authentication fails, check the full copied value, application/service access, expiration, usage limit, and balance before creating another key.

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.

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.

Video generation uses POST /flux/videos with action=generate (default) and mode=t2v/i2v/v2v/draft_enhance. The flux video --request-file request.json command validates the generation mode and outputs JSON. Requests are asynchronous by default; use flux task/flux wait for final delivery. Set async=false to wait synchronously.

Metadata

Release files for flux-pro-cli 2026.10.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flux-pro-cli 2026.10.12.0
File Size Uploaded
flux_pro_cli-2026.10.12.0.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flux-pro-cli 2026.10.12.0
File Interpreter ABI Platform
flux_pro_cli-2026.10.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / flux_pro_cli-2026.10.12.0.tar.gz

Download URL flux_pro_cli-2026.10.12.0.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d0153e7ec1dbb57ee25d00e91aeb0ababe197fa2a970a71701f7494dcadb9f5
BLAKE2b-256 checksum
How to use checksums
c6b1241d2471bba71f47d38651f1c679c13c1b7f392c61796e9d84204d84f97b
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.12.0-py3-none-any.whl

Download URL flux_pro_cli-2026.10.12.0-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4672db3909e4740b7652aa324e343a7182539d61cb74a431490fe5097a1a27da
BLAKE2b-256 checksum
How to use checksums
a8633c2433f3d939c335971413fd1a96b6b501ba0e69f5022ad4f8cd4ee55119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page