All Products
Search
Document Center

Data Management:GetChatContent

Last Updated:Dec 09, 2025

Retrieves chat content from a specific checkpoint by specifying a session ID and an agent ID.

Operation description

Request description

  • The response is returned as a Server-Sent Events (SSE) stream. Each event follows the SSEEvent pattern and includes metadata about the message level.

  • The content field in each SSE event may contain the actual message text or a JSON object, depending on the value of the content_type field.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/chat/stream HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

DMSUnit

string

No

The DMS unit. For users on the Alibaba Cloud China site, the default value is cn-hangzhou.

cn-hangzhou

SessionId

string

No

The session ID. This parameter is required.

sess_12345

AgentId

string

No

The agent ID. This parameter is required.

xxxx-xxxx-xxxx

Checkpoint

string

No

The backend returns output starting from this checkpoint.

0

Response elements

Element

Type

Description

Example

object

Each data object in the SSE response stream conforms to this JSON structure.

content

string

The message content.

Data understanding completed.

event_type

string

The type of the message. This is used to distinguish between control characters and specific messages. For example, CHAT_START indicates the beginning of an agent's reply, and CHAT_FINISH indicates the end. DATA indicates a message that contains content. DELTA indicates a part of an incremental output message.

DATA

content_type

string

The type of the content field. Possible values: [str, json]. When the value is json, the content field can then be parsed as a JSON structure.

str

checkpoint

integer

The checkpoint value.

0

level

integer

The output level of the message. A higher level indicates greater importance.

20

category

string

The category of the message. This helps parse content in JSON format. For example, `PLAN indicates that the message displays an execution plan and conforms to the execution plan schema.

PLAN

Examples

Success response

JSON format

{
  "content": "Data understanding completed.",
  "event_type": "DATA",
  "content_type": "str",
  "checkpoint": 0,
  "level": 20,
  "category": "PLAN"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.