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

# Create or update company budget

> Set or update the company's monthly spend budget. Requires CompanyAdmin role. Creates the budget on first call; updates it on subsequent calls.



## OpenAPI

````yaml /api-reference/api-console.yaml put /api/v3/billing/budget
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v1)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Budget
    description: >-
      Manage your organization's monthly spend budget and alert thresholds. Set
      a hard cap that blocks API requests when reached, and configure email
      notifications at custom spend percentages.
paths:
  /api/v3/billing/budget:
    put:
      tags:
        - Budget
      summary: Create or update company budget
      description: >-
        Set or update the company's monthly spend budget. Requires CompanyAdmin
        role. Creates the budget on first call; updates it on subsequent calls.
      operationId: api_v3_billing_budget_update
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetResponse'
          description: ''
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetResponse'
          description: ''
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
components:
  schemas:
    BudgetResponse:
      properties:
        is_enabled:
          description: Whether this budget is actively enforced.
          title: Is Enabled
          type: boolean
        amount_eur:
          description: Monthly budget cap in EUR.
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount Eur
          type: string
        currency:
          default: EUR
          description: ISO 4217 currency code.
          title: Currency
          type: string
        current_cycle_start:
          description: First day of the current billing cycle (ISO date).
          title: Current Cycle Start
          type: string
        next_cycle_start:
          description: First day of the next billing cycle (ISO date).
          title: Next Cycle Start
          type: string
        monthly_spend_eur:
          description: Current month's spend in EUR.
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Monthly Spend Eur
          type: string
        available_eur:
          description: Remaining budget for the current cycle in EUR.
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Available Eur
          type: string
        alerts:
          description: Alert thresholds.
          items:
            $ref: '#/components/schemas/BudgetAlertResponse'
          title: Alerts
          type: array
      required:
        - is_enabled
        - amount_eur
        - current_cycle_start
        - next_cycle_start
        - monthly_spend_eur
        - available_eur
      title: BudgetResponse
      type: object
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
    BudgetAlertResponse:
      properties:
        id:
          title: Id
          type: integer
        is_enabled:
          title: Is Enabled
          type: boolean
        threshold_type:
          title: Threshold Type
          type: string
        threshold_value:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Threshold Value
          type: string
      required:
        - id
        - is_enabled
        - threshold_type
        - threshold_value
      title: BudgetAlertResponse
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````