# Test your HF Space API $baseUrl = "https://bravedims-ai-avatar-chat.hf.space" Write-Host "Testing HF Space API..." -ForegroundColor Yellow Write-Host "Base URL: $baseUrl" -ForegroundColor Cyan # Test health endpoint try { Write-Host "`nTesting health endpoint..." -ForegroundColor Green $healthResponse = Invoke-RestMethod -Uri "$baseUrl/health" -Method GET -TimeoutSec 30 Write-Host "✅ Health Check Response:" -ForegroundColor Green $healthResponse | ConvertTo-Json -Depth 3 } catch { Write-Host "❌ Health check failed: $($_.Exception.Message)" -ForegroundColor Red Write-Host "This might mean the Space is still building or not running yet." -ForegroundColor Yellow } # Test if Space exists (even if not running) try { Write-Host "`nTesting if Space URL exists..." -ForegroundColor Green $response = Invoke-WebRequest -Uri $baseUrl -Method GET -TimeoutSec 30 -ErrorAction SilentlyContinue Write-Host "✅ Space URL is accessible (Status: $($response.StatusCode))" -ForegroundColor Green } catch { Write-Host "❌ Space URL not accessible: $($_.Exception.Message)" -ForegroundColor Red } Write-Host "`n📋 Your API Information:" -ForegroundColor Magenta Write-Host "Base URL: $baseUrl" -ForegroundColor White Write-Host "Health: GET $baseUrl/health" -ForegroundColor White Write-Host "Generate: POST $baseUrl/generate" -ForegroundColor White Write-Host "Gradio UI: $baseUrl/gradio" -ForegroundColor White