Image Editor

From 1.9 credits

Edit any image with AI. Change style, remove objects, modify elements, or transform the entire look.

Still needed: Images to Edit, Edit Instructions

Examples

Before / AfterGrok Imagine

Botanical fan in a Koh Samui repair shop

Grok Imagine. A natural-language edit turns a vintage desk fan into a banana-leaf sculpture while keeping the roadside workshop photorealistic.

0105

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.

Get an API token
inputs
5
required
2
Pricing
1.9 to 5.3 credits
Language
Language
bun add @pipe2-ai/sdk
Run a pipeline
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
Run a pipeline
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
Run a pipeline
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
Run a pipeline
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"}' \
  --wait

Full API reference CLI reference

Frequently Asked Questions

What kinds of edits can I make?
Almost anything: remove objects, change backgrounds, alter styles, add elements, adjust lighting and color, or completely reimagine the image.
Will the edit preserve the original composition?
Yes, the AI uses your image as the base and modifies only what you describe, preserving structure and composition unless you ask it to change.
What aspect ratios are supported?
1:1 (square), 16:9 (landscape), 9:16 (portrait), 4:3 (classic), 3:4 (tall).
How many credits does it cost?
1.9 to 5.3 credits per edit, depending on the model you choose.
Can I chain this with other pipelines?
Yes, the output image can be fed into image-motion for video, text-card for overlays, or video-generator as a start frame.

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

Explore more pipelines

Video Generator
from 9.5
Video Generator
Image Generator
0.2-6.4
Image Generator
Audio Generator
0.002-40.0
Audio Generator
Music Generator
2.5-22.6
Music Generator