Skip to main content
Glama

generate_image

Create images from text prompts using FLUX.1 Schnell AI, with Lightning Network payment integration for micro-transactions.

Instructions

Generate an image from a text prompt using FLUX.1 Schnell (12B). Costs 100 sats via Lightning L402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the image to generate
payment_hashNoPayment hash if retrying after L402 payment

Implementation Reference

  • The handler for 'generate_image' which sends a request to the API and handles L402 payment requirements.
    server.tool(
      "generate_image",
      "Generate an image from a text prompt using FLUX.1 Schnell (12B). Costs 100 sats via Lightning L402.",
      {
        prompt: z.string().describe("Description of the image to generate"),
        payment_hash: z.string().optional().describe("Payment hash if retrying after L402 payment"),
      },
      async ({ prompt, payment_hash }) => {
        const data = await l402Post(MAXIMUMSATS_API, "/api/imagegen", { prompt }, payment_hash);
        if (data.image) {
          return textResult(`Image generated. Base64 PNG (${data.image.length} chars). Model: ${data.model || "flux-1-schnell"}`);
        }
        return textResult(data.result || formatL402(data));
      }
    );
Behavior4/5

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

No annotations provided, so description carries full burden. Successfully discloses cost model (100 sats), payment protocol (Lightning L402), and specific AI model used. Missing output format details (returned as URL? binary?) but covers financial/operational traits well.

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-worded sentences. Front-loaded with action ('Generate an image'). Zero redundancy—every element (model name, cost, payment method) is essential operational information.

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 payment complexity and lack of output schema, description adequately covers the unique operational requirements (L402 payment, 100 sats cost, retry mechanism via payment_hash). Minor gap: doesn't specify return value format (JPEG, URL, etc.).

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 has 100% description coverage (both prompt and payment_hash documented in schema). Description adds general context ('text prompt') but doesn't extend parameter semantics beyond what the schema already provides. Baseline 3 appropriate for high-coverage schemas.

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?

Specific verb (Generate) + resource (image) + specific model (FLUX.1 Schnell 12B). Completely distinguishes from Bitcoin/WoT siblings (ask_bitcoin, wot_* tools) by being the sole image generation tool in the set.

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?

Discloses critical operational constraint: 'Costs 100 sats via Lightning L402' informs the agent this is a paid operation. The payment_hash parameter schema (referenced in context) indicates retry capability, though explicit 'when not to use' alternatives aren't listed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joelklabo/maximumsats-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server