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

# Get a gateway budget by id

> Returns a single budget by id.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/llm-gateway/budgets/{id}
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/llm-gateway/budgets/{id}:
    get:
      tags:
        - LLM Gateway Budgets
      summary: Get a gateway budget by id
      description: Returns a single budget by id.
      operationId: GatewayBudget.findById
      parameters:
        - name: id
          required: true
          in: path
          description: The budget id to retrieve or delete.
          schema:
            type: string
      responses:
        '200':
          description: The requested budget.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayBudget'
        '404':
          description: No budget with that id exists for the tenant.
      security:
        - jwt: []
components:
  schemas:
    GatewayBudget:
      type: object
      properties:
        id:
          type: string
          description: System-generated Budget ID.
          nullable: true
        tenantName:
          type: string
          description: Tenant the budget belongs to.
        name:
          type: string
          description: Budget name (unique per tenant).
        type:
          type: string
          description: Budget type (tenant-budget-config | team-budget-config).
        manifest:
          oneOf:
            - $ref: '#/components/schemas/TenantBudgetConfig'
            - $ref: '#/components/schemas/TeamBudgetConfig'
          description: The budget manifest.
        createdBySubject:
          description: Principal that created or last updated this budget.
          allOf:
            - $ref: '#/components/schemas/Subject'
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp.
          nullable: true
        updatedAt:
          format: date-time
          type: string
          description: Last-update timestamp.
          nullable: true
      required:
        - tenantName
        - name
        - type
        - manifest
        - createdBySubject
      title: GatewayBudget
      x-fern-type-name: GatewayBudget
    TenantBudgetConfig:
      description: Tenant Budget Configuration
      type: object
      required:
        - type
        - name
        - limits
        - applies_to
        - mode
      properties:
        type:
          description: |-
            +value=tenant-budget-config
            +sort=1
          type: string
          enum:
            - tenant-budget-config
          default: tenant-budget-config
        name:
          description: Unique name for this budget
          type: string
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9\-]{0,60}[a-zA-Z0-9])$
        when:
          $ref: '#/components/schemas/BudgetV2WhenTenantScoped'
        limits:
          $ref: '#/components/schemas/BudgetV2Limits'
        applies_to:
          $ref: '#/components/schemas/BudgetV2AppliesTo'
        mode:
          description: >-
            `enforce` blocks breaching requests, `audit` only tracks them,
            `soft_enforce` blocks only when no other matching budget allows the
            request.
          type: string
          enum:
            - enforce
            - audit
            - soft_enforce
          default: enforce
        alerts:
          $ref: '#/components/schemas/BudgetV2Alert'
      title: TenantBudgetConfig
      x-fern-type-name: TenantBudgetConfig
    TeamBudgetConfig:
      description: Team Budget Configuration
      type: object
      required:
        - type
        - team_name
        - name
        - limits
        - applies_to
        - mode
      properties:
        type:
          description: |-
            +value=team-budget-config
            +sort=1
          type: string
          enum:
            - team-budget-config
          default: team-budget-config
        team_name:
          description: >-
            Name of the team that owns this budget. RBAC is enforced on this
            value.
          type: string
        name:
          description: Unique name for this budget
          type: string
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9\-]{0,60}[a-zA-Z0-9])$
        when:
          $ref: '#/components/schemas/BudgetV2WhenTeamScoped'
        limits:
          $ref: '#/components/schemas/BudgetV2Limits'
        applies_to:
          $ref: '#/components/schemas/BudgetV2AppliesTo'
        mode:
          description: >-
            `enforce` blocks breaching requests, `audit` only tracks them,
            `soft_enforce` blocks only when no other matching budget allows the
            request.
          type: string
          enum:
            - enforce
            - audit
            - soft_enforce
          default: enforce
        alerts:
          $ref: '#/components/schemas/BudgetV2Alert'
      title: TeamBudgetConfig
      x-fern-type-name: TeamBudgetConfig
    Subject:
      type: object
      properties:
        subjectId:
          type: string
          description: Subject ID
        subjectType:
          type: string
          description: Subject type
          enum:
            - user
            - team
            - serviceaccount
            - virtualaccount
            - agent-identity
            - agent
            - agent-channel-identity
            - role
        subjectSlug:
          type: string
          description: Subject slug
          nullable: true
        subjectDisplayName:
          type: string
          description: Subject display name
          nullable: true
        subjectPatName:
          type: string
          description: Subject PAT name
          nullable: true
        subjectControllerName:
          type: string
          nullable: true
        subjectExternalIdentitySlug:
          type: string
          description: External identity slug (external_identity_id:sub:email)
          nullable: true
      required:
        - subjectId
        - subjectType
      title: Subject
      x-fern-type-name: Subject
    BudgetV2WhenTenantScoped:
      description: Tenant Budget Conditions
      type: object
      properties:
        subjects:
          $ref: '#/components/schemas/BudgetV2SubjectsTenantScoped'
        models:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        provider_accounts:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        metadata:
          description: Filter by metadata key-value pairs this budget applies to
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BudgetV2InNotInFilter'
      title: BudgetV2WhenTenantScoped
      x-fern-type-name: BudgetV2WhenTenantScoped
    BudgetV2Limits:
      description: Budget Limits
      type: object
      properties:
        cost_per_day:
          description: Maximum daily cost in USD
          type: number
        cost_per_week:
          description: Maximum weekly cost in USD
          type: number
        cost_per_month:
          description: Maximum monthly cost in USD
          type: number
        cost_per_quarter:
          description: Maximum quarterly cost in USD
          type: number
        cost_per_lifetime:
          description: >-
            Maximum lifetime cost in USD. Mutually exclusive with the
            day/week/month/quarter limits.
          type: number
      title: BudgetV2Limits
      x-fern-type-name: BudgetV2Limits
    BudgetV2AppliesTo:
      description: +discriminator=type
      type: object
      oneOf:
        - $ref: '#/components/schemas/BudgetV2AppliesToAggregate'
        - $ref: '#/components/schemas/BudgetV2AppliesToPerUser'
        - $ref: '#/components/schemas/BudgetV2AppliesToPerModel'
        - $ref: '#/components/schemas/BudgetV2AppliesToPerVirtualAccount'
        - $ref: '#/components/schemas/BudgetV2AppliesToMetadata'
      discriminator:
        propertyName: type
      title: BudgetV2AppliesTo
      x-fern-type-name: BudgetV2AppliesTo
    BudgetV2Alert:
      description: Budget Alert
      type: object
      required:
        - thresholds
      properties:
        thresholds:
          description: >-
            List of usage percentages (0-100) at which alerts should be
            triggered. Default thresholds are [75, 90, 95, 100].
          type: array
          items:
            type: number
            minimum: 0
            maximum: 100
          default:
            - 75
            - 90
            - 95
            - 100
        notification_target:
          description: Select where to send budget alert notifications
          type: array
          items:
            $ref: '#/components/schemas/NotificationTarget'
      title: BudgetV2Alert
      x-fern-type-name: BudgetV2Alert
    BudgetV2WhenTeamScoped:
      description: Team Budget Conditions
      type: object
      properties:
        subjects:
          $ref: '#/components/schemas/BudgetV2SubjectsTeamScoped'
        models:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        provider_accounts:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        metadata:
          description: Filter by metadata key-value pairs this budget applies to
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BudgetV2InNotInFilter'
      title: BudgetV2WhenTeamScoped
      x-fern-type-name: BudgetV2WhenTeamScoped
    BudgetV2SubjectsTenantScoped:
      description: Tenant Budget Subjects
      type: object
      properties:
        users:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        teams:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        virtual_accounts:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
      title: BudgetV2SubjectsTenantScoped
      x-fern-type-name: BudgetV2SubjectsTenantScoped
    BudgetV2InNotInFilter:
      description: In/Not-In Filter
      type: object
      properties:
        in:
          description: Match when the value is present in this list
          type: array
          items:
            type: string
        not_in:
          description: Match when the value is NOT present in this list
          type: array
          items:
            type: string
      title: BudgetV2InNotInFilter
      x-fern-type-name: BudgetV2InNotInFilter
    BudgetV2AppliesToAggregate:
      description: A single shared budget across every matching request.
      type: object
      required:
        - type
      properties:
        type:
          description: Applies To Type
          type: string
          enum:
            - aggregate
          default: aggregate
      title: BudgetV2AppliesToAggregate
      x-fern-type-name: BudgetV2AppliesToAggregate
    BudgetV2AppliesToPerUser:
      description: Track a separate budget for each unique user.
      type: object
      required:
        - type
      properties:
        type:
          description: Applies To Type
          type: string
          enum:
            - per-user
          default: per-user
        overrides:
          description: Optional per-user limit overrides
          type: array
          items:
            $ref: '#/components/schemas/BudgetV2PerUserOverride'
      title: BudgetV2AppliesToPerUser
      x-fern-type-name: BudgetV2AppliesToPerUser
    BudgetV2AppliesToPerModel:
      description: Track a separate budget for each model.
      type: object
      required:
        - type
      properties:
        type:
          description: Applies To Type
          type: string
          enum:
            - per-model
          default: per-model
        overrides:
          description: Optional per-model limit overrides
          type: array
          items:
            $ref: '#/components/schemas/BudgetV2PerModelOverride'
      title: BudgetV2AppliesToPerModel
      x-fern-type-name: BudgetV2AppliesToPerModel
    BudgetV2AppliesToPerVirtualAccount:
      description: Track a separate budget for each virtual account.
      type: object
      required:
        - type
      properties:
        type:
          description: Applies To Type
          type: string
          enum:
            - per-virtual-account
          default: per-virtual-account
        overrides:
          description: Optional per-virtual-account limit overrides
          type: array
          items:
            $ref: '#/components/schemas/BudgetV2PerVirtualAccountOverride'
      title: BudgetV2AppliesToPerVirtualAccount
      x-fern-type-name: BudgetV2AppliesToPerVirtualAccount
    BudgetV2AppliesToMetadata:
      description: Track a separate budget for each unique value of a metadata key.
      type: object
      required:
        - type
        - metadata
      properties:
        type:
          description: Applies To Type
          type: string
          enum:
            - metadata
          default: metadata
        metadata:
          description: Metadata key whose distinct values each get their own budget bucket
          type: string
        overrides:
          description: Optional per-metadata-value limit overrides
          type: array
          items:
            $ref: '#/components/schemas/BudgetV2PerMetadataOverride'
      title: BudgetV2AppliesToMetadata
      x-fern-type-name: BudgetV2AppliesToMetadata
    NotificationTarget:
      description: +discriminator=type
      type: object
      oneOf:
        - $ref: '#/components/schemas/Email'
        - $ref: '#/components/schemas/SlackWebhook'
        - $ref: '#/components/schemas/SlackBot'
        - $ref: '#/components/schemas/PagerDuty'
        - $ref: '#/components/schemas/MSTeamsWebhook'
      discriminator:
        propertyName: type
      title: NotificationTarget
      x-fern-type-name: NotificationTarget
    BudgetV2SubjectsTeamScoped:
      description: Team Budget Subjects
      type: object
      properties:
        users:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
        virtual_accounts:
          $ref: '#/components/schemas/BudgetV2InNotInFilter'
      title: BudgetV2SubjectsTeamScoped
      x-fern-type-name: BudgetV2SubjectsTeamScoped
    BudgetV2PerUserOverride:
      description: Per-User Override
      type: object
      required:
        - users
        - limits
      properties:
        users:
          description: Users whose usage uses this override instead of the default limits
          type: array
          items:
            type: string
        limits:
          $ref: '#/components/schemas/BudgetV2OverrideLimits'
      title: BudgetV2PerUserOverride
      x-fern-type-name: BudgetV2PerUserOverride
    BudgetV2PerModelOverride:
      description: Per-Model Override
      type: object
      required:
        - models
        - limits
      properties:
        models:
          description: Models whose usage uses this override instead of the default limits
          type: array
          items:
            type: string
        limits:
          $ref: '#/components/schemas/BudgetV2OverrideLimits'
      title: BudgetV2PerModelOverride
      x-fern-type-name: BudgetV2PerModelOverride
    BudgetV2PerVirtualAccountOverride:
      description: Per-Virtual-Account Override
      type: object
      required:
        - virtual_accounts
        - limits
      properties:
        virtual_accounts:
          description: >-
            Virtual accounts whose usage uses this override instead of the
            default limits
          type: array
          items:
            type: string
        limits:
          $ref: '#/components/schemas/BudgetV2OverrideLimits'
      title: BudgetV2PerVirtualAccountOverride
      x-fern-type-name: BudgetV2PerVirtualAccountOverride
    BudgetV2PerMetadataOverride:
      description: Per-Metadata Override
      type: object
      required:
        - metadata_values
        - limits
      properties:
        metadata_values:
          description: >-
            Metadata values whose usage uses this override instead of the
            default limits
          type: array
          items:
            type: string
        limits:
          $ref: '#/components/schemas/BudgetV2OverrideLimits'
      title: BudgetV2PerMetadataOverride
      x-fern-type-name: BudgetV2PerMetadataOverride
    Email:
      description: Email
      type: object
      required:
        - type
        - notification_channel
        - to_emails
      properties:
        type:
          description: +value=email
          type: string
          enum:
            - email
          default: email
        notification_channel:
          description: Specify the notification channel to send alerts to
          type: string
          minLength: 1
        to_emails:
          description: >-
            List of recipients' email addresses if the notification channel is
            Email.
          type: array
          items:
            type: string
            minLength: 1
      title: Email
      x-fern-type-name: Email
    SlackWebhook:
      description: Slack Webhook
      type: object
      required:
        - type
        - notification_channel
      properties:
        type:
          description: +value=slack-webhook
          type: string
          enum:
            - slack-webhook
          default: slack-webhook
        notification_channel:
          description: Specify the notification channel to send alerts to
          type: string
          minLength: 1
      title: SlackWebhook
      x-fern-type-name: SlackWebhook
    SlackBot:
      type: object
      required:
        - type
        - notification_channel
        - channels
      properties:
        type:
          description: +value=slack-bot
          type: string
          enum:
            - slack-bot
          default: slack-bot
        notification_channel:
          description: Specify the notification channel to send alerts to
          type: string
          minLength: 1
        channels:
          description: List of channels to send messages to.
          type: array
          items:
            type: string
            pattern: ^#[a-z0-9\-_]{2,80}$
      title: SlackBot
      x-fern-type-name: SlackBot
    PagerDuty:
      type: object
      required:
        - type
        - notification_channel
      properties:
        type:
          description: +value=pagerduty
          type: string
          enum:
            - pagerduty
          default: pagerduty
        notification_channel:
          description: Specify the notification channel to send alerts to
          type: string
          minLength: 1
      title: PagerDuty
      x-fern-type-name: PagerDuty
    MSTeamsWebhook:
      description: MS Teams Webhook
      type: object
      required:
        - type
        - notification_channel
      properties:
        type:
          description: +value=ms-teams-webhook
          type: string
          enum:
            - ms-teams-webhook
          default: ms-teams-webhook
        notification_channel:
          description: Specify the notification channel to send alerts to
          type: string
          minLength: 1
      title: MSTeamsWebhook
      x-fern-type-name: MSTeamsWebhook
    BudgetV2OverrideLimits:
      description: Override Limits
      type: object
      properties:
        cost_per_day:
          description: Override daily cost cap in USD
          type: number
        cost_per_week:
          description: Override weekly cost cap in USD
          type: number
        cost_per_month:
          description: Override monthly cost cap in USD
          type: number
        cost_per_quarter:
          description: Override quarterly cost cap in USD
          type: number
        cost_per_lifetime:
          description: Override lifetime cost cap in USD
          type: number
      title: BudgetV2OverrideLimits
      x-fern-type-name: BudgetV2OverrideLimits
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````