Logging
Logs offer insights into API usage.
Your logs dashboard displays detailed request logs, including user prompts, model responses, provider details, timestamps, request status, token usage, cost, and duration.
Configuration
By default, logging is enabled for all API requests and captures detailed logs. Use the x-glama-capture-payload
header to override these settings per request.
To ensure privacy or compliance, you can disable log collection in your settings. Log preferences can also be modified on a per-request basis.
Per-API Key Log Configuration
To update the default log settings:
- Log in to your workspace.
- Navigate to Settings > API keys.
- Toggle logging as needed under the API key actions.
Per-Request Logging
Use the x-glama-capture-payload
header to bypass the default log settings. If logging is enabled at the gateway level, this header excludes the specific request log. If logging is disabled, the header saves the request log.
Example: Use x-glama-capture-payload
to prevent saving a log for a request.