> ## 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.

# List an organization's service usage history

> Returns the organization's billed uses of platform services such as web search, newest first, one page at a time. Costs are integers in nano-USD (10^-9 USD).



## OpenAPI

````yaml /api-reference/cloud-platform-openapi.json get /v1/organizations/{org_id}/service-usage/history
openapi: 3.1.0
info:
  description: Account, organization, workspace and billing routes of NEAR AI Cloud.
  title: NEAR AI Cloud Platform API
  version: '5'
servers:
  - url: https://cloud-platform.near.ai
    description: NEAR AI Cloud Platform
security: []
paths:
  /v1/organizations/{org_id}/service-usage/history:
    get:
      tags:
        - Usage
      summary: List an organization's service usage history
      description: >-
        Returns the organization's billed uses of platform services such as web
        search, newest first, one page at a time. Costs are integers in nano-USD
        (10^-9 USD).
      operationId: get_service_usage_history
      parameters:
        - description: The organization id (a UUID).
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: Page size, 1 to 1000. Defaults to 100.
          in: query
          name: limit
          required: false
          schema:
            format: int64
            type: integer
        - description: Number of entries to skip. Defaults to 0.
          in: query
          name: offset
          required: false
          schema:
            format: int64
            type: integer
        - description: Only entries of this platform service, for example `web_search`.
          in: query
          name: serviceName
          required: false
          schema:
            type: string
        - description: >-
            Only entries funded by this credit type, for example `grant` or
            `payment`.
          in: query
          name: credit_type
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUsageHistoryResponse'
          description: A page of service usage history.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: A parameter is invalid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Missing or invalid credential.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The user is not a member of this organization.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The organization does not exist.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal error.
      security:
        - session: []
components:
  schemas:
    ServiceUsageHistoryResponse:
      description: Service usage history response
      properties:
        data:
          items:
            $ref: '#/components/schemas/ServiceUsageEntryResponse'
          type: array
        limit:
          format: int64
          type: integer
        offset:
          format: int64
          type: integer
        total:
          minimum: 0
          type: integer
      required:
        - data
        - total
        - limit
        - offset
      type: object
    ErrorResponse:
      description: The body of every error answer on the user routes.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      type: object
    ServiceUsageEntryResponse:
      description: >-
        One use of a platform service billed to an organization. Costs are
        integers in nano-USD (10^-9 USD).
      properties:
        allocation_policy_version:
          type:
            - string
            - 'null'
        api_key_id:
          type: string
        created_at:
          format: date-time
          type: string
        credit_allocations:
          items:
            $ref: '#/components/schemas/CreditAllocationSchema'
          type:
            - array
            - 'null'
        funded_amount:
          format: int64
          type:
            - integer
            - 'null'
        id:
          type: string
        inference_id:
          type:
            - string
            - 'null'
        organization_id:
          type: string
        quantity:
          format: int32
          type: integer
        service_id:
          type: string
        total_cost:
          format: int64
          type: integer
        total_cost_display:
          type: string
        unfunded_amount:
          format: int64
          type:
            - integer
            - 'null'
        workspace_id:
          type: string
      required:
        - id
        - organization_id
        - workspace_id
        - api_key_id
        - service_id
        - quantity
        - total_cost
        - total_cost_display
        - created_at
      type: object
    ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
      required:
        - message
        - type
      type: object
    CreditAllocationSchema:
      description: The part of a charge paid by one credit type.
      properties:
        amount:
          description: The amount paid, in nano-USD.
          format: int64
          type: integer
        organization_limit_id:
          description: The credit limit the amount was drawn from.
          format: uuid
          type:
            - string
            - 'null'
        policy_version:
          description: The version of the allocation rules applied.
          type: string
        source:
          description: The credit source, when the credit type has several.
          type:
            - string
            - 'null'
        type:
          description: The credit type that paid this part.
          type: string
      required:
        - type
        - amount
        - policy_version
      type: object
  securitySchemes:
    session:
      bearerFormat: Session token
      description: 'Session token from signing in, sent as `Authorization: Bearer <token>`.'
      scheme: bearer
      type: http

````

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