Copy
curl -X POST "https://postapi.site/v1/api" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Service-ID: video-gen-i2v" \
-d '{
"image_url": "https:\/\/example.com\/image.jpg",
"prompt": "Animate this image"
}'
import requests
import json
url = "https://postapi.site/v1/api"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"X-Service-ID": "video-gen-i2v"
}
data = {
"image_url": "https:\/\/example.com\/image.jpg",
"prompt": "Animate this image"
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())
const url = "https://postapi.site/v1/api";
const headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"X-Service-ID": "video-gen-i2v"
};
const body = JSON.stringify({
"image_url": "https:\/\/example.com\/image.jpg",
"prompt": "Animate this image"
});
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
<?php
$url = "https://postapi.site/v1/api";
$headers = [
"Content-Type: application/json",
"X-API-Key: YOUR_API_KEY",
"X-Service-ID: video-gen-i2v"
];
$data = {
"image_url": "https:\/\/example.com\/image.jpg",
"prompt": "Animate this image"
};
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>