> For the complete documentation index, see [llms.txt](https://docs.autoenhance.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autoenhance.ai/images/downloading-images/original.md).

# Original

Original images are either original single-bracket or merged HDR image that you've uploaded.\
\
The only requirement for downloading original images is the image\_id, you don't need an API key in order to be able to download the image.

{% hint style="info" %}
**Before you continue**\
Original images come in various resolutions. You can add a query parameter size into the request url in order to choose between **small, large or big** resolution.\
\
Don't want to specify the size? Simply don't include it in the URL, and we will default the download to the biggest resolution.
{% endhint %}

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const size = "big"

const downloadOriginalImage = async (imageId, size) => {
    const response = await fetch(
        `https://api.autoenhance.ai/v3/images/${imageId}/original${size ? size : ''}`,
        { method: "GET" }
    );
    const imageSource = await response.json()
    
    return imageSource
}
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

size = "big"

def download_original_image(image_id,size):
    url = f'https://api.autoenhance.ai/v3/images/{image_id}/original{size if size else ""}'
    response = requests.get(url)
    image_source = response.json()
    
    return image_source
```

{% endtab %}

{% tab title="PHP" %}

```php
$image_id = "ID_OF_YOUR_IMAGE";
$size = "big";

function download_original_image($image_id, $size) {
    $url = "https://api.autoenhance.ai/v3/images/$image_id/original" . ($size ? $size : '');

    $options = array(
        'http' => array(
            'method' => 'GET'
        )
    );

    $context = stream_context_create($options);
    $result = file_get_contents($url, false, $context);

    if ($result === FALSE) {
        return 'Error downloading image';
    }

    $image_source = json_decode($result, true);
    return $image_source;
}
```

{% endtab %}

{% tab title="cURL" %}

```
curl -X GET \
  'https://api.autoenhance.ai/v3/images/YOUR_IMAGE_ID/originalbig' \
  -H 'Content-Type: application/json'
```

{% endtab %}
{% endtabs %}

### Specification

{% openapi src="<https://api.autoenhance.ai/docs/openapi.spec>" path="/v3/images/{id}/original" method="get" %}
<https://api.autoenhance.ai/docs/openapi.spec>
{% endopenapi %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.autoenhance.ai/images/downloading-images/original.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
