image
fal.ai (Black Forest Labs)

Flux 2 Flex

Flux 2 Flex is the fast, cost-effective image generation model from Black Forest Labs. It trades some quality for significantly faster generation speed and lower credit cost. Ideal for rapid prototyping and bulk generation.

Quick Start with Flux 2 Flex

Generate images with Flux 2 Flex in 60 seconds.

terminal

$ npm install -g agent-media-cli

$ agent-media login

$ agent-media generate flux2-flex -p "Cute cartoon cat wearing a hat" --sync

Capabilities

Text-to-image generation
Fast generation speed
Cost-effective generation
Multiple aspect ratios
Good prompt adherence

Flux 2 Flex Specifications

ModelFlux 2 Flex
Providerfal.ai (Black Forest Labs)
Typeimage generation
CLI Slugflux2-flex
Resolutions1024x1024, 1024x768, 768x1024
Aspect Ratios1:1, 4:3, 3:4, 16:9, 9:16
Input TypesText prompt
Credit Cost25-50 credits per image

CLI Examples

Real commands you can run right now with agent-media CLI.

Quick illustration generation
agent-media generate flux2-flex -p "Cute cartoon cat wearing a hat" --sync
Generate a widescreen background
agent-media generate flux2-flex -p "Abstract colorful background pattern" --aspect-ratio 16:9 --sync
Generate design assets quickly
agent-media generate flux2-flex -p "Minimalist icon set, flat design" --sync

Strengths

  • Fastest generation time among image models
  • Lowest credit cost per image
  • Good quality-to-speed ratio
  • Reliable and consistent output

Best For

  • Rapid prototyping and iteration
  • Bulk image generation
  • Quick concept exploration
  • Budget-conscious image generation

Use Flux 2 Flex in Claude Code

agent-media CLI works as an MCP server for Claude Code. Add it to your config and generate images with Flux 2 Flex using natural language.

.claude/settings.json
{
  "mcpServers": {
    "agent-media": {
      "command": "npx",
      "args": ["-y", "agent-media-cli", "mcp"],
      "env": {
        "AGENT_MEDIA_API_KEY": "your-api-key"
      }
    }
  }
}

Then ask Claude: "Generate a image with Flux 2 Flex: your prompt here"

Start generating with Flux 2 Flex

Install agent-media CLI and run your first image generation in under 60 seconds.

npm install -g agent-media-cli