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

# Get current API key quota

> Returns the daily and monthly quotas for the authenticated API key. Another key cannot be selected. Both limits can apply at once. Quota reflects settled, aggregated consumption and is not a real-time admission decision or settlement record.

The response is an approximate snapshot, not a guarantee of request admission. The service may reuse a snapshot for about two seconds. `as_of` is the UTC time the snapshot was generated. Responses include `Cache-Control: no-store`; clients and intermediaries should not cache them. Monetary values are decimal strings; use a decimal or fixed-point type for calculations.



## OpenAPI

````yaml /openapi/api-keys/_quota.yaml get /billing/api-key/quota
openapi: 3.0.3
info:
  title: Get current API key quota
  version: 1.0.0
  description: Get current API key quota
servers:
  - url: https://api.linkmodel.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: api-keys
paths:
  /billing/api-key/quota:
    get:
      tags:
        - api-keys
      summary: Get current API key quota
      description: >-
        Returns the daily and monthly quotas for the authenticated API key.
        Another key cannot be selected. Both limits can apply at once. Quota
        reflects settled, aggregated consumption and is not a real-time
        admission decision or settlement record.


        The response is an approximate snapshot, not a guarantee of request
        admission. The service may reuse a snapshot for about two seconds.
        `as_of` is the UTC time the snapshot was generated. Responses include
        `Cache-Control: no-store`; clients and intermediaries should not cache
        them. Monetary values are decimal strings; use a decimal or fixed-point
        type for calculations.
      operationId: get-current-api-key-quota
      responses:
        '200':
          description: Snapshot returned successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - key_id
                  - currency
                  - as_of
                  - daily
                  - monthly
                properties:
                  key_id:
                    type: string
                    description: >-
                      Identifier of the authenticated API key; not the secret
                      key.
                    example: '12345'
                  currency:
                    type: string
                    description: Settlement currency.
                    example: USD
                  as_of:
                    type: string
                    format: date-time
                    description: UTC snapshot time.
                    example: '2026-11-10T10:00:00Z'
                  daily:
                    type: object
                    required:
                      - limit
                      - used
                      - remaining
                      - usage_ratio
                      - status
                      - reset_at
                    properties:
                      limit:
                        type: string
                        nullable: true
                        description: Monetary limit for the period; null means unlimited.
                        example: '10.000000'
                      used:
                        type: string
                        description: >-
                          Settled consumption aggregated in the current UTC
                          period. Excludes unsettled in-flight consumption;
                          aggregation may lag.
                        example: '2.500000'
                      remaining:
                        type: string
                        nullable: true
                        description: max(0, limit - used); null when unlimited.
                        example: '7.500000'
                      usage_ratio:
                        type: number
                        nullable: true
                        description: >-
                          used / limit when the limit is positive, rounded to
                          six decimal places; may exceed 1. Null for unlimited
                          or zero limits.
                        example: 0.25
                      status:
                        type: string
                        enum:
                          - available
                          - exhausted
                          - unlimited
                        description: Exhausted includes limits of zero or less.
                        example: available
                      reset_at:
                        type: string
                        format: date-time
                        description: Next period reset in UTC.
                        example: '2026-11-11T00:00:00Z'
                    description: Resets at 00:00 UTC each day.
                  monthly:
                    type: object
                    required:
                      - limit
                      - used
                      - remaining
                      - usage_ratio
                      - status
                      - reset_at
                    properties:
                      limit:
                        type: string
                        nullable: true
                        description: Monetary limit for the period; null means unlimited.
                        example: '10.000000'
                      used:
                        type: string
                        description: >-
                          Settled consumption aggregated in the current UTC
                          period. Excludes unsettled in-flight consumption;
                          aggregation may lag.
                        example: '2.500000'
                      remaining:
                        type: string
                        nullable: true
                        description: max(0, limit - used); null when unlimited.
                        example: '7.500000'
                      usage_ratio:
                        type: number
                        nullable: true
                        description: >-
                          used / limit when the limit is positive, rounded to
                          six decimal places; may exceed 1. Null for unlimited
                          or zero limits.
                        example: 0.25
                      status:
                        type: string
                        enum:
                          - available
                          - exhausted
                          - unlimited
                        description: Exhausted includes limits of zero or less.
                        example: available
                      reset_at:
                        type: string
                        format: date-time
                        description: Next period reset in UTC.
                        example: '2026-11-11T00:00:00Z'
                    description: Resets at 00:00 UTC on the first day of each month.
                    example:
                      limit: null
                      used: '20.000000'
                      remaining: null
                      usage_ratio: null
                      status: unlimited
                      reset_at: '2026-12-01T00:00:00Z'
        '401':
          description: Missing, invalid, or unavailable API key identity.
        '429':
          description: >-
            Gateway rate limit reached. Reduce request frequency and retry with
            backoff.
        '503':
          description: >-
            Authentication or billing dependency temporarily unavailable, or
            quota querying is disabled. Retry later with backoff.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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