> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akool.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image to Video API Overview

> Comprehensive guide to the Image to Video API

<Warning>
  The resources (image, video, voice) generated by our API are valid for 7 days.
  Please save the relevant resources as soon as possible to prevent expiration.
</Warning>

<Info>
  Experience our Image to Video AI technology in action by exploring our interactive demo on GitHub: [AKool Image to Video Demo](https://github.com/AKOOL-Official/akool-image-to-video-demo). This demo showcases how to transform static images into dynamic videos using prompt-driven animation, with support for multiple AI models, effects, and audio integration.
</Info>

## API Endpoints

### Image to Video Operations

* [Create Image to Video](/ai-tools-suite/image2video/create-video) - Transform a static image into a dynamic video
* [Create Batch Image to Video](/ai-tools-suite/image2video/create-batch) - Create multiple videos from images in a single request
* [Get Image to Video Results](/ai-tools-suite/image2video/get-results) - Retrieve video generation results by IDs
* [Get Available Effects](/ai-tools-suite/image2video/get-effects) - List all available video effects
* [Update Video Audio](/ai-tools-suite/image2video/update-audio) - Add or replace audio on a generated video
* [Delete Videos](/ai-tools-suite/image2video/delete-videos) - Delete generated videos by IDs

## Getting Started

### Basic Workflow

1. **Get Available Models** (Optional):
   ```
   GET /api/open/v4/aigModel/list?types[]=1501
   ```

2. **Create Image to Video**:
   * Prepare your image URL (PNG or JPEG)
   * Choose resolution, duration, and optional effects
   * Call the [Create Image to Video API](/ai-tools-suite/image2video/create-video) with your resources

3. **Check Results**:
   * Use the [Get Image to Video Results API](/ai-tools-suite/image2video/get-results) to check the status of your video
   * Download the result URL when the status is "Success" (status = 3)

4. **Update Audio** (Optional):
   * Use the [Update Video Audio API](/ai-tools-suite/image2video/update-audio) to add or replace audio on a completed video

### Response Code Description

<Note>
  Please note that if the value of the response code is not equal to 1000, the request
  has failed or encountered an error.
</Note>

| Code | Description                                            |
| ---- | ------------------------------------------------------ |
| 1000 | Success                                                |
| 1003 | Parameter error or Parameter cannot be empty           |
| 1008 | The content you get does not exist                     |
| 1009 | You do not have permission to operate                  |
| 1015 | Create video error, please try again later             |
| 1101 | Invalid authorization or The request token has expired |
| 1102 | Authorization cannot be empty                          |
| 1200 | The account has been banned                            |

## Video Status Codes

When checking results, the `status` field indicates the current state:

| Status | Description                                                         |
| ------ | ------------------------------------------------------------------- |
| 1      | In Queue - Your request is waiting to be processed                  |
| 2      | Processing - Video is currently being generated                     |
| 3      | Success - Video completed, result URL is available                  |
| 4      | Failed - Video generation failed, please check your input resources |

## Best Practices

### Image Requirements

* **Quality**: Use high-resolution images for better results
* **Format**: PNG or JPEG format is recommended
* **Content**: Clear, well-lit images produce better animation results

### API Usage Tips

* **Webhook**: Use the `webhookUrl` parameter to receive notifications when processing is complete
* **Prompt**: Use descriptive prompts to guide the animation style and motion
* **Negative Prompt**: Specify what to avoid for cleaner results
* **Effects**: Browse available effects with the [Get Available Effects API](/ai-tools-suite/image2video/get-effects) for creative video styles
* **Resolution**: Choose appropriate resolution based on your needs - higher resolution costs more credits and may take longer
* **Batch Creation**: Use the [Batch API](/ai-tools-suite/image2video/create-batch) to create multiple videos at once with the same settings
* **Result Cleanup**: Save generated videos promptly as they expire after 7 days

## Integration Workflow

1. **Get Available Models**
   ```
   GET /api/open/v4/aigModel/list?types[]=1501
   ```

2. **User Selects Model and Parameters**
   * Display models from step 1
   * Show supported resolutions and durations
   * Calculate and display credit cost

3. **Create Video(s)**
   ```
   POST /api/open/v4/image2Video/createBySourcePrompt/batch
   ```
   With selected `model_name` and parameters

4. **Check Results**
   ```
   POST /api/open/v4/image2Video/resultsByIds
   ```
   Using the `_id` values from creation response

**Notes**

* Models are sorted by `sort` field in descending order (higher values first)
* The `value` field should be used as the `model_name` parameter in creation APIs
* Resolution pricing may vary by model; check `resolutionList` for accurate costs
* Some advanced models may require paid accounts (`requiresPay: true`)
* The API returns an empty array for model types that are not yet implemented

## Support

For additional help and examples, check out our:

* [Authentication Guide](/authentication/usage)
* [Webhook Documentation](/ai-tools-suite/webhook)
