Base URL
Authentication
All API requests require an API key in theX-API-Key header:
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /health | Health check |
POST | /v1/scan/github | Scan a GitHub repository |
POST | /v1/scan/api | Scan an API endpoint |
POST | /v1/explain | AI explanation of a finding (streaming) |
POST | /v1/fix | AI-generated fix for a finding (streaming) |
POST | /v1/fix/pr | Open a GitHub PR with a deterministic fix |
POST | /v1/triage | AI-generated triage plan for all findings (streaming) |
Streaming responses
AI endpoints (/v1/explain, /v1/fix, /v1/triage) return text/plain streaming responses. Read the response incrementally:
Error handling
| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — invalid input, missing required fields |
401 | Unauthorized — missing or invalid API key |
403 | Forbidden — token lacks required permissions |
404 | Not found — repository doesn’t exist or isn’t accessible |
429 | Rate limited — slow down requests |
500 | Internal error — scan failed unexpectedly |
503 | AI unavailable — Anthropic API is at capacity |
Error response format
Streaming error sentinel
AI streaming responses may include an error sentinel if the AI provider fails mid-stream:[ZENVEIL_ERROR] prefix in streaming chunks and surface the message to the user.
Rate limits
| Plan | Scans/hour | AI requests/hour |
|---|---|---|
| Free | 10 | 5 |
| Pro | 100 | 50 |
| Team | Unlimited | 200 |
Interactive API explorer
The scanning API has built-in Swagger UI and ReDoc documentation:- Swagger UI:
https://api.zenveil.dev/docs - ReDoc:
https://api.zenveil.dev/redoc