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

# Compliance

> AI content को GDPR, HIPAA, EU AI Act, CCPA, India DPDP, और बाकी के against check करें।

Compliance endpoint जांचता है कि AI से बना content और उसके आसपास का context बड़े regulatory frameworks की requirements पूरी करता है या नहीं। यह हर framework के लिए pass/fail verdict, flagged clauses, और सुधार की guidance लौटाता है।

Compliance, [Evaluation](/concepts/evaluation) से अलग एक check है: evaluation 8 RAIL dimensions पर quality score करता है, जबकि compliance content को खास regulations के against जांचता है। ये अलग-अलग calls हैं — रोज़मर्रा के quality scoring के लिए evaluation use करें, और जब regulatory verdict चाहिए तब compliance।

<Info>
  **API endpoint:** `POST /railscore/v1/compliance/check` | **Python:** `client.compliance_check()`
</Info>

## Supported frameworks

| Code           | Framework                                           | Region          |
| -------------- | --------------------------------------------------- | --------------- |
| `gdpr`         | General Data Protection Regulation                  | EU              |
| `ccpa`         | California Consumer Privacy Act                     | US (California) |
| `hipaa`        | Health Insurance Portability and Accountability Act | US              |
| `eu_ai_act`    | EU Artificial Intelligence Act                      | EU              |
| `india_dpdp`   | India Digital Personal Data Protection Act          | India           |
| `india_ai_gov` | India AI Governance Guidelines                      | India           |

## Basic usage

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

  client = RailScoreClient(api_key="YOUR_RAIL_API_KEY")

  result = client.compliance_check(
      content="Your AI system collects user behavior data to personalize responses.",
      frameworks=["gdpr", "eu_ai_act"],
      context="B2C SaaS chatbot processing EU user data",
  )

  for framework, check in result.frameworks.items():
      print(f"{framework}: {'PASS' if check.compliant else 'FAIL'}")
      for issue in check.issues:
          print(f"  - {issue.description}")
          print(f"    Remedy: {issue.remediation}")
  ```

  ```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.complianceCheck({
    content: "Your AI system collects user behavior data to personalize responses.",
    frameworks: ["gdpr", "eu_ai_act"],
    context: "B2C SaaS chatbot processing EU user data",
  });

  for (const [framework, check] of Object.entries(result.frameworks)) {
    console.log(`${framework}: ${check.compliant ? "PASS" : "FAIL"}`);
  }
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.responsibleailabs.ai/railscore/v1/compliance/check \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
    -d '{
      "content": "Your AI system collects user behavior data to personalize responses.",
      "frameworks": ["gdpr", "eu_ai_act"],
      "context": "B2C SaaS chatbot processing EU user data"
    }'
  ```
</CodeGroup>

## India DPDP: dedicated API

`POST /compliance/check` किसी भी framework के लिए एक point-in-time verdict देता है, India DPDP समेत। India DPDP के साथ 7 dedicated endpoints का एक suite भी है, उन teams के लिए जिन्हें एक single check के बजाय stateful, lifecycle compliance चाहिए — इन्हें तब use करें जब आपको किसी user journey में consent, deadlines, और audit evidence track करना हो:

* **Scan** — content में Indian PII (Aadhaar, PAN, mobile, UPI, passport, और 5 और types), child signals, और purpose drift ढूंढें
* **Evaluate** — actions को DPDP rules के against जांचें, allow/block/require\_action verdicts के साथ
* **Emit** — compliance events (consent, DSR, breach, retention) भेजें, automatic timer creation के साथ
* **Require** — हर workflow step पर application को क्या करना चाहिए, इसकी proactive guidance
* **Evidence** — audit-grade packets बनाएं (DSR responses, breach notifications, annual reports)
* **Session** — किसी user journey में stateful tracking के लिए management
* **Timers** — DSR SLAs, breach notification deadlines, और retention windows पर नज़र रखें

<Card title="India DPDP API Reference" icon="shield-halved" href="/api-reference/compliance-overview#india-dpdp-dedicated-endpoints">
  request/response examples के साथ पूरा endpoint reference।
</Card>

## आगे क्या

<CardGroup cols={2}>
  <Card title="Compliance API Overview" icon="shield-halved" href="/api-reference/compliance-overview">
    सभी compliance frameworks और dedicated endpoints।
  </Card>

  <Card title="API Reference: Compliance Check" icon="code" href="/api-reference/compliance">
    General compliance check का parameter reference।
  </Card>

  <Card title="Python SDK: Compliance" icon="python" href="/sdk/python/compliance">
    Python SDK examples।
  </Card>

  <Card title="DPDP: Content Scan" icon="magnifying-glass-chart" href="/api-reference/dpdp-scan">
    Indian PII detection और masking।
  </Card>
</CardGroup>
