> ## 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.

# Schnellstart

> In weniger als 5 Minuten mit der RAIL Score API loslegen.

<Steps>
  <Step title="API-Schlüssel abrufen">
    1. [Kostenloses Konto erstellen](https://responsibleailabs.ai/register).
    2. Öffnen Sie Ihr [Dashboard](https://responsibleailabs.ai/dashboard).
    3. Klicken Sie im Bereich API-Schlüssel auf **Generate Key**.

    <Warning>
      Kopieren Sie Ihren Schlüssel sofort. Er beginnt mit `rail_` und wird nicht erneut angezeigt.
    </Warning>
  </Step>

  <Step title="Schlüssel überprüfen">
    <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="SDK installieren">
    <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="Ihre erste Antwort bewerten">
    Senden Sie einen von KI erzeugten Inhalt und erhalten Sie einen RAIL Score zurück. Hier bewerten wir eine typische Antwort eines Support-Bots.

    <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" }
    }
    ```

    **Die Antwort lesen:**

    * `rail_score.score` — der Gesamtscore, 0 bis 10, ein gewichteter Durchschnitt der acht Dimensionen. Hier liegt `7.6` im Band **Good**.
    * `dimension_scores` — Score und Konfidenz für jede der acht [RAIL-Dimensionen](/concepts/rail-framework). Die niedrigeren Werte hier (Transparenz, Verantwortlichkeit, Inklusivität um 6,6) zeigen, was verbessert werden sollte: Die Antwort sagt nicht, an wen man sich wenden kann oder was passiert, wenn die E-Mail nie ankommt.
    * `policy_outcome` — wie die [Richtlinie Ihrer Anwendung](/concepts/applications) dieses Ergebnis bewertet hat: der Schwellenwert zum Bestehen, ob es `passed` ist und ob die Durchsetzung derzeit aktiv ist. Hier befindet es sich im Beobachtungsmodus (`enforced: false`), das Urteil wird also gemeldet, aber die Antwort wird nicht verändert.
  </Step>

  <Step title="Mit dem Deep-Modus tiefer gehen">
    Der Basic-Modus liefert Ihnen die Scores. Der **Deep-Modus** führt eine detailliertere Analyse desselben Inhalts durch und ergänzt eine Erklärung pro Dimension, Problem-Tags und Verbesserungsvorschläge, sodass Sie sehen, *warum* eine Dimension so bewertet wurde, wie sie es wurde.

    ```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" }
    }
    ```

    Jede Dimension trägt nun eine `explanation` und `issues`, und die Antwort fasst alle markierten Probleme in einem `issues`-Array auf oberster Ebene zusammen, bereit zur Anzeige in einer Prüfwarteschlange oder einem Dashboard.
  </Step>
</Steps>

## Wie geht es weiter

<CardGroup cols={2}>
  <Card title="Konzepte: Bewertung" icon="magnifying-glass" href="/concepts/evaluation">
    Basic- vs. Deep-Modus, Bewertungsstufen und benutzerdefinierte Gewichtungen verstehen.
  </Card>

  <Card title="Konzepte: Sichere Regeneration" icon="rotate" href="/concepts/safe-regeneration">
    Inhalte automatisch korrigieren, die unter Ihren Schwellenwerten liegen.
  </Card>

  <Card title="Integrationen" icon="plug" href="/integrations/overview">
    Umhüllen Sie Ihre OpenAI-, Anthropic- oder Gemini-Aufrufe mit automatischem RAIL-Scoring.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/python/overview">
    Vollständige SDK-Referenz mit synchronen und asynchronen Clients.
  </Card>
</CardGroup>
