Health Check
curl --request GET \
--url https://api.stratus.run/healthimport requests
url = "https://api.stratus.run/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.stratus.run/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_URL => "https://api.stratus.run/health",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "https://api.stratus.run/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.stratus.run/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stratus.run/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "<string>",
"stratus_models_loaded": [
"<string>"
],
"llm_providers": [
"<string>"
],
"vault": "<string>",
"brain": {
"brain.loaded": true,
"brain.device": "<string>",
"brain.num_actions": 123,
"brain.sentence_transformers": true,
"brain.tool_matching": "<string>"
},
"version": "<string>",
"git_sha": "<string>"
}API Reference
Health Check
Check API health and model availability
GET
/
health
Health Check
curl --request GET \
--url https://api.stratus.run/healthimport requests
url = "https://api.stratus.run/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.stratus.run/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_URL => "https://api.stratus.run/health",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "https://api.stratus.run/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.stratus.run/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stratus.run/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "<string>",
"stratus_models_loaded": [
"<string>"
],
"llm_providers": [
"<string>"
],
"vault": "<string>",
"brain": {
"brain.loaded": true,
"brain.device": "<string>",
"brain.num_actions": 123,
"brain.sentence_transformers": true,
"brain.tool_matching": "<string>"
},
"version": "<string>",
"git_sha": "<string>"
}Overview
The/health endpoint provides real-time status information about the Stratus API, loaded models, LLM provider availability, and vault connectivity.
No authentication required - This endpoint is publicly accessible for monitoring and debugging.
Use Cases
Monitoring
Monitor API availability and model status
Service Discovery
Discover available models and providers
Debugging
Troubleshoot connection and availability issues
Health Checks
Integrate with load balancers and monitoring tools
Request
No parameters required. Simple GET request:GET https://api.stratus.run/health
Response
{
"status": "healthy",
"stratus_models_loaded": ["base"],
"llm_providers": ["openai", "anthropic", "google", "openrouter"],
"vault": "connected",
"brain": {
"loaded": true,
"checkpoint": "/home/formation/stratus_checkpoints/policy_probe/policy_probe_v4_best.pt",
"device": "cuda",
"num_actions": 903,
"random_baseline_nats": 6.8057,
"sentence_transformers": true,
"tool_matching": "sentence-transformers"
},
"version": "1.0.0",
"git_sha": "2abf045f"
}
Response Fields
string
Overall API health status. Returns
"healthy" when the service is running.string[]
Array of loaded Stratus world model sizes (e.g.,
["base"]).string[]
Array of registered LLM provider names. Current providers:
openai, anthropic, google, openrouter.string
Supabase Vault connection status for encrypted LLM key storage:
"connected" or "disabled".object
Policy head and world model status.
Show brain fields
Show brain fields
boolean
Whether the policy head checkpoint is loaded and ready.
string
Compute device (
"cuda" or "cpu").integer
Size of the action vocabulary (currently 903).
boolean
Whether sentence-transformers is loaded for semantic tool matching.
string
Tool matching strategy:
"sentence-transformers" (semantic) or "keyword" (fallback).string
API version string.
string
Git commit SHA of the deployed build.
Status Interpretation
Overall Status
| Status | Meaning | Action |
|---|---|---|
healthy | All systems operational | No action needed |
Vault Status
| Status | Meaning |
|---|---|
connected | LLM key management available |
disabled | Vault not configured — /v1/account/llm-keys endpoints unavailable |
Examples
Check API Health
curl https://api.stratus.run/health
const response = await fetch('https://api.stratus.run/health');
const health = await response.json();
if (health.status === 'healthy') {
console.log('API is healthy');
console.log('Loaded models:', health.stratus_models_loaded);
console.log('Providers:', health.llm_providers);
} else {
console.warn('API status:', health.status);
}
import requests
response = requests.get("https://api.stratus.run/health")
health = response.json()
if health['status'] == 'healthy':
print('API is healthy')
print(f"Loaded models: {health['stratus_models_loaded']}")
print(f"Providers: {health['llm_providers']}")
else:
print(f"API status: {health['status']}")
Check Provider Registration
async function isProviderRegistered(provider: 'openai' | 'anthropic') {
const response = await fetch('https://api.stratus.run/health');
const health = await response.json();
return (health.llm_providers as string[]).includes(provider);
}
// Use before making requests
const openaiAvailable = await isProviderRegistered('openai');
if (openaiAvailable) {
// Proceed with OpenAI-based request
}
Integration with Load Balancer
# Health check endpoint for Kubernetes/Docker
from flask import Flask, jsonify
import requests
app = Flask(__name__)
@app.route('/health')
def health_check():
try:
stratus_health = requests.get(
"https://api.stratus.run/health",
timeout=5
).json()
if stratus_health['status'] == 'healthy':
return jsonify({"status": "ok"}), 200
else:
return jsonify({"status": "degraded"}), 503
except Exception as e:
return jsonify({"status": "error", "message": str(e)}), 503
Monitoring Dashboard
async function getHealthDashboard() {
const response = await fetch('https://api.stratus.run/health');
const health = await response.json();
return {
apiStatus: health.status,
modelsLoaded: health.stratus_models_loaded as string[],
providers: health.llm_providers as string[],
vaultConnected: health.vault === 'connected',
version: health.version
};
}
// Display in UI
const dashboard = await getHealthDashboard();
console.log('Models loaded:', dashboard.modelsLoaded);
console.log('Providers:', dashboard.providers);
Performance
| Metric | Value |
|---|---|
| Latency | <100ms (typically ~50ms) |
| Availability | 99.9% uptime |
| Rate Limit | No rate limit (public endpoint) |
| Caching | No caching recommended (live status) |
Use in Production
Health Check Polling
// Poll every 30 seconds
setInterval(async () => {
try {
const response = await fetch('https://api.stratus.run/health', {
signal: AbortSignal.timeout(5000)
});
const health = await response.json();
// Update internal status
updateServiceStatus(health);
// Alert if degraded
if (health.status !== 'healthy') {
alertOps('Stratus API degraded', health);
}
} catch (error) {
alertOps('Stratus API unreachable', error);
}
}, 30000);
Circuit Breaker Pattern
import time
from enum import Enum
class CircuitState(Enum):
CLOSED = "closed"
OPEN = "open"
HALF_OPEN = "half_open"
class StratusCircuitBreaker:
def __init__(self, failure_threshold=3, timeout=60):
self.state = CircuitState.CLOSED
self.failures = 0
self.failure_threshold = failure_threshold
self.timeout = timeout
self.last_failure_time = None
def check_health(self):
try:
response = requests.get(
"https://api.stratus.run/health",
timeout=5
)
health = response.json()
if health['status'] == 'healthy':
self.on_success()
return True
else:
self.on_failure()
return False
except:
self.on_failure()
return False
def on_success(self):
self.failures = 0
self.state = CircuitState.CLOSED
def on_failure(self):
self.failures += 1
self.last_failure_time = time.time()
if self.failures >= self.failure_threshold:
self.state = CircuitState.OPEN
def can_request(self):
if self.state == CircuitState.CLOSED:
return True
if self.state == CircuitState.OPEN:
if time.time() - self.last_failure_time > self.timeout:
self.state = CircuitState.HALF_OPEN
return True
return False
# HALF_OPEN - try one request
return True
# Usage
breaker = StratusCircuitBreaker()
if breaker.can_request() and breaker.check_health():
# Make API request
pass
else:
# Use fallback
pass
Troubleshooting
Endpoint Not Responding
Symptoms: Timeout or connection refused Possible Causes:- Network connectivity issues
- DNS resolution problems
- Firewall blocking HTTPS traffic
# Test connectivity
curl -v https://api.stratus.run/health
# Check DNS
nslookup api.stratus.run
# Check with different DNS
curl --dns-servers 8.8.8.8 https://api.stratus.run/health
No Models Loaded
Symptoms:stratus_models_loaded is empty []
Meaning: No Stratus world model is loaded — all chat/messages/rollout/embeddings requests will fail
Action:
- Check
stratus_models_loadedarray - Contact support if models are not loading
- Monitor for recovery
Vault Disabled
Symptoms:vault: "disabled"
Impact: Cannot use /v1/account/llm-keys endpoints for encrypted key storage
Workaround: Pass LLM provider keys directly in requests (less secure but functional)
Integration Examples
With Prometheus
from prometheus_client import Gauge
import requests
stratus_health = Gauge('stratus_health', 'Stratus API health status', ['component'])
def collect_health_metrics():
response = requests.get("https://api.stratus.run/health")
health = response.json()
# Overall status (1 = healthy, 0 = unhealthy)
status_value = 1.0 if health['status'] == 'healthy' else 0.0
stratus_health.labels(component='api').set(status_value)
# Provider availability
for provider in health['llm_providers']:
stratus_health.labels(component=f'provider_{provider}').set(1.0)
# Models loaded
for model in health['stratus_models_loaded']:
stratus_health.labels(component=f'model_{model}').set(1.0)
With Datadog
import { StatsD } from 'node-dogstatsd';
const statsd = new StatsD();
async function reportHealthToDatadog() {
const response = await fetch('https://api.stratus.run/health');
const health = await response.json();
// Send metrics
statsd.gauge('stratus.health.status',
health.status === 'healthy' ? 1 : 0
);
// Provider availability
(health.llm_providers as string[]).forEach((provider) => {
statsd.gauge(`stratus.provider.${provider}.available`, 1);
});
// Model availability
(health.stratus_models_loaded as string[]).forEach((model) => {
statsd.gauge(`stratus.model.${model}.loaded`, 1);
});
}
Related Endpoints
- Models - List available model combinations
- LLM Keys - Manage encrypted LLM keys (requires vault connection)
Best Practices
- Poll health endpoint every 30-60 seconds for production monitoring
- Implement circuit breaker pattern to handle degraded states gracefully
- Monitor vault connection if using LLM key management features
- Set appropriate timeouts (5s recommended) to avoid blocking on health checks
⌘I

