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

# Get the organization's quota usage

> Organization-level quota status: the enforced LLM limits of the plan
(`llm.rpm`, `llm.tpm`, `llm.monthly_tokens`, `llm.monthly_cost`) with
current usage, the quota policy, the plan's contractual `included`
limits, the per-user defaults and the org's per-user quota settings.

Only what the gateway enforces carries usage; the `included` counters
(members, agents, interactions, storage) are returned as configured in
the plan, without usage.

Requires the `models:read` permission. **Rate limiting.** 60 requests
per 60 seconds per consumer.




## OpenAPI

````yaml /api-reference/llm-gateway/swagger.yml get /v1/quotas/usage
openapi: 3.0.3
info:
  version: 1.0.0
  title: LLM Gateway API
  description: |
    Public REST API for the Prisme.ai LLM Gateway - OpenAI-compatible
    chat completions, embeddings and image generation/editing, a standard
    rerank endpoint, a managed model catalogue with governance overrides
    per organization, and quota status for users and organizations.

    The gateway abstracts multi-provider LLM access (OpenAI, Azure OpenAI,
    Anthropic, Google Vertex, AWS Bedrock, OpenAI-compatible providers) behind
    an OpenAI-compatible request/response shape. It enforces per-tenant
    governance (allowed models, default models, quotas) and emits analytics
    events (`analytics.llm.completion`) usable for cost and carbon reporting.

    This spec documents only the public REST surface (endpoints exposed via
    Prisme.ai workspace webhooks). Internal helpers (private automations
    prefixed with `_`) and load-test mocks are not part of the public contract.
  contact:
    name: Prisme.ai
    url: https://prisme.ai
servers:
  - url: https://{host}/v2/workspaces/slug:llm-gateway/webhooks
    description: Prisme.ai workspace webhooks
    variables:
      host:
        default: api.studio.prisme.ai
        description: API host (override for self-hosted or sandbox)
security:
  - BearerAuth: []
  - OrgApiKeyAuth: []
tags:
  - name: Completions
    description: OpenAI-compatible chat completions (with optional SSE streaming).
  - name: Embeddings
    description: OpenAI-compatible text embeddings.
  - name: Rerank
    description: >-
      Rerank documents by relevance to a query (standard rerank contract,
      LLM-as-reranker backend).
  - name: Images
    description: OpenAI-compatible image generation and image editing.
  - name: Models
    description: Model catalogue (CRUD + bulk replace + governance-aware listing).
  - name: Audio
    description: OpenAI-compatible speech-to-text (audio transcriptions).
  - name: Quotas
    description: >-
      Effective LLM quota limits and current usage, per user and per
      organization.
  - name: Defaults
    description: >-
      Resolved default models for completions / embeddings / image generation /
      transcription / file parsing.
  - name: Test
    description: Smoke-test reachability of a model through the gateway.
