![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/.cursor-server/data/User/History/-49eb70c3/ |
<?php
// Test with correct model names
$api_url = 'https://api.api.box/api/v1/generate';
$api_key = '63edba40620216c5aa2c04240ac41dbd';
$models_to_test = [
'V3_5',
'V4',
'V4_5'
];
echo "<h2>Testing API.Box with Correct Models</h2>";
foreach ($models_to_test as $model) {
echo "<h3>Testing model: $model</h3>";
$test_data = [
'prompt' => 'Test music generation',
'model' => $model,
'style' => 'Pop',
'title' => 'Test Track',
'customMode' => false,
'instrumental' => false,
'duration' => 30,
'callBackUrl' => 'https://soundstudiopro.com/callback.php'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($test_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $api_key,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "<p>HTTP Code: $http_code</p>";
echo "<p>Response: " . htmlspecialchars($response) . "</p>";
$api_result = json_decode($response, true);
if ($http_code === 200 && isset($api_result['code']) && $api_result['code'] === 200) {
echo "<p style='color: green;'>✅ Model $model works perfectly!</p>";
echo "<p>Task ID: " . ($api_result['data']['taskId'] ?? 'N/A') . "</p>";
} elseif ($http_code === 200 && isset($api_result['code']) && $api_result['code'] === 400) {
echo "<p style='color: orange;'>⚠️ Model $model has issues: " . ($api_result['msg'] ?? 'Unknown error') . "</p>";
} else {
echo "<p style='color: red;'>❌ Model $model failed</p>";
}
echo "<hr>";
}
?>