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

# API Reference Overview

> RAIL Score API के लिए base URL, authentication, और पूरी endpoint listing।

## Base URL

```
https://api.responsibleailabs.ai
```

## Authentication

सभी endpoints (`/health` को छोड़कर) के लिए एक Bearer token चाहिए:

```
Authorization: Bearer YOUR_RAIL_API_KEY
```

Keys `rail_` से शुरू होती हैं। अपनी key [dashboard](https://responsibleailabs.ai/dashboard) से generate करें।

## Endpoints

| Method | Endpoint                               | Description                                        |
| ------ | -------------------------------------- | -------------------------------------------------- |
| `POST` | `/railscore/v1/eval`                   | Content को 8 RAIL dimensions पर evaluate करें      |
| `POST` | `/railscore/v1/safe-regenerate`        | threshold पूरा होने तक evaluate और regenerate करें |
| `POST` | `/railscore/v1/compliance/check`       | Regulatory compliance check                        |
| `POST` | `/railscore/v1/agent/tool-call`        | tool चलने से पहले agent tool call को evaluate करें |
| `POST` | `/railscore/v1/agent/tool-result`      | tool result में PII और injection scan करें         |
| `POST` | `/railscore/v1/agent/prompt-injection` | text में prompt injection पकड़ें                   |
| `GET`  | `/railscore/v1/config`                 | अपनी application की policy और configuration पढ़ें  |
| `GET`  | `/railscore/v1/dimensions`             | RAIL dimensions और आपके weights/thresholds         |
| `GET`  | `/railscore/v1/capabilities`           | आपके plan के features और limits                    |
| `POST` | `/verify`                              | API key verify करें और identity देखें              |
| `GET`  | `/health`                              | Service health check                               |

## Error codes

| Status | Meaning                                   |
| ------ | ----------------------------------------- |
| `400`  | Invalid request - parameters check करें   |
| `401`  | API key missing या invalid                |
| `402`  | Credits कम हैं                            |
| `403`  | Key revoked या plan restriction           |
| `422`  | Validation error - content बहुत छोटा/बड़ा |
| `429`  | Rate limit पार हो गई                      |
| `503`  | Service फिलहाल उपलब्ध नहीं                |

सभी error responses में एक JSON body होती है:

```json theme={null}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Requires 3.0 credits, balance is 1.5",
    "required": 3.0,
    "balance": 1.5
  }
}
```
