Hyperflow HUB

↩ API Docs

Built-in AI Services APIs

Hyperflow comes with following built-in AI-powered services :

Assist

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
role
required
Predefined role used to run the AI service
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/assist \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "role": "order_management_assistant",
   "chat": "[ ]",
  "message": "One second please"
}
EOF
Responses
Response Code
200
Example of 200 response code
{
   "outputs": {
       "results": [
           {
               "message": "Of course, take your time. I'm here whenever you're ready to continue."
           }
       ],
       "execution_id": "5b883a64-d29f-41ff-a9ef-8307d8d15ceb"
   },
   "service": "assist",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}
Back to the top

Bullet points

Built-in service that generated bullet points for a given message or conversation in a specific language.

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
language
required
Input language
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/bullet_points \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "[ ]",
  "message": "The TV has a lot of different internet settings such as ethernet and wifi",
  "language": "fr-FR"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "bullet_points": "La télévision dispose de nombreux paramètres internet différents"
           },
           {
               "bullet_points": "Options telles que l'ethernet et le wifi sont disponibles"
           }
       ],
       "execution_id": "fa5498e3-22ed-4e6c-8994-36ccaecbe322"
   },
   "service": "bullet_points",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Localization

Built-in service that takes in consideration the cultural nuances, ambiguities in languages and idiomatic expressions to identify the language and idiomatic expressions to identify the language and geolocation of the input message.

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input conversation
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/localization \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "[ ]",
  "message": "Como puedo cancelar mi ultimo pedido"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "language": "es-ES"
           }
       ],
       "execution_id": "5a4b0e15-3f75-4bf1-b14c-82569600a542"
   },
   "service": "localization",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Built-in AI Service: Sentiment analysis

Built-in service that performs a detailed sentiment analysis on an input message

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input conversation
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/sentiment_analysis \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
   "chat":"",
   "message":"One second please"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "polarity": "neutral",
               "emotion": "neutral",
               "urgency": "not urgent",
               "interest": "not interested"
           }
       ],
       "execution_id": "fa20f641-c34e-41f4-acce-af1dd8299ff4"
   },
   "service": "sentiment_analysis",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Talk2data

Built-in service that provides insightful responses, tables, charts and customizable reports to user queries in native language

Inputs
Input body json payload
role
required
Predefined role used to run the AI service
chat
required
Input conversation (Optional)
message
required
Input conversation
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/talk2data \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "role": "order_management_assistant",
   "chat": [ ],
  "message": "Como puedo cancelar mi ultimo pedido"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
curl https://{{ tenant }}.lightenup.ai/aiservice/talk2data \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "role": "order_management_assistant",
   "chat": "[ ]",
  "message": "Como puedo cancelar mi ultimo pedido"
}
EOF
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}
Back to the top

Built-in AI Service: talk2document

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
document
required
Input document
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/talk2document \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Summarize the first section of the document,
   "document": "us_law_usc35_118_106"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "answer": "The first section of the document titled 'TITLE 35—PATENTS' primarily includes editorial notes and references to parts concerning the United States Patent and Trademark Office, examination of applications, patentability of inventions, grant of patents, patents and protection of patent rights, Patent Cooperation Treaty, and The Hague Agreement concerning international registration of industrial designs."
           }
       ],
       "sourceDocuments": [
           {
               "pageContent": "## PART I—UNITED STATES PATENT AND TRADEMARK OFFICE \n\n##### EDITORIAL NOTES",
               "metadata": {
                   "loc": {
                       "lines": {
                           "to": 272,
                           "from": 270
                       }
                   },
                   "type": "pdf",
                   "source": "/tmp/bmz1t.md",
                   "version": "bmz1t",
                   "data_source": "us_law_usc35_118_106",
                   "version_date": 1740913118789,
                   "data_source_id": "2e10a6b6-364f-4bc3-9956-65b220ac4f31"
               }
           },
           ...
           }
       ],
       "summary": "The first section of the document titled 'TITLE 35—PATENTS' contains editorial notes and references relevant to the United States Patent and Trademark Office, examining applications, the patentability of inventions, granting patents, protecting patent rights, Patent Cooperation Treaty, and The Hague Agreement related to international registration of industrial designs.",
       "execution_id": "de80127c-f959-4bf9-be80-ba21990d37e0"
   },
   "service": "talk2document",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Text fusion

Built-in service that combines two versions of a text or document into a final version.

Inputs
Input body json payload
text1
required
Input text 1
text2
required
Input text 2
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/text_fusion \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "text1": "Example text 1",
  "text2": "Example text 2"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "final_text": "Fusionamos el texto 1 junto con el texto 2."
           }
       ],
       "execution_id": "5f3096b5-6e6e-4651-9a7d-0d89e27e813e"
   },
   "service": "text_fusion",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Auto populate

Built-in service that populates an existing text by filling the gaps with dynamic data provided as input.

Inputs
Input body json payload
text
required
input text
input value
required
Input value
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/auto_populate \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "text": "Example of text for autopopulating {this}.",
  "this": "input1"
}


Responses
Response Code
200
Example of output for Response Code 200
curl https://{{ tenant }}.lightenup.ai/aiservice/auto_populate \
--request POST \
--header "Authorization: Bearer xyz" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "text": "Example of text for autopopulating {this}.",
  "this": "input1"
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Auto populate file

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
file
required
input file
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/auto_populate_file \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "file": "{filename}"
}


