Skip to main content
Glama

generate_image

Generate images from text prompts using AI models like Grok Imagine, Seedream 4, or Nano Banana 2. Pay per request with Bitcoin Lightning — no signup required.

Instructions

Generate an image from a text prompt. Returns JSON with image URL. Models: Grok Imagine (fast creative generation, 100 sats), Seedream 4 (photorealistic detail, 150 sats), Nano Banana 2 (premium quality, 200 sats, default). Supports img2img with optional base64 input. Stable endpoints — models upgrade automatically as SOTA evolves. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='generate_image'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesValid payment ID (must be paid)
promptYesText prompt describing the image
modelIdNoOptional. Omit for default (best) model.
imageBase64NoOptional base64 image for img2img generation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / amount
      Removed value: -{
      -  "default": 1,
      -  "description": "Number of images to generate",
      -  "type": "number"
      -}
    • changedInput schema / properties / modelId / description
      Previous value: -"The AI model database ID (see Model IDs Reference)"New value: +"Optional. Omit for default (best) model."
    • changedInput schema / properties / prompt / description
      Previous value: -"Text prompt describing the image to generate"New value: +"Text prompt describing the image"
    • changedInput schema / required
      Previous value: -[
      -  "paymentId",
      -  "prompt",
      -  "modelId"
      -]New value: +[
      +  "paymentId",
      +  "prompt"
      +]
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses return format (JSON with URL), model upgrade policy, payment mechanism, and img2img capability. Lacks error handling or rate limit info, but is reasonably transparent.

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?

The description is compact with four sentences, each providing essential information without redundancy. The main action is front-loaded, and model details are efficiently listed.

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

Completeness4/5

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

Given the tool has 4 params, no output schema, and no annotations, the description covers key aspects: models, costs, payment, img2img, and automatic upgrades. It could mention expected output structure or error cases, but is largely complete.

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

Parameters4/5

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

Schema coverage is 100%, and the description adds meaning: it explains modelId choices (Grok, Seedream, Nano Banana with costs) and clarifies that imageBase64 enables img2img. It also notes that paymentId must be paid, which is not in the schema description.

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 begins with 'Generate an image from a text prompt,' clearly stating the verb (generate) and resource (image). It distinguishes from sibling tools like animate_image and upscale_image by specifying the output format and model options.

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

Usage Guidelines4/5

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

The description provides clear context: lists models with costs, mentions img2img, and explains payment requirement with explicit reference to create_payment. However, it does not explicitly state when to prefer this tool over siblings like generate_video or text_to_speech.

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