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

# Set a budget's usage for the current period(s) back to zero



## OpenAPI

````yaml post /api/airouter/budgets/{budget_id}/reset
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/airouter/budgets/{budget_id}/reset:
    post:
      tags:
        - AI Router
      summary: Set a budget's usage for the current period(s) back to zero
      operationId: reset_budget_api_airouter_budgets__budget_id__reset_post
      parameters:
        - name: budget_id
          in: path
          required: true
          schema:
            type: string
            title: Budget Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetBudgetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenBudget'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ResetBudgetRequest:
      properties:
        periods:
          items:
            type: string
            enum:
              - daily
              - weekly
              - monthly
          type: array
          title: Periods
      type: object
      title: ResetBudgetRequest
      description: Periods to set back to zero; empty means every period.
    TokenBudget:
      properties:
        id:
          type: string
          title: Id
        scope:
          type: string
          enum:
            - user
            - team
          title: Scope
        subject:
          type: string
          title: Subject
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        action:
          type: string
          enum:
            - block
            - warn
          title: Action
          default: block
        enabled:
          type: boolean
          title: Enabled
          default: true
        periods:
          additionalProperties:
            $ref: '#/components/schemas/PeriodUsage'
          propertyNames:
            enum:
              - daily
              - weekly
              - monthly
          type: object
          title: Periods
        active_members:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Members
        top_members:
          anyOf:
            - items:
                $ref: '#/components/schemas/MemberUsage'
              type: array
            - type: 'null'
          title: Top Members
        updated_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated By
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - scope
        - subject
        - periods
      title: TokenBudget
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PeriodUsage:
      properties:
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
        used:
          type: integer
          title: Used
          default: 0
        resets_at:
          type: string
          format: date-time
          title: Resets At
      type: object
      required:
        - resets_at
      title: PeriodUsage
    MemberUsage:
      properties:
        user:
          type: string
          title: User
        tokens:
          type: integer
          title: Tokens
      type: object
      required:
        - user
        - tokens
      title: MemberUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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