Skip to main content

Get Chat Endpoint

Overview

The Get Chat endpoint helps to get all conversation for a perticular chat_id.

Request

--request POST 'https://modelslab.com/api/v6/llm/get_chat' \

Make a POST request to https://modelslab.com/api/v6/llm/get_chat endpoint and pass the required parameters in the request body.

Body Attributes

ParameterDescriptionValues
keyYour API Key used for request authorization.string
chat_idID of the chat you want to retrieve. All metadata of your chat will be returned.id
tempWhether or not to send proxy links. Should be true or false. Defaults to false.true or false (Default: false)

Example

Body

Body
{
"key": "",
"chat_id" : "49afc793-803b-4b4a-bac9-d2f9318c2b8f",
"temp" : false
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"chat_id" : "49afc793-803b-4b4a-bac9-d2f9318c2b8f",
"temp" : false
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v6/llm/get_chat", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

Example Response
{
"status": "success",
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/chats/49afc793-803b-4b4a-bac9-d2f9318c2b8f.json"
],
"message": "",
"chat_id": "49afc793-803b-4b4a-bac9-d2f9318c2b8f",
"meta": {
"chat_id": "49afc793-803b-4b4a-bac9-d2f9318c2b8f",
"temp": "no"
}
}