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

# Quota

> Your organization's quota limits for the current period, the UTC calendar month, and what is left. These are the numbers run admission enforces. Requires `usage_read`. Takes no parameters.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/quota
openapi: 3.1.0
info:
  title: OpenType API
  version: 0.1.0
  license:
    name: Apache-2.0
  description: >-
    The OpenType HTTP API: decision runs on Neon 1.1, API keys, usage, quota and
    billing. Every `/v1` route takes `Authorization: Bearer <credential>`, where
    the credential is an API key (`otsk_` followed by 64 hex characters) or a
    console session token. Amounts are integers in micro-USD (1,000,000 = 1 US
    dollar). Errors share one envelope, `{"error": {"code", "message",
    "request_id"}}`. Stripe is named only where it hosts checkout, the billing
    portal and receipts.
servers:
  - url: https://api.opentype.dev
    description: Production
  - url: https://api.opentype.dev
    description: Production
security:
  - bearer: []
  - bearer: []
tags:
  - name: runs
    description: Create, list, retrieve and stream runs.
  - name: keys
    description: Create, list, rotate and revoke API keys.
  - name: usage
    description: Usage rollups, the daily series, the ledger and quota.
  - name: billing
    description: Credit balance, checkout, the billing portal and auto-recharge.
  - name: health
    description: Public liveness and readiness checks.
  - name: router
    description: >-
      Model Router: classify a task with Neon 1.1 and pick a model from the
      benchmark catalog.
paths:
  /v1/quota:
    get:
      tags:
        - usage
      summary: Quota
      description: >-
        Your organization's quota limits for the current period, the UTC
        calendar month, and what is left. These are the numbers run admission
        enforces. Requires `usage_read`. Takes no parameters.
      operationId: organization_quota
      responses:
        '200':
          description: Limits and remaining allowance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaResponse'
        '401':
          description: >-
            `missing_credentials` (no bearer credential) or `invalid_credential`
            (malformed, unknown or revoked).
        '403':
          description: >-
            `scope_denied`: the credential lacks `usage_read`. A session without
            an organization gets `no_active_organization`.
        '500':
          description: '`internal_error`: an unexpected failure. Report the `request_id`.'
        '503':
          description: >-
            `database_not_configured` or `database_unavailable`: accounting
            storage is unavailable. Also `auth_not_configured` or
            `trust_keys_unavailable` when credentials cannot be verified.
      security:
        - bearer: []
        - bearer: []
components:
  schemas:
    QuotaResponse:
      type: object
      description: '`GET /v1/quota`.'
      required:
        - organization_id
        - period
        - limits
        - consumed_tokens
        - consumed_spend
      properties:
        organization_id:
          type: string
        period:
          $ref: '#/components/schemas/UsageWindowBody'
        limits:
          $ref: '#/components/schemas/QuotaLimitsBody'
        consumed_tokens:
          $ref: '#/components/schemas/TokenTotalsBody'
        consumed_spend:
          $ref: '#/components/schemas/SpendTotalsBody'
        remaining_spend_micros:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            The spend limit minus the larger of settled and reserved spend,
            floored at 0. `null` when there is no spend limit.
          minimum: 0
        remaining_tokens:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
    UsageWindowBody:
      type: object
      required:
        - start_at
        - end_at
      properties:
        start_at:
          type: string
        end_at:
          type: string
    QuotaLimitsBody:
      type: object
      description: >-
        The limits half of `GET /v1/quota`. A null limit is "no
        organization-level

        limit is configured"; `request_spend_ceiling_micros` is never null.
      required:
        - request_spend_ceiling_micros
      properties:
        period_spend_limit_micros:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        period_token_limit:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        request_spend_ceiling_micros:
          type: integer
          format: int64
          description: >-
            The per-run spend ceiling, at most 20,000 micro-USD. Each run holds
            this much until it settles.
          minimum: 0
    TokenTotalsBody:
      type: object
      required:
        - input_tokens
        - output_tokens
        - total_tokens
      properties:
        input_tokens:
          type: integer
          format: int64
          minimum: 0
        output_tokens:
          type: integer
          format: int64
          minimum: 0
        total_tokens:
          type: integer
          format: int64
          minimum: 0
    SpendTotalsBody:
      type: object
      required:
        - reserved_micros
        - settled_micros
        - unsettled_micros
      properties:
        reserved_micros:
          type: integer
          format: int64
          minimum: 0
        settled_micros:
          type: integer
          format: int64
          minimum: 0
        unsettled_micros:
          type: integer
          format: int64
          description: '`reserved_micros` minus `settled_micros`, floored at 0.'
          minimum: 0
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (otsk_ + 64 hex) or a console session token.

````