Get thread messages

Retrieve the messages of a specific thread, including the thread title and message content with processed citations and file references. An assistant message carrying interrupted holds only the text produced before its turn ended without delivering a reply. A long thread returns its newest messages only, with truncated set. Messages sent with files carry attachments.

get/v1/threads/{threadId}/messages

Request

  • Base URL
    https://api.runbear.io
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

threadIdstring uuid required

ID of the thread to retrieve messages from

Example:0fade940-133f-49e6-bf4b-8f662186479b

Response

Default Response

truncatedboolean required

True when the thread holds more messages than were returned. The response carries the NEWEST messages, so the omitted ones are the oldest.

Example response

{
  "thread": {
    "id": "0fade940-133f-49e6-bf4b-8f662186479b",
    "assistantId": "08f1c3b3-f43b-41e6-8288-d438e98eea28"
  },
  "messages": [
    {
      "role": "assistant",
      "content": "I'd be happy to help you write a business plan. A comprehensive business plan typically includes several key sections...",
      "id": "msg_a1b2c3d4",
      "traceId": "4bf92f3577b34da6a3ce929d0e0e4736"
    },
    {
      "role": "user",
      "content": "Can you help me write a business plan?",
      "id": "msg_e5f6g7h8",
      "traceId": null
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.