# Image Upload

## Explanation

This API endpoint allows users to upload images to the server. It is designed to handle image files and store them in the server's storage system.&#x20;

\
The API supports a wide range of image formats, including JPG, JPEG, PNG, and WEBP, as well as RAW file formats such as [DNG, ARW, RAF, NEF, etc.](#user-content-fn-1)[^1]<br>

***

<mark style="color:green;">**`POST`**</mark> **`https://api.aihomedesign.com/v1/order/image`**

***

## Request Body

Ensure that your request body is in the <mark style="color:red;">**form-data**</mark> format.

<table><thead><tr><th>Name</th><th width="236">Type</th><th>Description</th></tr></thead><tbody><tr><td>image<mark style="color:red;">*</mark></td><td>File</td><td>Your image file<br><code>Max size:</code><strong><code>50 MB</code></strong></td></tr><tr><td>service_name<mark style="color:red;">*</mark></td><td>Text</td><td><p>Possible options for service_name:<br><strong><code>service-creative-designer</code></strong>,</p><p><strong><code>service-ai-virtual-staging</code></strong>,</p><p><strong><code>service-item-removal</code></strong>,</p><p><strong><code>service-day-to-dusk</code></strong>,</p><p><strong><code>service-image-enhancement</code></strong></p></td></tr></tbody></table>

## Headers

<table><thead><tr><th>Key</th><th>Value</th><th data-hidden></th></tr></thead><tbody><tr><td>x-api-key <mark style="color:red;">*</mark></td><td>{your_api_key_here}</td><td></td></tr></tbody></table>

## Response

{% tabs %}
{% tab title="200: OK; image successfully uploaded" %}

```json
{
    "order_id": string
}
```

*If the image uploads successfully, the response will include an `order_id`***.**

**Make sure you keep the `order_id`. You’ll need it to submit the order.**
{% endtab %}

{% tab title="400: Bad request; no such file" %}

```json
{
    "error": "http: no such file"
}
```

*If no image is provided, the response will return an error.*
{% endtab %}
{% endtabs %}

[^1]: How about HEIC?


---

# 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://doc.aihomedesign.com/api-endpoints/image-upload.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.
