{ "model_id": "pruna/p-image-upscale", "provider_id": "pruna", "name": "P-Image-Upscale", "description": "Pruna's P-Image-Upscale increases image resolution using AI, targeting 1-128 megapixels with optional detail and realism enhancement for sharper, cleaner results.", "task": "Image-to-Image", "tags": [ "Image Upscaling", "Image-to-Image", "Enhancement" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Per image (1-4 MP)": 0.005, "Per image (5-8 MP)": 0.01, "Per image (9-16 MP)": 0.02, "Per image (17-32 MP)": 0.04, "Per image (33-64 MP)": 0.06, "Per image (65-128 MP)": 0.12 }, "examples": [ { "name": "4MP Upscale", "description": "Upscale an image to 4 megapixels with detail enhancement.", "input": { "image": "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg", "target": 4, "enhance_details": true, "output_format": "jpg" }, "output": { "image": "https://examples.aig.cloudflare.com/pruna/p-image-upscale/4mp-upscale.jpg" }, "raw_response": { "state": "Completed", "result": { "image": "https://examples.aig.cloudflare.com/pruna/p-image-upscale/4mp-upscale.jpg" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'pruna/p-image-upscale',\n {\n image: 'https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg',\n target: 4,\n enhance_details: true,\n output_format: 'jpg',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"pruna/p-image-upscale\",\n \"input\": {\n \"image\": \"https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg\",\n \"target\": 4,\n \"enhance_details\": true,\n \"output_format\": \"jpg\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": false, "zdr_comment": null, "external_info": "https://docs.api.pruna.ai/guides/quickstart", "terms": null, "cover_image_url": null, "metadata": { "Target Resolution": "1-128 MP", "Output Formats": "jpg, png, webp" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "pruna", "pricing": { "mp_1_4": 0.005, "mp_5_8": 0.01, "mp_9_16": 0.02, "mp_17_32": 0.04, "mp_33_64": 0.06, "mp_65_128": 0.12 } } ], "banner": null, "created_at": "2026-06-18 15:52:26", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "description": "Input image to upscale. A publicly reachable HTTP(S) URL or a base64 data URI (data:image/...;base64,...)." }, "target": { "default": 4, "description": "Target resolution in megapixels (1-128). Output is capped at 128 MP.", "type": "integer", "minimum": 1, "maximum": 128 }, "output_format": { "default": "jpg", "description": "Format of the output image.", "type": "string", "enum": [ "webp", "jpg", "png" ] }, "output_quality": { "default": 80, "description": "Quality when saving the output image (0-100). Not relevant for .png outputs.", "type": "integer", "minimum": 0, "maximum": 100 }, "enhance_details": { "default": false, "description": "Enhance fine textures and small details.", "type": "boolean" }, "enhance_realism": { "default": false, "description": "Improve realism. Recommended for AI-generated images.", "type": "boolean" }, "disable_safety_checker": { "default": false, "description": "Disable safety checker for generated images.", "type": "boolean" } }, "required": [ "image", "target", "output_format", "output_quality", "enhance_details", "enhance_realism", "disable_safety_checker" ], "additionalProperties": {} }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri", "description": "Presigned URL for the upscaled image." } }, "required": [ "image" ], "additionalProperties": {} } } }