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-t2v" \
-d '{
"prompt": "A cinematic shot of a futuristic city with flying cars, neon lights, 4k resolution.",
"aspect_ratio": "16:9",
"callback_url": "https:\/\/webhook.site\/..."
}'
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-t2v"
}
data = {
"prompt": "A cinematic shot of a futuristic city with flying cars, neon lights, 4k resolution.",
"aspect_ratio": "16:9",
"callback_url": "https:\/\/webhook.site\/..."
}
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-t2v"
};
const body = JSON.stringify({
"prompt": "A cinematic shot of a futuristic city with flying cars, neon lights, 4k resolution.",
"aspect_ratio": "16:9",
"callback_url": "https:\/\/webhook.site\/..."
});
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-t2v"
];
$data = {
"prompt": "A cinematic shot of a futuristic city with flying cars, neon lights, 4k resolution.",
"aspect_ratio": "16:9",
"callback_url": "https:\/\/webhook.site\/..."
};
$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;
?>