Request headers
These are headers your application sends to Lectr on each request.X-Lectr-Key
Required. Identifies your organisation and authenticates the request.| Required | Yes — requests without this header return 401 |
| Format | lc_key_ followed by a random string |
| Where to get it | Dashboard → Settings → Integration |
| Storage | Treat like a password — environment variable only, never hardcode |
X-Lectr-Feature
Optional. Tags the request with the feature that made it.| Required | No |
| Valid values | Any non-empty string up to 100 characters |
| Recommended format | Lowercase, hyphens for spaces — onboarding-assistant |
| Missing | Request processed normally, grouped under untagged in dashboard |
| Invalid | Stored as-is, never rejected |
X-Lectr-Task
Optional. Declares the type of work the request is doing.| Required | No |
| Valid values | classification summarisation extraction generation reasoning |
| Missing | Heuristic signals used for recommendations |
| Invalid | Stored as-is, no influence on recommendations |
reasoning tasks are never recommended for model downgrade — hardcoded protection.
See Task Types for the full guide.
X-Lectr-Provider
Optional. Overrides automatic provider detection.| Required | Only for Azure OpenAI |
| Valid values | openai anthropic groq gemini azure |
| Missing | Provider auto-detected from model name |
| Invalid | Logged, defaults to openai |
Authorization
Required. Your provider API key — forwarded directly to the upstream provider.| Required | Yes — forwarded to provider as-is (OpenAI, Groq, Gemini) |
| Anthropic | Send as Authorization: Bearer sk-ant-... — Lectr rewrites to x-api-key |
| Azure | Send as Authorization: Bearer <key> — Lectr rewrites to api-key |
| Storage | Never stored, never logged, exists in memory per request only |
Authorization: Bearer, Lectr handles the rest.
Response headers
Lectr does not add custom headers to responses. The response your application receives is identical to what the provider returned — headers included.Header quick reference
| Header | Required | Purpose |
|---|---|---|
X-Lectr-Key | ✅ Yes | Org authentication |
Authorization | ✅ Yes | Provider API key passthrough |
X-Lectr-Feature | No | Feature tagging for dashboard breakdowns |
X-Lectr-Task | No | Task type for smarter recommendations |
X-Lectr-Provider | Azure only | Provider override |