跳转到主要内容

Base URL

https://api.responsibleailabs.ai

Authentication

All endpoints (except /health) require a Bearer token:
Authorization: Bearer YOUR_RAIL_API_KEY
Keys start with rail_. Generate yours from the dashboard.

Endpoints

MethodEndpointCreditsDescription
POST/railscore/v1/eval0.2–3.0Evaluate content across 8 RAIL dimensions
POST/railscore/v1/safe-regenerate1.0–9.0Evaluate + regenerate until threshold met
POST/railscore/v1/compliance/check5.0–10.0Regulatory compliance check
POST/railscore/v1/agent/evaluate-tool-call1.5–3.0Evaluate agent tool call before execution
POST/railscore/v1/agent/scan-tool-result0.5–1.0Scan tool result for PII and injection
POST/railscore/v1/agent/detect-injection0.5Detect prompt injection in text
POST/verify0Verify API key and check balance
GET/health0Service health check

Error codes

StatusMeaning
400Invalid request - check parameters
401Missing or invalid API key
402Insufficient credits
403Key revoked or plan restriction
422Validation error - content too short/long
429Rate limit exceeded
503Service temporarily unavailable
All error responses include a JSON body:
{
  "error": {
    "code": "insufficient_credits",
    "message": "Requires 3.0 credits, balance is 1.5",
    "required": 3.0,
    "balance": 1.5
  }
}