Documentation

Quick Start

Get started in less than 5 minutes

What you'll learn

  • How to authenticate with the RAIL API
  • How to make your first API call
  • How to interpret RAIL scores and confidence ratings
  • Understanding credit consumption

1Get Your API Key

First, you'll need to create an account and generate an API key:

  1. a.
    Sign up for a free account (no credit card required)
  2. b.
    Navigate to your dashboard
  3. c.
    Click "Generate Key" in the API Keys section
  4. d.
    Copy and save your API key - you won't be able to see it again!
Your API key will look like this:
rail_api_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd

2Test Your Connection

Before making scoring requests, verify your API key works:

# Test API is online (no auth required)
curl https://api.responsibleailabs.ai/

# Test health check (no auth required)
curl https://api.responsibleailabs.ai/health/check

# Verify your API key
curl -X POST https://api.responsibleailabs.ai/verify \
  -H "Authorization: Bearer your-rail-api-key"

# Expected response:
# {
#   "status": "verified",
#   "message": "API key is valid",
#   "tier": "free"
# }

3Make Your First API Call

Now let's evaluate a piece of content using the RAIL Score - Basic endpoint. Choose your preferred language:

curl -X POST "https://api.responsibleailabs.ai/railscore/v1/score/basic" \
  -H "Authorization: Bearer your-rail-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Our AI system ensures user privacy and data security through encryption and access controls."
  }'

Response

You'll receive comprehensive evaluation results with scores and confidence ratings:

{
  "result": {
    "rail_score": {
      "score": 8.7,
      "confidence": 0.90
    },
    "scores": {
      "fairness": {"score": 8.5, "confidence": 0.92, "explanation": "..."},
      "safety": {"score": 9.2, "confidence": 0.95, "explanation": "..."},
      "reliability": {"score": 8.8, "confidence": 0.89, "explanation": "..."},
      "transparency": {"score": 8.4, "confidence": 0.87, "explanation": "..."},
      "privacy": {"score": 9.1, "confidence": 0.94, "explanation": "..."},
      "accountability": {"score": 8.6, "confidence": 0.88, "explanation": "..."},
      "inclusivity": {"score": 8.3, "confidence": 0.86, "explanation": "..."},
      "user_impact": {"score": 8.7, "confidence": 0.91, "explanation": "..."}
    },
    "processing_time": 2.5
  },
  "metadata": {
    "req_id": "abc-123-def-456",
    "tier": "pro",
    "queue_wait_time_ms": 1200.0,
    "processing_time_ms": 2500.0,
    "credits_consumed": 2.0,
    "timestamp": "2025-11-03T10:30:00Z"
  }
}

3That's It!

The API returns comprehensive results with scores and confidence ratings. Each dimension is scored 0-10, with confidence ratings (0-1) indicating the reliability of each assessment.

Congratulations!

You've successfully made your first RAIL API call. The response includes an overall RAIL score (8.7 out of 10) with 90% confidence, plus individual scores for each of the 8 dimensions with explanations and confidence ratings. The metadata section provides request tracking information and actual credits consumed.

Understanding the Results

The RAIL score ranges from 1 to 10, where:

1 - 5
Poor
Significant issues detected
5 - 7.5
Fair
Room for improvement
7.5 - 10
Good
Meets responsible AI standards

Next Steps

Now that you've made your first API call, here's what to explore next:

Need Help?

Join our community or contact support for assistance with your integration.