List usage records
Returns the current user's usage records, newest first. JSON, NDJSON, and CSV are selected by the Accept header.
ApiKeyAuthAuthorization<token>since?stringStart time in RFC3339.
date-timeuntil?stringEnd time in RFC3339.
date-timemodel?stringrequest_id?stringExact request ID match.
usage_kind?string"llm""embedding""tts""stt""image""video""rerank""moderation""ocr""decision"status?string"success""error"billing_status?string"final""failed"credential_id?stringExact match on UsageItem.credential_id, the API key that made the request.
auth_method?string"sk-v1""jwt-v1""oauth-v1"cost_center?stringLabel filter. Matches usage records whose labels.cost_center equals this value.
length <= 128project?stringLabel filter. Matches usage records whose labels.project equals this value.
length <= 128environment?stringLabel filter. Matches usage records whose labels.environment equals this value.
length <= 128app_url?stringLabel filter. Matches usage records whose labels.app_url equals this value.
length <= 128app_title?stringLabel filter. Matches usage records whose labels.app_title equals this value.
length <= 128app_categories?stringLabel filter. Matches usage records whose labels.app_categories equals this value.
length <= 128sdk_info?stringLabel filter. Matches usage records whose labels.sdk_info equals this value.
length <= 128label.{key}?stringCustom label filter pattern. Replace {key} with a custom label name, for example label.team=core.
length <= 128cursor?stringlimit?integervalue <= 1000100Usage records.
- response
[index: integer]?curl -X GET 'https://api.ohmygpt.com/v1/usage'[ { "auth_method": "sk-v1", "billing_status": "final", "cache_creation_tokens": 0, "cache_read_tokens": 0, "client_ip": "string", "completion_tokens": 0, "cost_credits": 0, "credential_id": "string", "error": "string", "first_token_ms": 0, "image_dimensions": "string", "image_quality": "string", "input_api": "string", "is_stream": true, "key_hint": "string", "labels": { "property1": "string", "property2": "string" }, "latency_ms": 0, "list_credits": 0, "model": "string", "prompt_tokens": 0, "reasoning_tokens": 0, "request_id": "string", "retry_count": 0, "route_id": "string", "status": 0, "time": "string", "usage_kind": "string" }]