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

# Python: Configuration

> Read-only introspection of your application's policy, plan capabilities, and dimensions with client.get_config / get_capabilities / get_dimensions. No credits consumed.

<Info>
  **Concept:** [Applications](/concepts/applications) · [Policy Engine](/concepts/policy-engine) | **API:** [Configuration](/api-reference/config)
</Info>

<Note>
  Added in **SDK 2.6.0**. Every API key is bound to an application whose governance policy is configured centrally in the [dashboard](https://responsibleailabs.ai/dashboard). These three methods let your code read that configuration at runtime — useful for startup checks, dashboards, and monitoring. They are read-only and **consume no credits**.
</Note>

```mermaid theme={null}
flowchart LR
    K["Your API key"] --> A["client.get_config()<br/>policy + enforcement mode"]
    K --> B["client.get_capabilities()<br/>plan features + limits"]
    K --> C["client.get_dimensions()<br/>weights + thresholds"]
```

## Application configuration

`get_config()` returns the application the key is bound to, its governance policy, and whether enforcement is actively shaping responses or only observing them.

```python theme={null}
from rail_score_sdk import RailScoreClient

client = RailScoreClient(api_key="YOUR_RAIL_API_KEY")

cfg = client.get_config()

print(f"Application: {cfg.application.id} ({cfg.application.environment})")
print(f"Plan:        {cfg.application.plan}")
print(f"Enforcement: {cfg.policy.enforcement}")   # log_only | block | regenerate
print(f"Eval mode:   {cfg.policy.eval_mode}")      # basic | deep
print(f"Threshold:   {cfg.policy.overall_threshold}")
print(f"Mode:        {cfg.enforcement.mode}")      # enforce | monitor

if cfg.policy.locked:
    print("Policy is locked by an administrator; per-request overrides are ignored.")
```

## Plan capabilities

`get_capabilities()` reports what the key's plan can access — evaluation modes, compliance frameworks, agent and DPDP features, and request limits. Use it to adapt behavior without hard-coding plan assumptions.

```python theme={null}
caps = client.get_capabilities()

print(f"Plan: {caps.plan}")
print(f"Frameworks: {caps.compliance.get('frameworks')}")
print(f"DPDP evidence available: {caps.dpdp.get('evidence')}")   # Pro+ only
print(f"Requests/day: {caps.limits.get('requests_per_day')}")     # None = unlimited
```

## Dimension metadata

`get_dimensions()` returns the eight RAIL dimensions with the **weight** and **threshold** configured for your application, plus the score bands a result falls into.

```python theme={null}
dims = client.get_dimensions()

for d in dims.dimensions:
    print(f"{d.get('name'):14} weight={d.get('weight')} threshold={d.get('threshold')}")

for band in dims.score_bands:
    print(band.get("band"), ">=", band.get("min"))
```

<Tip>
  Each typed result also exposes a `.raw` dict with the unmodified response, so new fields are always reachable even before the SDK adds a typed accessor.
</Tip>

## Async

The async client exposes the same three methods:

```python theme={null}
import asyncio
from rail_score_sdk import AsyncRAILClient

async def main():
    client = AsyncRAILClient(api_key="YOUR_RAIL_API_KEY")
    caps = await client.get_capabilities()
    print(caps["plan"])  # async client returns raw dicts

asyncio.run(main())
```

## Related

<CardGroup cols={2}>
  <Card title="Configuration API" icon="gear" href="/api-reference/config">
    The REST endpoints behind these methods.
  </Card>

  <Card title="Policy Engine" icon="gavel" href="/concepts/policy-engine">
    How enforcement, thresholds, and locking work.
  </Card>
</CardGroup>
