---
title: "Get Used Models"
method: GET
path: "/analytics/used-models"
tags: ["analytics"]
---

# Get Used Models

`GET /analytics/used-models`

Return the distinct models the user has run inference against.

One entry per distinct ``inferences.model_id`` for the authenticated
user, ordered by most-recently-used first and carrying the last-used
timestamp plus a lifetime call count. LLM-as-Judge calls
(``source = 'llmaj'``) are excluded so the list reflects user-driven
usage. The service filters ``inferences.user_id`` explicitly because
the ``service_role`` async engine bypasses Postgres RLS.

Args:
    limit: Maximum number of models to return.
    auth: Authentication result carrying the user id used to scope
        the aggregate.

Returns:
    ``UsedModelsResponse`` with the recency-ordered model list. Empty
    when the user has no qualifying inferences.

## Query parameters

- `limit` integer — Maximum number of distinct models to return, ordered by most-recently-used first.

## Response `200`

Successful Response

- UsedModelsResponse — Distinct models a user has used, most-recently-used first. Excludes LLM-as-Judge (``source = 'llmaj'``) calls so the list only reflects models the user actually invoked. Scoped to the requesting user — the ``service_role`` engine bypasses RLS, so the service filters ``inferences.user_id`` explicitly.
  - `models` UsedModel[] — Used models ordered by ``last_used_at`` descending.
    - `model_id` string, required — Identifier the caller used for inference (base catalog id or fine-tuned model id). Stable grouping key for this row.
    - `model_name` string, nullable — Human-readable model name recorded on the inference, when set.
    - `base_model` string, nullable — HuggingFace base model id for fine-tuned models; null for direct base-model calls.
    - `project_id` string, nullable — Project the model belongs to (fine-tunes only); null for base-model calls. Lets the client route a click to the project page.
    - `training_job_id` string, nullable — Training job that produced the model (fine-tunes only); null for base-model calls.
    - `last_used_at` string, date-time, required — Most recent ``created_at`` for this model across the user's inferences (excluding LLM-as-Judge calls).
    - `inference_count` integer — Lifetime count of the user's inferences against this model (excluding LLM-as-Judge calls).

## Other responses

- `422` — Validation Error
- `503` — Used models dependency is temporarily unavailable.

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
