List Chats
GET
/v1/chats
const url = 'https://api.cloud.agentums.ru/v1/chats';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.cloud.agentums.ru/v1/chats \ --header 'Authorization: Bearer <token>'История разговоров: /ask, /chat и агент пишут в неё общий список.
kind показывает, чем сессия велась; у агентных (kind == "agent") идентификатор
можно вернуть в /agent/chat как session_id и продолжить с того же места.
Превью последней реплики вторично: если оно не собралось, список всё равно придёт —
просто без превью.
Authorizations
Заголовок раздела «Authorizations»Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
ChatSessionList
object
items
Items
Array<object>
ChatSessionOuttotal
Total
integer
Example
{ "items": [ { "kind": "ask", "last_file": "", "pinned": false, "preview": "" } ], "total": 0}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}