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
| Model | Flux 2 Flex |
| Provider | fal.ai (Black Forest Labs) |
| Type | image generation |
| CLI Slug | flux2-flex |
| Resolutions | 1024x1024, 1024x768, 768x1024 |
| Aspect Ratios | 1:1, 4:3, 3:4, 16:9, 9:16 |
| Input Types | Text prompt |
| Credit Cost | 25-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" --syncGenerate a widescreen background
agent-media generate flux2-flex -p "Abstract colorful background pattern" --aspect-ratio 16:9 --syncGenerate design assets quickly
agent-media generate flux2-flex -p "Minimalist icon set, flat design" --syncStrengths
- 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"