API Reference
Complete reference for all RAIL Score API endpoints
API Endpoints at a Glance
Score content across 8 RAIL dimensions. Basic or deep mode.
1–3 credits
Evaluate + automatically improve content until thresholds are met.
2–15 credits
Check content against regulatory frameworks (GDPR, HIPAA, etc.).
5–10 credits
Base URL
https://api.responsibleailabs.aiAuthentication
All scoring endpoints require a Bearer token in the Authorization header. Your API key starts with rail_.
Authorization: Bearer YOUR_RAIL_API_KEYEndpoints Overview
/railscore/v1/evalScore content across 8 RAIL dimensions. Supports basic and deep analysis modes, custom dimension selection, and custom weights.
/railscore/v1/safe-regenerateEvaluate content against thresholds and iteratively regenerate improved versions until quality targets are met.
/railscore/v1/compliance/checkAssess content against regulatory frameworks: GDPR, CCPA, HIPAA, EU AI Act, India DPDP, India AI Governance.
/railscore/v1/agent/tool-callPre-execution evaluation of an agentic tool call. Returns ALLOW, FLAG, or BLOCK with compliance signals. Requires agent:evaluate scope.
/railscore/v1/agent/tool-resultPost-execution scan of a tool result. Checks for PII, prompt injection, and RAIL dimension violations.
/railscore/v1/agent/prompt-injectionFast prompt injection classifier. Detects direct override, role hijack, jailbreak, data exfiltration, and indirect injection patterns.
/railscore/v1/agent/registry/toolsManage your organization's Tool Risk Registry. List, register, and delete custom tool risk profiles. Org overrides take precedence over system defaults.
/verifyVerify your API key is valid and check your account status.
Request Lifecycle
API key valid?
balance sufficient?
cached result?
ML + NLP pipeline
JSON + credits_consumed
Cache hit → skip Scoring, return immediately at 0 credits
Error Handling
All errors return a JSON body with an error message.
| Code | Meaning |
|---|---|
400 | Bad Request — Invalid parameters, content too short/long, invalid mode or dimensions |
401 | Unauthorized — Missing or invalid API key |
402 | Insufficient Credits — Includes balance and required amounts |
403 | Forbidden — API key inactive, suspended, or insufficient tier |
422 | Unprocessable — Content refused due to critical ethical violations (regeneration only) |
429 | Rate Limit Exceeded |
500 | Internal Server Error |
402 Error Example
{
"error": "Insufficient credits: 0.5 available, 3.0 required",
"balance": 0.5,
"required": 3.0
}Status & Support
System Status
Check real-time API uptime, ongoing incidents, and scheduled maintenance.
Report a Problem
Experiencing an issue? Submit a report and our team will investigate.
Content Limits
| Endpoint | Min | Max |
|---|---|---|
| /eval | 10 chars | 10,000 chars |
| /compliance/check | 1 char | 50,000 chars |