Image Editor
Edit any image with AI. Change style, remove objects, modify elements, or transform the entire look.
Still needed: Images to Edit, Edit Instructions
Runs on
APIExamples
Add a prop: Pyra's cozy scarf
Grok Imagine Quality. One instruction wraps Pyra in a hand-knitted violet scarf: a single prop added, the same dragon underneath, same violet eyes and glowing infinity crest.
Articles about this pipeline
Image Editor API
Call this pipeline from your own code. One request dispatches a run; the model is an input field, not a separate endpoint.
bun add @pipe2-ai/sdk import { createClient } from "@pipe2-ai/sdk";
const client = createClient(process.env.PIPE2_TOKEN!);
const { run_pipeline } = await client.RunPipeline({
pipeline_slug: "image-editor",
input: {
image_urls: ["https://example.com/product.jpg"],
instructions: "Remove the background and place the product on a soft grey studio backdrop",
model: "grok-imagine-image-quality",
},
});pip install pipe2 import asyncio
import os
from pipe2 import Pipe2Client
client = Pipe2Client(token=os.environ["PIPE2_TOKEN"])
run = asyncio.run(client.run_pipeline(
pipeline_slug="image-editor",
input={
"image_urls": ["https://example.com/product.jpg"],
"instructions": "Remove the background and place the product on a soft grey studio backdrop",
"model": "grok-imagine-image-quality",
},
))go get github.com/pipe2-ai/sdk-go client := pipe2.NewClient(os.Getenv("PIPE2_TOKEN"))
input := json.RawMessage(`{
"image_urls": ["https://example.com/product.jpg"],
"instructions": "Remove the background and place the product on a soft grey studio backdrop",
"model": "grok-imagine-image-quality"
}`)
run, err := pipe2.RunPipeline(context.Background(), client, "image-editor", input)
if err != nil {
log.Fatal(err)
}brew install pipe2-ai/tap/pipe2 pipe2 pipelines run \
--pipeline image-editor \
--input-json '{"image_urls": ["https://example.com/product.jpg"], "instructions": "Remove the background and place the product on a soft grey studio backdrop", "model": "grok-imagine-image-quality"}' \
--waitParameters
-
image_urlsrequired -
Images to edit. Give one image to edit it on its own, or several to be edited together into a single result. How many you may send depends on the model: Grok Imagine Quality accepts 3, Grok Imagine 5, the Gemini models 14.
array -
instructionsrequired -
What to change, in plain language — the edit is applied to the whole image.
string -
aspect_ratio -
Output aspect ratio. Leave unset to keep the source image's ratio.
1:116:99:164:33:4default1:1
Show all 4 inputs
-
model -
Image engine to use. Leave unset and Pipe2 picks one that supports your edit.
grok-imagine-image-qualitygrok-imagine-imagegemini-3-1-flash-imagegemini-3-pro-imagedefaultgrok-imagine-image-quality
Use it from an AI agent
Point any MCP client at pipe2 and your agent gets these tools. It finds this pipeline, reads the same schema above, then runs it.
- list_pipelines
- get_pipeline_schema
- run_pipeline
- get_pipeline_run_status
- request_upload
https://mcp.pipe2.ai/mcp {
"mcpServers": {
"pipe2ai": {
"url": "https://mcp.pipe2.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}Image Editor: AI-Powered Image Editing
Describe what you want to change and AI edits your image. Remove objects, change backgrounds, alter styles, add elements, or completely transform the look, all from a text prompt.
What You Can Do
- Remove objects: erase unwanted elements seamlessly
- Change backgrounds: swap any background with a described scene
- Style transfer: convert to painting, sketch, cinematic, or any style
- Add elements: insert objects, people, or effects into the scene
- Color grading: adjust mood, tone, and lighting with words
Choose a Model
- Grok Imagine: fast, natural-language edits at the lowest cost
- Grok Imagine Quality: higher fidelity and detail preservation
- Gemini 3.1 Flash Image: strong instruction following with multi-reference detail
- Gemini 3 Pro Image: premium tier for precise text and complex layouts
Frequently Asked Questions
What kinds of edits can I make?
Will the edit preserve the original composition?
What aspect ratios are supported?
How many credits does it cost?
Can I chain this with other pipelines?
Explore more pipelines
See all →Generate AI videos from a text prompt, image, or reference clip. Cinematic shots, product reveals, lifestyle ads, with synchronized audio and natural motion.
Generate AI images from text or reference photos. Product shots, character art, posters with readable text, photoreal portraits, high resolution in seconds.
Turn text into natural speech with dozens of voices, 70+ languages, and custom style directions for tone, accent, and pacing.
Generate original background music that matches any mood, genre, and length you describe. Royalty-free, ready in seconds.