> ## Documentation Index
> Fetch the complete documentation index at: https://aivision.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Read the relevant procedure and prerequisites before suggesting commands. Cite the section and give an observable check. Treat sample data as illustrative. Report product actions and results only when verified in the user's environment.

# Complete model costs

> Review available costs, add missing rates, and value subscription usage at selected token prices.

In **Integrations → Model pricing**, review model usage, cost, and pricing sources. Set the time range, check coverage, and open a model that needs a price. After saving a rule, reopen the original Trace to confirm its source and subtotal.

Space members can review costs and rules. Synchronizing the public catalog or adding and deleting rules requires a Space administrator. Start with a record containing model usage, and confirm its Space and call time.

> [!NOTE]
>
> Price completion currently covers native Trace, Session, and model-call details, plus **Cost overview** under **Integrations → Model pricing**. External Langfuse views retain costs supplied by the integration and support display-currency conversion; these rules do not fill their missing costs. Model pricing does not require a model API key. [Model connections](https://aivision.mintlify.site/en/guides/model-connections.md) is the separate entry for calling and validating models.

## Read the amount and coverage first

Open **Cost overview**, choose a time range, then select **Details** below the amount to check the priced call count and pricing sources. The overview covers native model and embedding calls in the current space. The built-in sample Agent’s simulated amounts are excluded. The selected range carries over between **Agent traces** and **Model pricing**. **Price rules** hides the time controls.

**Last 7 days** includes today and the six preceding calendar days in your device’s time zone. **This month** runs from the start of the local month to now. To check a provider’s billing period, enter its dates under **Custom**. Pricing supports a custom range of up to 31 days. Manual refresh recalculates preset windows and reuses the same dates for custom ranges.

| Result | Meaning |
| - | - |
| Cost and priced-call count | Based on supplied amounts or applicable rates, including clearly marked reference estimates. It is not a reconciled provider bill. |
| Known subtotal | Includes amounts from fully priced calls and the priced portions of incomplete calls. The coverage count includes only fully priced calls. |
| Subscription estimate | Values subscription usage at official model Token rates. If only part of the usage can be valued, read the estimate together with its coverage and missing reasons. The actual subscription charge remains unknown. |
| Unknown or not additive | Open **Details** for missing evidence or overlapping ownership. Neither means zero cost. |

When all calls use a subscription and a reference is available, that reference becomes the main amount. Mixed subscription and pay-as-you-go amounts remain separate and are never added together. Coverage counts only collected, identified model calls; it does not prove that every call was collected.

To trace an amount, first check **Details** for the entire query range. Close the popover and select **View details** on a model’s row to check that model’s subtotal.

<video controls playsInline preload="none" poster="/assets/walkthrough/en/pricing-usage.webp" src="https://mintcdn.com/aivision/qGp0V6y6p5Gih57B/assets/walkthrough/en/pricing-usage.mp4?fit=max&auto=format&n=qGp0V6y6p5Gih57B&q=85&s=b5e54a7ca213b2155cd892efb8107d33" aria-label="Check pricing sources for the range, then open the gpt-4o-mini subtotal · Demo data · Chinese UI" />

Check pricing sources for the range, then open the gpt-4o-mini subtotal · Demo data · Chinese UI

## Add a price for a model needing attention

1. In the **Model costs** list, select **Needs attention**, then open a model's **Complete price** or **View details** action. Read **Cost result** and the missing evidence first. Rates alone cannot repair missing usage.
2. Check the original provider and model IDs. If identity is missing, inspect the integration record. Entering an identity here only supports price lookup or rule configuration. Historical calls missing that identity still cannot match automatically; the integration must supply the missing information. Compatible API protocols do not establish identical provider prices.
3. Search for a price and choose the appropriate path below.
4. Set **Effective from**, choose **Review rule**, check the provider, model, and price, then select **Confirm and save**. Enter the time in your device’s time zone. To price a past call, set the effective time at or before that call.

| Available price | Action |
| - | - |
| Exact provider and model match with supported pricing | The existing public catalog can be used automatically. Applicable supplied amounts or higher-priority rules retain their precedence. |
| Similar name or an alias | Check the candidate model and rates, then **Confirm as price alias**. Candidates never apply themselves. |
| A comparable price from another provider | Enable **Find reference prices from other providers**, inspect the candidate, then **Use as reference estimate**. The amount remains marked as a reference. |
| No suitable candidate, or a custom price | Choose **Custom price** and enter the rates for your selected scenario. |

Manual entry always uses **USD per million tokens**, even when displayed costs use CNY or JPY. Input and output are required; cache reads, cache writes, and reasoning can have separate rates. An explicit `0` means a zero rate. An empty field does not mean zero. After saving, open **Price rules** to verify the source and effective time. When an exchange rate is available, the table converts the displayed rates. Check the unit in each column.

[![Price rules table with input and output prices per million Tokens](https://mintcdn.com/aivision/qGp0V6y6p5Gih57B/assets/walkthrough/zh-CN/pricing-rates.webp?fit=max\&auto=format\&n=qGp0V6y6p5Gih57B\&q=85\&s=1b8c3f8eb70cd4cb14e17111c64dadec)](https://aivision.mintlify.site/assets/walkthrough/zh-CN/pricing-rates.webp)

Purple outlines identify the manual input and output rates in USD and the rule’s effective date · Demo data · Chinese UI

Rules apply only to matching providers, models, and effective times in the current Space. Confirmed aliases and references preserve their selected rates; a later catalog sync does not replace them. Add a new effective rule to change rates. Rules still follow price-source priority and effective time: a later lower-priority rule does not override an existing higher-priority source. Check Details after saving to confirm which source actually applies. Deleting a rule can expose another applicable source or make the cost unknown again.

## Synchronize an empty or outdated catalog

A self-hosted backend with a bundled catalog imports its bundled models.dev snapshot in the background at startup when no catalog is saved. The bundled catalog works without access to models.dev or GitHub. A restart or upgrade keeps the saved catalog, even when the new backend ships a newer snapshot. To update an existing catalog, synchronize or import it using the steps below.

Open **Prices and exchange rates** and select **Sync public catalog** to use the automatic default. To select the API or GitHub explicitly, first expand **Advanced settings**, choose **Sync source**, then synchronize:

* **Automatic** tries the models.dev API, then the GitHub repository if the API fails.
* **models.dev API** uses the public pricing endpoint.
* **GitHub repository** synchronizes model data from the [models.dev repository](https://github.com/anomalyco/models.dev).

Review the source, version, and retrieval time in settings. The catalog and exchange rates are shared across Spaces; saved Space rules keep their selected prices. A failed synchronization retains the last successful catalog. Check its error state before retrying.

Retrieval time is not a provider price's historical effective time. Automatic catalog amounts value usage at the selected current catalog; they do not reconstruct past bills. Context tiers, service or region multipliers, multiple cache lifetimes, image or audio units, and other conditions can prevent automatic calculation. A matching model name is not sufficient. Check the provider's official tariff and, if appropriate, enter supported scalar rates for an explicit scenario.

### Update the catalog offline

A self-hosted deployment operator can download [api.json from models.dev](https://models.dev/api.json) on a connected machine and transfer it to the backend host.

```bash theme={null}
curl --fail --location https://models.dev/api.json --output api.json
```

From the backend source directory, `ai-vision/aivision-py-be/`, use the deployment's database configuration. Replace `/path/to/api.json` with the transferred file's path.

```bash theme={null}
uv run python manage.py sync_model_pricing --file /path/to/api.json
```

For a standard Docker deployment, run these commands on the backend host from the directory containing `api.json`. Replace the default container name `aivision-backend` with your backend container name.

```bash theme={null}
docker cp api.json aivision-backend:/tmp/api.json
docker exec -w /app aivision-backend python manage.py sync_model_pricing --file /tmp/api.json
```

For the native backend image, use `./manage` in place of `python manage.py` in the second command. The import validates the file before activating the catalog across Spaces. When you see `Saved models.dev snapshot`, reload the pricing page. Under **Advanced settings**, check for the **Imported file** source, the model count, and the content version. A deployment initialized from the built-in snapshot shows **Bundled models.dev**.

## Value Coding Plans and subscriptions

When AI Vision recognizes a subscription call and has the official model price and required token usage, it automatically shows **Estimate at official model rates**. AI Vision matches the model returned by the call when available and uses published base token rates. Verified provider rates fill specific catalog gaps. The retired DeepSeek V4 Flash 0731 uses its last published base rates and shows **Estimate at historical official rates**. Open **Details** to see the sources when a total includes both current and historical prices.

The estimate shows what the same usage would cost at published token rates. Subscription estimates and pay-as-you-go amounts appear separately. When only part of a call can be valued, that amount can contribute to the subscription subtotal, and the call remains outside the fully priced count. If none of the subscription calls can be priced in full but a subtotal is available, the label is **Subscription estimate subtotal**. Open **Details** to see which rates or usage are missing. If you use custom pay-as-you-go rates, apply them through a pay-as-you-go rule.

If the integration has not identified a subscription, you can set a **Subscription** rule and effective time for the provider and model in the Space. The gateway can recognize dedicated Baidu Qianfan Token Plan and GLM Coding Plan endpoints when the call reports them. For a shared endpoint or proxy used with both billing modes, report `subscription` or `pay_as_you_go` in `aivision.billing.mode` on each call. The call's explicit billing mode takes precedence over the Space default.

## Are cache hits charged?

**A cache hit is not necessarily free.** Whether reads and writes are charged, and at which rates, depends on the provider and selected pricing scenario.

In native usage, **Reused input (cached)** and cache writes are part of input Tokens. Reasoning Tokens are part of output. AI Vision deducts each reported breakdown from its input or output total before applying rates, then prices that breakdown at its own rate when available.

If the call reports a positive Token count in a breakdown but the applicable price has no rate for it, the full cost stays unknown. Any separately priced usage can appear as a subtotal. An explicit zero rate covers the reported breakdown at zero cost. If the call only reports input and output totals, AI Vision can price those totals at the applicable base rates and leaves the unreported breakdowns unknown in the usage display. Check [Token accounting](https://aivision.mintlify.site/en/guides/token-usage.md) for field definitions.

## Verify the result in observability

After saving a rule, reopen the [Trace](https://aivision.mintlify.site/en/guides/traces.md) details in the same Space and time window to inspect costs and coverage. Select a model call in Chain, Graph, or Timeline and open its cost **Details**. You can also check the cost summary in [Session](https://aivision.mintlify.site/en/guides/sessions.md) details. Use **Cost overview** on this page to compare costs over a time range.

**Details** explains the amount and its pricing source. Expand **More details** for coverage and conversion evidence. Verify that the amount appears on the target record and the source matches the applicable rule or official model price. Existing records require no new model request.

## Find model calls by cost

In native Trace details, expand **Filter spans** and enable **Minimum cost**. For example, select **USD**, enter `0.2`, and press Enter to find calls costing at least 0.2 dollars each. Leaving the field also applies the amount. Cost and Token usage are independent conditions: more Tokens do not necessarily mean a higher cost.

* **Computable cost (includes estimates)** uses the available amount for that call. To inspect subscription usage, choose **Subscription token-rate equivalent** instead. The two amounts are filtered separately and never added together.
* Minima include the exact boundary. An explicit `0` matches a minimum of `0`; unknown costs, missing single-call evidence, and overlapping ownership do not match. Comparison uses unrounded amounts, so similar displayed values can fall on different sides of a threshold.
* Choose USD, CNY, or JPY. Local-currency conditions use the reference exchange rate. Without a usable rate, the interface warns and saved local-currency conditions match no calls; they are never reinterpreted as USD. Refresh rates or explicitly change the condition's currency and confirm the amount. Changing currency does not convert the entered value.

Combine cost with model, Token, duration, or search conditions on the same call. Conditions remain active across Chain, Graph, and Timeline. Ancestors supply context only, and the selected detail stays open. Save the amount, currency, and cost basis in a personal **Preset**, scoped to this browser's account and Space. Changing display currency or interface language does not reinterpret its saved currency. External Langfuse views do not currently offer these cost filters.

## Choose a currency and resolve remaining gaps

Use **Display currency** next to the main amount in **Cost overview**. The default follows the interface language and uses CNY for Chinese, USD for English, and JPY for Japanese. Conversion uses dated ECB reference rates and preserves the original price.

Administrators can select **Refresh exchange rates** in **Prices and exchange rates**. Existing USD amounts stay in USD when there is no usable rate. Publisher tariffs quoted in CNY, including some Baidu ERNIE prices, need a usable rate before they can contribute to an estimate. The bundled catalog and exchange rates are maintained separately. Rates older than seven days show an update prompt. A failed refresh keeps the last successful rate. To check the conversion date, open cost **Details → More details**.

| Incomplete result | Next check |
| - | - |
| No model calls in the window | Confirm the Space and period, or complete an integration task. An empty result does not prove no actual consumption. |
| Missing provider, model, or effective price | Check source identity, candidate mapping, and the rule's effective time. |
| Missing input or output totals | Inspect the call's original usage and collection settings. |
| Missing rate for reported cache or reasoning Tokens | Check the applicable rule and the provider's separate rate for that usage. |
| Only a known subtotal | Open **Details** for the reason, then check the reported usage and applicable pricing rule. |
| Potentially overlapping nested calls | Keep the unknown or not-additive result until ownership is clear. Do not manually add parent and child amounts. |
| Explicit zero | This amount is known to be zero. It does not prove the entire service or account is free. |

Use the provider's bill for actual payments. The goal here is an amount with a clear scope, price source, and visible remaining gaps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.