An API for generating English sentences for a given input.

How to use Linguatools Sentence Generating API

The API can realise simple sentences given a subject, a verb and an object. Optional additional parameters allow to specify features like tense, number, voice, sentence type. The following table shows example request parameters and their outputs.

request parametersgenerated sentence
subject=police&verb=arrest&object=thiefThe police arrests a thief.
subject=police&verb=arrest&object=thief&tense=pastThe police arrested a thief.
subject=police&verb=arrest&object=thief&tense=past&passive=passiveA thief was arrested by the police.
subject=police&verb=arrest&object=thief&objmod=suspected&perfect=perfect&objnum=plural&objdet=theThe police has arrested the suspected thieves.
subject=police&verb=arrest&object=thief&objmod=suspected&perfect=perfect&objnum=plural&objdet=the&sentencetype=yesnoHas the police arrested the suspected thieves?

Connect to API


You can test the API and develop your own application – for free, with

  1. our test translate API on Heroku OR
  2. after sign up in RapidAPI  

1. Heroku

For testing, the following endpoint can be used with HTTP method GET:

Query example: https://lt-nlgservice.herokuapp.com/rest/english/realise?subject=dog&verb=eat&object=watter&tense=past&progressive=progressive&festesmerkmal=tense,progressive

Important note (!):
The initial API call might take up to 30 seconds because the heroku dyno falls asleep after 30 minutes of inactivity. (The test API runs on a free heroku dyno.)

2. RapidAPI

Advantage: Access to the full dictionary database (with limited requests, see section ‚Pricing‘)

Connect on RapidAPI


Query parameters

parameterdescriptionparameter value
subjectrequiredany noun, any pronoun
specifies the subject’s determiner. Default is „the“. Use subjdet=- to generate a subject without determiner.
a, the, –
specifies the subject’s number. Default is singular. A value of plural is overridden by subjdet=a.
singular, plural
verbrequiredany verb, including phrasal verbs like „start out“
If the object is a pronoun set objdet=- and use the base form of the pronoun (e.g. she instead of her). Possible base forms are: I, you, he, she, it, we, they. This will be automatically replaced by me, you, him, her, it, us, them.
Set objnum=plural to get the plural forms (e. g. object=he and objdet=- and objnum=plural yields them).
any noun or pronoun
specifies the object’s determiner. Default is „a“. Use objdet=- to generate an object without determiner.
a, the, –
specifies the object’s number. Default is singular. A value of plural is overridden by objdet=a.
singular, plural
specifies an adjective modifying the object
any adjective
specifies the verb’s tense. Default is „present“
present, past, future
&progressive=progressive sets the progressive (continuous) tense
&perfect=perfect sets the perfect tense
&negated=negated generates a negated sentence
&passive=passive generates a sentence in passive voice. The object is set as subject and the subject becomes the by-object.
specifies a modal verb modifying the verb. Only allowed for present tense. If tense=past or tense=future is set then the parameter modal will be ignored.
can, may, must, ought, shall, should, would
specifies the sentence type. Default is a declarative sentence. &sentencetype=yesno generates a yes/no-question, whatobj generates a WH-question for the object, whosubj generates a WH-question for the subject
yesno, whatobj, whosubj


If successful, the response body contains a JSON object with the generated sentence:

If there was an error the response status is 400 and the response body contains a JSON object with an error message:

Licensing conditions


Connect on RapidAPI


The sentence generator  https://gramomat.com/ is based on the Sentence Generating API.