Skip to main content
Glama

text_to_image

Generate images from text prompts via Grok Imagine. Submit a prompt, get task ID, status, and output URLs, with optional polling and webhook support.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesImage generation prompt.
enable_proNoNot accepted by this model.
timeout_msNo
aspect_ratioNoOutput aspect ratio.
callback_urlNoWebhook URL for terminal Task delivery.
poll_interval_msNo
enable_safety_checkerNoNot accepted by this model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.1.13
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / aspect_ratio / anyOf
      Added value: +[
      +  {
      +    "const": "1:1",
      +    "type": "string"
      +  },
      +  {
      +    "const": "2:3",
      +    "type": "string"
      +  },
      +  {
      +    "const": "3:2",
      +    "type": "string"
      +  },
      +  {
      +    "const": "16:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "9:16",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "2:3",
      -  "3:2",
      -  "1:1",
      -  "16:9",
      -  "9:16"
      -]
    • removedInput schema / properties / aspect_ratio / type
      Removed value: -"string"
    • changedInput schema / properties / enable_pro / description
      Previous value: -"Enable Pro image generation mode."New value: +"Not accepted by this model."
    • changedInput schema / properties / enable_safety_checker / description
      Previous value: -"Enable content safety checks."New value: +"Not accepted by this model."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "grok-imagine-text-to-image"
      -]New value: +[
      +  "grok-imagine-image-2-0",
      +  "grok-imagine-text-to-image"
      +]
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / prompt / maxLength
      Removed value: -5000
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  2. Changed6 schema fields changedv0.1.11
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Output aspect ratio."
    • addedInput schema / properties / callback_url
      Added value: +{
      +  "description": "Webhook URL for terminal Task delivery.",
      +  "type": "string"
      +}
    • addedInput schema / properties / enable_pro
      Added value: +{
      +  "description": "Enable Pro image generation mode.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / enable_safety_checker
      Added value: +{
      +  "description": "Enable content safety checks.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prompt
      Added value: +{
      +  "description": "Image generation prompt.",
      +  "maxLength": 5000,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "prompt"
      +]
  3. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

There are no annotations, so the description carries the full burden of disclosing behavior. It states that it returns a task id, status, and output URLs, which hints at an async model, but does not explain the task lifecycle, whether it blocks or polls (a 'wait' parameter exists but is not mentioned), error handling, or side effects. The description under-discloses the operational behavior for a task-creation tool.

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?

The description is a single, front-loaded sentence that immediately states the action and the return values. It is efficient and free of filler. It could be more informative, but conciseness itself is well-executed.

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

Completeness2/5

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

With no output schema, the description must explain the return format, but it only lists the elements without clarifying how the task id is used, when output URLs become available, or how the async workflow operates. It also omits guidance on the wait and callback options, leaving an agent unprepared to manage long-running tasks. The tool has 9 parameters, but the description ignores all of them, making the description incomplete for correct invocation.

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

Parameters2/5

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

Schema description coverage is 78%, leaving two parameters (timeout_ms and poll_interval_ms) undocumented. The description adds no parameter meaning beyond the schema; it does not explain these gaps or provide any parameter context. With moderate coverage, the description should compensate for missing schema details, but it fails to do so.

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 clearly states the action (create), the resource (a Grok Imagine task on RunAPI), and the specific domain (text to image). It differentiates from siblings like text_to_video and edit_image by naming the task type and the return values (task id, status, output URLs). The purpose is unambiguous and distinct.

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 provides no guidance on when to use this tool versus its siblings (e.g., text_to_video, edit_image, upscale_image). It does not mention alternatives, exclusions, or prerequisites. The only implicit usage is that it generates images from text, but no explicit routing or context is given.

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