Skip to main content
Glama

flux_generate_image

Create AI images from a text prompt using Flux models, with selectable sizes or aspect ratios and model options tuned for different speed and quality needs.

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

NameRequiredDescriptionDefault
sizeYesRequired image size. For flux-dev/pro/2-klein, use documented pixel presets such as '1024x1024' or aspect ratios. For flux-2-flex/pro/max and kontext models, use aspect ratios only: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, or 9:21.
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, aspect-ratio sizes only - 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.16
    • changedInput schema / properties / model / description
      Previous value: -"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-2-flex: Flux 2 flexible model, pixel sizes (x >= 64, multiple of 32)\n- flux-2-pro: Flux 2 professional model, high quality\n- flux-2-max: Flux 2 maximum-quality model\n- flux-2-klein: Flux 2 klein model, efficient generation\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"New value: +"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-2-flex: Flux 2 flexible model, aspect-ratio sizes only\n- flux-2-pro: Flux 2 professional model, high quality\n- flux-2-max: Flux 2 maximum-quality model\n- flux-2-klein: Flux 2 klein model, efficient generation\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"
    • changedInput schema / properties / size / description
      Previous value: -"Required image 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'."New value: +"Required image size. For flux-dev/pro/2-klein, use documented pixel presets such as '1024x1024' or aspect ratios. For flux-2-flex/pro/max and kontext models, use aspect ratios only: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, or 9:21."
  2. Changed5 schema fields changedv0.1.9
    • removedInput schema / properties / size / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / size / default
      Removed value: -null
    • changedInput schema / properties / size / description
      Previous value: -"Image 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."New value: +"Required image 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'."
    • addedInput schema / properties / size / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "prompt"
      -]New value: +[
      +  "prompt",
      +  "size"
      +]
  3. Changed2 schema fields changedv0.1.7
    • changedInput schema / properties / model / description
      Previous value: -"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-2-flex: Flux 2 flexible model, pixel sizes (x >= 64, multiple of 32)\n- flux-2-pro: Flux 2 professional model, high quality\n- flux-2-max: Flux 2 maximum-quality model\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"New value: +"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-2-flex: Flux 2 flexible model, pixel sizes (x >= 64, multiple of 32)\n- flux-2-pro: Flux 2 professional model, high quality\n- flux-2-max: Flux 2 maximum-quality model\n- flux-2-klein: Flux 2 klein model, efficient generation\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "flux-dev",
      -  "flux-pro",
      -  "flux-kontext-pro",
      -  "flux-kontext-max",
      -  "flux-2-flex",
      -  "flux-2-pro",
      -  "flux-2-max"
      -]New value: +[
      +  "flux-dev",
      +  "flux-pro",
      +  "flux-kontext-pro",
      +  "flux-kontext-max",
      +  "flux-2-flex",
      +  "flux-2-pro",
      +  "flux-2-max",
      +  "flux-2-klein"
      +]
  4. Changed2 schema fields changedv0.1.6
    • changedInput schema / properties / model / description
      Previous value: -"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-pro-1.1: Improved production model with better prompt following\n- flux-pro-1.1-ultra: Highest quality, supports aspect ratios instead of pixel sizes\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"New value: +"Flux model to use for generation. Options:\n- flux-dev: Fast development model, good balance of speed and quality (default)\n- flux-pro: Higher quality production model\n- flux-2-flex: Flux 2 flexible model, pixel sizes (x >= 64, multiple of 32)\n- flux-2-pro: Flux 2 professional model, high quality\n- flux-2-max: Flux 2 maximum-quality model\n- flux-kontext-pro: Context-aware model for editing and style transfer\n- flux-kontext-max: Maximum context model for complex editing tasks"
    • changedInput schema / properties / size / description
      Previous value: -"Image size. For flux-dev/pro/pro-1.1: pixel dimensions like '1024x1024' (256-1440px, multiples of 32). For flux-pro-1.1-ultra and kontext models: aspect 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."New value: +"Image 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."
  5. Addedv0.1.3
  6. Removedv0.1.2
  7. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden; it does disclose that the call returns a task ID plus image URLs, implying an asynchronous task lifecycle, and the schema exposes a callback_url for async notification. What it omits is any guidance to poll with flux_get_task, cost/rate-limit behavior, or how long results persist — meaningful gaps for an async generation job.

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

Conciseness4/5

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

Front-loaded with the action and well organized into when-to-use bullets and a returns note. The middle paragraph about Flux being a family of models is generic marketing context that partially overlaps the model enum descriptions in the schema, but it is short enough not to be wasteful.

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

Completeness3/5

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

An output schema exists, so return values need not be spelled out, yet the description never mentions the asynchronous task flow or the sibling flux_get_task that an agent needs to fetch results. For a 5-parameter async generation tool with several model variants, it is adequate but leaves the agent's follow-up path implicit.

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?

Schema description coverage is 100%: size presets vs. aspect ratios per model family, the model enum, count, and callback_url are all documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

States a specific verb and resource ('Generate AI images from a text prompt using Flux') and explicitly distinguishes itself from flux_edit_image for the editing case. An agent can route between the two siblings without opening either schema.

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?

Provides an explicit 'Use this when' list of triggering conditions and names the alternative tool (flux_edit_image) with the condition that selects it. This is the strongest form of routing guidance.

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