Appearance
Create Video
POST
/api/v1/generation-video
Transform an image into a video. The output video will be 720x1280 pixels. The input image will be cropped to fit these proportions before processing. Specify the input image using one of the following:
generation_result_id
- ID of a previously generated result.image_url
- URL of any image.
Additional parameters:
prompt
(optional) - Guide the video generation process.duration
- Specify video length (must be5
for 5 seconds or10
for 10 seconds).
Note: Generated images referenced by generation_result_id
are only available for 4 hours after completion.
Authorizations
HTTPBearer
TypeHTTP (bearer)
Request Body
JSON
{
"generation_result_id": 0,
"image_url": "",
"prompt": "",
"duration": 0
}
Responses
Successful Response
application/json
JSON
{
"generation_id": 0,
"payload": "string",
"created_at": "string",
"updated_at": "string"
}
POST
/api/v1/generation-video
Samples
cURL
curl -X POST \
'https://api.uwear.ai/api/v1/generation-video' \
-H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/generation-video', {method:'POST',headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
PHP
<?php
$url = 'https://api.uwear.ai/api/v1/generation-video';
$method = 'POST';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Python
import requests
url = 'https://api.uwear.ai/api/v1/generation-video'
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.json())