NLU Query API

The over.ai API conforms to REST protocol. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.

We allow the client to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website’s client-side code). All API responses return JSON.

Flow

  • User says the trigger word

  • The client sends the user’s voice input to an automatic speech recognition (ASR) module

  • The client receives the text output from the ASR module and sends a request to over.ai API to process it

  • over.ai API validates the JSON data and sends it to the client

post
NLU Query

https://api.over.ai/api/ai/call
This endpoint provides access to the over.ai natural language understanding (NLU) algorithms.
Request
Response
Headers
api-key
required
string
An API Key that is obtained from within the over.ai developers platform.Key is accessed from API Keys, found in the menu in the top right of the Agent dashboard, as seen below
Query Parameters
userId
required
string
user unique identifier
language
optional
string
language of the user input, default is English
sessionId
required
string
unique session interaction identifier
deviceId
optional
number
unique id of the device
deviceModel
optional
string
model of device the request was made from
latitude
optional
string
location latitude from which the request was made
longitude
optional
string
location longitude from which the request was made
timezone
optional
string
timezone of the device from
input
required
string
name of the requested agent
200: OK
This API response returns JSON
{
"nluResponse": {
"input": "take note",
"result": {
"action": null,
"completion_attempts": 0,
"contexts": [],
"dialog_complete": false,
"intent": "create.note",
"intent_id": "5958f450f3989b1074f0ec15",
"intent_name": "create.note",
"match_precision": 0.45,
"parameters": [
{
"input": "",
"name": "DETAIL",
"prompts": [
"Alright what would you like the note to be?"
],
"requested": true,
"required": true,
"type": "@sys.any",
"value": "$DETAIL"
}
],
"response": "Alright what would you like the note to be?",
"sentence_matched": " take a note",
"webhook_url": "http://skills.prod.over.ai/api/otl"
},
"status": {
"code": 0,
"message": "Success"
},
"timestamp": "2017-09-17 11:11:27",
"execution_time_ms": 75
},
"skillResponse": null,
"actions": [],
"telephonyActions": null,
"serverToken": "",
"mayContainSpellMistakes": false,
"dialogCompleted": false,
"debugInfo": null,
"env": "VFD",
"hiddenMode": false,
"botName": "AneedA",
"responseType": 1,
"responseLanguage": "English",
"responseVersion": 0,
"say": {
"sayUrl": [
"http://nuance.sensiya.com/api/Chatbot/mp3tts/?input=Alright+what+would+you+like+the+note+to+be%3f"
],
"sentencesAsOneLine": "Alright what would you like the note to be?",
"startConversation": true,
"sentences": [
"Alright what would you like the note to be?"
]
},
"spokenResult": {
"sayUrl": null,
"sentencesAsOneLine": "",
"startConversation": true,
"sentences": []
},
"thirdparty": null
}

Obtaining an over.ai API Key from the Developer Platform

Find your over.ai API Key from the top right menu while viewing any of your agents