Skip to main content
Glama
runapi-ai

@runapi.ai/flux-kontext-mcp

by runapi-ai

text_to_image

Generate images from English text prompts via RunAPI, returning a task ID, status, and output URLs for tracking results and downloads.

Instructions

Create a Flux Kontext 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 (English only). Declared type: string.
watermarkNoWatermark identifier. Declared type: string.
timeout_msNo
aspect_ratioNoOutput aspect ratio. Default: 16:9. Declared type: string. Known values: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16".
callback_urlNoWebhook URL for async notifications. Declared type: string.
output_formatNoOutput format. Default: jpeg. Declared type: string. Known values: "jpeg", "png".
poll_interval_msNo
safety_toleranceNoContent safety threshold. 0-6 for generation, 0-2 for editing. Default: 2. Declared type: integer.
source_image_urlNoSource image URL for editing mode. Declared type: string.
enable_translationNoAuto-translate non-English prompts. Default: true. Declared type: boolean.
enable_prompt_expansionNoExpand the prompt with more detail. Default: false. Declared type: boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.2.0
    • addedInput schema / additionalProperties
      Added value: +{}
    • removedInput schema / properties / aspect_ratio / anyOf
      Removed value: -[
      -  {
      -    "const": "21:9",
      -    "type": "string"
      -  },
      -  {
      -    "const": "16:9",
      -    "type": "string"
      -  },
      -  {
      -    "const": "4:3",
      -    "type": "string"
      -  },
      -  {
      -    "const": "1:1",
      -    "type": "string"
      -  },
      -  {
      -    "const": "3:4",
      -    "type": "string"
      -  },
      -  {
      -    "const": "9:16",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"Output aspect ratio. Default: 16:9."New value: +"Output aspect ratio. Default: 16:9. Declared type: string. Known values: \"21:9\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\"."
    • addedInput schema / properties / aspect_ratio / type
      Added value: +"string"
    • 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_prompt_expansion / description
      Previous value: -"Expand the prompt with more detail. Default: false."New value: +"Expand the prompt with more detail. Default: false. Declared type: boolean."
    • changedInput schema / properties / enable_translation / description
      Previous value: -"Auto-translate non-English prompts. Default: true."New value: +"Auto-translate non-English prompts. Default: true. Declared type: boolean."
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "flux-kontext-max",
      -  "flux-kontext-pro"
      -]
    • removedInput schema / properties / output_format / anyOf
      Removed value: -[
      -  {
      -    "const": "jpeg",
      -    "type": "string"
      -  },
      -  {
      -    "const": "png",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / output_format / description
      Previous value: -"Output format. Default: jpeg."New value: +"Output format. Default: jpeg. Declared type: string. Known values: \"jpeg\", \"png\"."
    • addedInput schema / properties / output_format / type
      Added value: +"string"
    • changedInput schema / properties / prompt / description
      Previous value: -"Image description (English only)."New value: +"Image description (English only). Declared type: string."
    • changedInput schema / properties / safety_tolerance / description
      Previous value: -"Content safety threshold. 0-6 for generation, 0-2 for editing. Default: 2."New value: +"Content safety threshold. 0-6 for generation, 0-2 for editing. Default: 2. Declared type: integer."
    • changedInput schema / properties / safety_tolerance / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / source_image_url / description
      Previous value: -"Source image URL for editing mode."New value: +"Source image URL for editing mode. Declared type: string."
    • changedInput schema / properties / watermark / description
      Previous value: -"Watermark identifier."New value: +"Watermark identifier. Declared type: string."
  2. Changed9 schema fields changedv0.1.13
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / aspect_ratio / anyOf
      Added value: +[
      +  {
      +    "const": "21:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "16:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "4:3",
      +    "type": "string"
      +  },
      +  {
      +    "const": "1:1",
      +    "type": "string"
      +  },
      +  {
      +    "const": "3:4",
      +    "type": "string"
      +  },
      +  {
      +    "const": "9:16",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "21:9",
      -  "16:9",
      -  "4:3",
      -  "1:1",
      -  "3:4",
      -  "9:16"
      -]
    • removedInput schema / properties / aspect_ratio / type
      Removed value: -"string"
    • addedInput schema / properties / output_format / anyOf
      Added value: +[
      +  {
      +    "const": "jpeg",
      +    "type": "string"
      +  },
      +  {
      +    "const": "png",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / output_format / enum
      Removed value: -[
      -  "jpeg",
      -  "png"
      -]
    • removedInput schema / properties / output_format / type
      Removed value: -"string"
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  3. Changed9 schema fields changedv0.1.11
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Output aspect ratio. Default: 16:9."
    • addedInput schema / properties / callback_url / description
      Added value: +"Webhook URL for async notifications."
    • addedInput schema / properties / enable_prompt_expansion / description
      Added value: +"Expand the prompt with more detail. Default: false."
    • addedInput schema / properties / enable_translation / description
      Added value: +"Auto-translate non-English prompts. Default: true."
    • addedInput schema / properties / output_format / description
      Added value: +"Output format. Default: jpeg."
    • addedInput schema / properties / prompt / description
      Added value: +"Image description (English only)."
    • addedInput schema / properties / safety_tolerance / description
      Added value: +"Content safety threshold. 0-6 for generation, 0-2 for editing. Default: 2."
    • addedInput schema / properties / source_image_url / description
      Added value: +"Source image URL for editing mode."
    • addedInput schema / properties / watermark / description
      Added value: +"Watermark identifier."
  4. Changed5 schema fields changedv0.1.2
    • addedInput schema / properties / callback_url / type
      Added value: +"string"
    • addedInput schema / properties / prompt / type
      Added value: +"string"
    • addedInput schema / properties / source_image_url / type
      Added value: +"string"
    • addedInput schema / properties / watermark / type
      Added value: +"string"
    • addedInput schema / required
      Added value: +[
      +  "prompt"
      +]
  5. First observedv0.1.0

TDQS

B3.3/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. It does disclose the return shape ('task id, status, and output URLs'), which is valuable since there is no output schema. However, it omits async/polling behavior, the meaning of the wait flag, cost implications (check_pricing is a sibling), and auth requirements, leaving meaningful behavioral gaps.

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

Conciseness5/5

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

Two tightly written sentences with zero filler, and the core action is front-loaded before the return-value note. Nothing is padded or redundant.

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?

For a 13-parameter generation tool with no annotations and no output schema, the definition is minimal. It covers the return values, which partly compensates for the missing output schema, but leaves async behavior, credits/cost, editing mode, and usage routing 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 high at 85%, so the schema already documents most of the 13 parameters including defaults and known values. The description adds essentially no parameter-level meaning beyond the schema, which is the expected baseline when the schema does the heavy lifting.

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 Kontext task on RunAPI (text to image)'. This clearly tells the agent it initiates an image generation task. It does not, however, name or differentiate itself from siblings like get_task, so an agent must infer that this is the creation step versus the retrieval step.

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?

The description offers no when-to-use guidance, no mention of alternatives such as get_task for polling or check_pricing for cost, and no note that the tool also supports an editing mode via source_image_url despite being labeled 'text to image'. The agent gets no routing information.

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