<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://modelslab.com/api/v6/video/text2video_ultra",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'model_id' => 'wan2.2',
'prompt' => '<string>',
'negative_prompt' => '<string>',
'seed' => 123,
'resolution' => 123,
'num_frames' => 81,
'num_inference_steps' => 25,
'guidance_scale' => 4,
'fps' => 15,
'portrait' => false,
'sample_shift' => 5,
'temp' => false,
'webhook' => '<string>',
'track_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}