> 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 feel more creative. Higher values feel more conservative. |

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` push the strongest generative effect.

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

Values `7` to `9` stay closest to standard upscale.

`bicubic_clean` means the image gets an extra cleanup pass after bicubic resizing.

| Value | Base path       | Generative effect         | In plain words                                                                                          |
| ----- | --------------- | ------------------------- | ------------------------------------------------------------------------------------------------------- |
| `1`   | `upscale_4`     | strong (`LoRA scale 1.0`) | Most AI-driven version of direct 4x upscale. Good when you want extra texture and detail.               |
| `2`   | `bicubic`       | strong (`LoRA scale 1.0`) | Starts from bicubic resize, then lets the generative model do heavy lifting.                            |
| `3`   | `bicubic_clean` | strong (`LoRA scale 1.0`) | Same strong effect as `2`, but with an extra cleanup pass. Good for messy or compressed inputs.         |
| `4`   | `upscale_4`     | medium (`LoRA scale 0.5`) | Balanced version of `1`. Keeps the generative look, but with a lighter touch.                           |
| `5`   | `bicubic`       | medium (`LoRA scale 0.5`) | Balanced version of `2`. A solid default when you want detail without going too far.                    |
| `6`   | `bicubic_clean` | medium (`LoRA scale 0.5`) | Balanced and cleaner. Useful for older photos, web images, and mild compression artifacts.              |
| `7`   | `upscale_4`     | off (`LoRA scale 0.0`)    | Pure upscale\_4 path. No generative push. Best when you want a safer result.                            |
| `8`   | `bicubic`       | off (`LoRA scale 0.0`)    | Bicubic resize without generative influence. Simple and conservative.                                   |
| `9`   | `bicubic_clean` | off (`LoRA scale 0.0`)    | Most conservative option with cleanup. Good when you want a tidier image with minimal reinterpretation. |

### 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 a more stylized result.

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

### 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.deep-image.ai/common-usecases/genarate-image-in-high-resolution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
