Skip to main content
Glama
runapi-ai

@runapi.ai/flux-2-mcp

Official
by runapi-ai

text_to_image

Generate Flux 2 images from a text prompt on RunAPI; get a task ID, status, and output URLs.

Instructions

Create a Flux 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.

Input Schema

NameRequiredDescriptionDefault
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesImage description. Declared type: string.
timeout_msNo
aspect_ratioNoOutput aspect ratio. Declared type: string. Known values: "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3".
callback_urlNoWebhook URL for async notifications. Declared type: string.
output_countNoNumber of images to generate. Declared type: integer. Known values: 1.
poll_interval_msNo
output_resolutionNoOutput resolution. Declared type: string. Known values: "1k", "2k".
enable_safety_checkerNoEnable the safety checker. Declared type: boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.3.0
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"Output aspect ratio."New value: +"Output aspect ratio. Declared type: string. Known values: \"1:1\", \"4:3\", \"3:4\", \"16:9\", \"9:16\", \"3:2\", \"2:3\"."
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "1:1",
      -  "4:3",
      -  "3:4",
      -  "16:9",
      -  "9:16",
      -  "3:2",
      -  "2:3"
      -]
    • changedInput schema / properties / callback_url / description
      Previous value: -"Webhook URL for async notifications."New value: +"Webhook URL for async notifications. Declared type: string."
    • changedInput schema / properties / enable_safety_checker / description
      Previous value: -"Enable the safety checker."New value: +"Enable the safety checker. Declared type: boolean."
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "flux-2-flex-text-to-image",
      -  "flux-2-max-text-to-image",
      -  "flux-2-pro-text-to-image"
      -]
    • changedInput schema / properties / output_count / description
      Previous value: -"Number of images to generate."New value: +"Number of images to generate. Declared type: integer. Known values: 1."
    • removedInput schema / properties / output_count / enum
      Removed value: -[
      -  1
      -]
    • changedInput schema / properties / output_count / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / output_resolution / description
      Previous value: -"Output resolution."New value: +"Output resolution. Declared type: string. Known values: \"1k\", \"2k\"."
    • removedInput schema / properties / output_resolution / enum
      Removed value: -[
      -  "1k",
      -  "2k"
      -]
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / prompt / description
      Previous value: -"Image description."New value: +"Image description. Declared type: string."
    • removedInput schema / properties / prompt / maxLength
      Removed value: -5000
    • removedInput schema / properties / prompt / minLength
      Removed value: -3
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  2. Changed11 schema fields changedv0.2.1
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Output aspect ratio."
    • addedInput schema / properties / callback_url
      Added value: +{
      +  "description": "Webhook URL for async notifications.",
      +  "type": "string"
      +}
    • addedInput schema / properties / enable_safety_checker
      Added value: +{
      +  "description": "Enable the safety checker.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "flux-2-flex-text-to-image",
      -  "flux-2-pro-text-to-image"
      -]New value: +[
      +  "flux-2-flex-text-to-image",
      +  "flux-2-max-text-to-image",
      +  "flux-2-pro-text-to-image"
      +]
    • addedInput schema / properties / output_count
      Added value: +{
      +  "description": "Number of images to generate.",
      +  "enum": [
      +    1
      +  ],
      +  "type": "number"
      +}
    • addedInput schema / properties / output_resolution / description
      Added value: +"Output resolution."
    • addedInput schema / properties / prompt / description
      Added value: +"Image description."
    • addedInput schema / properties / prompt / maxLength
      Added value: +5000
    • addedInput schema / properties / prompt / minLength
      Added value: +3
    • addedInput schema / properties / prompt / type
      Added value: +"string"
    • addedInput schema / required
      Added value: +[
      +  "prompt"
      +]
  3. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the async task model by stating it returns a task id, status, and output URLs. However, it omits key behavior: that the default `wait: true` blocks and polls, timeout/poll-interval semantics, callback usage, and any auth or rate-limit constraints.

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?

Two tight sentences with the action front-loaded and zero filler. It is efficiently sized, though the second sentence could carry more operational detail without bloat.

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?

There is no output schema, and the description partially compensates by naming the return fields (task id, status, output URLs). However, for a 10-parameter async generation tool with no annotations, it leaves the polling/waiting workflow, callback behavior, and timeout handling unexplained.

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 80%, so the schema already documents most parameters, establishing a baseline of 3. The description adds no per-parameter meaning (e.g., when to set `wait` vs `callback_url`, or timeout behavior), so it does not exceed that baseline.

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

Purpose4/5

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

States a specific verb and resource ("Create a Flux 2 task") and clarifies the modality with "(text to image)", which distinguishes it from remix_image and get_task. It does not explicitly contrast itself with those siblings, so it falls short of a 5.

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

Usage Guidelines2/5

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

No guidance on when to use this versus remix_image or when to poll with get_task, and no mention of the prerequisites (API credentials, model slug). The only implicit signal is the returned task id, which an agent must infer to pair with get_task.

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

Deploy Server

Other Tools