Relay

API Keys

Loading keys.

Create a key

plaintext shown once

Keys

Using a key

either header works

Authorization: Bearer — recommended

curl http://localhost:8002/v1/messages \
  -H "Authorization: Bearer sk-relay-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'

x-api-key

curl http://localhost:8002/v1/messages \
  -H "x-api-key: sk-relay-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'

POST /v1/classify accepts the same headers. Invalid or missing keys get a 401 authentication_error. Dashboard endpoints (/config, /metrics, /health) are never gated.