Photo Editing API

Edit any photo with a natural-language instruction. "Make the sky orange", "remove the person", "add a sunset" — one API call, hair-level accuracy. From $0.005 per edit.

$0.005 / edit
No credit card · Add · Remove · Replace · Restyle · 4K input · Royalty-free outputs

Built for production teams

One endpoint replaces a whole stack of one-task APIs. Send an image + a sentence — get the edited image back.

✏️

One instruction, one call

No masks to prepare, no per-effect endpoints. Send a sentence describing the change you want.

8–14 s typical

Median 8–14 seconds on 1024px inputs at default quality. Drop steps to 20 for ~5-second edits when throughput matters.

🎯

Local + global edits

Recolor a single object, swap a background, restyle the whole scene, or add and remove things — all from the same endpoint.

📐

Up to 4K input

4K input supported; output returned at the same resolution. JPEG, PNG, and WebP accepted as URL or base64 data URI.

💸

$0.005 per edit

5 credits per edit on PAYG. Roughly 40× cheaper than Photoroom API ($0.20+/image) for equivalent instruction-based work.

🌐

One account, web + app + API

Same credits across pixelapi.dev, the Lensora mobile app, and the REST API. Same key, three channels.

Quickstart

Edit one image with a single POST. Send the image (URL or base64 data URI) plus the instruction; receive the edited image.

curl Python Node
# curl — by image URL
curl -X POST https://api.pixelapi.dev/v1/image/edit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://example.com/photo.jpg",
    "prompt": "make the sky a dramatic orange sunset",
    "steps": 40,
    "cfg_scale": 4.0
  }'

# curl — by base64 data URI
IMG="data:image/jpeg;base64,$(base64 -w0 photo.jpg)"
curl -X POST https://api.pixelapi.dev/v1/image/edit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"image\": \"$IMG\", \"prompt\": \"remove the person on the left\"}"
# Python — image URL + prompt
import requests

r = requests.post(
    "https://api.pixelapi.dev/v1/image/edit",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "image": "https://example.com/photo.jpg",
        "prompt": "add a soft golden-hour sunset behind the subject",
        "steps": 40,
    },
    timeout=60,
)
r.raise_for_status()
data = r.json()
print("output:", data["output_url"])
// Node — fetch + JSON
const r = await fetch("https://api.pixelapi.dev/v1/image/edit", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image: "https://example.com/photo.jpg",
    prompt: "change the dress color to deep emerald green",
    steps: 40,
  }),
});
const data = await r.json();
console.log("output:", data.output_url);

PixelAPI vs Photoroom, Cloudinary, ClipDrop

Same job — edit an image with one instruction. Different price tags.

PixelAPI Photoroom / Cloudinary / ClipDrop
Price per edit (PAYG)$0.02$0.20 – $0.50
Free credits on signup100 — no cardLimited demo / trial
Instruction styleFree-form English up to 2000 charsEffect-specific endpoints
Add / remove / replace / restyle in one endpointYesUsually separate endpoints / SKUs
Max resolution4K (4096²)Varies, often 2K
Async job polling + webhookYes — GET /v1/image/edit/{id}Mixed support
Other tools in same key14 (BG, upscale, restore, try-on, 3D…)1–3 each
Indian Rupee billingRazorpay (₹200 / 2K credits)USD / EUR only

Competitor pricing references: photoroom.com/api/pricing, cloudinary.com/pricing, clipdrop.co/apis/pricing (checked 2026-05-17).

What kind of edits work well?

A non-exhaustive list of instructions teams are running against this endpoint right now.

🌅

Background swaps

"Change the background to a clean white studio", "make it a city street at dusk", "put this product on a marble countertop".

🧹

Object removal

"Remove the person on the left", "delete the lamp post", "take the watermark out of the bottom-right corner".

🎨

Recolor + restyle

"Change the dress color to navy blue", "make this look like a watercolor", "convert to a vintage 1970s print".

Add new content

"Add a small dog sitting beside the subject", "put sunglasses on the model", "include a rainbow in the sky".

FAQ

The questions we get most often from teams evaluating photo editing APIs.

How much does the photo editing API cost?

Each edit costs 5 credits, which is $0.005 on pay-as-you-go (1 credit = $0.001). That is roughly 40× cheaper than Photoroom API ($0.20+/image), and noticeably cheaper than Cloudinary or ClipDrop for equivalent edits.

What kinds of instructions does the model understand?

Free-form English instructions up to 2000 characters. Common patterns include adding objects ("add a sunset"), removing objects ("remove the person"), replacing scenes ("change the background to a city street"), restyling ("make this look like a watercolor"), or local edits ("make the sky orange", "turn the dress blue"). One instruction is one call.

What is the maximum input resolution?

Up to 4K input is supported (4096×4096). The output is returned at the same resolution as the input. JPEG, PNG, and WebP are accepted, either as a URL or a base64 data URI.

What output formats do I get?

PNG by default, with the same dimensions as the input. The response is a signed URL you can download immediately, plus a job_id you can poll via GET /v1/image/edit/{generation_id} for status, retries, or webhook integration.

How is this different from just removing a background?

Background removal cuts a subject out of a scene. The photo editing API understands the whole image and applies any natural-language change — add, remove, replace, restyle, or composite. For pure background removal use POST /v1/image/remove-background; for free-form edits use POST /v1/image/edit.

Can I use it as a drop-in for Photoroom, Cloudinary, or ClipDrop?

Yes, for the instruction-based subset of those products. Most teams migrating from Photoroom Edit, Cloudinary's AI Effects, or ClipDrop's Edit endpoints move over by changing the base URL, the API key, and the request shape to send image + prompt. Teams typically migrate in under an hour.

What is the typical latency per edit?

Median 8–14 seconds on a 1024px input at the default 40 inference steps. You can lower steps to 20 for ~5-second edits with a small fidelity trade-off, or run in batch for high-throughput workloads.

Try the photo editing API free

100 credits on signup. No card. Same key works on web, mobile, and the REST API.

Get 100 free credits