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

# My Budgets

> Return budgets applying to the account's active API keys and current cycles.

Recorded spend reflects retained attributed events and may lag enforcement.
Hard-budget availability includes outstanding reservations; unavailable
projections remain null. Shared budgets contain only aggregate balances
and the authenticated user's applicable key scopes.



## OpenAPI

````yaml /openapi.json get /api/costs/my-budgets
openapi: 3.1.0
info:
  title: Aixy Gateway API
  version: 0.1.0
  description: >-
    Route requests to configured AI providers through OpenAI- and
    Anthropic-compatible APIs. Aixy applies project access, model policies,
    guardrails, routing, budgets, and usage attribution before forwarding
    inference traffic.
servers:
  - url: https://api.aixy-gateway.com
    description: Aixy production gateway
security: []
tags:
  - name: operations
    description: Check process liveness and traffic readiness.
  - name: authentication
    description: Authenticate trusted server-side clients.
  - name: organizations
    description: Manage the organization and its lifecycle.
  - name: projects
    description: Create projects and manage project membership.
  - name: users
    description: Manage organization users, roles, and invitations.
  - name: teams
    description: Manage teams and team membership.
  - name: api-keys
    description: Manage project-scoped gateway API keys.
  - name: provider-credentials
    description: Manage organization and project provider credentials.
  - name: provider-catalog
    description: Discover providers supported by the gateway.
  - name: provider-models
    description: Discover and control models exposed by configured providers.
  - name: routing
    description: Configure stable model aliases, routing strategies, and fallbacks.
  - name: guardrails
    description: Configure prompt and sensitive-data protection policies.
  - name: identity connections
    description: Configure tenant-scoped enterprise identity federation.
  - name: playground
    description: Exercise configured models through the gateway.
  - name: cost-control
    description: Inspect spend and enforce budgets across tenant scopes.
  - name: metrics
    description: Inspect usage, token, latency, and error metrics.
  - name: activity
    description: Diagnose individual model requests and manage opt-in content capture.
  - name: monitors
    description: Configure operational monitors and notification channels.
  - name: audit
    description: Query, verify, and export the organization audit log.
  - name: telemetry exports
    description: Export telemetry to organization-owned destinations.
  - name: billing
    description: Inspect and manage the organization subscription.
  - name: models
    description: List models available to a project-scoped gateway API key.
  - name: inference
    description: Run model inference through the Aixy data plane.
  - name: pricing
    description: Manage versioned pricing attribution rules.
  - name: system
    description: Discover gateway capabilities and providers.
  - name: MCP beta
    description: Mcp beta operations exposed by the gateway.
  - name: cost-optimization
    description: Cost optimization operations exposed by the gateway.
  - name: custom domains
    description: Custom domains operations exposed by the gateway.
  - name: data processing
    description: Data processing operations exposed by the gateway.
  - name: feature flags
    description: Feature flags operations exposed by the gateway.
  - name: privacy
    description: Privacy operations exposed by the gateway.
  - name: roles
    description: Roles operations exposed by the gateway.
paths:
  /api/costs/my-budgets:
    get:
      tags:
        - cost-control
      summary: My Budgets
      description: >-
        Return budgets applying to the account's active API keys and current
        cycles.


        Recorded spend reflects retained attributed events and may lag
        enforcement.

        Hard-budget availability includes outstanding reservations; unavailable

        projections remain null. Shared budgets contain only aggregate balances

        and the authenticated user's applicable key scopes.
      operationId: get_my_cost_budgets
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalBudgetsResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '401':
          description: Authentication is required or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '403':
          description: The authenticated account cannot perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '413':
          description: The request body exceeds the endpoint limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '503':
          description: The control-plane capability is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        4XX:
          description: The request was rejected by validation or authorization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
      security:
        - BrowserSession: []
components:
  schemas:
    PersonalBudgetsResponse:
      properties:
        object:
          type: string
          const: cost.personal_budgets
          title: Object
          default: cost.personal_budgets
        as_of:
          type: string
          title: As Of
        data:
          items:
            $ref: '#/components/schemas/PersonalBudgetResponse'
          type: array
          title: Data
      type: object
      required:
        - as_of
        - data
      title: PersonalBudgetsResponse
    GatewayErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/GatewayErrorDetail'
      type: object
      required:
        - error
      title: GatewayErrorResponse
    PersonalBudgetResponse:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          const: cost.personal_budget
          title: Object
          default: cost.personal_budget
        scope:
          $ref: '#/components/schemas/BudgetScope'
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
        target_name:
          type: string
          title: Target Name
        interval:
          $ref: '#/components/schemas/BudgetInterval'
        limit_usd:
          type: string
          title: Limit Usd
        warning_threshold_percent:
          type: integer
          title: Warning Threshold Percent
        enforcement:
          $ref: '#/components/schemas/BudgetEnforcement'
        allocation:
          $ref: '#/components/schemas/BudgetAllocation'
        shared:
          type: boolean
          title: Shared
        applies_to:
          items:
            $ref: '#/components/schemas/BudgetUsageScopeResponse'
          type: array
          title: Applies To
        spend_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Spend Usd
        remaining_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Remaining Usd
        utilization_percent:
          anyOf:
            - type: number
            - type: 'null'
          title: Utilization Percent
        state:
          type: string
          enum:
            - healthy
            - warning
            - exceeded
            - unknown
          title: State
        starts_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Starts At
        resets_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Resets At
        spend_status:
          type: string
          enum:
            - available
            - unavailable
          title: Spend Status
        availability:
          $ref: '#/components/schemas/BudgetAvailabilityResponse'
      type: object
      required:
        - id
        - scope
        - target_id
        - target_name
        - interval
        - limit_usd
        - warning_threshold_percent
        - enforcement
        - allocation
        - shared
        - applies_to
        - spend_usd
        - remaining_usd
        - utilization_percent
        - state
        - starts_at
        - resets_at
        - spend_status
        - availability
      title: PersonalBudgetResponse
    GatewayErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: GatewayErrorDetail
    BudgetScope:
      type: string
      enum:
        - organization
        - project
        - team
        - user
        - api_key
      title: BudgetScope
    BudgetInterval:
      type: string
      enum:
        - daily
        - weekly
        - monthly
        - lifetime
      title: BudgetInterval
    BudgetEnforcement:
      type: string
      enum:
        - monitor
        - hard
      title: BudgetEnforcement
    BudgetAllocation:
      type: string
      enum:
        - shared
        - per_user
      title: BudgetAllocation
    BudgetUsageScopeResponse:
      properties:
        api_key_id:
          type: string
          title: Api Key Id
        api_key_name:
          type: string
          title: Api Key Name
        project_id:
          type: string
          title: Project Id
        project_name:
          type: string
          title: Project Name
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
        team_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Name
      type: object
      required:
        - api_key_id
        - api_key_name
        - project_id
        - project_name
        - team_id
        - team_name
      title: BudgetUsageScopeResponse
    BudgetAvailabilityResponse:
      properties:
        status:
          type: string
          enum:
            - available
            - unavailable
            - not_enforced
          title: Status
        spent_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Spent Usd
        reserved_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Reserved Usd
        remaining_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Remaining Usd
      type: object
      required:
        - status
        - spent_usd
        - reserved_usd
        - remaining_usd
      title: BudgetAvailabilityResponse
  securitySchemes:
    BrowserSession:
      type: apiKey
      description: Secure same-origin browser session cookie.
      in: cookie
      name: gateway_session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.