Read-only introspection of your application’s policy, plan capabilities, and dimensions with client.get_config / get_capabilities / get_dimensions. No credits consumed.
Added in SDK 2.6.0. Every API key is bound to an application whose governance policy is configured centrally in the 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.
get_config() returns the application the key is bound to, its governance policy, and whether enforcement is actively shaping responses or only observing them.
from rail_score_sdk import RailScoreClientclient = 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 | regenerateprint(f"Eval mode: {cfg.policy.eval_mode}") # basic | deepprint(f"Threshold: {cfg.policy.overall_threshold}")print(f"Mode: {cfg.enforcement.mode}") # enforce | monitorif cfg.policy.locked: print("Policy is locked by an administrator; per-request overrides are ignored.")
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.
get_dimensions() returns the eight RAIL dimensions with the weight and threshold configured for your application, plus the score bands a result falls into.
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"))
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.