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

# Report usage

> Metered quantities for the call: LLM tokens per model and tag, STT seconds, TTS characters, and other rows with a stated cost. The platform prices them. May be sent several times; rows add up. Idempotent on `reportId`.



## OpenAPI

````yaml https://api.pathors.com/openapi.json post /v1/projects/{projectId}/custom-agent/sessions/{sessionId}/usage
openapi: 3.1.0
info:
  title: Pathors API
  description: >-
    Public developer API for the Pathors platform. Authenticate with a developer
    key (`Authorization: Bearer dk_...`) created from the dashboard. See
    [docs.pathors.com](https://docs.pathors.com) for guides.
  version: 1.0.0
  contact:
    name: Pathors Support
    url: https://app.pathors.com/support
servers:
  - url: https://api.pathors.com
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - developerKey: []
tags:
  - name: Projects
    description: CRUD for projects owned by the authenticated developer
  - name: Agent Config
    description: Read and update a project's agent configuration and versions
  - name: Pathway
    description: Manage a project's pathway graph — nodes and decision edges
  - name: Chat
    description: OpenAI-compatible chat completions for a project agent
  - name: Sessions
    description: Create, search, terminate, and inspect agent sessions
  - name: Session History
    description: Browse and inspect persisted session history
  - name: Tools
    description: Manage a project's tools and inspect available tool types
  - name: Knowledgebases
    description: Manage knowledgebases and query them for relevant chunks
  - name: Datasets
    description: Upload and manage source files embedded into a knowledgebase
  - name: Test Cases
    description: CRUD for agent test cases
  - name: Test Suites
    description: Group test cases, run them, and read results
  - name: Webhooks
    description: Manage webhook subscriptions for project events
  - name: Calls
    description: Place outbound voice calls from a project agent
  - name: Campaigns
    description: Create and activate outbound campaigns that dial a call list
paths:
  /v1/projects/{projectId}/custom-agent/sessions/{sessionId}/usage:
    post:
      tags:
        - Custom Agent
      summary: Report usage
      description: >-
        Metered quantities for the call: LLM tokens per model and tag, STT
        seconds, TTS characters, and other rows with a stated cost. The platform
        prices them. May be sent several times; rows add up. Idempotent on
        `reportId`.
      operationId: postV1ProjectsByProjectIdCustomAgentSessionsBySessionIdUsage
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The ID of your project
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
          description: The session id returned by POST /sessions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                reportId:
                  type: string
                  minLength: 1
                  maxLength: 128
                  pattern: ^[\w.:-]+$
                llm:
                  default: []
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                        minLength: 1
                        maxLength: 64
                      model:
                        type: string
                        minLength: 1
                        maxLength: 128
                      tag:
                        type: string
                        minLength: 1
                        maxLength: 64
                        pattern: ^[\w.:-]+$
                      requests:
                        type: integer
                        minimum: 1
                        maximum: 1000000000
                      promptTokens:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      completionTokens:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      cachedTokens:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      cacheWriteTokens:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      providerCostUsd:
                        type: number
                        minimum: 0
                        maximum: 1000000
                    required:
                      - provider
                      - model
                      - tag
                      - promptTokens
                      - completionTokens
                stt:
                  default: []
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                        minLength: 1
                        maxLength: 64
                      model:
                        type: string
                        minLength: 1
                        maxLength: 128
                      audioSeconds:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      language:
                        type: string
                        maxLength: 32
                      providerCostUsd:
                        type: number
                        minimum: 0
                        maximum: 1000000
                    required:
                      - provider
                      - model
                      - audioSeconds
                tts:
                  default: []
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      provider:
                        type: string
                        minLength: 1
                        maxLength: 64
                      model:
                        type: string
                        minLength: 1
                        maxLength: 128
                      characters:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      audioSeconds:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      providerCostUsd:
                        type: number
                        minimum: 0
                        maximum: 1000000
                    required:
                      - provider
                      - model
                      - characters
                other:
                  default: []
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 64
                      unit:
                        type: string
                        minLength: 1
                        maxLength: 32
                      quantity:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                      costUsd:
                        default: 0
                        type: number
                        minimum: 0
                        maximum: 1000000
                    required:
                      - name
                      - unit
                      - quantity
              required:
                - reportId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      costs:
                        type: object
                        properties:
                          llmUsd:
                            type: number
                          sttUsd:
                            type: number
                          ttsUsd:
                            type: number
                          otherUsd:
                            type: number
                          totalUsd:
                            type: number
                        required:
                          - llmUsd
                          - sttUsd
                          - ttsUsd
                          - otherUsd
                          - totalUsd
                        description: What THIS report was priced at
                      sessionCosts:
                        type: object
                        properties:
                          llmUsd:
                            type: number
                          sttUsd:
                            type: number
                          ttsUsd:
                            type: number
                          otherUsd:
                            type: number
                          totalUsd:
                            type: number
                        required:
                          - llmUsd
                          - sttUsd
                          - ttsUsd
                          - otherUsd
                          - totalUsd
                        description: Every report of the session so far, this one included
                      unpriced:
                        type: array
                        items:
                          type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - llm
                                - stt
                                - tts
                            provider:
                              type: string
                            model:
                              type: string
                            tag:
                              type: string
                          required:
                            - kind
                            - provider
                            - model
                      undeclaredTags:
                        type: array
                        items:
                          type: string
                        description: Tags not in the manifest's usageTags
                    required:
                      - costs
                      - sessionCosts
                      - unpriced
                      - undeclaredTags
                required:
                  - data
        '400':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                required:
                  - error
        '401':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                required:
                  - error
        '403':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                required:
                  - error
        '409':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    developerKey:
      type: http
      scheme: bearer
      bearerFormat: Developer key (dk_...)
      description: Developer key created from the dashboard (Settings → Developer Keys)

````

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