BatchRequest¶
A batch request for NLP API version 3
This is an experimental feature. Use at your own risk. The API will reject any request larger than 500 KB. However, even analysis of smaller requests might time-out if they contain many entities.
import requests
def callGeneea(input):
url = 'https://api.geneea.com/v3/analysis/batch'
headers = {
'content-type': 'application/json',
'Authorization': 'user_key ' + GENEEA_API_KEY
}
return requests.post(url, json=input, headers=headers).json()
# the maximal size of the passed json is 500 KB
print(callGeneea([{'text': 'The pizza in London was great!'}, {'text': 'The pasta in Paris was terrible!'}]))