Skip to main content

Overview

Generates a smart reply.

Request

Authentication: Add authentication headers to the request. See Authentication

Method: POST

Rate limit: 100 requests/second

Endpoint: https://API domain/jim/assistants/answer

Content-Type: application/json

Request parameters

ParameterData typeRequiredDescription
conver_idstringYesconversationid
channel_typeintYesConversation type: 1 for private chat; 2 for group chat.
prompt_idstringNoPrompt ID
msgsarrayNoThe latest n messages in the conversation.

Request example

POST /jim/assistants/answer HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json

{
"conver_id":"xx",
"channel_type":1,
"prompt_id":"xxx",
"msgs":[
{
"sender_id":"xx",
"content":"xxxxx",
"msg_time":1741234567893
}
]
}

Response example

{
"code":0,
"msg":"sucess",
"data":{
"answer":"xxxxxxxxx"
}
}

Response codes

Response codesDescription