API keys
Create an API key
To generate an API key, open app.detail.dev and navigate to Settings → API Keys. Click New API key, give it a descriptive name, and copy the key value immediately — Detail only shows the full key once.Key format
All Detail API keys are prefixed withdtl_live_ so you can identify them at a glance and avoid accidentally committing them alongside other secrets.
Using your API key
Pass your API key as a Bearer token in theAuthorization header of every request:
Keep your API key secret. Never commit it to source control or expose it in client-side code. If a key is compromised, rotate it immediately from Settings → API Keys in the dashboard — delete the old key and generate a new one.
CLI authentication
Log in with the browser flow
The Detail CLI uses a browser-based OAuth flow by default. Run the following command to open the authorization page in your browser:Skip the browser with --token
If you’re working in a headless environment (such as a CI runner or a remote server), pass your API key directly using the --token flag:
Token storage
The CLI stores your authentication token at:Check authentication status
To verify that the CLI is authenticated and see which account it’s using, run:Log out
To remove your stored credentials, run:~/.config/detail-cli/config.toml. You’ll need to run detail auth login again before making any further CLI requests.
Authentication errors
If a request fails for an authentication or authorization reason, the Detail API returns a structured error response:| HTTP status | Error type | Cause |
|---|---|---|
401 Unauthorized | DETAIL_AUTHENTICATION_ERROR | The token is missing, malformed, or has been revoked. |
403 Forbidden | AUTHORIZATION_ERROR | The token is valid but does not have permission to access the requested resource. |