Upscale
Resolution upscaling and detail enhancement. Use it as the final step in almost any workflow.
POST /upscale/image/v1, upscale and enhance input_image by an integer scale factor.
- cURL
- JavaScript
- Python
- Java
curl -X POST https://api.imagepipeline.io/upscale/image/v1 \
-H "X-API-Key: $IMAGEPIPELINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_image": "https://.../staged.webp",
"scale": 4,
"output_format": "png"
}'
const res = await fetch("https://api.imagepipeline.io/upscale/image/v1", {
method: "POST",
headers: {
"X-API-Key": process.env.IMAGEPIPELINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input_image": "https://.../staged.webp",
"scale": 4,
"output_format": "png"
}),
});
const { job_id } = await res.json();
import requests
res = requests.post(
"https://api.imagepipeline.io/upscale/image/v1",
headers={"X-API-Key": API_KEY},
json={
"input_image": "https://.../staged.webp",
"scale": 4,
"output_format": "png",
},
)
job_id = res.json()["job_id"]
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.imagepipeline.io/upscale/image/v1"))
.header("X-API-Key", System.getenv("IMAGEPIPELINE_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"input_image": "https://.../staged.webp",
"scale": 4,
"output_format": "png"
}
"""))
.build();
HttpResponse<String> res = client.send(req, BodyHandlers.ofString());
| Field | Type | Default | Notes |
|---|---|---|---|
input_image | string | , | Public URL of the image to upscale and enhance. |
scale | integer | 4 | Upscale factor: 1 (enhance only), 2, 3, or 4. |
output_format | string | webp | webp, jpeg, or png. |
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_a0f5d213",
"status": "completed",
"result_url": "https://cdn.imagepipeline.io/o/7c1a9e44.webp",
"processing_time_seconds": 41.6,
"balance_remaining_usd": 187.52
}
Returns a job_id; poll GET /upscale/image/v1/status/{job_id} or use a
webhook.