A production AI Image Editor API that applies a natural-language instruction to a photo and returns the edited frame. JSON in, image out. $0.03 per image (30 credits). 5,000 free credits (24-hour trial), no credit card.
This is the instruction-based image editor: you describe the change in a sentence, not with a brush. The route is POST /v1/image/edit with JSON. Image may be a public URL or a base64 data URI.
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/portrait.jpg","prompt":"make the background a sunset beach scene"}'
curl https://api.pixelapi.dev/v1/image/GENERATION_ID \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
r = requests.post(
"https://api.pixelapi.dev/v1/image/edit",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"image": "https://example.com/portrait.jpg",
"prompt": "make the background a sunset beach scene",
},
)
job = r.json()
const res = await fetch("https://api.pixelapi.dev/v1/image/edit", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIXELAPI_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
image: "https://example.com/portrait.jpg",
prompt: "make the background a sunset beach scene",
}),
});
const job = await res.json();
require "net/http"
require "json"
uri = URI("https://api.pixelapi.dev/v1/image/edit")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = {image: "https://example.com/portrait.jpg",
prompt: "make the background a sunset beach scene"}.to_json
job = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: true){|h| h.request(req)}.body)
Most “edit this photo” products still mean sliders and layers. This endpoint is a developer Image Editor API: a REST call that applies a natural-language instruction while keeping the person or product recognizable. Typical prompts: “change the hair color to blonde”, “add dramatic studio lighting”, “make the person wear a red dress”, “restore the old photo to high quality”, “make the background a sunset beach scene”.
Use dedicated tools when the job is mechanical. Transparent cutouts go to the Background Removal API. Erasing a person or a cable goes to the Remove Object API. Date stamps and watermarks go to the Remove Text API. Print resolution goes to the Upscale API. The editor is for semantic change — lighting, wardrobe, setting, color — not for punching a hole in a layer.
image is required (https URL or data:image/...;base64,...). prompt is required, 1–2000 characters. Write a single concrete change. Stacking five unrelated asks in one sentence usually muddies identity.
reference_image is a second URL or data URI. Mention it as “the second image” in the prompt when you want a garment, prop, or palette copied onto the subject. Output keeps the primary frame’s size.
Live charge is $0.03 per image (30 credits) from /v1/pricing/live. That is the instruction-based editor meter, not the cheaper erase/upscale meters.
| Vendor | Interface | Typical paid rate |
|---|---|---|
| PixelAPI AI Image Editor API | JSON REST, URL or data URI, optional reference | $0.03 / image |
| Hosted edit APIs (Clipdrop, similar) | REST, often per-seat plus credits | Usually $0.04–$0.20 / image |
| Adobe / consumer editors | UI, generative credits, no simple server key | Subscription |
| Notebook-style GPU hosts | You run the graph | GPU-hour, not per image |
5,000 free credits (24-hour trial), no card. After that, prepaid credits. Do not hard-code a price in your app — read /v1/pricing/live so a rate change cannot silently under-charge or over-charge a customer.
application/json. Multipart file uploads belong on the other image routes.seed pins a result for tests. Optional negative_prompt steers away from artifacts you keep seeing.GET /v1/image/{generation_id}. The OpenAPI text that mentions a jobs path is not the public poll you should ship.Agencies batch seasonal color on product stills. Portrait apps restyle lighting. Marketplaces apply a studio look to phone photos. Fashion tools drape a reference garment when you pass reference_image.
Industry: ecommerce, fashion, photography, social, real estate. How-tos: modify background, modify clothing, change color, retouch portrait, add an element. Alternatives: Adobe Firefly, Clipdrop, Leonardo. Index hubs: use cases, alternatives, howto.
POST JSON to https://api.pixelapi.dev/v1/image/edit with a Bearer key. Send image as an https URL or a data URI, plus prompt describing the change. Poll GET /v1/image/{id} until completed and download output_url.
$0.03 per image (30 credits). Live rate is on /v1/pricing/live. New accounts get 5,000 free credits on a 24-hour trial, no card.
Scene and appearance changes in natural language: change a background, restyle lighting, recolor a garment, add studio light, restore an old print. It is not the right tool to cut a transparent background or to erase a watermark — use those dedicated endpoints.
Yes. Optional reference_image (URL or data URI) is a visual guide — for example a garment to apply. Refer to it in the prompt as 'the second image'. Output keeps the primary image size and aspect.
JSON. Unlike remove-object and upscale, /v1/image/edit expects application/json with image and prompt. Do not send a raw file field on this route.
Pass an integer seed. The same image, prompt, and seed produce a stable family of results, which is useful for regression tests in CI.
Yes. 5,000 free credits for 24 hours after signup, no credit card. Free evaluation is capped per tool inside that window so one endpoint cannot burn the whole grant.
20 requests/minute on the free trial, 60 on Starter, 120 on Pro and 300 on Scale, plus 3/10/20/50 parallel jobs. See /docs/parallel-processing.html.