Base URL
Authentication
All endpoints (except/health) require a Bearer token:
rail_. Generate yours from the dashboard.
Endpoints
| Method | Endpoint | Credits | Description |
|---|---|---|---|
POST | /railscore/v1/eval | 0.2–3.0 | Evaluate content across 8 RAIL dimensions |
POST | /railscore/v1/safe-regenerate | 1.0–9.0 | Evaluate + regenerate until threshold met |
POST | /railscore/v1/compliance/check | 5.0–10.0 | Regulatory compliance check |
POST | /railscore/v1/agent/evaluate-tool-call | 1.5–3.0 | Evaluate agent tool call before execution |
POST | /railscore/v1/agent/scan-tool-result | 0.5–1.0 | Scan tool result for PII and injection |
POST | /railscore/v1/agent/detect-injection | 0.5 | Detect prompt injection in text |
POST | /verify | 0 | Verify API key and check balance |
GET | /health | 0 | Service health check |
Error codes
| Status | Meaning |
|---|---|
400 | Invalid request - check parameters |
401 | Missing or invalid API key |
402 | Insufficient credits |
403 | Key revoked or plan restriction |
422 | Validation error - content too short/long |
429 | Rate limit exceeded |
503 | Service temporarily unavailable |