Skip to main content
GET
/
health
Health Check
curl --request GET \
  --url https://memory.stru.ai/health
{
  "status": "<string>"
}

Overview

Check the API health status. This endpoint also serves to warm up cold-start servers, improving response times for subsequent requests.
Call this endpoint when your application starts to ensure fast response times for your first user request.

Authentication

This endpoint does not require authentication

Response

status
string
Health status of the API
"status": "healthy"

Example Request

curl https://memory.stru.ai/health

Example Response

{
  "status": "healthy"
}

Best Practices

Warm up on startup - Call this endpoint when your application initializes to avoid cold-start delays
Health monitoring - Use in production health checks and monitoring systems
First call may be slow - If the server is cold, the first call takes longer. Subsequent calls are fast.

Use Cases

App Initialization

Call on app startup to warm up the API and ensure fast user experience

Health Monitoring

Use in monitoring systems to verify API availability

Load Balancer Checks

Configure as a health check endpoint for load balancers

Example: App Startup

import requests

def initialize_memory_api():
    """Warm up the Memory API on app startup"""
    try:
        response = requests.get("https://memory.stru.ai/health", timeout=10)
        if response.status_code == 200:
            print("✓ Memory API is healthy and warmed up")
        else:
            print("⚠ Memory API health check returned unexpected status")
    except Exception as e:
        print(f"✗ Memory API health check failed: {e}")

# Call during app initialization
if __name__ == "__main__":
    initialize_memory_api()
    # Continue with app startup...