मुख्य सामग्री पर जाएं
दो utility endpoints जो 0 credits cost करते हैं और सभी plans के लिए available हैं।

Health check

GET /health - current service status return करता है। Authentication required नहीं है।
curl https://api.responsibleailabs.ai/health
{
  "status": "healthy",
  "service": "rail-score-engine"
}
status
string
"healthy" जब service fully operational हो। इसे uptime monitoring और load balancer health probes के लिए use करें।
service
string
हमेशा "rail-score-engine"

Key verification

POST /verify - verify करता है कि API key valid और active है। Key का plan और remaining credits return करता है।
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 अगर key active और authorized है। false अगर key revoked है या exist नहीं करती।
plan
string
इस key से associated plan: "free", "pro", "business", या "enterprise"
credits_remaining
number
Current monthly period में बचे हुए credits।

Error responses

StatusMeaning
401Missing या invalid Authorization header
403Key revoked या inactive है
503Service temporarily unavailable - exponential backoff के साथ retry करें

SDKs में usage

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

आगे क्या देखें

Authentication

API keys कैसे generate और manage करें।

Credits & Pricing

हर endpoint के credit costs और plan allocations।