Get User Logs
User
Get User Logs
Get recent API request logs for the authenticated user
GET
Get User Logs
Retrieve recent API request logs for the authenticated user. This endpoint provides detailed information about your API usage history, including model usage, costs, timestamps, and request status.
Response
Returns an array of log entries containing information about recent API requests made with your API key.Log Entry Fields
- key - The API key used for the request
- model - The model that was used
- route - The API endpoint that was called
- credits - The cost in credits for this request
- timestamp - Unix timestamp when the request was made
- status - Request status (success, cancelled, error)
- ip - IP address from which the request was made
- input_tokens - Number of input tokens (for text models)
- output_tokens - Number of output tokens (for text models)
Example Response
Use Cases
- Usage Tracking - Monitor your API usage patterns and costs
- Debugging - Identify failed requests and troubleshoot issues
- Analytics - Analyze which models you use most frequently
- Billing - Track credit consumption over time
- Security - Monitor IP addresses accessing your API key
Authorizations
Enter your API key (starts with 'ek-')
Response
200 - application/json
Success
API key used for the request
Example:
"ek-abc123def456ghi789jkl012mno345pqr678stu901vwx234yz567"
Model used for the request
Example:
"gpt-4o"
API endpoint used
Example:
"chat.completions"
Credits consumed by the request
Example:
0.0052320000000000005
Unix timestamp of the request
Example:
1747381627
Status of the request
Available options:
success, cancelled, error Example:
"success"
IP address of the request
Example:
"2001:ee0:d780:9820:9115:b97:7e06:bb5b"
Number of input tokens (for text models)
Example:
44
Number of output tokens (for text models)
Example:
340
