Get usage statistics

View as markdown
GET /z1/usage

Retrieve current API usage statistics including:

  • Total requests (today, this month)
  • Request breakdown by type (chat, code, RAG, grounding)
  • Rate limit status (RPM, RPD, TPM)
  • Credit usage and remaining balance

Responses

  • 200 application/json

    Usage statistics

    Hide response attributes Show response attributes object
    • user_id string
    • tier string

      Values are free, startup, business, or enterprise.

    • usage object
      Hide usage attributes Show usage attributes object
      • total_requests integer
      • chat_requests integer
      • code_executions integer
      • rag_requests integer
      • grounding_searches integer
    • limits object
      Hide limits attributes Show limits attributes object
      • rpm integer

        Requests per minute limit

      • rpd integer

        Requests per day limit

      • monthly_total integer

        Total monthly requests limit

    • rate_limit_status object
      Hide rate_limit_status attributes Show rate_limit_status attributes object
      • rpm_remaining integer
      • rpd_remaining integer
      • monthly_remaining integer
      • reset_time string(date-time)
  • 401 application/json

    Unauthorized - invalid or missing API key

    Hide response attributes Show response attributes object
    • status string
    • message string
    • code string
    • details object | null
GET /z1/usage
curl \
 --request GET 'https://zenux-api.redglacier-fb4abe56.southafricanorth.azurecontainerapps.io/z1/usage' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "user_id": "user_123",
  "tier": "startup",
  "usage": {
    "total_requests": 1203,
    "chat_requests": 1000,
    "code_executions": 50,
    "rag_requests": 100,
    "grounding_searches": 53
  },
  "limits": {
    "rpm": 1000,
    "rpd": 10000,
    "monthly_total": 30000
  },
  "rate_limit_status": {
    "rpm_remaining": 998,
    "rpd_remaining": 9847,
    "monthly_remaining": 28797,
    "reset_time": "2025-11-14T03:00:00Z"
  }
}
Response examples (401)
{
  "code": "UNAUTHORIZED",
  "status": "error",
  "message": "Invalid API key"
}