AI Health Tracker API Documentation

This API provides real-time health status information for various AI services including OpenAI, X.AI (Grok), Google Gemini, Anthropic, DeepSeek, and Perplexity.

Authentication

All API requests require authentication using an API key. You can provide the API key using the X-RapidAPI-Key header.

Base URL

The base URL for all API endpoints is: https://apiun.replit.app/services/health-tracker/v1

Note: The legacy URL https://apiun.replit.app/api/v1 is still supported for backward compatibility.

Endpoints

GET /health

Get the health status of all AI services.

Response

{
  "success": true,
  "timestamp": "2023-06-15T12:34:56.789Z",
  "overall_status": {
    "status": "All Systems Operational",
    "operational_count": 5,
    "degraded_count": 1,
    "offline_count": 0,
    "unknown_count": 0,
    "total_count": 6
  },
  "services": {
    "openai": {
      "status": "Online",
      "lastChecked": "2023-06-15T12:34:55.123Z",
      "details": { ... },
      "subservices": [
        { "name": "API (US East)", "status": "Online" },
        { "name": "API (US West)", "status": "Online" },
        { "name": "API (EU)", "status": "Online" },
        { "name": "ChatGPT Web", "status": "Online" },
        { "name": "ChatGPT Mobile", "status": "Online" }
      ]
    },
    "xai": {
      "status": "Degraded",
      "lastChecked": "2023-06-15T12:34:55.456Z",
      "details": { ... }
    },
    "google_gemini": {
      "status": "Online",
      "lastChecked": "2023-06-15T12:34:55.789Z",
      "details": { ... }
    },
    "anthropic": {
      "status": "Online",
      "lastChecked": "2023-06-15T12:34:56.123Z",
      "details": { ... }
    },
    "deepseek": {
      "status": "Offline",
      "lastChecked": "2023-06-15T12:34:56.456Z",
      "details": { ... }
    },
    "perplexity": {
      "status": "Online",
      "lastChecked": "2023-06-15T12:34:56.789Z",
      "details": { ... }
    }
  }
}

GET /health/:service

Get the health status of a specific AI service.

Path Parameters

Parameter Description Required
service The service to check. Valid options: openai, xai, google_gemini, anthropic, deepseek, perplexity Yes

Response

{
  "success": true,
  "timestamp": "2023-06-15T12:34:56.789Z",
  "service": "openai",
  "status": {
    "status": "Online",
    "lastChecked": "2023-06-15T12:34:55.123Z",
    "details": { ... }
  }
}

Status Definitions

Status Description
Online The service is operating normally.
Degraded The service is experiencing some issues but is still operational.
Offline The service is not available.
Unknown The service status could not be determined.

Error Responses

In case of an error, the API will return a JSON response with a status code of 4xx or 5xx.

{
  "success": false,
  "message": "Error message describing what went wrong",
  "error": "Detailed error information (if available)"
}

Live Demo

Test the API directly from this page.

Result:

Click a button above to test the API...

Code Examples

JavaScript/Node.js

const axios = require('axios');

async function checkAllServices() {
  try {
    const response = await axios.get('https://your-api-domain.com/api/v1/health', {
      headers: {
        'X-RapidAPI-Key': 'YOUR_API_KEY'
      }
    });
    console.log(response.data);
  } catch (error) {
    console.error('Error:', error.response ? error.response.data : error.message);
  }
}

checkAllServices();

Python

import requests

def check_all_services():
    try:
        response = requests.get(
            'https://your-api-domain.com/api/v1/health',
            headers={'X-RapidAPI-Key': 'YOUR_API_KEY'}
        )
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")
        return None

result = check_all_services()
print(result)