API Documentation
Integrate AlparAi guardrails, hallucination checks, and audit logging into your applications via our robust REST API.
Authentication
All API requests must include your live Bearer token in the Authorization header.
Authorization: Bearer alp_live_xxxxxxxxxxxxxxxxxxxxxxxx
REST Endpoints Reference
| Method & Endpoint | Description | Auth Required |
|---|---|---|
| POST/v1/guardrails/check | Verify prompt for hallucinations and safety violations. | Yes (Bearer) |
| GET/v1/audits/stream | Stream real-time immutable audit logs. | Yes (Bearer) |
| POST/v1/compliance/evaluate | Evaluate model output against EU AI Act articles. | Yes (Bearer) |
| GET/v1/models/health | Check status of connected LLM endpoints and filters. | Yes (Bearer) |
Example Request (cURL)
curl -X POST https://api.alparai.com/v1/guardrails/check \
-H "Authorization: Bearer alp_live_xyz" \
-H "Content-Type: application/json" \
-d '{"prompt": "Assess financial risk for Q3", "strict": true}'
-H "Authorization: Bearer alp_live_xyz" \
-H "Content-Type: application/json" \
-d '{"prompt": "Assess financial risk for Q3", "strict": true}'