> For the complete documentation index, see [llms.txt](https://docs.nexos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexos.ai/gateway-api/cost-optimization.md).

# Cost Optimization

### Overview

The **Cost Optimization** dashboard shows how nexos.ai optimization features impact your AI gateway costs. Use it to track savings from caching and understand the performance trade-offs of optimization.

### How does it look?

At the top of the dashboard, you can see the key metrics that summarize the impact of cost optimization:

* **Estimated cost without caching** - what your usage would have cost without caching.
* **Actual cost with caching** - the actual cost after caching is applied.
* **Total savings** - the amount saved through caching.
* **Added latency** - the additional response time introduced by the optimization.

The dashboard also includes a **Cumulative cost** chart, which lets you compare costs with and without caching over time.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FrhbVAFJjosarbTZfzhHW%2Fimage.png?alt=media&amp;token=118e9a52-9fda-46a9-a8d1-e017f22297d6" alt=""><figcaption></figcaption></figure>

### How to use it?

Use the filters at the top of the page to analyze cost optimization for a specific period, user, team, or model. This helps you understand where optimization has the greatest impact.

1. Select a **time range**.
2. Filter by **users, teams, or models** if needed.
3. Review your **actual cost and estimated savings**.
4. Use the chart to compare how costs change over time.

### Optimization measures

The **Optimization measures** section shows the features nexos.ai uses or plans to use to help reduce AI costs.

**Cache optimization** reduces costs by taking advantage of cached prompt content when supported by the model provider. This can be especially useful when requests repeatedly contain the same instructions or context.

**Smart Router** and **Context Compression** will appear as **Coming soon** until they become available.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexos.ai/gateway-api/cost-optimization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
