>


word/predict/future

Predict the most likely words based on all possible future characters and what is to the left, right, and/or the prefix of the current word. This is useful for interfaces that want to cache future predictions in order to hide API latency.

Parameter Required Description Valid values Default
left no Left text context One or more words separated by spaces (none)
right no Right text context One or more words separated by spaces (none)
prefix no Prefix of current word Sequence of one or more characters (none)
num no Number of results Positive integer 5
vocab no Filter to words in this vocabulary 1k, 5k, 10k, 20k, 40k, 100k, 500k 100k
sort no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability of next character, largest first
rev-logprob = log probability of next character, smallest first
logprob-next = word set max log probability, largest first
rev-logprob-next = word set max log probability, smallest first
logprob
safe no Safe mode, filters obscene words. true or false false
lang no Language code Language to use (see list) en

Example:


word/predict/next/future

Predict the most likely words based on the words predictions based on a given left context, prefix, and right context. This is useful for interfaces that want to cache future predictions in order to hide API latency.

Parameter Required Description Valid values Default
left no Left text context One or more words separated by spaces (none)
right no Right text context One or more words separated by spaces (none)
prefix no Prefix of current word Sequence of one or more characters (none)
num no Number of results Positive integer 5
vocab no Filter to words in this vocabulary 1k, 5k, 10k, 20k, 40k, 100k, 500k 100k
sort no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability of next character, largest first
rev-logprob = log probability of next character, smallest first
logprob-next = word set max log probability, largest first
rev-logprob-next = word set max log probability, smallest first
logprob
safe no Safe mode, filters obscene words. true or false false
lang no Language code Language to use (see list) en

Example:


character/predict/future

Get the probability of all next characters given all possible next characters and the current left text context. This is useful for interfaces that want to cache future predictions in order to hide API latency.

Parameter Required Description Valid values Default
left no Left text context A sequence of characters (none)
sort 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
alpha
lang no Language code Language to use (see list) en

Example:


character/predict/next/future

Get the probability of all next characters given all word predictions based on a given left context, prefix, and right context. This is useful for interfaces that want to cache future predictions in order to hide API latency.

Parameter Required Description Valid values Default
left no Left text context One or more words separated by spaces (none)
right no Right text context One or more words separated by spaces (none)
prefix no Prefix of current word Sequence of one or more characters (none)
num no Number of results Positive integer 5
vocab no Filter to words in this vocabulary 1k, 5k, 10k, 20k, 40k, 100k, 500k 100k
sort no Sorting of result words alpha = alphabetically A-Z
rev-alpha = reverse alphabetically Z-A
logprob = log probability of next character, largest first
rev-logprob = log probability of next character, smallest first
logprob-next = word set max log probability, largest first
rev-logprob-next = word set max log probability, smallest first
logprob
safe no Safe mode, filters obscene words. true or false false
lang no Language code Language to use (see list) en

Example: