Skip to main content
POST
/
v2.0
/
projects
/
{projectId}
/
nlu
/
scores
Generate NLU Scores
curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/projects/{projectId}/nlu/scores \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "flowReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "localeReferenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sentence": "<string>"
}'
{
  "scores": [
    {
      "id": "8870303c-2934-4145-a9c4-e2d89f05e3cf",
      "name": "food",
      "score": 0.6269008375746541,
      "negated": false,
      "confirmationSentence": null,
      "confirmationSentences": null,
      "disambiguationSentence": null,
      "flow": "43b8f152-f82c-4d0b-b7ae-04db34de8b68"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

api_key
string
query
required

Supply the API Key in the Url-Query

Path Parameters

projectId
string
required
Required string length: 24

Body

application/json
flowReferenceId
string<uuid>
required

UUID of the flow reference.

localeReferenceId
string<uuid>
required

UUID of the locale reference.

sentence
string
required

Sentence to analyze for NLU scoring.

Response

Returns a collection of matching NLU Intents and Scores for the given sentence.

scores
object[]

NLU scores based on the analysis.