Skip to main content
Glama

flux_generate_image

Generate AI images from a text prompt using Flux models. Choose from multiple model options, sizes, and counts to create the artwork or photo you need.

Instructions

Generate AI images from a text prompt using Flux.

Flux is a family of fast, high-quality image generation models by Black Forest Labs.
Different models offer different tradeoffs between speed, quality, and capabilities.

Use this when:
- You want to create new images from a text description
- You need high-quality AI-generated artwork or photos
- You want fast image generation with good prompt following

For editing existing images, use flux_edit_image instead.

Returns:
    Task ID and generated image information including URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoImage size. For flux-dev: pixel dimensions like '1024x1024' (256-1440px, multiples of 32). For flux-2-flex/pro/max: pixel dimensions (x >= 64, multiples of 32). For kontext models: image ratios like '1:1', '16:9', '9:16', '4:3', '3:2', '2:3', '4:5', '5:4', '3:4', '21:9', '9:21'. Default varies by model.
countNoNumber of images to generate. Only supported for generate action. Default is 1.
modelNoFlux model to use for generation. Options: - flux-dev: Fast development model, good balance of speed and quality (default) - flux-pro: Higher quality production model - flux-2-flex: Flux 2 flexible model, pixel sizes (x >= 64, multiple of 32) - flux-2-pro: Flux 2 professional model, high quality - flux-2-max: Flux 2 maximum-quality model - flux-2-klein: Flux 2 klein model, efficient generation - flux-kontext-pro: Context-aware model for editing and style transfer - flux-kontext-max: Maximum context model for complex editing tasksflux-dev
promptYesDescription of the image to generate. Be descriptive about style, subject, lighting, and composition. Examples: 'A majestic mountain landscape at golden hour, photorealistic', 'Cyberpunk street scene with neon lights and rain, cinematic', 'Minimalist logo design of a phoenix, vector art style'
callback_urlNoWebhook callback URL for asynchronous notifications. When provided, the API will POST to this URL when the image is generated.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the transparency burden. It does disclose the return value ('Returns: Task ID and generated image information including URLs'), but it does not mention asynchronous behavior, authentication, rate limits, or other operational traits. The return info adds useful context but leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a clear purpose and has a structured layout (use cases, returns). However, the background paragraph about Flux models and the 'Use this when' bullets contain redundant information that is already evident from the tool name and schema, making it slightly more verbose than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, an output schema, and a clear sibling context, the description provides sufficient high-level guidance: when to use, what it does, and what it returns. It lacks explicit notes on asynchronous execution or model-specific recommendations, but the schema compensates for most missing details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% parameter coverage, including detailed descriptions and examples for prompt, size, model, count, and callback_url. The description adds only generic context ('Different models offer different tradeoffs') and does not enhance understanding beyond what the schema already offers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Generate AI images from a text prompt using Flux,' which is a specific verb+resource statement. It further distinguishes itself from sibling tools by ending with 'For editing existing images, use flux_edit_image instead.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides a 'Use this when' section with three clear use cases, and it names the alternative tool for image editing. This gives direct guidance on when to select this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AceDataCloud/FluxMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server