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

# Get per-space usage

> Tokens ingested and search queries for a single space over a date range (defaults to the current calendar month). Use this to attribute usage to one end-user when you map one space per end-user.



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json get /api/v1/spaces/{space_uuid}/usage
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/spaces/{space_uuid}/usage:
    get:
      tags:
        - spaces
      summary: Get per-space usage
      description: >-
        Tokens ingested and search queries for a single space over a date range
        (defaults to the current calendar month). Use this to attribute usage to
        one end-user when you map one space per end-user.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: space_uuid
          in: path
        - schema:
            type: string
            format: date
          required: false
          name: start_date
          in: query
        - schema:
            type: string
            format: date
          required: false
          name: end_date
          in: query
      responses:
        '200':
          description: Space usage for the selected period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceUsageResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    SpaceUsageResponse:
      type: object
      properties:
        space_id:
          type: string
          format: uuid
        period_start:
          type: string
          format: date
        period_end:
          type: string
          format: date
        tokens_ingested:
          type: integer
          minimum: 0
        search_queries:
          type: integer
          minimum: 0
      required:
        - space_id
        - period_start
        - period_end
        - tokens_ingested
        - search_queries
    SpaceErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````