Liya Engine

Usage

Query current month and historical usage broken down by domain and intent.

GET /dashboard/usage

Returns current month's usage aggregated by domain and intent.

GET https://api.liyaengine.ai/dashboard/usage
Authorization: Bearer <jwt>

Response:

{
  "success": true,
  "data": {
    "period": {
      "start": "2026-03-01",
      "end": "2026-03-31"
    },
    "totals": {
      "requests": 1240,
      "tokens": "6200000",
      "costUsd": "3.1000"
    },
    "byDomain": [
      {
        "domain": "hiring",
        "requests": 1240,
        "tokens": "6200000",
        "costUsd": "3.1000",
        "byIntent": [
          {
            "intent": "resume_analysis",
            "requests": 620,
            "tokens": "2480000",
            "costUsd": "1.2400"
          },
          {
            "intent": "candidate_prescreen",
            "requests": 380,
            "tokens": "2660000",
            "costUsd": "1.3300"
          }
        ]
      }
    ]
  }
}

GET /dashboard/usage/history

Returns monthly usage aggregates for up to 12 months.

GET https://api.liyaengine.ai/dashboard/usage/history?months=6
Authorization: Bearer <jwt>

Query parameters:

ParameterTypeDefaultMax
monthsinteger612

Response:

{
  "success": true,
  "data": {
    "history": [
      { "month": "2025-10", "requests": 320, "tokens": "1600000", "costUsd": "0.8000" },
      { "month": "2025-11", "requests": 580, "tokens": "2900000", "costUsd": "1.4500" },
      { "month": "2025-12", "requests": 720, "tokens": "3600000", "costUsd": "1.8000" },
      { "month": "2026-01", "requests": 940, "tokens": "4700000", "costUsd": "2.3500" },
      { "month": "2026-02", "requests": 1100, "tokens": "5500000", "costUsd": "2.7500" },
      { "month": "2026-03", "requests": 1240, "tokens": "6200000", "costUsd": "3.1000" }
    ]
  }
}

Months with no usage are included with zero values — no gaps in the series.

On this page