API Reference
Everything you need to integrate Keprax into your workflow.
Base URL
https://keprax.devFormat
JSONAuthentication
Include your API key in the Authorization header:
Authorization: Bearer keprax_your_api_keyGet your API key from the Developer Portal.
Endpoints
CLI Tool
Scan directly from your terminal with pre-commit hook support.
Installation
npm install -g keprax-cliUsage
# Set your API key
export KEPRAX_API_KEY=keprax_your_key
# Scan current directory
keprax scan .
# Scan with options
keprax scan ./src --fail-on high --output markdown
# Install pre-commit hook
keprax initWebhooks
Automatically scan code when PRs are created or updated.
🐙 GitHub
- Settings → Webhooks → Add webhook
- URL:
https://keprax.dev/api/v1/webhooks/github - Content type: application/json
- Secret: Your Keprax API key
- Events: Pull requests
🦊 GitLab
- Settings → Webhooks
- URL:
https://keprax.dev/api/v1/webhooks/gitlab - Secret token: Your Keprax API key
- Trigger: Merge request events
Rate Limits
| Tier | Scans/Day | API Calls/Month | Rate |
|---|---|---|---|
| Free | 5 | — | 60/min |
| Pro | Unlimited | 1,000 | 300/min |
| Team | Unlimited | 10,000 | 1,000/min |
Error Codes
400Bad request
401Unauthorized
403Forbidden
404Not found
429Rate limited
500Server error