---
title: "Put Agent Spend Limit"
method: PUT
path: "/api/agents/{agent_id}/llm-spend-limit"
tags: ["llm-spend-limits"]
---

# Put Agent Spend Limit

`PUT /api/agents/{agent_id}/llm-spend-limit`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/agents/{agent_id}/llm-spend-limit`
- Auth: HTTP bearer

Sets the agent's own monthly limit. A null limit means no limit for this agent.

## Path parameters

- `agent_id` string, required

## Request body

- AgentSpendLimitUpdate
  - `monthlyLimitCents` integer, nullable, required

## Response `200`

Successful Response

- AgentSpendLimitResponse
  - `monthlyLimitCents` integer, nullable, required
  - `source` 'agent' | 'account_default' | 'none', required
  - `spentThisMonthCents` number, required
  - `limitReached` boolean, required
  - `periodStart` string, date-time, required
  - `periodEnd` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/maritime/apis/maritime-api.md) - [All operations](https://skmtc.dev/maritime/apis/maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maritime/apis/maritime-api/revisions/acd712090ad6?raw)
