Skip to main content

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

MethodEndpointDescription
POST/railscore/v1/evalEvaluate content across 8 RAIL dimensions
POST/railscore/v1/safe-regenerateEvaluate and regenerate until the threshold is met
POST/railscore/v1/compliance/checkRegulatory compliance check
POST/railscore/v1/agent/tool-callEvaluate an agent tool call before execution
POST/railscore/v1/agent/tool-resultScan a tool result for PII and injection
POST/railscore/v1/agent/prompt-injectionDetect prompt injection in text
GET/railscore/v1/configRead the policy and configuration for your application
GET/railscore/v1/dimensionsThe RAIL dimensions and your weights/thresholds
GET/railscore/v1/capabilitiesFeatures and limits for your plan
POST/verifyVerify an API key and view identity
GET/healthService 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
  }
}