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

# Get

> Aggregated usage and cost per meter, current calendar month by default.



## OpenAPI

````yaml /openapi.json get /v1/orgs/{orgId}/projects/{projectId}/usage
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/usage:
    get:
      tags:
        - usage
      summary: Get
      description: Aggregated usage and cost per meter, current calendar month by default.
      operationId: usage.get
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Aggregate events recorded at or after this time (RFC 3339).
        - name: until
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Aggregate events recorded strictly before this time (RFC 3339).
            Defaults to now; with since, selects a closed billing window.
        - name: granularity
          in: query
          required: false
          schema:
            type: string
            enum:
              - day
          description: >-
            Pass "day" to add per-day cost buckets (UTC calendar days) for the
            window.
      responses:
        '200':
          description: Aggregated meters at rate-card prices.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meters:
                    type: array
                    items:
                      type: object
                      properties:
                        meterId:
                          type: string
                        quantity:
                          type: number
                        costUsd:
                          type: number
                      required:
                        - meterId
                        - quantity
                        - costUsd
                  resources:
                    type: array
                    description: >-
                      Usage grouped by named app, database, cache, queue, cron,
                      deployment, or storage resource.
                    items:
                      type: object
                      description: >-
                        Named product resource responsible for usage. Internal
                        provider and producer identifiers are never returned.
                      properties:
                        resourceType:
                          type: string
                          enum:
                            - app
                            - database
                            - cache
                            - queue
                            - cron
                            - deployment
                            - storage
                            - other
                        resourceId:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Customer-visible Korve resource id, or null for a
                            product-wide category.
                        name:
                          type: string
                        environment:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            slug:
                              type: string
                              pattern: ^[a-z][a-z0-9-]{0,38}$
                          required:
                            - id
                            - name
                            - slug
                        meters:
                          type: array
                          items:
                            type: object
                            properties:
                              meterId:
                                type: string
                              quantity:
                                type: number
                              costUsd:
                                type: number
                            required:
                              - meterId
                              - quantity
                              - costUsd
                        totalUsd:
                          type: number
                      required:
                        - resourceType
                        - resourceId
                        - name
                        - environment
                        - meters
                        - totalUsd
                  totalUsd:
                    type: number
                  days:
                    type: array
                    description: >-
                      Present with granularity=day: cost per UTC calendar day,
                      ascending. Days in the window without usage are omitted.
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: UTC calendar day, "YYYY-MM-DD".
                        totalUsd:
                          type: number
                        meters:
                          type: array
                          description: That day's cost per meter, ascending by meter id.
                          items:
                            type: object
                            properties:
                              meterId:
                                type: string
                              costUsd:
                                type: number
                            required:
                              - meterId
                              - costUsd
                      required:
                        - date
                        - totalUsd
                        - meters
                required:
                  - meters
                  - resources
                  - totalUsd
        '404':
          description: No such project in this organization.
        '422':
          description: Invalid since/until timestamp, empty window, or invalid granularity.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````