Responses
Response Code
200
Example of output for Response Code 200
curl https://{{ tenant }}.lightenup.ai/aiservice/auto_populate_file \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "file": "{filename}"
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Moderation

Built-in service that moderates a message or a chat conversation to identify and flag any toxic content.

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/moderation \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Their employee is stupid and useless."
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flagged": false,
               "sexual_score": 0.0008080193656496704,
               "hate_score": 0.00004539938527159393,
               "hate-threatening_score": 3.1266944233721006e-7,
               "harassment_score": 0.0002502103743609041,
               "harassment-threatening_score": 0.000007856332558731083,
               "self-harm_score": 0.000004336468464316567,
               "violence_score": 0.00014375659520737827
           }
       ],
       "execution_id": "4db3a116-5f04-4301-8fc7-ba681170ff37"
   },
   "service": "moderation",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       400,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Reputational risk

Built-in service that conducts a risk analysis check for the possibility of reputational risk at each interaction

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/reputational_risk \
--request POST \
--header "Authorization: Bearer {access_token]" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Como puedo cancelar mi ultimo pedido"
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flag": "0"
           }
       ],
       "execution_id": "fdd56a54-1f50-4242-a4c7-69fc89f9abbd"
   },
   "service": "reputational_risk",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Fraud risk

Built-in service that conducts a risk analysis and checks for any fraud risk.

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/fraud_risk \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "{message}"
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flag": "0"
           }
       ],
       "execution_id": "e8a640d9-e9ad-46fd-975e-3c77a5fc7f21"
   },
   "service": "fraud_risk",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Privacy risk

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/privacy_risk \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
   "chat":"",
   "message":"One second please"
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flag": "0"
           }
       ],
       "execution_id": "a5e90282-77ad-4f02-952c-1e47c7f3bd2d"
   },
   "service": "privacy_risk",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Security risk

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input message
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/security_risk \
--request POST \
--header "Authorization: Bearer xyz" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Como puedo cancelar mi ultimo pedido"
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flag": "0"
           }
       ],
       "execution_id": "a0af90c5-1cae-4ab9-812c-adae2b483be7"
   },
   "service": "security_risk",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top
REST API

Custom compliance risk

Built-in service that conducts a compliance check for the possibility of breaking any company rules.

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input conversation
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/custom_compliance_risk \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Como puedo cancelar mi ultimo pedido"
}


Responses
Response Code
200
Example of output for Response Code 200
curl https://{{ tenant }}.lightenup.ai/aiservice/custom_compliance_risk \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Como puedo cancelar mi ultimo pedido"
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Churn risk

Built-in service that returns answers according to your data and policies

Inputs
Input body json payload
chat
required
Input conversation (Optional)
message
required
Input conversation
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/churn_risk \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "chat": "",
  "message": "Como puedo cancelar mi ultimo pedido"
}


Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "flag": "0"
           }
       ],
       "execution_id": "326d55d5-134a-4965-8408-09a2cd85d6b6"
   },
   "service": "churn_risk",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top
REST API

Context audit quality

Built-in service evaluates the quality of the interactions and returns the quality metrics.

Inputs
Input body json payload
execution_id
required
Input execution Id
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/context_audit_quality \
--request POST \
--header "Authorization: {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "execution_id": "ce23b160-9485-4f81-92b7-76263ee50336",
}
EOF

Responses
Response Code
200
Example of output for Response Code 200
{
   "outputs": {
       "results": [
           {
               "precision": "1",
               "relevancy": "1"
           }
       ],
       "execution_id": "ce23b160-9485-4f81-92b7-76263ee50336"
   },
   "service": "context_audit_quality",
   "service_type": "ai_services",
   "websocket": {}
}
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top

Sensitive data anonymizer

Built-in service that anonymizes the input data.

Inputs
Input body json payload
message
required
Input message
sensitive_type
required
Input sensitive type (uuid, creditCard, ssn, url, ipv4, email,
passwordSubstring, password, passwordInUri, passwordMention)
Example of Rest API Call
curl https://{{ tenant }}.lightenup.ai/aiservice/sensitive_data_anonymizer \
--request POST \
--header "Authorization: Bearer {access_token}" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "message": "My name is Jhon Doe and my email is jhon.doe@mail.com",
  "sensitive_type": "mail"
}
EOF


Responses
Response Code
200
Example of output for Response Code 200
"{\"outputs\":[{\"message\":\"My email is jo*************om\"}]}"
Response Code
400
Example of 400 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Missing parameters"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Missing parameters"}
}
Response Code
500
Example of 500 error
{      
       headers: {
           'Content-Type': 'application/json',
           'Access-Control-Allow-Headers': '*',
           'Access-Control-Allow-Methods': allowMethods,
          'Access-Control-Allow-Origin': GLOBALS.CORS_ORIGIN,
           'Access-Control-Allow-Credentials': true
       },
       500,
      {"message":"Internal server: error processing intake step"},
      Error: "CustomError",
      Cause: {"errorType": "CustomError", "errorMessage": "Internal server: error
processing intake step"}
}

Back to the top