Skip to main content
Glama

iterateImage

Refine generated images by editing specific parts, applying style changes, fixing issues, or cropping to coordinates. Use detailed prompts to modify existing images while preserving structure.

Instructions

Refine, modify, or create variations of an existing generated image.

Use this to:

  • Edit specific parts of an image ("change the background to blue", "add a title")

  • Apply style changes ("make it more minimalist", "use darker colors")

  • Fix issues ("remove the text", "make the icon larger")

  • Crop the image to specific coordinates

For diagram iterations:

  1. Include the original Mermaid/D2/Vega source in your prompt to preserve structure

  2. Be explicit about visual issues (e.g., "the left edge is clipped")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe session UUID containing the image to iterate on
assetIdYesThe asset UUID of the image to iterate on
promptYesDetailed instruction for the iteration. Be specific about what to change. Examples: 'Change the primary color to #0033A0', 'Add a subtle drop shadow'
cropX1NoCrop: X coordinate of the top-left corner in pixels
cropY1NoCrop: Y coordinate of the top-left corner in pixels
cropX2NoCrop: X coordinate of the bottom-right corner in pixels
cropY2NoCrop: Y coordinate of the bottom-right corner in pixels

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/securecoders/opengraph-io-mcp'

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