v1

latestOpenAPI 3.0.02026-07-174565114.3 KB
threads

post/threads/{id}/messages

Path parameters

idstring required

Request body

reasoningstring[]

Reasoning text from the LLM, if the model supports it.

reasoningDurationMSnumber

Duration of reasoning in milliseconds

metadataobject
actionType'tool_call' | 'tool_response'

No longer used - instead set role and the tool call information

errorstring
isCancelledboolean

Whether the message has been cancelled

toolResponseobject

@deprecated Put the response in the content instead

componentStateobject

The initial state of the component

additionalContextobject

Additional context to provide to the AI beyond the user query, such as the info about the current page the user is visiting.

role'user' | 'assistant' | 'system' | 'tool' required
tool_call_idstring

Example request

{
  "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

object required