Skip to main content
Glama

ai_image_editor_create_image

Submit a text prompt and source images to generate AI-edited images with configurable model, resolution, aspect ratio, and count. Starts an async job and returns an ID to fetch the completed output.

Instructions

Edit images with AI.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoGive your image a custom name for easy identification.Ai Image Editor - dateTime
modelNoThe AI model to use for image editing. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `flux-2-klein` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Max additional input images: 5 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `gpt-image-2.5-flare` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `krea-2` - from 10 credits/image - Supported resolutions: 640px, 1k - Available for tiers: free, creator, pro, business - Max additional input images: 1 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-2-lite` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `qwen-edit` - from 10 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Max additional input images: 2 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v4.5` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v5-pro` - from 75 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: creator, pro, business - Max additional input images: 9
styleYes
assetsYesProvide the assets for image edit
resolutionNoMaximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `flux-2-klein` - 640px, 1k, 2k - `gpt-image-2` - 640px, 1k, 2k, 4k - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k - `krea-2` - 640px, 1k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `nano-banana-2-lite` - 640px, 1k - `nano-banana-pro` - 1k, 2k, 4k - `qwen-edit` - 640px, 1k, 2k - `seedream-v4` - 640px, 1k, 2k, 4k - `seedream-v4.5` - 640px, 1k, 2k, 4k - `seedream-v5-pro` - 640px, 1k, 2k Note: Resolution availability depends on the model and your subscription tier.
image_countNoNumber of images to generate. Maximum varies by model. Defaults to 1 if not specified.
aspect_ratioNoThe aspect ratio of the output image(s). If not specified, defaults to `auto`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and delivers exceptionally. It discloses the async job model (returns id and credits_charged immediately), the exact completion states to poll for (complete, error, canceled), that completed projects include downloads with direct URLs, and that the wait helper returns exact_download_urls separately from expiration metadata. It also warns about the failure modes of hotlinked URLs and prescribes the safer upload flow — precisely the behavioral traits an agent cannot infer from the schema.

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?

The purpose sentence is front-loaded and the MCP guidance is organized into two scannable bullets. The async-result bullet is tight and information-dense; the file-path bullet is slightly verbose but every clause carries actionable guidance. Given the tool's complexity (async, polling, upload flows), the length is justified.

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?

The description covers the operational essentials an agent needs: async return semantics, how to obtain results (wait helper or polling), completion states, download URLs, and file-path sourcing. An output schema exists, so return values need not be explained. The only gap is tool-selection context among sibling image tools — the description never explains when this general editor is preferred over specialized siblings.

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 high (86%), so the schema already documents most parameters well. The description adds genuine value for the assets parameter by explaining how to source *_file_path values: prefer an existing Magic Hour file path or the upload-URL endpoint result, and prefer presigned uploads over potentially failing hotlinked URLs. This compensates for the schema's thin coverage of the assets field, which even contains a copy-paste error ('direct URL to the video file').

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?

The description states a clear verb+resource: 'Edit images with AI.' This correctly conveys that the tool modifies existing images via a prompt rather than generating from scratch, which distinguishes it semantically from ai_image_generator_create_image. However, it does not explicitly differentiate it from the many other image-editing siblings (ai_face_editor_edit_image, photo_colorizer_create_image, etc.), so an agent must infer the general-purpose editing scope.

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

Usage Guidelines3/5

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

The MCP guidance provides strong operational workflow context — how to handle the async job, when to call wait_for_image_project, and when to use the presigned upload flow. What it does not do is state when to choose this tool over the ~13 sibling image tools, and no alternatives are named. Usage is implied by name and schema rather than explicitly routed.

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