Skip to main content
GET
/
health
Health API
curl --request GET \
  --url http://127.0.0.1:8765/health \
  --header 'X-API-Key: <api-key>'
import requests

url = "http://127.0.0.1:8765/health"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('http://127.0.0.1:8765/health', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_PORT => "8765",
  CURLOPT_URL => "http://127.0.0.1:8765/health",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:8765/health"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://127.0.0.1:8765/health")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:8765/health")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "<string>",
  "schema_version": "<string>",
  "server_name": "<string>",
  "server_version": "<string>",
  "providers": [
    {}
  ],
  "endpoint_count": 123
}

Health API

The health endpoint provides server health status and basic information about available providers.

Overview

Every PraisonAI server exposes /health which returns the current health status along with provider information.

When to Use

  • Health checks: Kubernetes/Docker health probes
  • Load balancer: Backend health verification
  • Monitoring: Uptime and availability monitoring

Base URL + Playground

# Start server
praisonai serve unified --host 127.0.0.1 --port 8765
Base URL: http://127.0.0.1:8765

Request

none
none
No parameters required.

Example Request

curl http://127.0.0.1:8765/health
import requests

response = requests.get("http://127.0.0.1:8765/health")
health = response.json()
print(f"Status: {health['status']}")
const response = await fetch("http://127.0.0.1:8765/health");
const health = await response.json();
console.log(`Status: ${health.status}`);

Response

status
string
required
Health status: healthy or unhealthy
schema_version
string
Discovery schema version
server_name
string
Server name
server_version
string
Server version
providers
array
List of provider types available
endpoint_count
integer
Number of registered endpoints

Example Response

{
  "status": "healthy",
  "schema_version": "1.0.0",
  "server_name": "praisonai-unified",
  "server_version": "1.0.0",
  "providers": ["agents-api", "recipe", "mcp", "a2a", "a2u"],
  "endpoint_count": 5
}

Errors

StatusDescription
200Server is healthy
500Server error

CLI Equivalent

# Health check via endpoints CLI
praisonai endpoints health --url http://127.0.0.1:8765

Configuration

Health endpoint is automatically added to all servers. No configuration required.

Notes

  • Returns 200 for healthy, 500 for unhealthy
  • Use for Kubernetes liveness/readiness probes
  • No authentication required