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

# Get key budget



## OpenAPI

````yaml /api-reference/ageneral-project-keys-openapi.json get /v1/projects/{project_id}/keys/{key_id}/budget
openapi: 3.1.0
info:
  title: Keys
  version: 1.0.0
  description: >-
    Keys under a **project id** in the path: create, list, delete, and per-key
    budget.


    **JSON** over **HTTPS** with **camelCase** field names.


    **Authentication:** `Authorization: Bearer <session JWT>` from Ageneral
    sign-in. **Base URL:** `https://ageneral.ai`.
  contact:
    name: Ageneral
    url: https://ageneral.ai
servers:
  - url: https://ageneral.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Keys
    description: Keys and budgets under `/v1/projects/{project_id}/keys`.
paths:
  /v1/projects/{project_id}/keys/{key_id}/budget:
    get:
      tags:
        - Keys
      summary: Get key budget
      operationId: getProjectKeyBudget
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: key_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProjectKeyBudgetResponse'
        '401':
          description: Missing or invalid session.
        '403':
          description: Forbidden for this user or project.
        '404':
          description: Resource not found.
components:
  schemas:
    GetProjectKeyBudgetResponse:
      type: object
      properties:
        budget:
          $ref: '#/components/schemas/BudgetInfo'
    BudgetInfo:
      type: object
      properties:
        maxBudgetUsd:
          type: number
          format: double
        resetDuration:
          type: string
        currentUsageUsd:
          type: number
          format: double
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ageneral session JWT. Obtain through web sign-in or extension OAuth.

````