Skip to main content
Glama

text_to_image

Create a Grok Imagine image generation task on RunAPI from a text prompt; receive a task id, status, and output URLs for polling or webhook delivery.

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. Declared type: string.
enable_proNoNot accepted by this model. Declared type: boolean.
timeout_msNo
aspect_ratioNoOutput aspect ratio. Declared type: string. Known values: "1:1", "2:3", "3:2", "16:9", "9:16".
callback_urlNoWebhook URL for terminal Task delivery. Declared type: string.
poll_interval_msNo
enable_safety_checkerNoNot accepted by this model. Declared type: boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.2.0
    • addedInput schema / additionalProperties
      Added value: +{}
    • removedInput schema / properties / aspect_ratio / anyOf
      Removed 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"
      -  }
      -]
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"Output aspect ratio."New value: +"Output aspect ratio. Declared type: string. Known values: \"1:1\", \"2:3\", \"3:2\", \"16:9\", \"9:16\"."
    • addedInput schema / properties / aspect_ratio / type
      Added value: +"string"
    • changedInput schema / properties / callback_url / description
      Previous value: -"Webhook URL for terminal Task delivery."New value: +"Webhook URL for terminal Task delivery. Declared type: string."
    • changedInput schema / properties / enable_pro / description
      Previous value: -"Not accepted by this model."New value: +"Not accepted by this model. Declared type: boolean."
    • changedInput schema / properties / enable_safety_checker / description
      Previous value: -"Not accepted by this model."New value: +"Not accepted by this model. Declared type: boolean."
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "grok-imagine-image-2-0",
      -  "grok-imagine-text-to-image"
      -]
    • changedInput schema / properties / prompt / description
      Previous value: -"Image generation prompt."New value: +"Image generation prompt. Declared type: string."
  2. 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
  3. 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"
      +]
  4. First observedv0.1.0

TDQS

B3/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 plus the return shape (task id, status, output URLs). However, it omits the wait/polling behavior that governs the call's blocking semantics, any auth or rate-limit context, and what a terminal status failure looks like.

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 sentences with no filler, and the operation is front-loaded ahead of the return-value note. Efficient, though the second sentence duplicates value already implied by the tool's nature.

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 fills that gap by naming the returned fields. But for a 9-parameter, annotation-free creation tool, the absence of usage, polling, and parameter detail leaves meaningful gaps.

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 coverage is 78% with 9 parameters, and two parameters (timeout_ms, poll_interval_ms) have no schema description at all. The description adds zero parameter meaning beyond what the schema already provides, so it does not compensate for the coverage gap.

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 Grok Imagine task on RunAPI') and disambiguates the modality with '(text to image)', which separates it from edit_image and image_to_video. It does not explicitly name a sibling, so it stops 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?

There is no guidance on when to choose this over edit_image, text_to_video, or upscale_image, and no prerequisites are stated. The only usage hint is the parenthetical modality label, which is implied rather than instructional.

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