ai_detector
Sample Code
import requests
from pprint import pprint
key = '<api-key>'
url = 'https://api.sapling.ai/api/v1/aidetect'
data = {
'key': key,
'text': 'I am an artificial intelligence system designed to help people solve complex problems. My capabilities include natural language processing, machine learning, and predictive analytics.',
}
try:
response = requests.post(url, json=data)
if 200 <= response.status_code < 300:
resp_json = response.json()
edits = resp_json['edits']
pprint(edits)
else:
print('Error: ', str(response.status_code), response.text)
except Exception as e:
print('Error: ', e)
Sample Output
{
"score":0.9989707556330055,
"sentence_scores":[
{
"score":0.9764397893790885,
"sentence": "I am an artificial intelligence system designed to help people solve complex problems."
},
{
"score":0.9923806397189778,
"sentence":"My capabilities include natural language processing, machine learning, and predictive analytics."
}
],
"text":"I am an artificial intelligence system designed to help people solve complex problems. My capabilities include natural language processing, machine learning, and predictive analytics."
}