Skip to main content
GET
/
health
Health Check
curl --request GET \
  --url https://api.stratus.run/health
{
  "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

status
string
Overall API health status. Returns "healthy" when the service is running.
stratus_models_loaded
string[]
Array of loaded Stratus world model sizes (e.g., ["base"]).
llm_providers
string[]
Array of registered LLM provider names. Current providers: openai, anthropic, google, openrouter.
vault
string
Supabase Vault connection status for encrypted LLM key storage: "connected" or "disabled".
brain
object
Policy head and world model status.
version
string
API version string.
git_sha
string
Git commit SHA of the deployed build.

Status Interpretation

Overall Status

StatusMeaningAction
healthyAll systems operationalNo action needed

Vault Status

StatusMeaning
connectedLLM key management available
disabledVault not configured — /v1/account/llm-keys endpoints unavailable

Examples

Check API Health

curl https://api.stratus.run/health

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

MetricValue
Latency<100ms (typically ~50ms)
Availability99.9% uptime
Rate LimitNo rate limit (public endpoint)
CachingNo 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
Solution:
# 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:
  1. Check stratus_models_loaded array
  2. Contact support if models are not loading
  3. 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);
  });
}
  • 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