#!/bin/bash # Test script for Banatie API endpoints BASE_URL="http://localhost:3000" echo "🧪 Testing Banatie API Endpoints" echo "================================" # Test 1: Health check echo "1. Testing health endpoint..." curl -s "$BASE_URL/health" | jq '.' || echo "Health endpoint failed" echo -e "\n" # Test 2: API info echo "2. Testing API info endpoint..." curl -s "$BASE_URL/api/info" | jq '.' || echo "API info endpoint failed" echo -e "\n" # Test 3: Text-to-image endpoint validation (should fail without API key) echo "3. Testing text-to-image endpoint (should fail without valid API key)..." curl -s -X POST "$BASE_URL/api/text-to-image" \ -H "Content-Type: application/json" \ -d '{"prompt": "A simple test image", "filename": "test"}' | jq '.' || echo "Text-to-image endpoint test failed" echo -e "\n" echo "✅ API tests completed!"