{
  "opencollection": "1.0.0",
  "info": {
    "name": "Portkey Analytics > Graphs Assistants API",
    "version": "2.0.0"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "x-portkey-api-key",
      "value": "{{x-portkey-api-key}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "Assistants",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Returns a list of assistants.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/assistants",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n"
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n"
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n"
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Returns a list of assistants."
        },
        {
          "info": {
            "name": "Create an assistant with a model and instructions.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/assistants",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create an assistant with a model and instructions."
        },
        {
          "info": {
            "name": "Retrieves an assistant.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/assistants/:assistant_id",
            "params": [
              {
                "name": "assistant_id",
                "value": "",
                "type": "path",
                "description": "The ID of the assistant to retrieve."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves an assistant."
        },
        {
          "info": {
            "name": "Modifies an assistant.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/assistants/:assistant_id",
            "params": [
              {
                "name": "assistant_id",
                "value": "",
                "type": "path",
                "description": "The ID of the assistant to modify."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Modifies an assistant."
        },
        {
          "info": {
            "name": "Delete an assistant.",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.portkey.ai/v1/assistants/:assistant_id",
            "params": [
              {
                "name": "assistant_id",
                "value": "",
                "type": "path",
                "description": "The ID of the assistant to delete."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Delete an assistant."
        },
        {
          "info": {
            "name": "Create a thread.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a thread."
        },
        {
          "info": {
            "name": "Retrieves a thread.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to retrieve."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves a thread."
        },
        {
          "info": {
            "name": "Modifies a thread.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to modify. Only the `metadata` can be modified."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Modifies a thread."
        },
        {
          "info": {
            "name": "Delete a thread.",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.portkey.ai/v1/threads/:thread_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to delete."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Delete a thread."
        },
        {
          "info": {
            "name": "Returns a list of messages for a given thread.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/messages",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong to."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n"
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n"
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n"
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n"
              },
              {
                "name": "run_id",
                "value": "",
                "type": "query",
                "description": "Filter messages by the run ID that generated them.\n"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Returns a list of messages for a given thread."
        },
        {
          "info": {
            "name": "Create a message.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/messages",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message for."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a message."
        },
        {
          "info": {
            "name": "Retrieve a message.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/messages/:message_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs."
              },
              {
                "name": "message_id",
                "value": "",
                "type": "path",
                "description": "The ID of the message to retrieve."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieve a message."
        },
        {
          "info": {
            "name": "Modifies a message.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/messages/:message_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to which this message belongs."
              },
              {
                "name": "message_id",
                "value": "",
                "type": "path",
                "description": "The ID of the message to modify."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Modifies a message."
        },
        {
          "info": {
            "name": "Deletes a message.",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/messages/:message_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to which this message belongs."
              },
              {
                "name": "message_id",
                "value": "",
                "type": "path",
                "description": "The ID of the message to delete."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Deletes a message."
        },
        {
          "info": {
            "name": "Create a thread and run it in one request.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/runs",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a thread and run it in one request."
        },
        {
          "info": {
            "name": "Returns a list of runs belonging to a thread.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread the run belongs to."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n"
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n"
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n"
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Returns a list of runs belonging to a thread."
        },
        {
          "info": {
            "name": "Create a run.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to run."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a run."
        },
        {
          "info": {
            "name": "Retrieves a run.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run to retrieve."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves a run."
        },
        {
          "info": {
            "name": "Modifies a run.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run to modify."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Modifies a run."
        },
        {
          "info": {
            "name": "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id/submit_tool_outputs",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run that requires the tool output submission."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n"
        },
        {
          "info": {
            "name": "Cancels a run that is `in_progress`.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id/cancel",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to which this run belongs."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run to cancel."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Cancels a run that is `in_progress`."
        },
        {
          "info": {
            "name": "Returns a list of run steps belonging to a run.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id/steps",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread the run and run steps belong to."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run the run steps belong to."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n"
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n"
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n"
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Returns a list of run steps belonging to a run."
        },
        {
          "info": {
            "name": "Retrieves a run step.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.portkey.ai/v1/threads/:thread_id/runs/:run_id/steps/:step_id",
            "params": [
              {
                "name": "thread_id",
                "value": "",
                "type": "path",
                "description": "The ID of the thread to which the run and run step belongs."
              },
              {
                "name": "run_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run to which the run step belongs."
              },
              {
                "name": "step_id",
                "value": "",
                "type": "path",
                "description": "The ID of the run step to retrieve."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-portkey-api-key",
              "value": "{{x-portkey-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves a run step."
        }
      ]
    }
  ],
  "bundled": true
}