> For the complete documentation index, see [llms.txt](https://docs.aimlapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aimlapi.com/api-references/image-models/bytedance/dreamina-creative-upscale.md).

# Dreamina Creative Upscale

{% columns %}
{% column width="66.66666666666666%" %}
{% hint style="info" %}
This documentation is valid for the following list of our models:

* `bytedance/dreamina-creative-upscale`
  {% endhint %}
  {% endcolumn %}

{% column width="33.33333333333334%" %} <a href="https://aimlapi.com/app/bytedance/dreamina-creative-upscale" class="button primary">Try in Playground</a>
{% endcolumn %}
{% endcolumns %}

## Model Overview

Dreamina Creative Upscale — image super-resolution model from ByteDance. Enhances AI-generated and low-resolution images with support for high-quality 2K and 4K output resolution.

## Setup your API Key

If you don't have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).

## API Schema

## POST /v1/images/generations

>

```json
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/v1/images/generations":{"post":{"operationId":"_v1_images_generations","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["bytedance/dreamina-creative-upscale"]},"image_url":{"type":"string","format":"uri","description":"URL or data URL of the input image to upscale. Supported formats: JPEG, PNG. Maximum file size: 4.7 MB. Maximum resolution: 4096×4096 px."},"resolution":{"type":"string","enum":["2k","4k"],"default":"2k","description":"Target output resolution. Use '2k' for standard upscaling or '4k' for ultra-high-definition output."},"scale":{"type":"integer","minimum":0,"maximum":100,"default":50,"description":"Degree of detail generation during upscaling, from 0 (minimal enhancement) to 100 (maximum detail generation). Higher values produce more generated detail but may diverge from the source image."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url","description":"Format of the returned image. Use 'url' to receive a hosted download link, or 'b64_json' to receive the image as base64-encoded data."}},"required":["model","image_url"],"title":"bytedance/dreamina-creative-upscale"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","nullable":true,"items":{"type":"object","properties":{"url":{"type":"string","nullable":true,"description":"The URL where the upscaled image can be downloaded from."},"b64_json":{"type":"string","nullable":true,"description":"The base64-encoded data of the upscaled image. Populated only when response_format is 'b64_json'."}}},"description":"The list containing the upscaled image."},"meta":{"type":"object","nullable":true,"properties":{"usage":{"type":"object","nullable":true,"properties":{"credits_used":{"type":"number","description":"The number of credits consumed during generation."},"usd_spent":{"type":"number","description":"The total amount spent in USD."}},"required":["credits_used","usd_spent"]}},"description":"Additional details about the generation."}}}}}}}}}}}
```

## Quick Example

Let's upscale an image to 2K resolution.

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" %}

```python
import requests
import json

def main():
    response = requests.post(
        "https://api.aimlapi.com/v1/images/generations",
        headers={
            # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
            "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
            "Content-Type": "application/json",
        },
        json={
            "model": "bytedance/dreamina-creative-upscale",
            "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png",
            "resolution": "2k",
            "scale": 50,
            "response_format": "url",
        }
    )

    data = response.json()
    print(json.dumps(data, indent=2, ensure_ascii=False))

if __name__ == "__main__":
    main()
```

{% endcode %}
{% endtab %}

{% tab title="JS" %}
{% code overflow="wrap" %}

```javascript
async function main() {
    const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
      method: 'POST',
      headers: {
        // Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
        'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        model: 'bytedance/dreamina-creative-upscale',
        image_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png',
        resolution: '2k',
        scale: 50,
        response_format: 'url',
      }),
    });

    const data = await response.json();
    console.log(JSON.stringify(data, null, 2));
}

main();
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

{% code overflow="wrap" %}

```json5
{
  "data": [
    {
      "url": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png",
      "b64_json": null
    }
  ],
  "meta": {
    "usage": {
      "credits_used": 120000,
      "usd_spent": 0.06
    }
  }
}
```

{% endcode %}

</details>


---

# 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://docs.aimlapi.com/api-references/image-models/bytedance/dreamina-creative-upscale.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.
