Microsoft Azure · Schema

A run on a thread

Represents an execution run on a [thread](/docs/api-reference/threads).

API ManagementCloudCloud ComputingEnterpriseInfrastructure as a ServicePlatform as a ServiceT1

Properties

Name Type Description
id string The identifier, which can be referenced in API endpoints.
object string The object type, which is always `thread.run`.
created_at integer The Unix timestamp (in seconds) for when the run was created.
thread_id string The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.
assistant_id string The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.
status string The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.
required_action object Details on the action required to continue the run. Will be `null` if no action is required.
last_error object The last error associated with this run. Will be `null` if there are no errors.
expires_at integer The Unix timestamp (in seconds) for when the run will expire.
started_at integer The Unix timestamp (in seconds) for when the run was started.
cancelled_at integer The Unix timestamp (in seconds) for when the run was cancelled.
failed_at integer The Unix timestamp (in seconds) for when the run failed.
completed_at integer The Unix timestamp (in seconds) for when the run was completed.
model string The model that the [assistant](/docs/api-reference/assistants) used for this run.
instructions string The instructions that the [assistant](/docs/api-reference/assistants) used for this run.
tools array The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
file_ids array The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run.
metadata object Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long
View JSON Schema on GitHub

JSON Schema

microsoft-azure-runobject-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/runObject",
  "title": "A run on a thread",
  "type": "object",
  "description": "Represents an execution run on a [thread](/docs/api-reference/threads).",
  "properties": {
    "id": {
      "description": "The identifier, which can be referenced in API endpoints.",
      "type": "string"
    },
    "object": {
      "description": "The object type, which is always `thread.run`.",
      "type": "string",
      "enum": [
        "thread.run"
      ],
      "x-ms-enum": {
        "name": "runObjectType",
        "modelAsString": true,
        "values": [
          {
            "value": "thread.run",
            "description": "The run object type which is always thread.run"
          }
        ]
      }
    },
    "created_at": {
      "description": "The Unix timestamp (in seconds) for when the run was created.",
      "type": "integer"
    },
    "thread_id": {
      "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.",
      "type": "string"
    },
    "assistant_id": {
      "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.",
      "type": "string"
    },
    "status": {
      "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.",
      "type": "string",
      "enum": [
        "queued",
        "in_progress",
        "requires_action",
        "cancelling",
        "cancelled",
        "failed",
        "completed",
        "expired"
      ],
      "x-ms-enum": {
        "name": "RunObjectStatus",
        "modelAsString": true,
        "values": [
          {
            "value": "queued",
            "description": "The queued state"
          },
          {
            "value": "in_progress",
            "description": "The in_progress state"
          },
          {
            "value": "requires_action",
            "description": "The required_action state"
          },
          {
            "value": "cancelling",
            "description": "The cancelling state"
          },
          {
            "value": "cancelled",
            "description": "The cancelled state"
          },
          {
            "value": "failed",
            "description": "The failed state"
          },
          {
            "value": "completed",
            "description": "The completed state"
          },
          {
            "value": "expired",
            "description": "The expired state"
          }
        ]
      }
    },
    "required_action": {
      "type": "object",
      "description": "Details on the action required to continue the run. Will be `null` if no action is required.",
      "nullable": true,
      "properties": {
        "type": {
          "description": "For now, this is always `submit_tool_outputs`.",
          "type": "string",
          "enum": [
            "submit_tool_outputs"
          ]
        },
        "submit_tool_outputs": {
          "type": "object",
          "description": "Details on the tool outputs needed for this run to continue.",
          "properties": {
            "tool_calls": {
              "type": "array",
              "description": "A list of the relevant tool calls.",
              "items": {
                "$ref": "#/components/schemas/runToolCallObject"
              }
            }
          },
          "required": [
            "tool_calls"
          ]
        }
      },
      "required": [
        "type",
        "submit_tool_outputs"
      ]
    },
    "last_error": {
      "type": "object",
      "description": "The last error associated with this run. Will be `null` if there are no errors.",
      "nullable": true,
      "properties": {
        "code": {
          "type": "string",
          "description": "One of `server_error` or `rate_limit_exceeded`.",
          "enum": [
            "server_error",
            "rate_limit_exceeded"
          ],
          "x-ms-enum": {
            "name": "LastErrorCode",
            "modelAsString": true,
            "values": [
              {
                "value": "server_error",
                "description": "The server failed to respond to request due to server error"
              },
              {
                "value": "rate_limit_exceeded",
                "description": "The server failed to respond to request due to rate limit exceeded"
              }
            ]
          }
        },
        "message": {
          "type": "string",
          "description": "A human-readable description of the error."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "expires_at": {
      "description": "The Unix timestamp (in seconds) for when the run will expire.",
      "type": "integer"
    },
    "started_at": {
      "description": "The Unix timestamp (in seconds) for when the run was started.",
      "type": "integer",
      "nullable": true
    },
    "cancelled_at": {
      "description": "The Unix timestamp (in seconds) for when the run was cancelled.",
      "type": "integer",
      "nullable": true
    },
    "failed_at": {
      "description": "The Unix timestamp (in seconds) for when the run failed.",
      "type": "integer",
      "nullable": true
    },
    "completed_at": {
      "description": "The Unix timestamp (in seconds) for when the run was completed.",
      "type": "integer",
      "nullable": true
    },
    "model": {
      "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.",
      "type": "string"
    },
    "instructions": {
      "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.",
      "type": "string"
    },
    "tools": {
      "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.",
      "default": [],
      "type": "array",
      "maxItems": 20,
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/assistantToolsCode"
          },
          {
            "$ref": "#/components/schemas/assistantToolsRetrieval"
          },
          {
            "$ref": "#/components/schemas/assistantToolsFunction"
          }
        ]
      }
    },
    "file_ids": {
      "description": "The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run.",
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n",
      "type": "object",
      "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",
    "file_ids",
    "metadata"
  ]
}