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

# Set Trace Capture



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json put /api/v1/inference/trace-capture
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/inference/trace-capture:
    put:
      tags:
        - inference
      summary: Set Trace Capture
      operationId: set_trace_capture_api_v1_inference_trace_capture_put
      parameters:
        - name: teamId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            title: Teamid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TraceCaptureUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceCaptureRoute'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    TraceCaptureUpdate:
      properties:
        model:
          type: string
          maxLength: 512
          minLength: 1
          title: Model
        enabled:
          type: boolean
          title: Enabled
      additionalProperties: false
      type: object
      required:
        - model
        - enabled
      title: TraceCaptureUpdate
    TraceCaptureRoute:
      properties:
        model:
          type: string
          title: Model
        name:
          type: string
          title: Name
        run_id:
          type: string
          title: Run Id
        enabled:
          type: boolean
          title: Enabled
        active:
          type: boolean
          title: Active
        inactive_reason:
          anyOf:
            - $ref: '#/components/schemas/TraceCaptureInactiveReason'
            - type: 'null'
      type: object
      required:
        - model
        - name
        - run_id
        - enabled
        - active
      title: TraceCaptureRoute
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    TraceCaptureInactiveReason:
      type: string
      enum:
        - privacy_opt_out
        - storage_limit
        - enabler_unflagged
      title: TraceCaptureInactiveReason
      description: >-
        Why an enabled route retains nothing. Every value must be a condition

        build_policy itself honours, so the state a route reports and the state
        the

        gateway acts on cannot drift apart.
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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