Editing
Instruction-based image editing via natural-language prompts. Change scenes, swap objects, and adjust composition without masks.
POST /edit/image/v1, edit input_image according to prompt.
- cURL
- JavaScript
- Python
- Java
curl -X POST https://api.imagepipeline.io/edit/image/v1 \
-H "X-API-Key: $IMAGEPIPELINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_image": "https://.../photo.webp",
"prompt": "change the jacket to navy blue and add soft rim lighting",
"faster_inference": true
}'
const res = await fetch("https://api.imagepipeline.io/edit/image/v1", {
method: "POST",
headers: {
"X-API-Key": process.env.IMAGEPIPELINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input_image": "https://.../photo.webp",
"prompt": "change the jacket to navy blue and add soft rim lighting",
"faster_inference": true
}),
});
const { job_id } = await res.json();
import requests
res = requests.post(
"https://api.imagepipeline.io/edit/image/v1",
headers={"X-API-Key": API_KEY},
json={
"input_image": "https://.../photo.webp",
"prompt": "change the jacket to navy blue and add soft rim lighting",
"faster_inference": True,
},
)
job_id = res.json()["job_id"]
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.imagepipeline.io/edit/image/v1"))
.header("X-API-Key", System.getenv("IMAGEPIPELINE_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"input_image": "https://.../photo.webp",
"prompt": "change the jacket to navy blue and add soft rim lighting",
"faster_inference": true
}
"""))
.build();
HttpResponse<String> res = client.send(req, BodyHandlers.ofString());
input_image accepts a single URL string, or an array of URLs (for example a model image
plus a product image to composite).
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | , | Required. The natural-language edit instruction. |
input_image | string | string[] | , | Image(s) to edit. A single URL, or an array of URLs. |
mode | string | , | Processing mode. Use anime to convert a photo to an illustration. |
faster_inference | boolean | true | Use the Lightning LoRA distillation for speed. |
refine_strength | number | , | Z-Image Turbo refinement pass after editing (0.0 to 1.0). |
num_inference_steps | integer | model | Diffusion steps (1 to 100). Higher = better, slower. |
guidance_scale | number | model | Classifier-free guidance (0.0 to 20.0). 0 disables it. |
cfg_norm_strength | number | , | CFG normalization strength (0.0 to 1.0). |
tone_correction | number | , | Post-edit tonal correction strength (0.0 to 1.0). |
product_saturation | number | , | Saturation multiplier applied to the product image (image 2). |
has_text | boolean | , | Whether the image contains visible text, logos, or labels. |
has_product | boolean | , | Whether the image contains a physical product as the subject. |
seed | integer | -1 | -1 randomizes; set a value for reproducibility. |
palette | string[] | , | Brand colours as hex codes, e.g. ["#FF5733"]. |
output_format | string | webp | webp, jpeg, or png. |
profile_id | string | , | Apply an identity profile. |
callback_url | string | , | Receive a webhook on completion. |
server_id | string | , | Enterprise: pin to a dedicated pod. |
Response — poll GET …/status/{job_id} until status is completed:
{
"job_id": "job_7c1a9e44",
"status": "completed",
"result_url": "https://cdn.imagepipeline.io/o/7c1a9e44.webp",
"processing_time_seconds": 30.2,
"balance_remaining_usd": 187.52
}
Returns a job_id; poll GET /edit/image/v1/status/{job_id} or use a
webhook.