Skip to main content
Glama

Image To Image

image_to_image

Transform an existing image using a text prompt for style transfer and editing. Accepts image URLs, data URIs, or base64, and supports up to five source images for combined edits.

Instructions

Transform an existing image using a text prompt.

Modifies images based on text descriptions. Useful for style transfer and editing. Accepts images as URLs (preferred), data URIs (data:image/...;base64,...), or base64 strings. When a URL is available (e.g., from a previous text_to_image result), always prefer passing the URL directly.

Pass either image for a single source or images for up to five; the API rejects a request carrying both.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "model": "<model>"
    },
    "name": "image_to_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility
imageNoSource image as URL (e.g., from text_to_image result), data URI (data:image/png;base64,...), or base64 string. IMPORTANT: Pass the image directly without displaying or printing the base64 data.
lorasNoList of LoRA models (optional, e.g., [{'name': 'style_lora', 'weight': 0.75}])
modelYesAI model name for image transformation
stepsNoNumber of diffusion steps. Defaults to the model's own value (see the model list)
widthNoOutput width in pixels. Defaults to the first input image's size; ignored by models that keep the input size (Qwen, gpt-image-1.5/2)
heightNoOutput height in pixels. Defaults to the first input image's size; ignored by models that keep the input size (Qwen, gpt-image-1.5/2)
imagesNoSeveral source images to edit together, each a URL, data URI or base64 string. How many a model takes is 'up to N input image(s)' in the model list (the API caps it at 5). Mutually exclusive with 'image'
promptYesText description of desired transformation
qualityNoQuality tier for models that price by tier, e.g. 'low', 'medium', 'high'. Costs vary sharply between tiers
webhook_urlNoHTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here
enhance_promptNoLet the API expand the prompt before generating
guidance_scaleNoHow closely to follow the prompt. Leave unset to use the model's own default
webhook_secretNo32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript
negative_promptNoThings to exclude from the transformed image (optional)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A3.8/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 usefully discloses the image/images mutual exclusivity and that the API rejects both, plus the URL-over-base64 preference, but says nothing about job execution model, cost implications, or failure modes for a 15-parameter generation call.

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?

Four short sentences, front-loaded with the core action, then input formats, then the exclusivity constraint. No filler, though the second sentence ("Modifies images based on text descriptions") largely restates the first.

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?

For a 15-parameter tool with an output schema and full schema coverage, the description covers the highest-risk input decisions (format choice, single vs multiple images). Remaining gaps around model selection and async behavior are handled by the schema and output schema.

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%, so baseline is 3, but the description adds practical meaning beyond the schema: URL is the preferred input form, up to five images are accepted, and image/images are mutually exclusive. It does not touch model, quality, or webhook parameters, which the schema already documents well.

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 ("Transform an existing image using a text prompt") and the phrase "existing image" implicitly separates it from the text_to_image sibling. It does not name the sibling explicitly, so differentiation is inferential rather than stated.

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?

Gives clear usage context ("style transfer and editing") and a concrete operational rule: prefer a URL when one is available, e.g. from a prior text_to_image result. It stops short of explicit when-not-to-use guidance or naming alternatives for creating images from scratch.

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