These endpoints provide word predictions and auto-corrections based on client-provided distributions over possible characters.

Here are some test pages for the endpoints:


Returns the most likely text given a sequence of distributions over possible characters. Optionally can return word completion predictions based on the observation sequence being the prefix of a word. Call should be via a POST containing JSON with the following key/value pairs:

Parameter Required Description Valid values Default
no Left text context One or more words separated by spaces (none)
no Right text context One or more words separated by spaces (none)
no Number of best recognition results Positive integer 5
no Number of prefix word completion results Non-negative integer 0
no Filter to text only containing words in the specified vocabulary 1k, 5k, 10k, 20k, 40k, 100k, 500k 100k
no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability, largest first
rev-logprob = log probability, smallest first
no Safe mode, remove hypotheses that contain any obscene words true or false false
no Restricts recognition hypotheses to single words true or false true
exactContext no Client is providing exact left and right context including any spaces or sentence start/end words (for experts) true or false false
no Language code Language to use (see list) en
no Configuration code Recognition configuration to use (see list) en
yes List of distributions to recognize against See details below (none)

The distribs parameter is a list of the user's input distributions. Each distribution contains the following:

Key Required Description Valid values Default
distrib yes Distributions over possible characters A list with 0 or more items containing: text and logProb. (none)
time no Time of input double value (none)


Example POST request:

    "left"       : "this is a",
    "right"      : "message",
    "numBest"    : 2,
    "numPrefix"  : 3,
    "vocab"      : "100k",
    "sort"       : "logprob",
    "safe"       : false,
    "singleWord" : true,
    "distribs"   : [ { "distrib" : [ {"text": "t", "logProb": -1.23},
                                     {"text": "r", "logProb": -2.34},
                                     {"text": "y", "logProb": -3.45}
                       "time"    : 0.123
                     { "distrib" : [ {"text": "e", "logProb": -1.56},
                                     {"text": "w", "logProb": -3.43},
                                     {"text": "r", "logProb": -4.84}
                       "time"    : 0.234

Example response:

    "best": [
            "text": "te",
            "logProb": -14.897991
            "text": "re",
            "logProb": -16.703276
    "prefix": [
            "text": "text",
            "logProb": -10.180267
            "text": "team",
            "logProb": -12.689505
            "text": "terror",
            "logProb": -13.126982