v1

latestOpenAPI 3.0.02026-07-174565114.3 KB
threads

Create and advance a thread stream

Creates a new thread and advances it, and streams the response message(s)

post/threads/advancestream

Request body

contextKeystring

Unique user identifier for the thread

toolCallCountsobject

Tool call counts

forceToolChoicestring

Example request

{
  "toolCallCounts": {
    "tool_name": 1
  },
  "initialMessages": [
    {
      "content": [
        {
          "resource": {
            "uri": "file:///path/to/document.pdf",
            "name": "project-documentation.pdf",
            "description": "Project documentation for Q4 2024",
            "mimeType": "application/pdf",
            "text": "The contents of the document...",
            "blob": "SGVsbG8gV29ybGQh"
          }
        }
      ]
    }
  ],
  "messageToAppend": {
    "content": [
      {
        "resource": {
          "uri": "file:///path/to/document.pdf",
          "name": "project-documentation.pdf",
          "description": "Project documentation for Q4 2024",
          "mimeType": "application/pdf",
          "text": "The contents of the document...",
          "blob": "SGVsbG8gV29ybGQh"
        }
      }
    ]
  }
}