Usage
Retrieve usage statistics for your API key, including request counts, endpoint breakdowns, and recent request history.
Endpoint
Section titled “Endpoint”GET /usageRequest
Section titled “Request”No request body. Authentication via X-API-Key header.
curl https://mcll3bnfubyazfg6wekv3xc6fi0dgpyk.lambda-url.us-east-1.on.aws/usage \ -H "X-API-Key: YOUR_API_KEY"Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
total_requests | number | Total requests made with this key |
requests_by_endpoint | object | Request count per endpoint |
requests_today | number | Requests made today (UTC) |
recent_requests | array | Last 20 requests (newest first) |
Recent request object
Section titled “Recent request object”| Field | Type | Description |
|---|---|---|
endpoint | string | API endpoint path |
timestamp | string | ISO 8601 timestamp |
latency_ms | number | Request duration in milliseconds |
status | number | HTTP status code |
Example response
Section titled “Example response”{ "total_requests": 142, "requests_by_endpoint": { "/identify_clothing": 89, "/generate_image": 41, "/style_me": 8, "/usage": 4 }, "requests_today": 12, "recent_requests": [ { "endpoint": "/identify_clothing", "timestamp": "2025-01-15T14:32:01.000Z", "latency_ms": 3200, "status": 200 }, { "endpoint": "/generate_image", "timestamp": "2025-01-15T14:28:45.000Z", "latency_ms": 18500, "status": 200 } ]}- Usage data is tracked automatically for every authenticated request
- The
recent_requestsarray returns the most recent 20 requests - Usage statistics are per API key, not per user
- You can also view usage in the Developer Portal