跳转到主要内容
Two utility endpoints that cost 0 credits and are available to all plans.

Health check

GET /health - returns the current service status. No authentication required.
curl https://api.responsibleailabs.ai/health
{
  "status": "healthy",
  "service": "rail-score-engine"
}
status
string
"healthy" when the service is fully operational. Use this for uptime monitoring and load balancer health probes.
service
string
Always "rail-score-engine".

Key verification

POST /verify - verifies that an API key is valid and active. Returns the plan and remaining credits for the key.
curl -X POST https://api.responsibleailabs.ai/verify \
  -H "Authorization: Bearer YOUR_RAIL_API_KEY"
{
  "valid": true,
  "plan": "pro",
  "credits_remaining": 847.5
}
valid
boolean
true if the key is active and authorized. false if the key is revoked or does not exist.
plan
string
The plan associated with this key: "free", "pro", "business", or "enterprise".
credits_remaining
number
Credit balance remaining in the current monthly period.

Error responses

StatusMeaning
401Missing or invalid Authorization header
403Key is revoked or inactive
503Service temporarily unavailable - retry with exponential backoff

Usage in SDKs

from rail_score_sdk import RailScoreClient

client = RailScoreClient(api_key="YOUR_RAIL_API_KEY")

# Check health
health = client.health()
print(health.status)  # "healthy"

# Verify key
info = client.verify()
print(info.valid)              # True
print(info.plan)               # "pro"
print(info.credits_remaining)  # 847.5

What’s next

Authentication

How to generate and manage API keys.

Credits & Pricing

Credit costs for each endpoint and plan allocations.