# Creating & Uploading

This API endpoint allows you to create an image. To create an image, you must provide a valid API key.

{% hint style="info" %}
We've prepared quick start guides for uploading images the simplest way possible. If you're stuck, or perhaps want to see simple code examples, then start over there!

[Single Image](/getting-started/quickstart/single-bracket.md)

[HDR Brackets](/getting-started/quickstart/hdr.md)
{% endhint %}

### Creating image

{% openapi src="<https://api.autoenhance.ai/docs/openapi.spec>" path="/v3/images/" method="post" expanded="false" %}
<https://api.autoenhance.ai/docs/openapi.spec>
{% endopenapi %}

{% hint style="info" %}
All of your uploaded images will contain an **order\_id** even if you don't specify it. If you want to upload multiple images into an order, you need to specify the **order\_id** while creating the image in our API. Learn more on the [Orders page](/orders.md).
{% endhint %}

After successfully creating an image, the response will include an `upload_url` or  `s3PutObjectUrl` if you're using an older API version.  To upload the physical image to our service, make a PUT request to this URL with the image in the body of the request.

## Uploading image

<mark style="color:orange;">`PUT`</mark> **`upload_url || s3PutObjectUrl`**

The body should contain the data for your image and the Content-Type should be equal to what you sent when creating the image.

**Headers**

| Name         | Value                                                                                                                                                                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-Type | <p>eg. <code>image/jpeg</code> This value has to match the used <code>content\_type</code> in create image request!<br><br>If you don't specify content\_type in the create image request please specify <code>application/octet-stream</code> for the header value</p> |

**Body**

| Type         | Description                     |
| ------------ | ------------------------------- |
| File or Blob | Image in a Blob or File format. |

**Response**

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

```json
{
  "status": "success"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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.autoenhance.ai/images/managing-images/creating-and-uploading.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.
