---
title: "p-image-upscale"
url: "https://docs.api.pruna.ai/guides/models/p-image-upscale"
image: "https://docs.api.pruna.ai/_og/d/c_Ocean.takumi,title_p-image-upscale,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiM3YzNhZWQifX19,p_Ii9ndWlkZXMvbW9kZWxzL3AtaW1hZ2UtdXBzY2FsZSI,s_isb1Bc-T_dBhvO_-.png"
---

# p-image-upscale

AI-powered image upscaling with detail and realism enhancement

## [Overview](#overview)

p-image-upscale is Pruna's image upscaling model that increases image resolution using AI. Specify a target resolution in megapixels (1-128 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 Resolution | Price          |
| :---------------- | :------------- |
| 1-4 MP            | $0.005 / image |
| 5-8 MP            | $0.01 / image  |
| 9-16 MP           | $0.02 / image  |
| 17-32 MP          | $0.04 / image  |
| 33-64 MP          | $0.06 / image  |
| 65-128 MP         | $0.12 / image  |

## [Quickstart](#quickstart)

### [Start with uploading an image](#start-with-uploading-an-image)

```bash
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:

```text
{
  "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)

```bash
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)

```bash
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": false,
"enhance_details": true,
"output_format": "png"
}
}'
```

#### [Parameters](#parameters)

###### Required Parameters

| Parameter | Type   | Description                |
| :-------- | :----- | :------------------------- |
| image     | string | Input image URL to upscale |

##### Optional Parameters

| Parameter              | Type    | Default | Description                                                                      |
| :--------------------- | :------ | :------ | :------------------------------------------------------------------------------- |
| target                 | integer | 4       | Target resolution in megapixels (1-128). Output is capped at 128 MP.             |
| output_format          | string  | "jpg"   | Format of the output image. Options: "webp", "jpg", "png"                        |
| output_quality         | integer | 80      | Quality when saving the output image (0-100). Not relevant for .png outputs.     |
| enhance_details        | boolean | false   | Enhance fine textures and small details. May increase contrast and introduce minor deviations from the original. |
| enhance_realism        | boolean | false   | Improve realism. May deviate more from the original. Recommended for AI-generated images. |
| disable_safety_checker | boolean | false   | Disable safety checker for generated images.                                     |