Skip to main content
Glama

Continue Edit Session

continue_edit_session

Apply iterative edits to an image session using focused prompts. Takes the previous output as input and returns updated image and session.

Instructions

Apply another edit turn to an existing session. The previous turn's output image is used as the input. Use short, focused prompts like "make the sky more orange" or "add a small boat on the horizon"; include "keep everything else the same" to limit drift. Returns the new image and the updated session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesThe session id returned by start_edit_session.
promptYesImage description. gpt-image-2 handles very detailed prompts; use ALL CAPS or quote literal text you want rendered verbatim.
sizeNoOutput dimensions. "auto" (default), one of the presets "1024x1024", "1536x1024", "1024x1536", or a custom "WxH" where both edges are multiples of 16, max edge ≤ 3840px, aspect ratio within 1:3–3:1, and total pixels 655,360–8,294,400. Outputs above 2K are beta.auto
qualityNoEdit quality — same levels as generate.auto
backgroundNoBackground behavior. "opaque" forces a filled background; "auto" lets the model pick. gpt-image-2 does NOT support transparent backgrounds — use a different model for that.auto
output_formatNoFile format. "png" (default, lossless), "jpeg" (smaller, lossy), "webp" (best compression). When omitted on continue_edit_session, the session's current format is kept.
output_compressionNoCompression level 0–100 for jpeg/webp outputs. Ignored for png. Defaults to 100 (minimal compression).
filename_prefixNoShort label appended to the generated filename so you can find it later (e.g. "hero-banner"). Letters/digits/hyphens only; auto-sanitized.
userNoOptional end-user identifier forwarded to OpenAI for abuse monitoring. Pass a stable hashed user ID, not PII.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
promptYes
requestedYes
appliedYes
imagesYes
usageYes
cost_usd_estimatedYes
routeNoWhich API route served the request (edit tools only): "direct" = /v1/images/edits, "responses" = Responses-API fallback (one image per call, undercounted cost).
notesNoCaveats about how the request was served.
session_idYes
turnYes
Behavior4/5

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

Beyond annotations (which are sparse), the description explains the stateful behavior (each turn uses the previous output) and the return value (new image and updated session). No contradictions; adds value by clarifying the iterative process.

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?

Three sentences front-loaded with purpose, followed by usage guidelines and return value. No extraneous information; every sentence earns its place.

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 output schema exists, the description covers essential stateful behavior and return values. Could mention session expiry or error handling, but overall adequate for a complex tool with 9 parameters.

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 coverage is 100%, so the schema already documents all parameters. The description adds minimal parameter-specific meaning, mostly through usage examples in prompt. Baseline of 3 is appropriate.

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 clearly states the tool applies another edit turn to an existing session, using the previous turn's output as input. It distinguishes itself from sibling tools like start_edit_session and generate_image by specifying session-based iterative editing.

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?

Provides concrete advice on prompt style ('short, focused prompts') and includes tips to limit drift ('keep everything else the same'). While it doesn't explicitly state when not to use the tool or name alternatives, the context implies its iterative nature.

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/Borys520/gpt-image-2-mcp'

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