Documentation

API Reference

Complete reference for all RAIL API endpoints

Base URL

https://api.responsibleailabs.ai

Authentication

All API requests (except /health) require authentication using your API key in the Authorization header:

Authorization: Bearer YOUR_RAIL_API_KEY

Utility Endpoints

GET/health

Check API availability (no authentication required)

POST/verify

Verify API key validity and check plan tier

Evaluation Endpoints

Score and analyze content across 8 RAIL dimensions.

POST/railscore/v1/score/basic

Fast response with essential scoring information only

POST/railscore/v1/score/detailed

Detailed insights with issues, explanations, and AI-generated reprompt

POST/railscore/v1/score/basic/dimension

Fast evaluation of a single specific dimension

POST/railscore/v1/score/detailed/dimension

Detailed analysis of a single specific dimension with explanations and issues

POST/railscore/v1/score/basic/custom

Fast evaluation with user-selected dimensions and custom percentage-based weights

POST/railscore/v1/score/detailed/custom

Detailed analysis with user-selected dimensions and custom weights

Reprompt Endpoints

Generate improvement prompts for AI-generated content.

POST/railscore/v1/reprompt/basic

Evaluate AI-generated content and provide improvement prompt if below threshold

POST/railscore/v1/reprompt/detailed

Detailed evaluation and comprehensive improvement prompt with specific issues per dimension

Error Handling

CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - API key inactive or suspended
422Unprocessable Entity - Validation error
429Too Many Requests - Rate limit exceeded
500Internal Server Error