Authentication and API keys
Grant task access and authenticate a server-side application.
Create an API key in the MuseSpark console and enable the openapi_tools product.
| Operation | Required scope |
|---|---|
| Create a task | task:write |
| Read task status or list task models | task:read |
The current task write scope also allows task reads. Use read-only keys when an integration only needs to observe tasks.
Send the key
Use a server-side environment variable:
export MUSESPARK_API_KEY='YOUR_API_KEY'Send Authorization: Bearer YOUR_API_KEY on each request. X-API-Key: YOUR_API_KEY is also accepted. Send a single credential header: when both are present, a nonempty trimmed X-API-Key takes priority.
A valid key still needs access to the requested product and model. HTTP 403 can indicate a product, scope, or model-permission failure.
Keep credentials on the server
Store the key in your application server's secret configuration. Browser applications should call their own backend rather than include a key in client-side code.
Workspace JWT routes use a separate authentication boundary. Use the public /api/v1/openapi routes shown in these guides for API-key integrations.
LLM calls use a separate product and scope configuration.