Patricia Spending Limits API
The spending-limits API from Patricia — 1 operation(s) for spending-limits.
The spending-limits API from Patricia — 1 operation(s) for spending-limits.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/patricia-app:patricia-app-spending-limits-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Patricia Spending Limits API
version: 0.1.0
tags:
- name: spending-limits
paths:
/v1/spending-limits:
get:
tags:
- spending-limits
summary: Get the workspace spending limits
description: 'Effective per-run budgets (grouped) plus the monthly cap for the caller''s workspace, labelling each value as Patricia''s recommended default or a workspace override. About the dollar amounts: Usage cost is Patricia''s measure of what your work costs to run, not what you paid for your credits.'
operationId: get_spending_limits_v1_spending_limits_get
security:
- HTTPBearer: []
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Tenant-Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SpendingLimitsResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
patch:
tags:
- spending-limits
summary: Update the workspace spending limits
description: 'Set the monthly cap and/or per-group per-run limits (a group applies to all its underlying triggers), choose what happens when a run reaches its limit (warn and keep going, the default, or stop the task), or reset everything to Patricia''s recommended settings. A reset removes a custom monthly cap; while a cap is active, no per-run limit may exceed it. Changes take effect on the workspace''s next run. About the dollar amounts: Usage cost is Patricia''s measure of what your work costs to run, not what you paid for your credits.'
operationId: update_spending_limits_v1_spending_limits_patch
security:
- HTTPBearer: []
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Tenant-Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SpendingLimitsUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SpendingLimitsResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
GroupLimitView:
properties:
key:
type: string
title: Key
label:
type: string
title: Label
description:
type: string
title: Description
dollars:
type: number
title: Dollars
source:
type: string
title: Source
min_dollars:
type: number
title: Min Dollars
max_dollars:
type: number
title: Max Dollars
triggers:
items:
$ref: '#/components/schemas/TriggerLimitView'
type: array
title: Triggers
type: object
required:
- key
- label
- description
- dollars
- source
- min_dollars
- max_dollars
- triggers
title: GroupLimitView
description: 'A friendly group of per-run budgets (e.g. "Conversations"), shown as one input.
``dollars`` is the representative ceiling for the group (the highest of its
triggers'' effective budgets); editing it fans the one value out to every
trigger in the group on PATCH. ``triggers`` is the per-trigger breakdown for
the "advanced" reveal.
Dollar amounts are usage cost.
Usage cost is Patricia''s measure of what your work costs to run, not what you paid for your credits.'
SpendingLimitsUpdate:
properties:
monthly_cap_dollars:
anyOf:
- type: number
maximum: 100000.0
minimum: 10.0
- type: 'null'
title: Monthly Cap Dollars
description: The optional monthly spending cap in dollars. Amounts are in US dollars of usage cost. Usage cost is Patricia's measure of what your work costs to run, not what you paid for your credits.
groups:
anyOf:
- additionalProperties:
type: number
type: object
- type: 'null'
title: Groups
description: 'Per-run dollar limits by group: conversations, scheduled_tasks, proactive_replies, and background_work. Amounts are in US dollars of usage cost. Usage cost is Patricia''s measure of what your work costs to run, not what you paid for your credits.'
over_budget_behavior:
anyOf:
- type: string
enum:
- warn
- stop
- type: 'null'
title: Over Budget Behavior
description: 'What happens when a single run reaches its per-run limit: ''warn'' keeps going and tells the owner what it cost (the default; a safety stop still ends any run that reaches four times its limit, or the workspace''s remaining spend headroom if that is lower); ''stop'' stops the task at the limit. Omitted or null leaves the workspace''s current behaviour unchanged.'
reset_to_recommended:
type: boolean
title: Reset To Recommended
default: false
additionalProperties: false
type: object
title: SpendingLimitsUpdate
description: 'PATCH body: every field optional; only what''s provided is written.
``groups`` maps a group key (``conversations`` / ``scheduled_tasks`` /
``proactive_replies`` / ``background_work``) to a per-run dollar limit that is
fanned out to every trigger in that group. ``reset_to_recommended`` clears all
overrides and cannot be combined with an explicit value.'
OverBudgetView:
properties:
behavior:
type: string
enum:
- warn
- stop
title: Behavior
source:
type: string
title: Source
type: object
required:
- behavior
- source
title: OverBudgetView
description: 'What happens when a single run reaches its per-run limit.
``"warn"`` (the platform default): Patricia keeps going past the limit and tells the owner
what it cost, but a safety stop still ends any run that reaches four times its limit, or
sooner when the workspace is close to its monthly cap or low on credits. ``"stop"``
(opt-in): the task stops at the limit itself.'
ErrorResponse:
properties:
code:
type: string
title: Code
message:
type: string
title: Message
errors:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Errors
type: object
required:
- code
- message
title: ErrorResponse
description: Standard error envelope, matching exception handler output.
TriggerLimitView:
properties:
key:
type: string
title: Key
label:
type: string
title: Label
dollars:
type: number
title: Dollars
source:
type: string
title: Source
type: object
required:
- key
- label
- dollars
- source
title: TriggerLimitView
description: One underlying per-trigger budget inside a group (the advanced-detail rows).
SpendingLimitsResponse:
properties:
monthly_cap:
$ref: '#/components/schemas/MonthlyCapView'
groups:
items:
$ref: '#/components/schemas/GroupLimitView'
type: array
title: Groups
over_budget:
$ref: '#/components/schemas/OverBudgetView'
using_recommended:
type: boolean
title: Using Recommended
type: object
required:
- monthly_cap
- groups
- over_budget
- using_recommended
title: SpendingLimitsResponse
description: Effective spending limits for the caller's workspace (policy default + override).
MonthlyCapView:
properties:
dollars:
anyOf:
- type: number
- type: 'null'
title: Dollars
source:
type: string
title: Source
min_dollars:
type: number
title: Min Dollars
max_dollars:
type: number
title: Max Dollars
type: object
required:
- dollars
- source
- min_dollars
- max_dollars
title: MonthlyCapView
description: 'The optional workspace-wide monthly spend ceiling.
``dollars=None`` means no monthly cap; the remaining credit balance is the limit.
Dollar amounts are usage cost.
Usage cost is Patricia''s measure of what your work costs to run, not what you paid for your credits.'
securitySchemes:
HTTPBearer:
type: http
scheme: bearer