Skip to content

Developer portal

Authentication

Send a bearer token or x-api-key header on every protected route. The pilot defaults to a single shared key per deployment.

Supported headers

  • Authorization: Bearer <key> — preferred for server-side integrations
  • x-api-key: <key> — convenient for tools and proxies

Examples

Bearer (curl)

curl -X POST "…/optimize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '…'

Pilot vs production keys

Pilot keys are suitable for sandbox, staging, and integration tests. Request production credentials via /access. Never commit keys to source control — use environment variables (QTANGL_API_KEY on the server, NEXT_PUBLIC_QTANGL_SANDBOX_API_KEY in the browser sandbox only).

Key rotation

  1. Issue a new key in your deployment environment.
  2. Update clients to send the new header value.
  3. Revoke the old key after traffic drains.

Public routes

GET /health does not require authentication. All /optimize and /hospital/* routes require a valid key.