---
title: "List models seen in traces with no price or an approximate one"
method: GET
path: "/api/{org_id}/llm/models/unpriced"
tags: ["LLM"]
---

# List models seen in traces with no price or an approximate one

`GET /api/{org_id}/llm/models/unpriced`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/llm/models/unpriced`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/llm/models/unpriced/get.ts> (a function with typed inputs; its response is checked against the schema)

Models in the stream's spans that ingest marked unpriced or approximately priced during the window, with spans, tokens and recorded cost. Historical gaps remain after adding an exact price and are marked priced_now; old costs are not backfilled. Spans with tokens but no model name are listed as one row with a null model.

## Path parameters

- `org_id` string, required

## Query parameters

- `stream_name` string, required
- `start_time` integer, required
- `end_time` integer, required

## Response `200`

Success

- UnpricedModelsResponse
  - `model_count` integer, required: Distinct models ingest marked in the window, uncapped and before today's prices are applied; spans without a model name count as one.
  - `models` UnpricedModel[], required: Models with recorded pricing gaps, including those priced since ingestion.
    - `agent_count` integer, required: Distinct agent names behind the row, including those past the cap.
    - `agents` string[], required: Up to [`MAX_AGENT_NAMES`] agent names that sent the model.
    - `cost` number, double, required: Cost recorded at ingest (0 for unpriced spans).
    - `model` string, nullable: Null for spans that carry no model name: they have tokens but nothing to price.
    - `spans` integer, required
    - `status` 'unpriced' | 'approximate' | 'free', required: How ingest priced an LLM span whose cost is not an exact non-zero price; stored in [`COST_STATUS_COLUMN`].
    - `tokens` integer, required
    - `matched` UnpricedModelMatch: The pricing definition a listed model resolves to today.
      - `match_pattern` string, required
      - `name` string, required
      - `source` 'built_in' | 'meta_org' | 'org', required: Ownership source of a model pricing definition.
      - `tiers` PricingTierDefinition[], required
        - `condition` TierCondition: Condition for a pricing tier.
          - `operator` 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'neq': Comparison operators for tier conditions.
          - `usage_key` string: The usage key to evaluate (e.g., "input")
          - `value` number, double: Threshold value (e.g., 200000 for extended context pricing)
        - `name` string: Display name for this tier (e.g., "Default", "Extended Context")
        - `prices` object: Prices per token, keyed by usage type. Keys must exactly match usage keys produced by the span extractor: "input", "output", "cache_read_input_tokens", "cache_creation_input_tokens", etc. Values are price per single token (e.g., 0.000003 = $3/1M tokens). **Precision note:** `f64` provides ~15 significant decimal digits, which is more than sufficient for cost *estimation* on observability data. These values are not used for billing or financial accounting — they produce approximate cost figures for dashboards and alerts. The multiplication `token_count as f64 * price` is exact for token counts < 2^53 (~9 quadrillion), well beyond practical span sizes.
        - `priority` integer: Breaks ties between matching tiers before the restriction count; higher wins.
        - `rules` TierRule[]: Span-attribute rules (service tier, speed, region) that must all hold.
          - `keys` string[]: Attribute keys tried in order; compared ignoring case and `_`/`-`/`.` separators.
          - `op` 'in' | 'not_in' | 'exists' | 'not_exists' | 'gt' | 'gte' | 'lt' | 'lte' | 'unknown': Operators for [`TierRule`].
          - `value` number, double, nullable: Threshold for the numeric operators.
          - `values` string[]: Accepted values for `in` / `not_in`, compared trimmed and case-insensitively.
        - `utc_windows` UtcTimeWindow[]: Recurring UTC time-of-day windows during which this tier applies. Empty (the default) means the tier is not time-restricted. Providers such as DeepSeek publish "peak" and "off-peak" rates that repeat every day, which is a time-of-day range rather than an absolute cutover (that is what `valid_from` is for). A tier applies when the span falls in ANY of its windows *and* its `condition` (if set) passes, so windows compose with context-length tiering.
          - `end_minute` integer: Exclusive end, minutes since UTC midnight (0–1440).
          - `start_minute` integer: Inclusive start, minutes since UTC midnight (0–1440).
    - `priced_now` boolean, required: An exact definition covers new spans; these older spans retain their recorded cost.
  - `models_truncated` boolean, required: The server listed only the models with the most tokens; `model_count` has them all.
  - `tokens` integer, required: Tokens on every span ingest marked in the window.

## Other responses

- `400`: Invalid query
- `403`: Forbidden
- `429`: Search not allowed for the organization
- `500`: Internal server error

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
