Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	| ο»Ώ# 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 | |