Base URL
Authentication
सभी endpoints (/health को छोड़कर) एक Bearer token require करते हैं:
rail_ से start होती हैं। अपनी key dashboard से generate करें।
Endpoints
| Method | Endpoint | Credits | Description |
|---|---|---|---|
POST | /railscore/v1/eval | 0.2–3.0 | 8 RAIL dimensions में content evaluate करें |
POST | /railscore/v1/safe-regenerate | 1.0–9.0 | Evaluate + regenerate जब तक threshold meet न हो |
POST | /railscore/v1/compliance/check | 5.0–10.0 | Regulatory compliance check |
POST | /railscore/v1/agent/evaluate-tool-call | 1.5–3.0 | Execution से पहले agent tool call evaluate करें |
POST | /railscore/v1/agent/scan-tool-result | 0.5–1.0 | Tool result को PII और injection के लिए scan करें |
POST | /railscore/v1/agent/detect-injection | 0.5 | Text में prompt injection detect करें |
POST | /verify | 0 | API key verify करें और balance check करें |
GET | /health | 0 | Service health check |
Error codes
| Status | Meaning |
|---|---|
400 | Invalid request - parameters check करें |
401 | Missing या invalid API key |
402 | Insufficient credits |
403 | Key revoked या plan restriction |
422 | Validation error - content बहुत छोटा/बड़ा है |
429 | Rate limit exceed हो गई |
503 | Service temporarily unavailable |