GrayPass API Reference

Use this reference to enroll users, authenticate sessions, and retrieve metrics. Authenticate every request with your secret key in the Authorization: Bearer header. Test keys: sk_test_*. Live keys: sk_live_*.

Base URLs

Test

https://api.graypass.org

Live

https://api.graypass.org

Endpoints

Enroll

Create or update a brainprint for a user.

POST /enrol
Authorization: Bearer sk_test_xxx
Content-Type: application/json
{
  "user_id": "user@example.com",
  "reaction_times": [420, 385, 510],
  "keystroke_intervals": [85, 102, 78],
  "consent": true
}

Authenticate

Verify a session against an enrolled user.

POST /auth
Authorization: Bearer sk_test_xxx
Content-Type: application/json
{
  "user_id": "user@example.com",
  "reaction_times": [415, 392, 498],
  "keystroke_intervals": [88, 98, 82]
}

Response:
{
  "ok": true,
  "confidence": 0.847,
  "decision": "accept",
  "reason_codes": ["match:timing"]
}

Metrics

Fetch system-level metrics and latency summaries.

GET /metrics
Authorization: Bearer sk_test_xxx

Guidelines

Rate Limits

Test: 1,000 req/hour. Live: 10,000 req/hour by default. 429 is returned on overage with remaining quota headers.

Data Handling

No raw frames stored. Timing series and optional gaze stats only. Send minimal PII (user_id as stable identifier).

Webhooks

Configure callbacks for enrollment, auth decisions, and anomalies. Verify signatures with your secret.

Environments

Keep test and live keys isolated. Responses include mode for cross-checking.

Support

Need higher limits or enterprise controls? Reach out to the team with your use case and projected volume.

Contact: api@graypass.org