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

# Get Traces

> Use this endpoint to get the list of traces.



## OpenAPI

````yaml GET /api/v1/traces
openapi: 3.1.0
info:
  version: 0.0.1
  title: Prem Studio API
  description: Studio autofinetuning agent API
servers:
  - url: http://studio.premai.io
    description: Current environment
  - url: https://studio.premai.io
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/traces:
    get:
      tags:
        - Traces
      description: Get trace with feedback list
      operationId: traces.list
      parameters:
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            default: 1
            description: Page number to retrieve. Page size is fixed.
          required: false
          description: Page number to retrieve. Page size is fixed.
          name: page
          in: query
        - schema:
            type: string
            description: Comma separated list of model IDs or aliases to filter traces.
          required: false
          description: Comma separated list of model IDs or aliases to filter traces.
          name: modelIds
          in: query
        - schema:
            type: string
            format: uuid
            description: Project identifier to filter traces.
          required: false
          description: Project identifier to filter traces.
          name: projectId
          in: query
        - schema:
            type: string
            enum:
              - createdAt
              - score
            default: createdAt
            description: Sort traces by creation time or score.
          required: false
          description: Sort traces by creation time or score.
          name: sortBy
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: Sort order to use for the selected sortBy field.
          required: false
          description: Sort order to use for the selected sortBy field.
          name: sortOrder
          in: query
      responses:
        '200':
          description: success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceListResponse'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TraceListResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Trace'
        total:
          type: integer
          description: >-
            Total number of traces that match the current filters, across all
            pages.
      required:
        - results
        - total
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    Trace:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique trace identifier.
        createdAt:
          type: string
          format: date-time
          description: ISO timestamp representing when the trace was recorded.
        modelId:
          type: string
          description: Model identifier attached to the trace.
        projectId:
          type: string
          nullable: true
          format: uuid
          description: Project identifier, null when the trace is not linked to a project.
        input:
          type: string
          description: Prompt or message provided to the model.
        output:
          type: string
          description: Model response captured for the trace.
        score:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          description: Score between 0 and 1. Null when the trace has not been scored yet.
        feedback:
          type: string
          nullable: true
          maxLength: 2048
          description: Feedback provided for the trace.
        addedToDataset:
          type: boolean
          description: Flag indicating whether the trace is already in the dataset.
        processingStatus:
          type: string
          enum:
            - none
            - processing
            - failed
          description: >-
            Background processing status used when generating improved
            datapoints.
      required:
        - id
        - createdAt
        - modelId
        - projectId
        - input
        - output
        - score
        - feedback
        - addedToDataset
        - processingStatus
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````