API key authentication
The Napster Companion API uses API keys for authentication. Every key is scoped to a specific organization and project. All resources — companions, tools, knowledge collections — live under a project.
How to use your key
Include your API key in the X-Api-Key header on every request. If the key is missing, expired, or invalid the API returns 401 Unauthorized. The same key works for all Companion API endpoints.
Generating a key
- Go to the API Keys page in the dashboard.
- Click Generate API key.
- Select your project and LLM provider (Azure OpenAI).
- Choose Napster-managed (no credentials needed) or Custom (bring your own Azure deployment).
Important: Your API key is a secret. Never embed it in front-end JavaScript or commit it to public repositories.