Detector API
Try it Out
You can test out the API without code by going to the FastAPI link with your web browser: https://aicheck.undetectable.ai/docs
Authentication
Undetectable.AI uses API keys to allow access to the API. You can get your API key at the top of the page in our developer portal.
UD expects for the API key to be included in all API requests to the server in a request body that looks like the following:
key: YOUR API KEY GOES HERE
You must replace YOUR API KEY GOES HERE with your personal API key.
AI Detector
Detect Single
This endpoint allows you to submit text for AI detection.
POST https://aicheck.undetectable.ai/detect
Example Request
curl -X 'POST' \
'https://aicheck.undetectable.ai/detect' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"text": "Citizen science involves the public participating in scientific research. This can take many forms, collecting data on local wildlife populations to analyzing astronomical images. Citizen science projects allow researchers to gather large amounts of data and engage the public in the process. By participating, individuals contribute to valuable research while gaining a deeper understanding of the scientific world around them.",
"key": "YOUR-API-KEY-GOES-HERE"
}'
Example Response
{
"human": 88
}
Here, "human": 88 signifies that the text is likely 88% human-written. Inversely, it's likely 12% AI-generated.
Detect Individual
This endpoint enables the submission of text for detection by various third-party AI detectors.
POST https://aicheck.undetectable.ai/detectIndividual
Example Request
curl -X 'POST' \
'https://aicheck.undetectable.ai/detectIndividual' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"text": "Citizen science involves the public participating in scientific research. This can take many forms, collecting data on local wildlife populations to analyzing astronomical images. Citizen science projects allow researchers to gather large amounts of data and engage the public in the process. By participating, individuals contribute to valuable research while gaining a deeper understanding of the scientific world around them.",
"key": "YOUR-API-KEY-GOES-HERE"
}'
Example Response
{
"human": 88,
"gptzero": 100,
"openai": 100,
"writer": 100,
"crossplag": 100,
"copyleaks": 50,
"sapling": 100,
"contentatscale": 100,
"zerogpt": 50
}
Here, "human": 88 signifies that the text is likely 88% human-written. Inversely, it's likely 12% AI-generated. Similarly, "gptzero": 100 signifies that the text is likely 100% human-written. Same goes for the rest of the other detectors.
Errors
Most errors will be from incorrect parameters being sent to the API. Double check the parameters of each API call to make sure it's properly formatted, and try running the provided example code.
The generic error codes we use conform to the REST standard:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
403 | Forbidden -- The API key is invalid or there isn't sufficient credits (0.1 per word). |
404 | Not Found -- The specified resource doesn't exist. |
405 | Method Not Allowed -- You tried to access a resource with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't JSON. |
410 | Gone -- The resource at this end point has been removed. |
422 | Invalid Request Body -- You're request body is formatted incorrectly or invalid or there are missing parameters. |
429 | Too Many Requests -- You're sending too many requests! Slow it down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Updated on: 08/07/2024
Thank you!