Endpoint
Request Headers
| Parameter | Value | Description |
|---|---|---|
| x-api-key | API Key | Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded. |
| Authorization | Bearer {token} | Your API Key used for request authorization.Get Token |
Body Attributes
| Parameter | Type | Required | Description |
|---|---|---|---|
| pre_video_id | String | true | Image to Video result _id |
| audio_url | String | true | Audio URL, required when audio_type = 2 |
| audio_type | Integer | true | 1 = AI Generate, 2 = user custom upload |
Response Attributes
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Interface returns business status code (1000:success) |
| msg | String | Interface returns status information |
| data | Object | Response data object |
| - create_time | Long | Creation timestamp |
| - uid | Integer | User ID |
| - team_id | String | Team ID |
| - update_time | Long | Last update time |
| - video_duration | Number | Video duration |
| - webhookUrl | String | Callback URL |
| - resolution | String | Resolution |
| - file_name | String | File name |
| - effect_name | String | Effect name |
| - _id | String | Document ID |
| - pre_video_id | String | Original video ID |
| - image_url | String | Image URL |
| - prompt | String | Prompt text |
| - negative_prompt | String | Negative prompt |
| - extend_prompt | Boolean | Whether extended prompts were used |
| - audio_type | Integer | Audio type |
| - audio_url | String | Audio URL |
| - deduction_credit | Integer | Credits deducted |
| - effect_code | String | Effect code |
| - status | Integer | Status: 1=queueing, 2=processing, 3=completed, 4=failed |
| - only_add_audio | Boolean | Whether only audio was added |
Example
Request Body
Request
Response
Important Notes
- The
pre_video_idmust be the_idof a completed video (status = 3) from a previous Create Image to Video request - When
audio_typeis 2 (custom upload), theaudio_urlparameter is required - When
audio_typeis 1 (AI generate), the system will automatically generate matching audio - The response creates a new video entry with its own
_id; use this to track the audio update status via Get Image to Video Results - Video to Audio is charged separately (5 credits for 5s, 10 credits for 10s) unless included in the original Image to Video creation