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

# Get the per-organization consumption ranking (Admin only)

> Organizations with usage in the selected period ranked by consumed cost, with the
verifiable/external split, requests, tokens, models used, a current paying flag, and
last-usage timestamp. Paginated and filterable — full attribution of usage/spend per org.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/admin/platform/org-revenue
openapi: 3.1.0
info:
  title: NEAR AI Cloud API
  description: >-
    NEAR AI Cloud API for private AI model inference and organization
    administration.
  contact:
    name: NEAR AI Team
    email: support@near.ai
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://cloud-api.near.ai
    description: NEAR AI Cloud
security:
  - session_token: []
  - api_key: []
tags:
  - name: Chat
    description: Chat completion endpoints for AI model inference
  - name: Images
    description: Image generation endpoints
  - name: Audio
    description: Audio transcription endpoints
  - name: Rerank
    description: Document reranking endpoints
  - name: Score
    description: Text similarity scoring endpoints
  - name: Privacy
    description: Privacy classification (PII span detection) endpoints
  - name: Models
    description: Public model catalog and information
  - name: Responses
    description: >-
      Stateless response inference (`store: false` only). Raw request/response
      content, response items, and history are not persisted. Clients must
      include any prior context in each request. Every successful Responses
      inference makes exactly one Chat Completions call. Only custom `function`
      tools are supported. They are client-managed: Cloud returns
      `function_call` items but never executes them; a later `store: false`
      request replays the individual call (the raw item from output is accepted)
      with its matching `function_call_output`, alongside caller-managed message
      history and the same function tool definitions. The minimal replay path
      also accepts assistant `message` text parts of type `output_text`, but not
      reasoning or arbitrary full `response.output` items. Server-executed tools
      (`web_search`, `web_context_search`, `file_search`, `code_interpreter`,
      `computer`, and remote `mcp`) and image-generation/editing models are
      rejected. The separate `POST /mcp` endpoint continues to expose its
      `web_search` tool independently of Responses; use `/v1/images/*` for image
      generation/editing. Existing completed-response gateway attestation is
      preserved best-effort: when the signature write succeeds, `GET
      /v1/signature/resp_*` retrieves signatures over SHA-256 request/response
      digests, never raw content. Interrupted streams create no `resp_*`
      attestation record or legacy disconnect fallback. Conversations, response
      history, and file input are rejected.
  - name: Organizations
    description: Organization management
  - name: Organization Members
    description: Organization member and invitation management
  - name: Workspaces
    description: Workspace and API key management
  - name: Users
    description: User profile and token management
  - name: Invitations
    description: Token-based invitation handling
  - name: Usage
    description: Usage tracking and billing information
  - name: Reporting
    description: Read-only customer usage reporting
  - name: Billing
    description: Billing costs endpoint (HuggingFace integration)
  - name: Staking Farm
    description: House of Stake farm credit configuration and synchronization
  - name: Health
    description: Health check endpoints
  - name: Attestation
    description: Attestation and verification endpoints
  - name: Gateway
    description: Model gateway integration endpoints
  - name: Admin
    description: Administrative endpoints (admin access required)
  - name: Services
    description: Public platform services (e.g. web_search pricing)
paths:
  /v1/admin/platform/org-revenue:
    get:
      tags:
        - Admin
      summary: Get the per-organization consumption ranking (Admin only)
      description: >-
        Organizations with usage in the selected period ranked by consumed cost,
        with the

        verifiable/external split, requests, tokens, models used, a current
        paying flag, and

        last-usage timestamp. Paginated and filterable — full attribution of
        usage/spend per org.
      operationId: get_org_revenue
      parameters:
        - name: start
          in: query
          description: Start of time range (ISO 8601). Defaults to 30 days ago.
          required: false
          schema:
            type: string
        - name: end
          in: query
          description: End of time range (ISO 8601). Defaults to now.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Page size (1-1000, default 100)
          required: false
          schema:
            type: integer
            format: int64
        - name: offset
          in: query
          description: Page offset (default 0)
          required: false
          schema:
            type: integer
            format: int64
        - name: paying
          in: query
          description: Filter to current paying (true) / non-paying (false) orgs
          required: false
          schema:
            type: boolean
        - name: sort
          in: query
          description: 'Sort: revenue (default), requests, tokens'
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Org revenue retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgRevenueReport'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - session_token: []
components:
  schemas:
    OrgRevenueReport:
      type: object
      description: Paginated per-organization consumption ranking for a period
      required:
        - period_start
        - period_end
        - data
        - total
        - limit
        - offset
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OrgRevenueEntry'
        limit:
          type: integer
          format: int64
        offset:
          type: integer
          format: int64
        period_end:
          type: string
          format: date-time
        period_start:
          type: string
          format: date-time
        total:
          type: integer
          format: int64
          description: Total matching organizations (before limit/offset)
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    OrgRevenueEntry:
      type: object
      description: Per-organization consumption breakdown entry
      required:
        - organization_id
        - organization_name
        - consumed_cost_usd
        - verifiable_consumed_usd
        - non_verifiable_consumed_usd
        - requests
        - tokens
        - models_used
        - is_paying
      properties:
        consumed_cost_usd:
          type: number
          format: double
          description: Consumed usage cost, USD
        is_paying:
          type: boolean
          description: >-
            Current snapshot: org has an active payment-type credit (not
            historical;

            does not yet count postpaid — see #704).
        last_usage_at:
          type:
            - string
            - 'null'
          format: date-time
        models_used:
          type: integer
          format: int64
        non_verifiable_consumed_usd:
          type: number
          format: double
        organization_id:
          type: string
          format: uuid
        organization_name:
          type: string
        requests:
          type: integer
          format: int64
        tokens:
          type: integer
          format: int64
        verifiable_consumed_usd:
          type: number
          format: double
    ErrorDetail:
      type: object
      required:
        - message
        - type
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token for user authentication (Authorization: Bearer
        <jwt_token>). Create via POST /users/me/access_tokens.
    api_key:
      type: http
      scheme: bearer
      bearerFormat: api_key
      description: 'API key for programmatic access (Authorization: Bearer sk-<api_key>)'

````

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