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

# Model and step trace for the run

> Every step: name, model id, local or NIM, Meterless mode, latency and tokens. Powers the trace panel.



## OpenAPI

````yaml /contract/openapi.yaml get /runs/{id}/trace
openapi: 3.1.0
info:
  title: Porch Light API
  version: 0.1.0
  summary: >-
    The shared contract every Porch Light agent builds against. Country
    agnostic: everything US specific sits behind the country adapter interface
    in contract/adapter.md.
  description: >-
    Porch Light takes a weather alert in, builds the warning area, ranks the
    facilities inside it with a fixed transparent formula, and returns a call
    sheet where every row carries its evidence trail. Zetaris is the only data
    path. Meterless is the only model path. Nemotron explains, the formula
    ranks.
  license:
    name: AGPL-3.0
servers: []
security:
  - bearerAuth: []
tags:
  - name: alerts
  - name: runs
  - name: health
paths:
  /runs/{id}/trace:
    get:
      tags:
        - runs
      summary: Model and step trace for the run
      description: >-
        Every step: name, model id, local or NIM, Meterless mode, latency and
        tokens. Powers the trace panel.
      operationId: getRunTrace
      parameters:
        - $ref: '#/components/parameters/RunId'
      responses:
        '200':
          description: The trace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trace'
        '404':
          description: No such run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  parameters:
    RunId:
      name: id
      in: path
      required: true
      schema:
        type: string
        example: run_milton_12081_mock
  schemas:
    Trace:
      type: object
      required:
        - run_id
        - steps
      properties:
        run_id:
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/TraceStep'
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
            detail: {}
            retry_after_ms:
              type: integer
    TraceStep:
      type: object
      required:
        - step
        - provider
        - started_at
      properties:
        step:
          type: string
          example: reason_written
        model_id:
          type: string
        mode:
          type: string
          enum:
            - meterless/deep
            - meterless/fast
            - meterless/local
            - none
        provider:
          type: string
          enum:
            - local
            - nim
            - none
        latency_ms:
          type: integer
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        tokens_per_sec:
          type: number
        trace_id:
          type: string
        query_ids:
          type: array
          items:
            type: string
            minLength: 1
          uniqueItems: true
        started_at:
          type: string
          format: date-time
        detail:
          type: string
    ErrorCode:
      type: string
      enum:
        - not_found
        - bad_request
        - no_facilities
        - source_stale
        - zetaris_down
        - meterless_unauthorized
        - meterless_offline
        - timeout
        - export_refused
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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