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

# Get Agent Budget

> Read one agent's monthly budget, budget mode, and spend

Read and update monthly agent budgets in US dollars. Use the `bring-your-own-keys` prefix for this workspace mode.

The calls use the workspace API key's `BILLING_API` scope. Writes run as the key's service account owner.

## Base URL

```
https://api.langdock.com/billing/v1/bring-your-own-keys/agents/{agentId}
```

> [!WARNING]
>
> **Dedicated deployments**
>
> Replace `api.langdock.com` with `<your-deployment-url>/api/public` in all requests.

## Prerequisites

* **API key** with the `BILLING_API` scope
* The key owner is a service account that has not been deleted and has an active Admin membership

```json theme={null}
{
  "id": "33333333-3333-4333-8333-333333333333",
  "name": "Contract reviewer",
  "budget": { "type": "limited", "amount": 40 },
  "budgetMode": "always",
  "budgetPeriodSpend": 18.7
}
```

`name` may be `null`. `budgetPeriodSpend` is `null` when the workspace hides per user spend.

When per user spend is hidden, agents that are not shared are left out of the list. Reading or updating one of those agents returns `404` and changes nothing. Shared agents stay in the list with `budgetPeriodSpend` set to `null`.

> [!NOTE]
>
> Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on [API Key Best Practices](https://docs.langdock.com/en/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


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