Skip to main content
GET
Read an agent budget in USD
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

Dedicated deploymentsReplace 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
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.
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.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Path Parameters

agentId
string<uuid>
required

Response

Successful response.

Monthly budget in mode currency, subject to workspace enforcement. always uses agent allowance; on_limit_hit uses it after the member allowance. Spend is null when user-level usage is hidden and always null on PATCH.

id
string<uuid>
required
name
string | null
required
budget
object
required

Monthly budget in the mode currency. none follows workspace/member limits; unlimited keeps a separate budget without a numeric cap.

budgetMode
enum<string>
required
Available options:
always,
on_limit_hit
budgetPeriodSpend
number | null
required
Required range: x >= 0