|
| 1 | +--- |
| 2 | +layout: |
| 3 | + width: wide |
| 4 | + title: |
| 5 | + visible: true |
| 6 | + description: |
| 7 | + visible: true |
| 8 | + tableOfContents: |
| 9 | + visible: true |
| 10 | + outline: |
| 11 | + visible: true |
| 12 | + pagination: |
| 13 | + visible: true |
| 14 | + metadata: |
| 15 | + visible: true |
| 16 | + tags: |
| 17 | + visible: true |
| 18 | + actions: |
| 19 | + visible: true |
| 20 | +--- |
| 21 | + |
| 22 | +# Dreamina Creative Upscale |
| 23 | + |
| 24 | +{% columns %} |
| 25 | +{% column width="66.66666666666666%" %} |
| 26 | +{% hint style="info" %} |
| 27 | +This documentation is valid for the following list of our models: |
| 28 | + |
| 29 | +* `bytedance/dreamina-creative-upscale` |
| 30 | +{% endhint %} |
| 31 | +{% endcolumn %} |
| 32 | + |
| 33 | +{% column width="33.33333333333334%" %} |
| 34 | +<a href="https://aimlapi.com/app/bytedance/dreamina-creative-upscale" class="button primary">Try in Playground</a> |
| 35 | +{% endcolumn %} |
| 36 | +{% endcolumns %} |
| 37 | + |
| 38 | +## Model Overview |
| 39 | + |
| 40 | +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. |
| 41 | + |
| 42 | +## Setup your API Key |
| 43 | + |
| 44 | +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). |
| 45 | + |
| 46 | +## API Schema |
| 47 | + |
| 48 | +{% openapi-operation spec="dreamina-creative-upscale" path="/v1/images/generations" method="post" %} |
| 49 | +[OpenAPI dreamina-creative-upscale](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/image-models/ByteDance/dreamina-creative-upscale.json) |
| 50 | +{% endopenapi-operation %} |
| 51 | + |
| 52 | +## Quick Example |
| 53 | + |
| 54 | +Let's upscale an image to 2K resolution. |
| 55 | + |
| 56 | +{% tabs %} |
| 57 | +{% tab title="Python" %} |
| 58 | +{% code overflow="wrap" %} |
| 59 | +```python |
| 60 | +import requests |
| 61 | +import json |
| 62 | + |
| 63 | +def main(): |
| 64 | + response = requests.post( |
| 65 | + "https://api.aimlapi.com/v1/images/generations", |
| 66 | + headers={ |
| 67 | + # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>: |
| 68 | + "Authorization": "Bearer <YOUR_AIMLAPI_KEY>", |
| 69 | + "Content-Type": "application/json", |
| 70 | + }, |
| 71 | + json={ |
| 72 | + "model": "bytedance/dreamina-creative-upscale", |
| 73 | + "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png", |
| 74 | + "resolution": "2k", |
| 75 | + "scale": 50, |
| 76 | + "response_format": "url", |
| 77 | + } |
| 78 | + ) |
| 79 | + |
| 80 | + data = response.json() |
| 81 | + print(json.dumps(data, indent=2, ensure_ascii=False)) |
| 82 | + |
| 83 | +if __name__ == "__main__": |
| 84 | + main() |
| 85 | +``` |
| 86 | +{% endcode %} |
| 87 | +{% endtab %} |
| 88 | + |
| 89 | +{% tab title="JS" %} |
| 90 | +{% code overflow="wrap" %} |
| 91 | +```javascript |
| 92 | +async function main() { |
| 93 | + const response = await fetch('https://api.aimlapi.com/v1/images/generations', { |
| 94 | + method: 'POST', |
| 95 | + headers: { |
| 96 | + // Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>: |
| 97 | + 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>', |
| 98 | + 'Content-Type': 'application/json', |
| 99 | + }, |
| 100 | + body: JSON.stringify({ |
| 101 | + model: 'bytedance/dreamina-creative-upscale', |
| 102 | + image_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png', |
| 103 | + resolution: '2k', |
| 104 | + scale: 50, |
| 105 | + response_format: 'url', |
| 106 | + }), |
| 107 | + }); |
| 108 | + |
| 109 | + const data = await response.json(); |
| 110 | + console.log(JSON.stringify(data, null, 2)); |
| 111 | +} |
| 112 | + |
| 113 | +main(); |
| 114 | +``` |
| 115 | +{% endcode %} |
| 116 | +{% endtab %} |
| 117 | +{% endtabs %} |
| 118 | + |
| 119 | +<details> |
| 120 | + |
| 121 | +<summary>Response</summary> |
| 122 | + |
| 123 | +{% code overflow="wrap" %} |
| 124 | +```json5 |
| 125 | +{ |
| 126 | + "data": [ |
| 127 | + { |
| 128 | + "url": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png", |
| 129 | + "b64_json": null |
| 130 | + } |
| 131 | + ], |
| 132 | + "meta": { |
| 133 | + "usage": { |
| 134 | + "credits_used": 120000, |
| 135 | + "usd_spent": 0.06 |
| 136 | + } |
| 137 | + } |
| 138 | +} |
| 139 | +``` |
| 140 | +{% endcode %} |
| 141 | + |
| 142 | +</details> |
0 commit comments