p-image-upscale

AI-powered image upscaling with detail and realism enhancement

Overview

p-image-upscale is Pruna's image upscaling model that increases image resolution using AI. Specify a target resolution in megapixels (1-8 MP) and the model will upscale accordingly. Optional detail and realism enhancement improve output quality, especially for AI-generated images.

Rate Limit: 500 requests per minute

Category: Image Upscaling

Pricing:

Target ResolutionPrice
1–4 MP$0.005 / image
5–8 MP$0.01 / image

Quickstart

Start with uploading an image

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/your/image.jpg"

Note: Use -F (form) with @ prefix to upload a file from your local filesystem. The file path should be absolute or relative to your current directory.

Response:

{
  "id": "fqadqq42xq",
  "name": "image.jpg",
  "content_type": "image/jpeg",
  "size": 185093,
  "etag": "\"14e9a51deaac6bee2dd8b5c52d7d0b5f\"",
  "checksums": {
    "sha256": "aa10d5d09bcee5cb5d854bd81899308b0cf0c0c50e29d4f00c2c06e51f0e2fe6"
  },
  "metadata": {
    "content_length": 185093,
    "width": 1344,
    "height": 768
  },
  "created_at": "2025-01-08T18:51:26.729Z",
  "expires_at": "2025-01-09T18:51:26.729Z",
  "urls": {
    "get": "https://api.pruna.ai/v1/files/fqadqq42xq"
  }
}
Asynchronous Request (Default)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-upscale' \
-d '{
"input": {
"image": "https://your-url.com/photo.jpg",
"target": 4,
"output_format": "jpg"
}
}'
Synchronous Request (Try-Sync)
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image-upscale' \
-H 'Try-Sync: true' \
-d '{
"input": {
"image": "https://your-url.com/photo.jpg",
"target": 4,
"enhance_realism": true,
"enhance_details": true,
"output_format": "png"
}
}'

Parameters

Required Parameters
ParameterTypeDescription
imagestringInput image URL to upscale
Optional Parameters
ParameterTypeDefaultDescription
targetinteger4Target resolution in megapixels (1-8). Output is capped at 8 MP.
output_formatstring"jpg"Format of the output image. Options: "webp", "jpg", "png"
output_qualityinteger80Quality when saving the output image (0-100). Not relevant for .png outputs.
enhance_detailsbooleanfalseEnhance fine textures and small details. May increase contrast and introduce minor deviations from the original.
enhance_realismbooleantrueImprove realism. May deviate more from the original. Recommended for AI-generated images.
disable_safety_checkerbooleanfalseDisable safety checker for generated images.