Authentication
TPC resolves callers in a fixed order: API key, bearer token, then session cookie. If you send more than one credential,x-api-key wins.
Choose your credential
Session cookie
Session cookies are for The Prompting Company dashboard. The browser sends thebetter-auth.session_token cookie automatically.
OAuth bearer
The CLI authenticates with browser-based device flow:API key
API keys are the recommended credential for integrations. Create an organization API key from:x-api-key:
Precedence
resolveCaller checks credentials in this order:
x-api-keyAuthorization: Bearer <token>- Session cookie
Rotation and revocation
Rotate API keys when a teammate leaves, a secret may have leaked, or an integration boundary changes.- Create a new key with the same or narrower scopes.
- Deploy the new secret to your integration.
- Confirm requests are succeeding with the new key.
- Revoke the old key from the API key settings page.