API Documentation
- Introduction
- API Keys
- Errors
- Prompts
- Conversations
- Conversations Overview
- GETGet All Conversations
- POSTCreate a General Conversation
- POSTCreate a Persona Conversation
- GETGet All Conversations with a Persona
- GETGet User Conversations
- PATCHContinue (HTTP/2 Streaming)
- PATCHContinue (SSE Streaming)
- PATCHContinue Chat
- GETGet Specific Conversation
- PATCHSet Conversation as Active
- PATCHSet Conversation's Metadata
- PATCHSet Conversation's Name
- PATCHSet Conversation's Status
- Capture Feedback
- Audit Report
- Feedback Report
- Moderations
Conversations
Create a Persona Conversation
Start a Conversation with a Persona.
POST
/
conversations
/
persona
curl --request POST \
--url https://api.hyperleapai.com/conversations/persona \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"personaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"metadata": {},
"stream": true,
"externalUserId": "<string>"
}'
{
"conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"aiSystem": "<string>",
"model": "<string>",
"personaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationStatus": "<string>",
"conversationName": "<string>",
"chatMessages": [
{
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"feedbacks": [
{
"feedbackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"score": 0,
"comments": "<string>",
"tags": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z",
"scoreConfidence": 0.5
}
],
"promptTokens": 123,
"completionTokens": 123,
"totalTokens": 123,
"conversationRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"chatMessagesCount": 123,
"chatStarted": true,
"areChatMessagesInBlob": true,
"chatMessagesBlobUri": "<string>",
"configuration": {},
"metadata": {},
"externalUserId": "<string>",
"isActive": true,
"isDeleted": true,
"promptTokens": 123,
"completionTokens": 123,
"totalTokens": 123
}
Authorizations
API Key for authentication
Body
Response
200
text/plain
OK
The response is of type object
.
curl --request POST \
--url https://api.hyperleapai.com/conversations/persona \
--header 'Content-Type: application/json' \
--header 'x-hl-api-key: <api-key>' \
--data '{
"personaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replacements": {},
"metadata": {},
"stream": true,
"externalUserId": "<string>"
}'
{
"conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"aiSystem": "<string>",
"model": "<string>",
"personaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationStatus": "<string>",
"conversationName": "<string>",
"chatMessages": [
{
"role": "<string>",
"content": "<string>",
"toolCallId": "<string>",
"name": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"feedbacks": [
{
"feedbackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"score": 0,
"comments": "<string>",
"tags": [
"<string>"
],
"timestamp": "2023-11-07T05:31:56Z",
"scoreConfidence": 0.5
}
],
"promptTokens": 123,
"completionTokens": 123,
"totalTokens": 123,
"conversationRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"chatMessagesCount": 123,
"chatStarted": true,
"areChatMessagesInBlob": true,
"chatMessagesBlobUri": "<string>",
"configuration": {},
"metadata": {},
"externalUserId": "<string>",
"isActive": true,
"isDeleted": true,
"promptTokens": 123,
"completionTokens": 123,
"totalTokens": 123
}
Assistant
Responses are generated using AI and may contain mistakes.