Ai chat

Get a chat with paginated message history

GET/ai/chats/{ref}

Returns the chat with a slice of its messages. By default the latest 100 messages are returned (oldest-to-newest within the slice). For long chats use limit/offset to page; total length is reported as messageCount.

X-Api-Key<token>

Issued to you when your integration is provisioned. Determines which catalogue resources are visible and which AI tools are available.

In: header

Path Parameters

ref*integer

Query Parameters

limit?integer

Maximum messages to return.

Range1 <= value <= 500
Default100
offset?integer

Zero-based offset into the messages array.

Range0 <= value
Default0

Response Body

application/json

application/json

curl -X GET "https://example.com/ai/chats/0"
{  "data": {    "ref": 0,    "name": "string",    "created": "string",    "messages": [      {        "role": "user",        "content": "string",        "model": "string",        "images_path": [          "string"        ],        "reasoning": "string"      }    ],    "messageCount": 0,    "limit": 0,    "offset": 0,    "userMessageCount": 0  }}
{  "success": false,  "status": "fail",  "message": "string",  "error": {    "message": "API key is required",    "code": "NO_API_KEY"  }}