- Third-party
Pruna's P-Image-Upscale increases image resolution using AI, targeting 1-128 megapixels with optional detail and realism enhancement for sharper, cleaner results.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing |
|
const response = await env.AI.run(
'pruna/p-image-upscale',
{
image: 'https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg',
target: 4,
enhance_details: true,
output_format: 'jpg',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "pruna/p-image-upscale",
"input": {
"image": "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg",
"target": 4,
"enhance_details": true,
"output_format": "jpg"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/pruna/p-image-upscale/4mp-upscale.jpg"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}image
stringrequiredInput image to upscale. A publicly reachable HTTP(S) URL or a base64 data URI (data:image/...;base64,...).target
integerrequireddefault: 4minimum: 1maximum: 128Target resolution in megapixels (1-128). Output is capped at 128 MP.output_format
stringrequireddefault: jpgenum: webp, jpg, pngFormat of the output image.output_quality
integerrequireddefault: 80minimum: 0maximum: 100Quality when saving the output image (0-100). Not relevant for .png outputs.enhance_details
booleanrequireddefault: falseEnhance fine textures and small details.enhance_realism
booleanrequireddefault: falseImprove realism. Recommended for AI-generated images.disable_safety_checker
booleanrequireddefault: falseDisable safety checker for generated images.image
stringformat: uriPresigned URL for the upscaled image.