Skip to main content
GET
/
v2
/
messages
/
{message_id}
Get Message (v2 - UIMessage format)
curl --request GET \
  --url https://api.example.com/v2/messages/{message_id}
{
  "createdAt": "2024-01-01T00:00:00Z",
  "id": "msg_01ABC",
  "parts": [
    {
      "text": "Hello, how can I help?",
      "type": "text"
    }
  ],
  "role": "assistant"
}

Documentation Index

Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

message_id
string
required

Query Parameters

task_id
string
required

The task ID

Response

UIMessage · object | null

Successful Response

Vercel AI SDK compatible message format.

Based on: https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message with extensions for our use case.

id
string
required

Unique message ID

parts
(TextPart · object | ReasoningPart · object | ToolPart · object | SourceUrlPart · object | FilePart · object | DataPart · object | ErrorPart · object)[]
required

Content parts of the message

Minimum array length: 1

Text content part.

role
enum<string>
required

Role of the message author

Available options:
system,
user,
assistant
createdAt
string | null

ISO timestamp when created

metadata
UIMessageMetadata · object

Message metadata