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

# Get run



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml get /threads/{thread_id}/runs/{run_id}
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}:
    get:
      tags:
        - Assistants
      operationId: getRun
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            type: string
        - in: path
          name: run_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunObject'
components:
  schemas:
    RunObject:
      type: object
      title: A run on a thread
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - thread.run
        created_at:
          type: integer
        thread_id:
          type: string
        assistant_id:
          type: string
        status:
          type: string
          enum:
            - queued
            - in_progress
            - requires_action
            - cancelling
            - cancelled
            - failed
            - completed
            - incomplete
            - expired
        required_action:
          type: object
          nullable: true
          properties:
            type:
              type: string
              enum:
                - submit_tool_outputs
            submit_tool_outputs:
              type: object
              properties:
                tool_calls:
                  type: array
                  items:
                    $ref: '#/components/schemas/RunToolCallObject'
              required:
                - tool_calls
          required:
            - type
            - submit_tool_outputs
        last_error:
          type: object
          nullable: true
          properties:
            code:
              type: string
              enum:
                - server_error
                - rate_limit_exceeded
                - invalid_prompt
            message:
              type: string
          required:
            - code
            - message
        expires_at:
          type: integer
          nullable: true
        started_at:
          type: integer
          nullable: true
        cancelled_at:
          type: integer
          nullable: true
        failed_at:
          type: integer
          nullable: true
        completed_at:
          type: integer
          nullable: true
        incomplete_details:
          type: object
          nullable: true
          properties:
            reason:
              type: string
              enum:
                - max_completion_tokens
                - max_prompt_tokens
        model:
          type: string
        instructions:
          type: string
        tools:
          default: []
          type: array
          maxItems: 20
          items:
            oneOf:
              - $ref: '#/components/schemas/AssistantToolsCode'
              - $ref: '#/components/schemas/AssistantToolsFileSearch'
              - $ref: '#/components/schemas/AssistantToolsFunction'
            x-oaiExpandable: true
        metadata:
          type: object
          x-oaiTypeLabel: map
          nullable: true
        usage:
          $ref: '#/components/schemas/RunCompletionUsage'
        temperature:
          type: number
          nullable: true
        top_p:
          type: number
          nullable: true
        max_prompt_tokens:
          type: integer
          nullable: true
          minimum: 256
        max_completion_tokens:
          type: integer
          nullable: true
          minimum: 256
        truncation_strategy:
          $ref: '#/components/schemas/TruncationObject'
          nullable: true
        tool_choice:
          $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
          nullable: true
        parallel_tool_calls:
          $ref: '#/components/schemas/ParallelToolCalls'
        response_format:
          $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
          nullable: true
      required:
        - id
        - object
        - created_at
        - thread_id
        - assistant_id
        - status
        - required_action
        - last_error
        - expires_at
        - started_at
        - cancelled_at
        - failed_at
        - completed_at
        - model
        - instructions
        - tools
        - metadata
        - usage
        - incomplete_details
        - max_prompt_tokens
        - max_completion_tokens
        - truncation_strategy
        - tool_choice
        - parallel_tool_calls
        - response_format
    RunToolCallObject:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          required:
            - name
            - arguments
      required:
        - id
        - type
        - function
    AssistantToolsCode:
      type: object
      title: Code interpreter tool
      properties:
        type:
          type: string
          enum:
            - code_interpreter
      required:
        - type
    AssistantToolsFileSearch:
      type: object
      title: FileSearch tool
      properties:
        type:
          type: string
          enum:
            - file_search
        file_search:
          type: object
          properties:
            max_num_results:
              type: integer
              minimum: 1
              maximum: 50
      required:
        - type
    AssistantToolsFunction:
      type: object
      title: Function tool
      properties:
        type:
          type: string
          enum:
            - function
        function:
          $ref: '#/components/schemas/FunctionObject'
      required:
        - type
        - function
    RunCompletionUsage:
      type: object
      properties:
        completion_tokens:
          type: integer
        prompt_tokens:
          type: integer
        total_tokens:
          type: integer
      required:
        - prompt_tokens
        - completion_tokens
        - total_tokens
      nullable: true
    TruncationObject:
      type: object
      title: Thread Truncation Controls
      properties:
        type:
          type: string
          enum:
            - auto
            - last_messages
        last_messages:
          type: integer
          minimum: 1
          nullable: true
      required:
        - type
    AssistantsApiToolChoiceOption:
      oneOf:
        - type: string
          enum:
            - none
            - auto
            - required
        - $ref: '#/components/schemas/AssistantsNamedToolChoice'
      x-oaiExpandable: true
    ParallelToolCalls:
      type: boolean
      default: true
    AssistantsApiResponseFormatOption:
      oneOf:
        - type: string
          enum:
            - none
            - auto
        - $ref: '#/components/schemas/AssistantsApiResponseFormat'
      x-oaiExpandable: true
    FunctionObject:
      type: object
      properties:
        description:
          type: string
        name:
          type: string
        parameters:
          $ref: '#/components/schemas/FunctionParameters'
        strict:
          type: boolean
          default: false
          nullable: true
      required:
        - name
    AssistantsNamedToolChoice:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
            - code_interpreter
            - file_search
        function:
          type: object
          properties:
            name:
              type: string
          required:
            - name
      required:
        - type
    AssistantsApiResponseFormat:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
            - json_object
          default: text
    FunctionParameters:
      type: object
      additionalProperties: true
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````