Llm Models Models List List

GET/POST /api/models/list/ (Public API) GET/POST /api/llm_models/models/list/ (Platform) List models. **Authentication is optional** (OpenRouter-style catalog) — the SAME endpoint serves both public and authenticated callers: - **Unauthenticated** → managed/shared models only (``organization=None``). Rate-limited per client IP. - **API key / JWT** → managed models PLUS the caller's own custom models. Read-only: there is no create/write path (``ListAPIView``); ``post()`` only delegates to ``get()`` to support POST-body filtering (BE conventions). Both auth modes fully support filtering. Optionally enriches each model with cross-org performance metrics (opt-in via ``is_including_metrics``) over an absolute UTC ``[start_time, end_time)`` window read at ``time_tick`` grain (dashboard convention). Each model gets a ``metrics`` object: average_tps / average_ttft / average_latency (OpenRouter-style averages), uptime_percent, number_of_requests, cost, the prompt/completion/ cache token sums, and cache_hit_percentage. Sourced from the cross-org ``get_public_breakdown_metrics`` reader (clickhouse/tasks.py). The metrics are cross-org aggregates, so they're identical regardless of auth. Filtering: Use standard filter syntax: { "filters": { "affiliation_category": { "value": ["CUSTOM"] } } } See boilerplates/keywordsai/feature_docs/shared/filters_api_reference.md

Authentication

AuthorizationBearer
JWT access token or Respan API key

Query parameters

pageintegerOptional
A page number within the paginated result set.
page_sizeintegerOptional
Number of results to return per page.

Response

countinteger
resultslist of objects
nextstring or nullformat: "uri"
previousstring or nullformat: "uri"
total_countinteger
current_filtersobject

Pydantic model for FilterParamDict. A dictionary that maps metric names to their filter parameters.

Each key is a metric name (str), and each value can be:

  • A single MetricFilterParamPydantic (one condition)
  • A List[MetricFilterParamPydantic] (multiple conditions for same metric)
  • A FilterBundlePydantic (nested filter bundle with connector)

Note: Uses extra=“allow” for dynamic metric name fields. The pydantic_extra annotation tells Pydantic what types to expect for extra fields, and generates typed additionalProperties in JSON Schema.

filters_dataobject