HUD

HUD Limits API

The limits API from HUD — 3 operation(s) for limits.

Operations 5

GET /v2/limits List Spend Limits #
POST /v2/limits Create Spend Limit #
PATCH /v2/limits/{limit_id} Update Spend Limit #
DELETE /v2/limits/{limit_id} Delete Spend Limit #
POST /v2/limits/{limit_id}/reset Reset Spend Limit #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hud-ai:hud-ai-limits-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hud-ai-limits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HUD Platform Limits API
  version: 2.0.0
tags:
- name: Limits
paths:
  /v2/limits:
    get:
      tags:
      - Limits
      summary: List Spend Limits
      description: List the spend limits visible to the caller with current-period spend.
      operationId: list_spend_limits_v2_limits_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendLimitListResponse'
        '400':
          description: Invalid or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller may not access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Referenced entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded; wait at least Retry-After seconds
          headers:
            Retry-After:
              description: Seconds until the request budget has room
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The server is at capacity; retry after Retry-After seconds
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
      - Limits
      summary: Create Spend Limit
      description: Create a team, member, or API-key limit, or a team percentage alert.
      operationId: create_spend_limit_v2_limits_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendLimitCreateRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendLimitItem'
        '400':
          description: Invalid or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller may not access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Referenced entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded; wait at least Retry-After seconds
          headers:
            Retry-After:
              description: Seconds until the request budget has room
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The server is at capacity; retry after Retry-After seconds
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/limits/{limit_id}:
    patch:
      tags:
      - Limits
      summary: Update Spend Limit
      description: Update an absolute amount, percentage threshold, or enabled state.
      operationId: update_spend_limit_v2_limits__limit_id__patch
      parameters:
      - name: limit_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Limit Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendLimitUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendLimitItem'
        '400':
          description: Invalid or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller may not access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Referenced entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded; wait at least Retry-After seconds
          headers:
            Retry-After:
              description: Seconds until the request budget has room
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The server is at capacity; retry after Retry-After seconds
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - Limits
      summary: Delete Spend Limit
      description: Delete a spend limit.
      operationId: delete_spend_limit_v2_limits__limit_id__delete
      parameters:
      - name: limit_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Limit Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Invalid or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller may not access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Referenced entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded; wait at least Retry-After seconds
          headers:
            Retry-After:
              description: Seconds until the request budget has room
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The server is at capacity; retry after Retry-After seconds
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v2/limits/{limit_id}/reset:
    post:
      tags:
      - Limits
      summary: Reset Spend Limit
      description: Start a new spend window on a blocking limit. Ledger rows are unchanged.
      operationId: reset_spend_limit_v2_limits__limit_id__reset_post
      parameters:
      - name: limit_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Limit Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendLimitItem'
        '400':
          description: Invalid or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller may not access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Referenced entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded; wait at least Retry-After seconds
          headers:
            Retry-After:
              description: Seconds until the request budget has room
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The server is at capacity; retry after Retry-After seconds
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SpendInterval:
      type: string
      enum:
      - week
      - month
      title: SpendInterval
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        source:
          $ref: '#/components/schemas/ErrorSource'
        detail:
          type: string
          title: Detail
      type: object
      required:
      - error
      - source
      - detail
      title: ErrorResponse
      description: The uniform `{error, source, detail}` envelope returned for every 4xx/5xx.
    SpendLimitAction:
      type: string
      enum:
      - alert
      - block
      title: SpendLimitAction
    ErrorSource:
      type: string
      enum:
      - user
      - platform
      - provider
      title: ErrorSource
      description: 'Who is at fault for a failure.


        ``user``: the customer''s input, account, environment, or agent code.

        ``platform``: HUD infrastructure or a broken platform invariant.

        ``provider``: a third-party dependency (cloud runtime, upstream LLM API).'
    SpendLimitListResponse:
      properties:
        limits:
          items:
            $ref: '#/components/schemas/SpendLimitItem'
          type: array
          title: Limits
      type: object
      required:
      - limits
      title: SpendLimitListResponse
    SpendLimitItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        api_key_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Api Key Id
        api_key_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key Name
        membership_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Membership Id
        member_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Member Name
        parent_limit_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Parent Limit Id
        threshold_percent:
          anyOf:
          - type: string
          - type: 'null'
          title: Threshold Percent
        interval:
          $ref: '#/components/schemas/SpendInterval'
        amount_usd:
          type: string
          title: Amount Usd
        action:
          $ref: '#/components/schemas/SpendLimitAction'
        enabled:
          type: boolean
          title: Enabled
        spend_usd:
          type: string
          title: Spend Usd
        period_start:
          type: string
          title: Period Start
        period_end:
          type: string
          title: Period End
        reset_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Reset At
        editable:
          type: boolean
          title: Editable
      type: object
      required:
      - id
      - api_key_id
      - api_key_name
      - membership_id
      - member_name
      - parent_limit_id
      - threshold_percent
      - interval
      - amount_usd
      - action
      - enabled
      - spend_usd
      - period_start
      - period_end
      - reset_at
      - editable
      title: SpendLimitItem
      description: 'One limit with its current spend-window total.


        API-key and membership limits use their corresponding ID. Team limits have

        neither; percentage alerts additionally identify their parent team limit.

        ``period_start`` is the window opening (calendar start or last reset);

        ``period_end`` is the next calendar boundary.'
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        error:
          type: string
          const: validation_error
          title: Error
        source:
          type: string
          enum:
          - user
          - platform
          - provider
          title: Source
        detail:
          type: string
          title: Detail
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Errors
      required:
      - error
      - source
      - detail
      - errors
    ValidationError:
      title: ValidationError
      type: object
      properties:
        type:
          type: string
          title: Error Type
        loc:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
        msg:
          type: string
          title: Message
      required:
      - type
      - loc
      - msg
    SpendLimitCreateRequest:
      properties:
        api_key_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Api Key Id
        membership_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Membership Id
        parent_limit_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Parent Limit Id
        threshold_percent:
          anyOf:
          - type: number
            maximum: 100.0
            exclusiveMinimum: 0.0
          - type: string
            pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          - type: 'null'
          title: Threshold Percent
        interval:
          $ref: '#/components/schemas/SpendInterval'
        amount_usd:
          anyOf:
          - type: number
            maximum: 1000000.0
            exclusiveMinimum: 0.0
          - type: string
            pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          - type: 'null'
          title: Amount Usd
        action:
          $ref: '#/components/schemas/SpendLimitAction'
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
      - interval
      - action
      title: SpendLimitCreateRequest
      description: 'Create an absolute limit or a percentage alert.


        Set one scope ID for an API-key or membership limit, or neither for a team

        limit. Percentage alerts set ``parent_limit_id`` and

        ``threshold_percent``; their interval must match the parent and their

        amount is inherited.'
    SpendLimitUpdateRequest:
      properties:
        amount_usd:
          anyOf:
          - type: number
            maximum: 1000000.0
            exclusiveMinimum: 0.0
          - type: string
            pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          - type: 'null'
          title: Amount Usd
        threshold_percent:
          anyOf:
          - type: number
            maximum: 100.0
            exclusiveMinimum: 0.0
          - type: string
            pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          - type: 'null'
          title: Threshold Percent
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
      type: object
      title: SpendLimitUpdateRequest
x-hud-contract-scope: platform_public