PATCH
https://api.hyperleapai.com/conversations/{conversationId}/chatSend a user message and continue an existing Conversation. Full response will be sent at once (not recommended especially for longer responses).
Authenticated with your API key in the x-hl-api-key request header.
Path parameters
conversationIdstring · uuidrequiredQuery parameters
streambooleanoptionaldefault trueRequest body
application/jsonmessagestringrequiredResponses
200OK
application/jsonidstringnullableobjectstringnullableGenAiUsage
prompt_tokensinteger · int32completion_tokensinteger · int32total_tokensinteger · int32read-onlycreatedinteger · int64nullableGenAiChatChoice[]nullable
finish_reasonstringnullableindexinteger · int32GenAiChatMessage
GenAiContentModerationResult
messageIdstring · uuidrunIdstring · uuidnullablehttpRequestIdstring · uuidCitation[]nullable
linkstringnullableindexstringnullabledocumentIdstringnullablefileIdstringnullablesourceContentTypestringnullablesourceNamestringnullablesourceUrlstringnullablePartition[]nullable
GenAiContentModerationResult
GenAiContentModerationCategoryResult[]nullableread-only
Example payload
{
"id": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
},
"created": 0,
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"role": "string",
"content": "string",
"toolCallId": "string",
"name": "string"
},
"moderation_results": {
"categoryResults": []
}
}
],
"messageId": "string",
"runId": "string",
"httpRequestId": "string",
"citations": [
{
"link": "string",
"index": "string",
"documentId": "string",
"fileId": "string",
"sourceContentType": "string",
"sourceName": "string",
"sourceUrl": "string",
"partitions": [
{
"text": null,
"tags": null
}
]
}
],
"prompt_moderations": {
"categoryResults": [
{
"category": "string",
"filtered": true,
"severity": "string"
}
]
}
}{
"id": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
},
"created": 0,
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"role": "string",
"content": "string",
"toolCallId": "string",
"name": "string"
},
"moderation_results": {
"categoryResults": []
}
}
],
"messageId": "string",
"runId": "string",
"httpRequestId": "string",
"citations": [
{
"link": "string",
"index": "string",
"documentId": "string",
"fileId": "string",
"sourceContentType": "string",
"sourceName": "string",
"sourceUrl": "string",
"partitions": [
{
"text": null,
"tags": null
}
]
}
],
"prompt_moderations": {
"categoryResults": [
{
"category": "string",
"filtered": true,
"severity": "string"
}
]
}
}400Bad Request
application/jsonArray of ModelError
Exception
MethodBase
messageanytruncateddataanytruncatedinnerExceptionanytruncatedhelpLinkanytruncatedsourceanytruncatedhResultanytruncatedstackTraceanytruncatederrorMessageanytruncatedExample payload
[
{
"exception": {
"targetSite": {
"memberType": 1,
"name": "string",
"declaringType": {
"name": null,
"customAttributes": null,
"namespace": null,
"assemblyQualifiedName": null,
"fullName": null
}
}
}
}
][
{
"exception": {
"targetSite": {
"memberType": 1,
"name": "string",
"declaringType": {
"name": null,
"customAttributes": null,
"namespace": null,
"assemblyQualifiedName": null,
"fullName": null
}
}
}
}
]500Internal Server Error
No response body.
curl -X PATCH "https://api.hyperleapai.com/conversations/{conversationId}/chat?stream=true" \
-H "x-hl-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "string"
}'curl -X PATCH "https://api.hyperleapai.com/conversations/{conversationId}/chat?stream=true" \
-H "x-hl-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "string"
}'Example response · 200
{
"id": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
},
"created": 0,
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"role": "string",
"content": "string",
"toolCallId": "string",
"name": "string"
},
"moderation_results": {
"categoryResults": []
}
}
],
"messageId": "string",
"runId": "string",
"httpRequestId": "string",
"citations": [
{
"link": "string",
"index": "string",
"documentId": "string",
"fileId": "string",
"sourceContentType": "string",
"sourceName": "string",
"sourceUrl": "string",
"partitions": [
{
"text": null,
"tags": null
}
]
}
],
"prompt_moderations": {
"categoryResults": [
{
"category": "string",
"filtered": true,
"severity": "string"
}
]
}
}{
"id": "string",
"object": "string",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
},
"created": 0,
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {
"role": "string",
"content": "string",
"toolCallId": "string",
"name": "string"
},
"moderation_results": {
"categoryResults": []
}
}
],
"messageId": "string",
"runId": "string",
"httpRequestId": "string",
"citations": [
{
"link": "string",
"index": "string",
"documentId": "string",
"fileId": "string",
"sourceContentType": "string",
"sourceName": "string",
"sourceUrl": "string",
"partitions": [
{
"text": null,
"tags": null
}
]
}
],
"prompt_moderations": {
"categoryResults": [
{
"category": "string",
"filtered": true,
"severity": "string"
}
]
}
}