API Reference
Complete reference for all RAIL API endpoints
Base URL
https://api.responsibleailabs.aiAuthentication
All API requests (except /health) require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_RAIL_API_KEYUtility Endpoints
/healthCheck API availability (no authentication required)
/verifyVerify API key validity and check plan tier
Evaluation Endpoints
Score and analyze content across 8 RAIL dimensions.
/railscore/v1/score/basicFast response with essential scoring information only
/railscore/v1/score/detailedDetailed insights with issues, explanations, and AI-generated reprompt
/railscore/v1/score/basic/dimensionFast evaluation of a single specific dimension
/railscore/v1/score/detailed/dimensionDetailed analysis of a single specific dimension with explanations and issues
/railscore/v1/score/basic/customFast evaluation with user-selected dimensions and custom percentage-based weights
/railscore/v1/score/detailed/customDetailed analysis with user-selected dimensions and custom weights
Reprompt Endpoints
Generate improvement prompts for AI-generated content.
/railscore/v1/reprompt/basicEvaluate AI-generated content and provide improvement prompt if below threshold
/railscore/v1/reprompt/detailedDetailed evaluation and comprehensive improvement prompt with specific issues per dimension
Error Handling
| Code | Meaning |
|---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - API key inactive or suspended |
422 | Unprocessable Entity - Validation error |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |