Authentication
Most public endpoints require a Prismatic API key. OpenAI-style clients use Authorization: Bearer; Anthropic-style clients can use x-api-key plus anthropic-version.
Standard header
Use this header for OpenAI-compatible endpoints and direct HTTP clients that expect bearer authentication.
Bash
Authorization: Bearer pa_YOUR_KEY
Anthropic-compatible header
Use this header set for POST /v1/messages and POST /v1/messages/count_tokens when your client speaks the Anthropic protocol.
Bash
x-api-key: pa_YOUR_KEY anthropic-version: 2023-06-01
Where to get your key
Open the Prismatic dashboard, go to API Keys and generate a customer API key. Keep the full key secret; only the prefix is safe to display in logs or UI.
Best practices
- Keep keys server-side whenever possible.
- Rotate keys immediately if a client, screenshot or repository exposes one.
- Use one key per environment or integration when practical.
- Handle
401authentication errors separately from402billing and429rate-limit responses.