# AI image editing for agents > morigraph's image editing tool lets Claude, ChatGPT, Cursor, Codex or your own code change an existing image by instruction: upscale it, clean it up, remove the background, erase an object or restyle it. It needs no account or API key with an image vendor. An edit costs 0.4 to 8 credits, about 4 to 80 cents, depending on the kind of edit. - **Tool name**: `image_edit` - **Price**: 0.4 to 8 credits ($0.04 to about $0.8) an edit - **Providers**: BytePlus and Stability AI - **Call it from**: MCP, command line and HTTP API - **Needs**: one morigraph connection; no vendor account or API key ## What it is for - **Make it bigger or sharper**: Upscale and clean up a small or soft image. - **Take something out**: Erase an object and fill the space to match the scene. - **Change one thing**: Swap the sky, the colour of a product or the setting, in the person's own words. ## How to call it In your assistant (MCP). Connect once, then ask in plain words: ```sh claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp Take the product photo I uploaded and remove the car in the background, keeping the street as it is. ``` From a terminal or script (CLI): ```sh npx @morigraph/cli@latest login morigraph call image_edit --json-args '{"image":"https://example.com/photo.jpg","instruction":"Remove the car in the background","operation":"erase","target":"the car"}' ``` From your own code (HTTP API): ```sh curl https://api.morigraph.com/v1/tools/image_edit \ -H "Authorization: Bearer $MORIGRAPH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image":"https://example.com/photo.jpg","instruction":"Remove the car in the background","operation":"erase","target":"the car"}' ``` What comes back: A preview and the edited file saved to your workspace, as JPEG or PNG. ## Arguments | Argument | Type | Required | What it is | |---|---|---|---| | `image` | string | yes | The image to change: a Files id or filename (e.g. a photo the person sent, or an earlier render), or an https URL. | | `instruction` | string | yes | What to do, in the person's words: 'unblur this', 'make it 4x bigger', 'remove the background', 'take out the car', 'make the sky a sunset'. | | `operation` | auto \| enhance \| upscale \| remove_background \| erase \| edit | no | enhance = upscale and clean up (it does not undo heavy motion blur); upscale = make it bigger; remove_background; erase = remove something (say what in target); edit = change or restyle it. auto picks from the instruction. | | `target` | string | no | For erase, or an edit that swaps one thing: what in the image to find, e.g. 'the car'. | | `scene` | string | no | What the picture shows, in a few words, as you see it. For erase, describe it WITHOUT the thing being removed ('an empty canoe on a calm lake, pine forest'). Makes erase and edit far more faithful; pass it whenever you can see the image. | | `format` | jpeg \| png | no | Output format. remove_background is always png (transparent). | ## Good to know - Through MCP the image can be a file saved in your workspace. Through the API it must be a public https link. - Removing or replacing a background is about 1 credit; the largest upscale is 8. - Background removal alone is free with the separate background removal tool. ## When to choose something else Choose Photoshop or another editor when you need to control the result by hand, work in layers or match exact pixels. This tool is for edits you can describe in a sentence. ## What kinds of edit can it do? Enhance, upscale, remove a background, erase an object, and general edits that change part of the picture by instruction. You can let it choose the operation from your words or name one. ## How much does an image edit cost? 0.4 to 8 credits, about 4 to 80 cents. Removing or replacing a background is about 1 credit and the largest upscale is 8. ## Can it fix a blurry photo? It can upscale and clean up a soft image. It does not undo heavy motion blur. ## Related tools - [Background removal](https://morigraph.com/tools/background-removal.md): free - [Photo editing](https://morigraph.com/tools/photo-editing.md): free - [Image generation](https://morigraph.com/tools/image-generation.md): 0.6 to 1.8 credits a call - [All tools](https://morigraph.com/tools.md) --- Canonical page: https://morigraph.com/tools/image-editing/ Prices read from the production service on 2026-11-27. Connect: https://morigraph.com/connect.md · API docs: https://morigraph.com/docs.md · Site overview: https://morigraph.com/llms.txt