> ## 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 Groups Route

> Complete task groups, with the selected optimizer step's batch first and other checkpoint samples afterward. Limit counts groups; every attempt in a selected group is returned together. Filters include whole matching groups. Cursors retain a read snapshot for 30 minutes.



## OpenAPI

````yaml /openapi.json get /api/v1/train/{run_id}/steps/{step}/groups
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}/groups:
    get:
      tags:
        - training
      summary: List Training Step Groups Route
      description: >-
        Complete task groups, with the selected optimizer step's batch first and
        other checkpoint samples afterward. Limit counts groups; every attempt
        in a selected group is returned together. Filters include whole matching
        groups. Cursors retain a read snapshot for 30 minutes.
      operationId: listTrainingStepGroups
      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: group_filter
          in: query
          required: false
          schema:
            enum:
              - all
              - all_pass
              - mixed
              - all_fail
            type: string
            default: all
            title: Group Filter
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 40
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: termination_reason
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Termination Reason
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingStepGroupsResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TrainingStepGroupsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TrainingStepGroupTrajectory'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
        training_run_id:
          type: string
          title: Training Run Id
        step:
          type: integer
          title: Step
      type: object
      required:
        - items
        - has_more
        - training_run_id
        - step
      title: TrainingStepGroupsResponse
    TrainingStepGroupTrajectory:
      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: >-
            Normalized status: the status column, falling back to
            ingestion_state; null when neither holds a known status.
        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.
        in_training_batch:
          type: boolean
          title: In Training Batch
          description: Whether the selected optimizer step actually consumed this rollout.
      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
        - in_training_batch
      title: TrainingStepGroupTrajectory
    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.