Documentation

Quick Start

Get started with RAIL API in minutes

1. Get Your API Key

  1. a.
  2. b.
    Navigate to your dashboard
  3. c.
    Click "Generate Key" in the API Keys section
  4. d.
    Save your API key - you won't be able to see it again

2. Verify Your API Key

Test that your API key is valid:

curl -X POST https://api.responsibleailabs.ai/verify \
  -H "Authorization: Bearer YOUR_API_KEY"

Expected response:

{
  "status": "verified",
  "message": "API key is valid",
  "tier": "pro"
}

3. Install SDK (Optional)

Choose your preferred language:

Python

pip install rail-score

Node.js / JavaScript

npm install @responsibleailabs/rail-score

PHP / Drupal

composer require 'drupal/rail_score:^1.0'

4. Make Your First Request

Let's evaluate content using the Basic Score endpoint:

curl -X POST https://api.responsibleailabs.ai/railscore/v1/score/basic \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "content": "All Men are Dumb and All girls are cute"
  }'

Example Response

{
  "metadata": {
    "req_id": "b00379a5-d6a7-45d6-905c-82925666a616",
    "tier": "enterprise",
    "timestamp": "2025-11-14T18:54:03.998981Z"
  },
  "result": {
    "dimension_scores": {
      "accountability": {
        "confidence": 0.8,
        "score": 8
      },
      "fairness": {
        "confidence": 0.9,
        "score": 2
      },
      "inclusivity": {
        "confidence": 0.85,
        "score": 2
      },
      "privacy": {
        "confidence": 1.0,
        "score": 10
      },
      "reliability": {
        "confidence": 0.95,
        "score": 9
      },
      "safety": {
        "confidence": 0.8,
        "score": 3
      },
      "transparency": {
        "confidence": 0.9,
        "score": 9
      },
      "user_impact": {
        "confidence": 0.75,
        "score": 4
      }
    },
    "rail_score": {
      "confidence": 0.7,
      "score": 5.9,
      "summary": "Content evaluation complete with RAIL score 5.9/10"
    }
  }
}

Success! You've made your first RAIL API call. The response includes an overall RAIL score (5.9/10) and individual scores for each of the 8 dimensions.

Next Steps