Files
AIGC/test-storyboard-api.ps1

25 lines
842 B
PowerShell
Raw Normal View History

# 测试分镜视频API
$uri = "http://localhost:8080/api/storyboard-video/create"
$token = "eyJhbGciOiJIUzUxMiJ9.eyJyb2xlIjoiUk9MRV9VU0VSIiwidXNlcklkIjoxLCJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE3NjE3MDQ1MjcsImV4cCI6MTc2MTc5MDkyN30.msGvOH48sa5np8LFLGl0AGfW1dOwiw6nK_sSi1b4Mm5mRuhsFiRH8eRLgJY9K8NbvvdnvdBDMR-8dWAwAtN5Yw"
$body = @{
prompt = "测试分镜图生成"
aspectRatio = "16:9"
hdMode = $false
} | ConvertTo-Json
$headers = @{
"Content-Type" = "application/json"
"Authorization" = "Bearer $token"
}
try {
$response = Invoke-RestMethod -Uri $uri -Method Post -Body $body -Headers $headers
Write-Host "Success: $($response | ConvertTo-Json)"
} catch {
Write-Host "Error: $($_.Exception.Message)"
if ($_.ErrorDetails) {
Write-Host "Details: $($_.ErrorDetails.Message)"
}
}