# Video Generation

Video generation transforms design images into short animated clips.\
It supports Home, Interior, Exterior, and Garden designs. The system adds motion and smooth visual transitions. This helps users explore designs in a more interactive way.

## ENDPOINT

<mark style="color:green;">**`POST`**</mark>  <mark style="color:purple;">`/video_generation`</mark>

An API URL would be like <mark style="color:blue;"><https://homedesigns.ai/api/v2/video\\_generation></mark>

{% hint style="info" %} <mark style="color:$primary;">Use this endpoint to generate videos instantly from the image. The Video Generation API leverages AI to create dynamic visual content.</mark>
{% endhint %}

{% tabs %}
{% tab title="Request" %}
{% hint style="info" %} <mark style="color:blue;">An API request must be in the</mark> <mark style="color:orange;">**`form-data`**</mark> <mark style="color:blue;">format.</mark>
{% endhint %}

### Request

<table><thead><tr><th width="301">Parameters &#x26; Data Type</th><th width="181">Value</th><th>Description</th></tr></thead><tbody><tr><td><p><mark style="color:red;"><strong><code>image</code></strong></mark>  </p><p>file[ .jpg, .jpeg, .png] / base64 Image <mark style="color:green;"><code>string</code></mark></p></td><td>         -</td><td>The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. <strong>(Required Parameter)</strong></td></tr><tr><td><p><mark style="color:red;"><strong><code>tool_name</code></strong></mark></p><p><mark style="color:green;"><code>string</code></mark></p></td><td>The tool_name should be in [pan_up, pan_down, pan_left_right, zoom_in, zoom_out, camera_pullback, rotate_cw, rotate_ccw, combining_motions, look_up, look_down].</td><td>Create dynamic design videos using camera effects like Pan, Zoom, Rotate, Pullback, etc.<br>Add smooth motion to make your Home, Interior, Exterior, and Garden designs more realistic.<strong>(Required Parameter)</strong></td></tr></tbody></table>
{% endtab %}

{% tab title="Errors" %}

### Parameters & Errors

<mark style="color:red;">**`image`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Image field required</td><td>Image not provided</td></tr><tr><td>Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.</td><td>Image Size Not Proper.</td></tr><tr><td>Invalid image format. Only PNG, JPEG and JPG images are allowed.</td><td>Image Format not valid.</td></tr></tbody></table>

<mark style="color:red;">**`tool_name`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>tool_name field required</td><td>Tool name not provided</td></tr><tr><td>tool_name value is not a valid enumeration member; permitted: 'pan_up'</td><td>Tool name not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`status_check`**</mark>&#x20;

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Please Enter a Valid Queue ID</td><td>Invalid queue ID.</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```json
//Output should be in list of array depends on no of designs as shown below:

{
    "input_image": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/input-77a61d7d-1fc6-4911-924b-fb05b4d9b76d-2026-03-31-07-16-30.png",
    "output_video": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/imageToClip/videos-807cdcca-2957-49b4-b4b4-282fcaf5d020-2026-03-31-07-17-25-video.mp4"
}
```

{% endtab %}
{% endtabs %}

#### Process for Using <mark style="color:blue;">`/video_generation`</mark> and <mark style="color:blue;">`/video_generation/status_check`</mark> Endpoints

<mark style="background-color:green;">**`GET`**</mark>  [https://homedesigns.ai/api/v2/video\_generation/status\_check/](https://homedesigns.ai/api/v2/virtual_staging/status_check/0dc62f7f-85f1-4d50-94e2-b5040375d96f-u1)<mark style="color:blue;">ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1</mark>

1. **Step 1: Pass Required Parameters to&#x20;**<mark style="color:$info;">**`/video_generation`**</mark>
   * When you send a request to the <mark style="color:$info;">**`/video_generation`**</mark>endpoint with all required parameters, it will generate a `queue_id`.
   * Example response from <mark style="color:$info;">**`/video_generation`**</mark>:

     ```json
     {
         "id": "ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1",
         "status": "IN_QUEUE"
     }
     ```
   * The `queue_id` (`id` value) from this response will be used in subsequent requests.

***

2. **Step 2: Use `queue_id` in&#x20;**<mark style="color:$info;">**`/video_generation/status_check`**</mark>**Endpoint**
   * Append the generated `queue_id` to the <mark style="color:$info;">**`/video_generation/status_check`**</mark>endpoint to check the processing status.
   * Example request:

     ```bash
     GET /video_generation/status_check/ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1
     ```

***

3. **Step 3: Review the Status Response**
   * The <mark style="color:$info;">**`/video_generation/status_check`**</mark> endpoint will return the current status of the process. Initially, the status might indicate that the process is still in  **`"starting"`**  wait a few moments and send the request again.
   * Example response:

     ```json
     {
         "created_at": "2025-05-26T12:39:19.094Z",
         "status": "starting"
     }
     ```
   * If the status is still pending **`"processing"`**, wait a few moments and send the request again.
   * Example response:
   * ```
     {
         "created_at": "2026-03-31T09:54:38.303Z",
         "started_at": "2026-03-31T09:54:38.322847005Z",
         "status": "processing"
     }
     ```
   * Once all the statuses marked as `IN_QUEUE` , `starting` and **`processing`** are completed, after hitting the requests one by one, you will see the results as follows:

     ```
     //Output should be in list of array depends on no of designs as shown below:

     {
         "input_image": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/input-77a61d7d-1fc6-4911-924b-fb05b4d9b76d-2026-03-31-07-16-30.png",
         "output_video": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/imageToClip/videos-807cdcca-2957-49b4-b4b4-282fcaf5d020-2026-03-31-07-17-25-video.mp4"
     }
     ```

***

4. **Step 4: Get the Final Result**

   * Continue checking the status by re sending the request to the <mark style="color:$info;">**`/video_generation/status_check`**</mark> endpoint until the status changes to `"SUCCESS"`.
   * When the status is `"SUCCESS"`, you will receive the final result in the response.<br>

   ## <sub>Tool name:</sub>

<table data-header-hidden><thead><tr><th width="305"></th><th></th></tr></thead><tbody><tr><td><mark style="color:purple;"><code>look_down</code></mark></td><td><mark style="color:purple;"><code>pan_up</code></mark></td></tr><tr><td><mark style="color:purple;"><code>pan_down</code></mark></td><td><mark style="color:purple;"><code>pan_left_right</code></mark></td></tr><tr><td><mark style="color:purple;"><code>zoom_in</code></mark></td><td><mark style="color:purple;"><code>camera_pullback</code></mark></td></tr><tr><td><mark style="color:purple;"><code>zoom_out</code></mark></td><td><mark style="color:purple;"><code>rotate_cw</code></mark></td></tr><tr><td><mark style="color:purple;"><code>rotate_ccw</code></mark></td><td><mark style="color:purple;"><code>combining_motions</code></mark></td></tr><tr><td><mark style="color:purple;"><code>look_up</code></mark></td><td></td></tr></tbody></table>

\ <br>
