TL;DR: Authenticate every API request with a workspace API token sent as a Bearer credential: Authorization: Bearer mt_live_…. Owners mint tokens in Settings → API tokens; the value is shown once. Store it as a secret (for example BALLET_API_TOKEN) and use a separate token per integration so you can revoke without breaking everything.
Developers making authenticated calls to the Ballet REST API or MCP endpoint.
mt_live_… prefix.Only Owners can create tokens; Builders can view tokens they created.
Pass it in the Authorization header on every request:
curl https://api.ballet.dev/api/playbooks \
-H "Authorization: Bearer $BALLET_API_TOKEN"
Set the token from your environment rather than hardcoding it:
const token = process.env.BALLET_API_TOKEN;
const res = await fetch("https://api.ballet.dev/api/playbooks", {
headers: { Authorization: `Bearer ${token}` },
});
The API is served from api.ballet.dev. app.ballet.dev serves Ballet Studio and returns the app's HTML for API paths rather than an error, so a request sent there appears to succeed while returning no data.
A token acts as your workspace and is scoped to it, with the role it was minted for. Use it to list and run playbooks, poll run status and step results, and call the management surface.
The same token also authenticates the MCP endpoint — send it as a Bearer credential when your MCP client cannot complete a browser OAuth flow. Interactive clients should prefer OAuth, which issues short-lived tokens and needs nothing pasted.