v1

latestOpenAPI 3.0.02026-07-174565114.3 KB
threads

DEPRECATED - Advance a thread (non-streaming)

This endpoint has been deprecated. Use POST /:id/advancestream instead.

post/threads/{id}/advance

Path parameters

idstring required
Example:thr_123.456

Id of an existing thread to advance

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"
        }
      }
    ]
  }
}

Response

statusMessagestring

Status message for the generation stage

mcpAccessTokenstring

MCP access token to be used as bearer token when talking to the Tambo MCP server. Only included when MCP servers are configured for the project.

generationStage'IDLE' | 'CHOOSING_COMPONENT' | 'FETCHING_CONTEXT' | 'HYDRATING_COMPONENT' | 'STREAMING_RESPONSE' | 'COMPLETE' | 'ERROR' | 'CANCELLED' required

Example response

{
  "responseMessageDto": {
    "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"
        }
      }
    ]
  },
  "statusMessage": "Streaming response...",
  "mcpAccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}