API Reference

Everything you need to integrate Keprax into your workflow.

Base URLhttps://keprax.dev
FormatJSON

Authentication

Include your API key in the Authorization header:

Authorization: Bearer keprax_your_api_key

Get 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-cli

Usage

# 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 init

Webhooks

Automatically scan code when PRs are created or updated.

🐙 GitHub

  1. Settings → Webhooks → Add webhook
  2. URL: https://keprax.dev/api/v1/webhooks/github
  3. Content type: application/json
  4. Secret: Your Keprax API key
  5. Events: Pull requests

🦊 GitLab

  1. Settings → Webhooks
  2. URL: https://keprax.dev/api/v1/webhooks/gitlab
  3. Secret token: Your Keprax API key
  4. Trigger: Merge request events

Rate Limits

TierScans/DayAPI Calls/MonthRate
Free560/min
ProUnlimited1,000300/min
TeamUnlimited10,0001,000/min

Error Codes

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

429

Rate limited

500

Server error