API Documentation

AI Content Detection API

Our AI Content Detection API analyzes text to determine if it was generated by AI. This page provides detailed information on how to use the API, including request parameters, response formats, and code examples.

Word Usage

Each AI content detection request uses words from your detection word balance.

Endpoint Details

Base URL

https://api.example.com/detection

HTTP Method

POST

Headers

Content-Type: application/json
X-API-Key: your_api_key_here

Request Body

{
  "text": "Text to analyze for AI content detection"
}
ParameterTypeRequiredDescription
textstringYesThe text to analyze for AI content detection. Maximum length: 10,000 characters.

Response

{
  "status": 200,
  "length": 123,
  "score": 0.85,
  "sentences": [
    {
      "length": 45,
      "score": 0.92,
      "text": "This sentence was likely written by AI."
    },
    {
      "length": 78,
      "score": 0.78,
      "text": "This sentence might have been written by a human."
    }
  ],
  "readability_score": 65,
  "input": "Text to analyze for AI content detection",
  "words_used": 1,
  "words_remaining": 99,
  "version": "1.0",
  "language": "en"
}
FieldTypeDescription
statusintegerHTTP status code
lengthintegerCharacter count of the input text
scorefloatOverall AI probability score (0-1, where 1 is most likely AI-generated)
sentencesarrayArray of sentence objects with individual scores
readability_scoreintegerReadability score (0-100)
inputstringThe original input text
words_usedintegerNumber of words used for this request
words_remainingintegerNumber of words remaining in your detection balance
versionstringAPI version
languagestringDetected language of the input text

Code Examples

curl -X POST https://api.example.com/detection \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{"text": "Text to analyze for AI content detection"}'

Important Notes

  • The maximum text length is 10,000 characters. Longer texts will be truncated.
  • The API currently supports English, Spanish, French, German, and Italian. Other languages may have reduced accuracy.
  • AI detection is probabilistic and may not be 100% accurate in all cases.
  • For best results, provide at least 100 characters of text.