Authentication
Learn how to authenticate requests to the Napster API
API keys
How keys scope to organizations and projects
Getting an API key
Create a key from the dashboard
Using your API key
Pass the key in the X-Api-Key header
API keys
The Napster API uses API keys to authenticate requests. Every API key is scoped to an organization and a project. All resources — companions, tools, knowledge collections, and FAQ collections — live under a specific project.
All API requests must include the key in the X-Api-Key header:
X-Api-Key: <your-api-key>If the key is missing or invalid, the server responds with 401 Unauthorized.
If your organization runs out of credits, your key stays valid, but requests that start sessions or create resources return 403 with InactiveSubscription. See Credits.
Your API key is a secret. Keep it private and only use it on the server side — never expose it in client-side code.
Getting an API key
No account yet? Sign up at napster.com/developer — or via the Azure Portal if you bill through Azure.
For a step-by-step walkthrough with screenshots, see the Create a New API Key guide.
In short: open the dashboard, navigate to Keys, and click + Create API key. You'll choose an architecture (Realtime, Cascade, or Other) and the providers for it. Realtime with Azure OpenAI, the default, runs on Napster's managed infrastructure, or you can connect your own credentials.
Using your API key
Include your key in the X-Api-Key header on every request:
curl https://napster-api.napster.com/public/companions/napster-stock \
-H "X-Api-Key: $NAPSTER_API_KEY"The same key works for all Napster API endpoints — managing companions, uploading knowledge, configuring tools, and everything else.