> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-docs-prisma-airs-updates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List run steps



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml get /threads/{thread_id}/runs/{run_id}/steps
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /threads/{thread_id}/runs/{run_id}/steps:
    get:
      tags:
        - Assistants
      operationId: listRunSteps
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            type: string
        - in: path
          name: run_id
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
        - name: order
          in: query
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
        - name: after
          in: query
          schema:
            type: string
        - name: before
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRunStepsResponse'
components:
  schemas:
    ListRunStepsResponse:
      properties:
        object:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/RunStepObject'
        first_id:
          type: string
        last_id:
          type: string
        has_more:
          type: boolean
      required:
        - object
        - data
        - first_id
        - last_id
        - has_more
    RunStepObject:
      type: object
      title: Run steps
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - thread.run.step
        created_at:
          type: integer
        assistant_id:
          type: string
        thread_id:
          type: string
        run_id:
          type: string
        type:
          type: string
          enum:
            - message_creation
            - tool_calls
        status:
          type: string
          enum:
            - in_progress
            - cancelled
            - failed
            - completed
            - expired
        step_details:
          type: object
          oneOf:
            - $ref: '#/components/schemas/RunStepDetailsMessageCreationObject'
            - $ref: '#/components/schemas/RunStepDetailsToolCallsObject'
          x-oaiExpandable: true
        last_error:
          type: object
          nullable: true
          properties:
            code:
              type: string
              enum:
                - server_error
                - rate_limit_exceeded
            message:
              type: string
          required:
            - code
            - message
        expired_at:
          type: integer
          nullable: true
        cancelled_at:
          type: integer
          nullable: true
        failed_at:
          type: integer
          nullable: true
        completed_at:
          type: integer
          nullable: true
        metadata:
          type: object
          x-oaiTypeLabel: map
          nullable: true
        usage:
          $ref: '#/components/schemas/RunStepCompletionUsage'
      required:
        - id
        - object
        - created_at
        - assistant_id
        - thread_id
        - run_id
        - type
        - status
        - step_details
        - last_error
        - expired_at
        - cancelled_at
        - failed_at
        - completed_at
        - metadata
        - usage
    RunStepDetailsMessageCreationObject:
      title: Message creation
      type: object
      properties:
        type:
          type: string
          enum:
            - message_creation
        message_creation:
          type: object
          properties:
            message_id:
              type: string
          required:
            - message_id
      required:
        - type
        - message_creation
    RunStepDetailsToolCallsObject:
      title: Tool calls
      type: object
      properties:
        type:
          type: string
          enum:
            - tool_calls
        tool_calls:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RunStepDetailsToolCallsCodeObject'
              - $ref: '#/components/schemas/RunStepDetailsToolCallsFileSearchObject'
              - $ref: '#/components/schemas/RunStepDetailsToolCallsFunctionObject'
            x-oaiExpandable: true
      required:
        - type
        - tool_calls
    RunStepCompletionUsage:
      type: object
      properties:
        completion_tokens:
          type: integer
        prompt_tokens:
          type: integer
        total_tokens:
          type: integer
      required:
        - prompt_tokens
        - completion_tokens
        - total_tokens
      nullable: true
    RunStepDetailsToolCallsCodeObject:
      title: Code Interpreter tool call
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - code_interpreter
        code_interpreter:
          type: object
          required:
            - input
            - outputs
          properties:
            input:
              type: string
            outputs:
              type: array
              items:
                type: object
                oneOf:
                  - $ref: >-
                      #/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject
                  - $ref: >-
                      #/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject
                x-oaiExpandable: true
      required:
        - id
        - type
        - code_interpreter
    RunStepDetailsToolCallsFileSearchObject:
      title: File search tool call
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - file_search
        file_search:
          type: object
          x-oaiTypeLabel: map
      required:
        - id
        - type
        - file_search
    RunStepDetailsToolCallsFunctionObject:
      type: object
      title: Function tool call
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
            output:
              type: string
              nullable: true
          required:
            - name
            - arguments
            - output
      required:
        - id
        - type
        - function
    RunStepDetailsToolCallsCodeOutputLogsObject:
      title: Code Interpreter log output
      type: object
      properties:
        type:
          type: string
          enum:
            - logs
        logs:
          type: string
      required:
        - type
        - logs
    RunStepDetailsToolCallsCodeOutputImageObject:
      title: Code Interpreter image output
      type: object
      properties:
        type:
          type: string
          enum:
            - image
        image:
          type: object
          properties:
            file_id:
              type: string
          required:
            - file_id
      required:
        - type
        - image
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````