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

# Get budget

> One budget, in exactly the row shape `GET /budgets` returns, including the live spend enrichment and the per-person `end_users_seen` / `end_users_over` standing on attributed-user templates. Archived budgets are not returned. `spend_available: false` means spend could not be totalled, and `spent_usd` / `spent_nano_usd` are null rather than a figure that cannot be told apart from zero spend. A per-person template reports null there too, because one allowance per person has no single total; each person's figure is in `GET /spend-summaries` and the seat buckets.



## OpenAPI

````yaml GET /api/gateway/v1/budgets/{id}
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/gateway/v1/budgets/{id}:
    get:
      tags:
        - Budgets
      summary: Get budget
      description: >-
        One budget, in exactly the row shape `GET /budgets` returns, including
        the live spend enrichment and the per-person `end_users_seen` /
        `end_users_over` standing on attributed-user templates. Archived budgets
        are not returned. `spend_available: false` means spend could not be
        totalled, and `spent_usd` / `spent_nano_usd` are null rather than a
        figure that cannot be told apart from zero spend. A per-person template
        reports null there too, because one allowance per person has no single
        total; each person's figure is in `GET /spend-summaries` and the seat
        buckets.
      operationId: getApiGatewayV1BudgetsById
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        '200':
          description: The budget
          content:
            application/json:
              schema:
                type: object
                properties:
                  budget:
                    type: object
                    properties:
                      id:
                        type: string
                      organization_id:
                        type: string
                      scope_type:
                        type: string
                        enum:
                          - organization
                          - team
                          - project
                          - virtual_key
                          - principal
                          - group
                          - attributed_user
                      scope_id:
                        type: string
                      name:
                        type: string
                      description:
                        type:
                          - string
                          - 'null'
                      window:
                        type: string
                        enum:
                          - minute
                          - hour
                          - day
                          - week
                          - month
                          - total
                          - manual
                      on_breach:
                        type: string
                        enum:
                          - block
                          - warn
                      limit_usd:
                        type: string
                        description: >-
                          Display value. Decimal string, up to 9 fractional
                          digits, trailing zeros trimmed, never exponent
                          notation. Use limit_nano_usd for arithmetic.
                      limit_nano_usd:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          Canonical integer amount, nano-USD. Null past the safe
                          integer range, where limit_usd still reads.
                      spent_usd:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Display value, null when spend_available is false.
                          Decimal string, up to 9 fractional digits, trailing
                          zeros trimmed, never exponent notation. Use
                          spent_nano_usd for arithmetic.
                      spent_nano_usd:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          Canonical integer spend, nano-USD. Null when spend is
                          unavailable. Derived from the same integer as
                          spent_usd, so the pair always agrees.
                      timezone:
                        type:
                          - string
                          - 'null'
                      provider_key:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                      current_period_started_at:
                        type: string
                        description: >-
                          Start of the period `spent_usd` covers, computed at
                          read time. For an anchored budget this is its own
                          cycle's start, not the calendar period's.
                      resets_at:
                        type: string
                        description: >-
                          When the current period gives way to the next.
                          Far-future for total and manual windows, which do not
                          roll on their own.
                      cycle_anchor_at:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The instant this budget's cycle is phased to. Null
                          means no anchor: a calendar-aligned cyclic window, or
                          one of the two windows that do not cycle (total,
                          manual).
                      last_reset_at:
                        type:
                          - string
                          - 'null'
                      archived_at:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                      member_count:
                        type: integer
                      end_users_seen:
                        type: integer
                      end_users_over:
                        type: integer
                    required:
                      - id
                      - organization_id
                      - scope_type
                      - scope_id
                      - name
                      - description
                      - window
                      - on_breach
                      - limit_usd
                      - limit_nano_usd
                      - spent_usd
                      - spent_nano_usd
                      - timezone
                      - provider_key
                      - external_id
                      - metadata
                      - current_period_started_at
                      - resets_at
                      - cycle_anchor_at
                      - last_reset_at
                      - archived_at
                      - created_at
                  spend_available:
                    type: boolean
                required:
                  - budget
                  - spend_available
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      trace_id:
                        type: string
                      span_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````