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

# How to reduce costs

Keeping costs low starts with how you build.

Most credit usage happens while Cody is actively building, editing, and testing. Once an agent is ready, ongoing run costs are usually much lower.

### Best ways to reduce costs

#### Keep chat threads short

Long chat threads cost more to process. Start a new chat for each new agent or build.

If a thread gets long, continue in a new one. Your context stays available, so Cody still understands what you have been building.

{% hint style="info" %}
Use one chat per agent when possible. This is the easiest way to keep build costs down.
{% endhint %}

#### Ask Cody to optimize for cost

Tell Cody to keep cost in mind before or during a build. This works best when you are starting a new build.

You can ask for:

* Lower-cost approaches
* Simpler workflows
* Fewer unnecessary steps

#### Use cheaper models when the task allows

Some tasks do not need the most expensive model. Ask Cody whether it can switch to a cheaper model for the same task.

Keep the output quality bar in mind. Use lower-cost models where they still meet your needs.

#### Expect building to cost more than running

Building usually costs more than ongoing usage. That includes planning, editing, testing, and iterating.

Once your agent is working well, the cost to run it is generally much lower.

### Example prompts

Try prompts like:

* `Keep cost in mind while building this.`
* `Can you suggest a cheaper way to build this workflow?`
* `Can you use a lower-cost model here without reducing output quality too much?`

### Quick summary

To reduce costs:

* Start fresh chats often
* Ask Cody to optimize for cost
* Use cheaper models when possible
* Track spend in **Usage**


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.codewords.ai/pricing-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
