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

# Cost control

Set spending limits, alerts, and monitor credit consumption.

Use these tasks to control and review account credit consumption. Set a limit before people begin work, then add alerts before the limit takes effect.

**Microservice:** Identity Hub\
**QA base URL:** `https://api-builder-qa.uptiq.dev/identity-hub`

### Endpoint quick reference

| Task                 | Endpoint                             | Result                                 |
| -------------------- | ------------------------------------ | -------------------------------------- |
| Set a hard limit     | `POST /accounts/credits/usage-limit` | Rejects usage after the configured cap |
| Create a usage alert | `POST /accounts/credits/usage-limit` | Sends a threshold notification         |

{% hint style="info" %}
Set a hard limit first. Use `type: "HardLimit"` for a cap or `type: "NotificationThreshold"` for a notification.
{% endhint %}

<table data-view="cards"><thead><tr><th>Task</th><th data-card-target data-type="content-ref">Open</th></tr></thead><tbody><tr><td><strong>Set a credit limit</strong><br>Set a hard cap so the account cannot overspend.</td><td><a href="/cookbooks/platform-admin/cost/cap-account-spending.md">Set a credit limit</a></td></tr><tr><td><strong>Create a usage alert</strong><br>Notify Account Admins before consumption reaches a threshold.</td><td><a href="/cookbooks/platform-admin/cost/get-alerted-before-a-cap.md">Create a usage alert</a></td></tr><tr><td><strong>Review credit usage</strong><br>Break down consumption by app, agent, model, and feature.</td><td><a href="/cookbooks/platform-admin/cost/find-what-used-credits.md">Review credit usage</a></td></tr></tbody></table>

***


---

# 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.uptiq.ai/cookbooks/platform-admin/cost.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.
