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

# List training step trajectories

> Retrieve a page of one training step’s trajectories, including rewards, termination reasons, tool failures, and group outcomes. The sort presets are errors, mixed, success, and failed. The search parameter is currently ignored.



## OpenAPI

````yaml /openapi.json get /api/v1/train/{run_id}/steps/{step}/trajectories
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/train/{run_id}/steps/{step}/trajectories:
    get:
      tags:
        - training
      summary: List training step trajectories
      description: >-
        Retrieve a page of one training step’s trajectories, including rewards,
        termination reasons, tool failures, and group outcomes. The sort presets
        are errors, mixed, success, and failed. The search parameter is
        currently ignored.
      operationId: listTrainingStepTrajectories
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: step
          in: path
          required: true
          schema:
            type: integer
            title: Step
        - name: mode
          in: query
          required: false
          schema:
            enum:
              - training
              - eval
            type: string
            default: training
            title: Mode
        - name: selection
          in: query
          required: false
          schema:
            enum:
              - sampled
              - trained
            type: string
            default: sampled
            title: Selection
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 25
            title: Limit
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingStepTrajectoriesResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TrainingStepTrajectoriesResponse:
      properties:
        training_run_id:
          type: string
          title: Training Run Id
          description: Training run whose step rollouts are returned.
        step:
          type: integer
          title: Step
          description: Training step whose rollouts are returned.
        items:
          items:
            $ref: '#/components/schemas/TrainingStepTrajectory'
          type: array
          title: Items
          description: >-
            Page of the training step's rollouts. Without a sort they are
            ordered by uid then trajectory_idx; sort=errors puts ERROR
            terminations then most tool failures first, and
            sort=mixed|success|failed puts groups with that outcome first.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for the next page, or null if none.
        has_more:
          type: boolean
          title: Has More
          description: True if more rollouts remain beyond this page.
      type: object
      required:
        - training_run_id
        - step
        - items
        - has_more
      title: TrainingStepTrajectoriesResponse
    TrainingStepTrajectory:
      properties:
        task_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Preview
          description: Preview of the task's first user prompt, when recorded.
        trajectory_id:
          type: string
          title: Trajectory Id
          description: Trajectory identifier.
        uid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uid
          description: 'Rollout group key: rollouts of one task share a uid.'
        trajectory_idx:
          anyOf:
            - type: integer
            - type: 'null'
          title: Trajectory Idx
          description: Position of this rollout within its group.
        status:
          anyOf:
            - $ref: '#/components/schemas/TrajectoryStatus'
            - type: 'null'
          description: Recorded trajectory lifecycle status, or null when unavailable.
        reward:
          anyOf:
            - type: number
            - type: 'null'
          title: Reward
          description: Reward assigned to the trajectory, or null until finished.
        turns:
          anyOf:
            - type: integer
            - type: 'null'
          title: Turns
          description: >-
            Agent turns (num_steps); a turn is an agent step inside a
            trajectory, distinct from a training step.
        tokens_generated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokens Generated
          description: Generated tokens (total_token_count).
        termination_reason:
          type: string
          title: Termination Reason
          description: Upper-case TerminationReason name; NONE when unset.
        tool_failure_count:
          type: integer
          title: Tool Failure Count
          description: Tool failures recorded on the trajectory; 0 when null.
        tool_failures_exec:
          type: integer
          title: Tool Failures Exec
          description: >-
            Tool calls that ran and failed
            (attributes.metrics.num_tool_failures_exec).
        tool_failures_parse:
          type: integer
          title: Tool Failures Parse
          description: Malformed tool calls (attributes.metrics.num_tool_failures_parse).
        tool_failures_unk:
          type: integer
          title: Tool Failures Unk
          description: >-
            Tool calls with no response and no error
            (attributes.metrics.num_tool_failures_unk).
        training_step:
          anyOf:
            - type: integer
            - type: 'null'
          title: Training Step
          description: >-
            Optimizer step that consumed this rollout; null when not yet trained
            on.
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: Benchmark task identifier, when one was recorded.
        rejection_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejection Reason
          description: >-
            Why training skipped this rollout's group without learning from it:
            all_pass, all_fail, or no_variance. Reported only for
            selection=trained; null when trained or still batched.
        group_outcome:
          type: string
          enum:
            - incomplete
            - mixed
            - all_success
            - all_failed
          title: Group Outcome
          description: >-
            Reward pattern of this rollout's group: incomplete until every
            rollout has finished with a reward; then all_success (every reward
            >= 1), all_failed (every reward <= 0), or mixed. Skipped training
            batches use the trainer's group decision and ignore unscored
            rollouts.
        group_no_signal:
          type: boolean
          title: Group No Signal
          description: >-
            True when every finished reward in the group is identical, so GRPO
            advantages are zero and the group contributes no gradient whether or
            not the trainer consumed it. Skipped training batches ignore
            unscored rollouts; no_variance is authoritative.
      type: object
      required:
        - trajectory_id
        - uid
        - trajectory_idx
        - status
        - reward
        - turns
        - tokens_generated
        - termination_reason
        - tool_failure_count
        - tool_failures_exec
        - tool_failures_parse
        - tool_failures_unk
        - training_step
        - task_id
        - rejection_reason
        - group_outcome
        - group_no_signal
      title: TrainingStepTrajectory
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    TrajectoryStatus:
      type: string
      enum:
        - in_progress
        - cancelling
        - finalizing
        - completed
        - aborted
      title: TrajectoryStatus
      description: The trajectory’s recorded lifecycle status.
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - billing_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

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