Documentation Index
Fetch the complete documentation index at: https://docs.promptingcompany.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Credential | Best for | Notes |
|---|---|---|
| Session cookie | First-party dashboard calls. | Browser-only. Session callers rely on route-level organization and product checks. |
| OAuth bearer | CLI and OAuth clients. | tpc auth login uses a browser device flow, then the CLI sends bearer credentials. |
| API key | Server-to-server integrations. | Organization-scoped, rotatable, and limited by explicit scopes. |
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.