> For the complete documentation index, see [llms.txt](https://documentation.deep-image.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.deep-image.ai/common-usecases/genarate-image-in-high-resolution.md).

# Generative upscale

Generative upscaling increases image resolution with diffusion models.

It works for any input image, not only generated ones.

Use it for photos, product shots, scans, illustrations, and AI-generated images when you want more texture and more detail than regular upscale can recover.

{% hint style="warning" %}
Generative upscale can slightly change the image. It may add or reinterpret small details. Keep it off when exact source fidelity matters most.
{% endhint %}

### Parameters

| Parameter            | What it does                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `generative_upscale` | Turns on diffusion-based upscaling. Use `true` when you want a richer and more detailed result.                                                  |
| `upscale_strength`   | Controls how strongly the generative part affects the image. Lower values stay closer to standard upscale. Higher values push a stronger effect. |

If you only set `width` or `height`, the other dimension is calculated automatically. For more about sizing rules, see [Resize and padding](/image-processing/resize-and-padding.md).

### `upscale_strength` levels

Think about `upscale_strength` as a style dial.

Values `1` to `3` stay closest to standard upscale.

Values `4` to `6` are a more balanced middle ground.

Values `7` to `9` push the strongest generative effect.

<table><thead><tr><th width="99">Value</th><th>In plain words</th></tr></thead><tbody><tr><td><code>1</code></td><td>Most conservative option with cleanup. Good when you want a tidier image with minimal reinterpretation.</td></tr><tr><td><code>2</code></td><td>Bicubic resize without generative influence. Simple and conservative.</td></tr><tr><td><code>3</code></td><td>Pure upscale_4 path. Best when you want a safer result.</td></tr><tr><td><code>4</code></td><td>Balanced and cleaner. Useful for older photos, web images, and mild compression artifacts.</td></tr><tr><td><code>5</code></td><td>A solid default when you want detail without going too far.</td></tr><tr><td><code>6</code></td><td>Balanced direct upscale with a lighter generative touch.</td></tr><tr><td><code>7</code></td><td>Strong effect with cleanup. Good for messy or compressed inputs.</td></tr><tr><td><code>8</code></td><td>Starts from bicubic resize, then lets the generative model do heavy lifting.</td></tr><tr><td><code>9</code></td><td>Most AI-driven version of direct 4x upscale. Good when you want extra texture and detail.</td></tr></tbody></table>

Let's check the 320×213 example

<figure><img src="/files/AKShB7Fp5zJVOWs7byiB" alt=""><figcaption></figcaption></figure>

Upscaled with strength 1:

<figure><img src="/files/0HqLQ2PfCh3AO3plGqjW" alt=""><figcaption></figcaption></figure>

and with strength = 9

<figure><img src="/files/NH29gsaDpmeJjBy0S4Ru" alt=""><figcaption></figcaption></figure>

### Upscale any image

This example upscales a regular input image.

```json
{
    "url": "https://deep-image.ai/api-example.png",
    "width": 3000,
    "generative_upscale": true,
    "upscale_strength": 5
}
```

Use a lower `upscale_strength` when you want to stay closer to the original image.

Use a higher `upscale_strength` when you want a stronger stylized result.

### Prompt-guided generative upscale

You can also guide the upscale with a prompt.

This is useful when you want the model to push specific textures or visual mood during the upscale.

```json
{
    "url": "https://deep-image.ai/api-example.png",
    "width": 2048,
    "height": 1024,
    "generative_upscale": true,
    "upscale_strength": 4,
    "background": {
        "generate": {
            "adapter_type": "upscale",
            "description": "small cottage and cows eating grass on the green fields. Sunset."
        }
    }
}
```

For more about prompt-based generation fields, see [Image generation](/image-processing/image-generation.md).

<figure><img src="/files/MlFdf1YSd39DmqRWRhyy" alt=""><figcaption><p>Example result with generative upscale enabled.</p></figcaption></figure>
