Skip to main content
GET
/
analytics
/
api_keys
Get API key analytics
curl --request GET \
  --url https://api.bitgpt.xyz/analytics/api_keys \
  --header 'Authorization: <api-key>'
{
  "status": 200,
  "data": {
    "core_metrics": {
      "total_requests": 4,
      "requests_per_second": 0,
      "total_success": 3,
      "total_errors": 1,
      "success_rate_pct": 75,
      "avg_latency_ms": 67.5,
      "pct_under_100ms": 100,
      "pct_under_500ms": 100,
      "pct_under_1s": 100,
      "unique_endpoints": 1,
      "distinct_api_keys": 2
    },
    "prev_core_metrics": {
      "total_requests": 10,
      "requests_per_second": 2,
      "total_success": 8,
      "total_errors": 2,
      "success_rate_pct": 80,
      "avg_latency_ms": 120,
      "pct_under_100ms": 70,
      "pct_under_500ms": 90,
      "pct_under_1s": 95,
      "unique_endpoints": 3,
      "distinct_api_keys": 4
    },
    "most_used_api_keys": [
      {
        "auth": "Test auth",
        "usage_count": 3
      }
    ],
    "ip_metrics": [
      {
        "ip": "343.221.232.123",
        "total_requests": 3,
        "total_errors": 1,
        "error_rate": 33.33
      },
      {
        "ip": "234.122.99.012",
        "total_requests": 1,
        "total_errors": 0,
        "error_rate": 0
      }
    ],
    "hourly_metrics": [
      {
        "hour": "2025-07-30 15:00:00",
        "total_requests": 3,
        "error_count": 1,
        "error_rate_pct": 33.33,
        "avg_latency_ms": 71.33
      },
      {
        "hour": "2025-07-31 15:00:00",
        "total_requests": 1,
        "error_count": 0,
        "error_rate_pct": 0,
        "avg_latency_ms": 56
      }
    ],
    "api_key_metrics_30d": [
      {
        "api_key_id": null,
        "total_requests": 4
      }
    ],
    "latency_breakdown": {
      "total_requests": 500,
      "less_than_100ms": 233,
      "less_than_500ms": 100,
      "less_than_1s": 50,
      "more_than_1s": 2
    },
    "latency": {
      "min": 0,
      "max": 0,
      "avg": 0,
      "p50": 0,
      "p90": 0,
      "p95": 0,
      "p99": 0
    }
  },
  "error": null,
  "log": null,
  "validator": null,
  "support_id": null,
  "message": "Resource created successfully",
  "env": "development"
}

Authorizations

Authorization
string
header
required

Send your access token as header Authorization: Bearer {accessToken}

Authorization
string
header
required

Your API key that starts with sk_live or sk_test. You can create yours at go.bitgpt.xyz/api-keys.

Response

Successful API key analytics response

status
enum<integer>
required

Status code of the response

Available options:
200,
201,
202
data
object
required

Response data containing the requested object

message
string | null
required

Message of the response, human readable

Example:

"Resource created successfully"

env
enum<string>
required

API environment

Available options:
development,
production
error
string | null

Error message of the response, human readable

Example:

"Invalid email address"

log

Useful informaiton, not always present, to debug the response

Examples:
{ "request_id": "req_1234567890" }

"Some pertinent log message"

validator
object

Validator response object, each key is the field name and value is the error message

Example:
{
"email": "Invalid email address",
"password": "Password is required"
}
support_id
string<uuid> | null

Support ID linked to the response, used to identify it when talking with our team

Example:

"support_uuidv7-something-else"