paths:
  /v1/quotas/usage:
    get:
      tags:
        - Quotas
      summary: Get the organization's quota usage
      description: |
        Organization-level quota status: the enforced LLM limits of the plan
        (`llm.rpm`, `llm.tpm`, `llm.monthly_tokens`, `llm.monthly_cost`) with
        current usage, the quota policy, the plan's contractual `included`
        limits, the per-user defaults and the org's per-user quota settings.

        Only what the gateway enforces carries usage; the `included` counters
        (members, agents, interactions, storage) are returned as configured in
        the plan, without usage.

        Requires the `models:read` permission. **Rate limiting.** 60 requests
        per 60 seconds per consumer.
      operationId: getOrgQuotasUsage
      responses:
        '200':
          description: Organization quota status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgQuotasUsageResponse'
        '400':
          description: 'The caller has no active organization (`error: NO_ORG_CONTEXT`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Missing `models:read` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limit exceeded (`error: RATE_LIMITED`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrgQuotasUsageResponse:
      type: object
      required:
        - orgSlug
        - computed_at
        - policy
        - enforced
      properties:
        orgSlug:
          type: string
        computed_at:
          type: string
          format: date-time
        usage_refreshed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Last refresh of the monthly usage aggregate (null when none this
            month).
        policy:
          type: string
          description: >-
            Organization quota policy (`hard_block` by default, or
            `soft_downgrade`).
        enforced:
          type: array
          description: >-
            Plan limits enforced by the gateway (`scope` `org`, `source`
            `plan`).
          items:
            allOf:
              - $ref: '#/components/schemas/QuotaGauge'
              - type: object
                properties:
                  source:
                    type: string
                    enum:
                      - plan
        included:
          description: Contractual limits included in the plan, as configured (no usage).
          additionalProperties: true
        per_user_defaults:
          type: object
          description: Plan default per-user limits (`rpm`, `tpm`).
          additionalProperties: true
        org_user_quotas:
          type: object
          description: >-
            Organization per-user quota settings (`overrides` by user,
            `by_role`).
          additionalProperties: true
      example:
        orgSlug: acme-corp
        computed_at: '2026-01-15T10:00:00.000Z'
        usage_refreshed_at: '2026-01-15T09:00:00.000Z'
        policy: hard_block
        enforced:
          - key: llm.monthly_tokens
            scope: org
            window: month
            limit: 10000000
            used: 6400000
            percent: 64
            source: plan
        per_user_defaults:
          rpm: 20
          tpm: 20000
    Error:
      type: object
      required:
        - error
      description: |
        Standard error envelope. `error` carries either a stable PascalCase
        identifier or a free-text label (legacy endpoints) - `code` is the
        canonical machine-readable identifier going forward.
      properties:
        error:
          type: string
          description: Stable PascalCase identifier or short error label.
        message:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: |
            Machine-readable error code. Observed values include
            `RATE_LIMITED`, `MODEL_NOT_ALLOWED`, `HEADER_POLICY_VIOLATION`,
            `MODEL_NOT_FOUND`,
            `MODEL_EXISTS`, `MISSING_MODEL_ID`, `MISSING_TYPE`, `INVALID_BODY`,
            `BULK_REPLACE_FAILED`,
            `INVALID_ITEMS`, `INVALID_DIMENSIONS`, `PAYLOAD_TOO_LARGE`,
            `METHOD_NOT_ALLOWED`, `PROVIDER_ERROR`, `PROVIDER_NO_RESPONSE`.
        details:
          description: Optional structured context (e.g. list of invalid items).
          additionalProperties: true
        status:
          type: integer
          description: HTTP status mirror, when present.
        retryAfter:
          type: integer
          description: Seconds to wait before retrying (rate-limit responses).
        provider:
          type: string
          description: Upstream provider name (provider-error responses).
        model:
          type: string
          description: Model id involved in the error (provider-error responses).
        provider_error_type:
          type: string
          description: Upstream provider's own error class name.
    QuotaGauge:
      type: object
      required:
        - key
        - scope
        - window
        - limit
        - used
        - percent
      properties:
        key:
          type: string
          enum:
            - llm.rpm
            - llm.tpm
            - llm.monthly_tokens
            - llm.monthly_cost
        scope:
          type: string
          enum:
            - user
            - org
        window:
          type: string
          enum:
            - minute
            - month
        limit:
          type: number
          description: Configured limit (requests, tokens or cost depending on `key`).
        used:
          type: number
          description: Current usage in the window (0 until a first request is recorded).
        percent:
          type: number
          description: '`used / limit` as a rounded percentage.'
        as_of:
          type: string
          format: date-time
          description: Time of the last recorded request (rate gauges only).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        User-bound credential carrying an identity: either a session JWT
        or a user access token (`at:*`) generated from the user settings UI.
        Send as `Authorization: Bearer <token>`.
        Org API keys (`iak_*`) are **not** accepted here - they carry
        no user identity. Use the `x-prismeai-api-key` header instead
        (see `OrgApiKeyAuth`).
    OrgApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key
      description: |
        Organization API key (`iak_{orgSlug}_{uuid}`). Unlike
        `Authorization: Bearer`, this credential is **not** tied to a user
        identity - it is bound to the org and its effective access is
        defined by the scopes / permission rules attached to it (it can
        be restricted to a single project, or kept broader).
        Send as `x-prismeai-api-key: iak_...`.

````

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