> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get up and running with the RAIL Score API in under 5 minutes.

<Steps>
  <Step title="Get your API key">
    1. [Sign up for a free account](https://responsibleailabs.ai/register).
    2. Open your [Dashboard](https://responsibleailabs.ai/dashboard).
    3. Click **Generate Key** in the API Keys section.

    <Warning>
      Copy your key immediately. It starts with `rail_` and will not be shown again.
    </Warning>
  </Step>

  <Step title="Verify your key">
    <CodeGroup>
      ```bash Health check theme={null}
      curl https://api.responsibleailabs.ai/health
      ```

      ```bash Key verification theme={null}
      curl -X POST https://api.responsibleailabs.ai/verify \
        -H "Authorization: Bearer YOUR_RAIL_API_KEY"
      ```
    </CodeGroup>

    ```json Response theme={null}
    { "status": "healthy", "service": "rail-score-engine" }
    ```
  </Step>

  <Step title="Install an SDK">
    <CodeGroup>
      ```bash Python theme={null}
      pip install rail-score-sdk
      ```

      ```bash JavaScript theme={null}
      npm install @responsible-ai-labs/rail-score
      ```

      ```bash Python (with OpenAI wrapper) theme={null}
      pip install "rail-score-sdk[openai]"
      ```

      ```bash Python (all integrations) theme={null}
      pip install "rail-score-sdk[integrations]"
      ```
    </CodeGroup>
  </Step>

  <Step title="Score your first response">
    Send a piece of AI-generated content and get back a RAIL score. Here we evaluate a typical support-bot reply.

    <CodeGroup>
      ```python Python theme={null}
      from rail_score_sdk import RailScoreClient

      client = RailScoreClient(api_key="YOUR_RAIL_API_KEY")

      result = client.eval(
          content="To reset your password, open Settings, choose Security, and "
                  "select Reset password. We will email you a secure link that "
                  "expires in 30 minutes.",
          mode="basic",
      )

      print(f"RAIL Score: {result.rail_score.score}/10")
      for dim, scores in result.dimension_scores.items():
          print(f"  {dim}: {scores.score}/10")
      ```

      ```typescript JavaScript theme={null}
      import { RailScoreClient } from "@responsible-ai-labs/rail-score";

      const client = new RailScoreClient({ apiKey: "YOUR_RAIL_API_KEY" });

      const result = await client.eval({
        content: "To reset your password, open Settings, choose Security, and select Reset password. We will email you a secure link that expires in 30 minutes.",
        mode: "basic",
      });

      console.log(`RAIL Score: ${result.railScore.score}/10`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.responsibleailabs.ai/railscore/v1/eval \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
        -d '{"content": "To reset your password, open Settings, choose Security, and select Reset password. We will email you a secure link that expires in 30 minutes.", "mode": "basic"}'
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "result": {
        "rail_score": { "score": 7.6, "confidence": 0.51, "summary": "RAIL Score: 7.6/10 — Good" },
        "dimension_scores": {
          "fairness":       { "score": 7.7, "confidence": 0.84 },
          "safety":         { "score": 10.0, "confidence": 0.70 },
          "reliability":    { "score": 7.7, "confidence": 0.16 },
          "transparency":   { "score": 6.5, "confidence": 0.50 },
          "privacy":        { "score": 8.0, "confidence": 0.59 },
          "accountability": { "score": 6.6, "confidence": 0.97 },
          "inclusivity":    { "score": 6.6, "confidence": 0.74 },
          "user_impact":    { "score": 7.8, "confidence": 0.09 }
        },
        "from_cache": false
      },
      "policy_outcome": { "enforcement": "block", "threshold": 7.0, "score": 7.6, "passed": true, "enforced": false },
      "metadata": { "req_id": "b00379a5-d6a7-45d6-905c-82925666a616", "mode": "basic" }
    }
    ```

    **Reading the response:**

    * `rail_score.score` — the overall score, 0–10, a weighted average of the eight dimensions. Here `7.6` is in the **Good** band.
    * `dimension_scores` — the score and confidence for each of the eight [RAIL dimensions](/concepts/rail-framework). The lower scores here (transparency, accountability, inclusivity around 6.6) point to what to improve: the reply does not say who to contact or what happens if the email never arrives.
    * `policy_outcome` — how your [application's policy](/concepts/applications) judged this result: the threshold to pass, whether it `passed`, and whether enforcement is currently active. Here it is in monitor mode (`enforced: false`), so the verdict is reported but the response is not changed.
  </Step>

  <Step title="Go deeper with deep mode">
    Basic mode tells you the scores. **Deep mode** runs a more detailed analysis of the same content and adds a per-dimension explanation, issue tags, and improvement suggestions, so you can see *why* a dimension scored the way it did.

    ```python theme={null}
    result = client.eval(
        content="To reset your password, open Settings, choose Security, and "
                "select Reset password. We will email you a secure link that "
                "expires in 30 minutes.",
        mode="deep",
        include_explanations=True,
        include_issues=True,
    )

    for dim, scores in result.dimension_scores.items():
        print(f"{dim}: {scores.score}/10 — {scores.explanation}")
    ```

    ```json Response (excerpt) theme={null}
    {
      "result": {
        "rail_score": { "score": 8.1, "confidence": 0.77, "summary": "RAIL Score: 8.1/10 — Good" },
        "dimension_scores": {
          "transparency": {
            "score": 7.0, "confidence": 0.8,
            "explanation": "The process is mostly clear, but more details on security could help.",
            "issues": ["Lack of detailed security information"]
          },
          "safety": {
            "score": 8.0, "confidence": 0.8,
            "explanation": "The process includes a secure link, but users must be cautious of phishing.",
            "issues": ["Potential phishing risks"]
          }
        },
        "issues": [
          { "dimension": "safety", "description": "Potential phishing risks" },
          { "dimension": "transparency", "description": "Lack of detailed security information" }
        ]
      },
      "metadata": { "mode": "deep" }
    }
    ```

    Each dimension now carries an `explanation` and `issues`, and the response gathers all flagged issues under a top-level `issues` array, ready to surface in a review queue or dashboard.
  </Step>
</Steps>

## What's next

<CardGroup cols={2}>
  <Card title="Concepts: Evaluation" icon="magnifying-glass" href="/concepts/evaluation">
    Understand basic vs deep mode, scoring tiers, and custom weights.
  </Card>

  <Card title="Concepts: Safe Regeneration" icon="rotate" href="/concepts/safe-regeneration">
    Auto-fix content that scores below your thresholds.
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/overview">
    Wrap your OpenAI, Anthropic, or Gemini calls with automatic RAIL scoring.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/python/overview">
    Full SDK reference with sync/async clients.
  </Card>
</CardGroup>
