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

# Get Usage Analytics

> Returns usage and cost for one plan type over a time range, in buckets of `window_size`. Requires billing access.



## OpenAPI

````yaml openapi-specs/playground/platform.json POST /usage/stats/
openapi: 3.1.0
info:
  title: Simplismart Platform APIs (Read-only)
  description: >-
    Read-only endpoints for accounts, models, deployments, observability, usage,
    alerting and external catalogues.
  version: 1.0.0
servers:
  - url: https://api.app.simplismart.ai
    description: Simplismart API
security: []
tags:
  - name: Accounts
  - name: Models
  - name: Deployments
  - name: Observability
  - name: Usage
  - name: Alerting
paths:
  /usage/stats/:
    post:
      tags:
        - Usage
      summary: Get Usage Analytics
      description: >-
        Returns usage and cost for one plan type over a time range, in buckets
        of `window_size`. Requires billing access.
      operationId: post_usage_stats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                plan_type:
                  type: string
                  enum:
                    - shared
                    - private
                    - byoc
                    - reserved
                    - training
                    - compilation
                  description: >-
                    Which usage to return. Each plan type has its own filters
                    (see below). `private` includes reserved GPUs: for an org
                    with a reservation it returns the reserved plan, as the
                    dashboard's Private tab does. `reserved` is deprecated; use
                    `private`.
                start_time:
                  type: string
                  format: date-time
                  description: Start of the range (ISO 8601, UTC).
                end_time:
                  type: string
                  format: date-time
                  description: End of the range (ISO 8601, UTC).
                window_size:
                  type: string
                  enum:
                    - MINUTE
                    - 15MIN
                    - 30MIN
                    - HOUR
                    - 3HOUR
                    - 6HOUR
                    - 12HOUR
                    - DAY
                    - WEEK
                  description: Bucket size for each item's `points`.
                workspace_id:
                  type: string
                  format: uuid
                  description: Workspace UUID. Defaults to your default workspace.
                deployment_ids:
                  type: array
                  items:
                    type: string
                  description: Only these deployment UUIDs. For `private` and `byoc`.
                deployment_slugs:
                  type: array
                  items:
                    type: string
                  description: Only these deployment slugs. For `private` and `byoc`.
                model_names:
                  type: array
                  items:
                    type: string
                  description: Only these models (for example `DeepSeek-R1`). For `shared`.
                training_job_ids:
                  type: array
                  items:
                    type: string
                  description: Only these training job UUIDs. For `training`.
                training_job_names:
                  type: array
                  items:
                    type: string
                  description: Only these training job names. For `training`.
                model_repo_ids:
                  type: array
                  items:
                    type: string
                  description: Only these model repo UUIDs. For `compilation`.
                model_repo_names:
                  type: array
                  items:
                    type: string
                  description: Only these model repo names. For `compilation`.
                statuses:
                  description: Only resources in these statuses. Ignored for `training`.
                  oneOf:
                    - title: Deployment statuses
                      description: For `shared`, `private` and `byoc`.
                      type: array
                      items:
                        type: string
                        enum:
                          - PROGRESSING
                          - PENDING
                          - DEPLOYING
                          - DEPLOYED
                          - DEPLOYED_WARMPOOL
                          - FAILED_DELETING
                          - FAILED_WARMPOOL
                          - FAILED_DELETING_WARMPOOL
                          - FAILED
                          - DELETING
                          - DELETED
                          - STOPPED
                          - EDIT_IN_PROGRESS
                          - EDIT_WARMPOOL_IN_PROGRESS
                          - EDIT_ROLLBACK_IN_PROGRESS
                          - EDIT_ROLLBACK_FAILED
                          - EDIT_SUCCESS
                    - title: Model repo statuses
                      description: For `compilation`.
                      type: array
                      items:
                        type: string
                        enum:
                          - QUEUED
                          - PENDING
                          - IN_PROGRESS
                          - OPTIMISING
                          - LAUNCHING_RAY_CLUSTER
                          - PROGRESSING
                          - SUCCESS
                          - FAILED
                          - FAILED_LAUNCHING_RAY_CLUSTER
                          - FAILED_OPTIMISING
                          - FAILED_HUNTING
                          - FAILED_CLEANUP
                          - FAILED_BILLING_RESOLUTION
                          - DELETED
                group_by:
                  type: array
                  items:
                    type: string
                    enum:
                      - source
                      - feature_id
                  description: >-
                    `["source", "feature_id"]`: one item per deployment.
                    `["feature_id"]`: one item per accelerator. `private` only.
                    On an org with reserved GPUs, omitting it returns one item
                    per accelerator unless deployments are filtered.
              required:
                - plan_type
                - start_time
                - end_time
                - window_size
            example:
              plan_type: private
              start_time: '2026-10-22T00:00:00Z'
              end_time: '2026-10-29T00:00:00Z'
              window_size: DAY
              deployment_ids:
                - 3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b
              group_by:
                - source
                - feature_id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                items:
                  - source: llama-3-8b-prod_3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b
                    feature_id: feat_01JW63P4JH5909JHMTWAMAH67D
                    event_name: 2-X-nvidia-h100-deployment
                    total_usage: '2660'
                    total_cost: '310.33'
                    currency: usd
                    unit_price:
                      amount: '0.066666666666667'
                      currency: usd
                    event_count: 1330
                    points:
                      - timestamp: '2026-10-22T00:00:00Z'
                        usage: '2660'
                        cost: '310.33'
                        computed_commitment_utilized_amount: '0'
                        computed_overage_amount: '0'
                        computed_true_up_amount: '0'
                        event_count: 1330
                subtotal: '310.33'
                total_discount: '0'
                total_cost: '310.33'
                currency: usd
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        source:
                          type: string
                          description: >-
                            `{deployment_name}_{deployment_id}`. Absent in the
                            pooled (accelerator) view.
                        feature_id:
                          type: string
                          description: Billing feature (accelerator) id.
                        event_name:
                          type: string
                          description: >-
                            Billing event, for example
                            `2-X-nvidia-h100-deployment`.
                        total_usage:
                          type: string
                          description: Usage over the range. Decimal as a string.
                        total_cost:
                          type: string
                          description: Cost over the range. Decimal as a string.
                        currency:
                          type: string
                        unit_price:
                          type: object
                          description: Price per unit of usage.
                          properties:
                            amount:
                              type: string
                              description: Decimal as a string.
                            currency:
                              type: string
                        event_count:
                          type: integer
                        points:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                type: string
                                format: date-time
                                description: Start of the window.
                              usage:
                                type: string
                                description: Usage in the window. Decimal as a string.
                              cost:
                                type: string
                                description: Cost in the window. Decimal as a string.
                              event_count:
                                type: integer
                              computed_commitment_utilized_amount:
                                type: string
                                description: >-
                                  Commitment used (pooled queries). Decimal as a
                                  string.
                              computed_overage_amount:
                                type: string
                                description: Overage (pooled queries). Decimal as a string.
                              computed_true_up_amount:
                                type: string
                                description: True-up (pooled queries). Decimal as a string.
                  subtotal:
                    type: string
                    description: Cost before discounts. Decimal as a string.
                  total_discount:
                    type: string
                    description: Discounts. Decimal as a string.
                  total_cost:
                    type: string
                    description: Total cost. Decimal as a string.
                  currency:
                    type: string
                    description: For example `usd`.
                  reservation_commitment:
                    type: object
                    description: >-
                      Orgs with reserved GPUs, pooled queries only:
                      commitment-adjusted cost and per-GPU overage/true-up.
        '400':
          description: 'Bad request: invalid filter combination'
          content:
            application/json:
              example:
                deployment_ids:
                  - >-
                    Cannot be combined with an explicit group_by that omits
                    'source' - a pooled/accelerator-grouped query never resolves
                    per-deployment sources, so this filter would be silently
                    ignored. Add 'source' to group_by (or omit group_by
                    entirely) to get the per-deployment shape instead.
        '401':
          description: 'Unauthorized: Authentication failed'
          content:
            application/json:
              example:
                error: Authentication failed
        '403':
          description: >-
            Forbidden: You don’t have permission to view billing for this
            organization.
          content:
            application/json:
              example:
                error: >-
                  You don’t have permission to view billing for this
                  organisation.
        '404':
          description: 'Not found: Organization not found'
          content:
            application/json:
              example:
                error: Organisation not found
        '500':
          description: Server error
          content:
            application/json:
              example:
                error: Internal server error.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Simplismart Playground token, from Settings → API Key.

````

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