This endpoint detects anomalies in the provided content. It analyzes the text and returns insights or flags any peculiarities based on predefined criteria.
Request Headers
Content-Type: application/json: Indicates that the request body format is JSON.
x-magicapi-key: API_KEY: Your unique API key for authentication. Replace API_KEY with your actual API key.
Request Body
The request body must be in JSON format and contain the following parameter:
content (string): The text content to be analyzed.
Example:
{ "content": "In the bustling metropolis of Neo City, where technology reigned supreme, a peculiar phenomenon began to unfold. Citizens reported receiving mysterious messages simply saying \"hello\" on their electronic devices, be it their holographic screens or their neural implants. The message seemed to emanate from an unknown source, sparking curiosity and a sense of unease among the populace."
}
Response
The response will be in JSON format and may include the following fields:
ai_percentage (number): The percentage likelihood that the content was generated by AI.
average_score (number): The average score of all analyzed sentences.
content_label (string): A label indicating the likelihood of AI-generated content (e.g., "May Have AI").
gptzero_me_label (string): Another label indicating AI detection results (e.g., "ai").
sentence_scores (array): An array of sentences and their respective scores.
Example Response:
{"ai_percentage":66.66666666666666,"average_score":42.94423105622707,"content_label":"May Have AI","gptzero_me_label":"ai","sentence_scores": [ [ "In the bustling metropolis of Neo City, where technology reigned supreme, a peculiar phenomenon began to unfold.",
35.899437137314855 ], [ "Citizens reported receiving mysterious messages simply saying \"hello\" on their electronic devices, be it their holographic screens or their neural implants.",
74.62703649255953 ], [ "The message seemed to emanate from an unknown source, sparking curiosity and a sense of unease among the populace.",
18.306219538806836 ] ]}
import requestsheaders ={'accept':'application/json','x-magicapi-key':'API_KEY','Content-Type':'application/x-www-form-urlencoded',}data ={ 'content': 'ContentDetector.AI is an accurate and free AI Detector and AI Content Detector that can be used to detect any AI-generated content. It provides a probability score based on the likelihood that the text content was generated by AI tools or chatbots.',
}response = requests.post('https://api.magicapi.dev/api/v1/capix/free/detector/v1/', headers=headers, data=data)
import axios from'axios';constresponse=awaitaxios.post('https://api.magicapi.dev/api/v1/capix/free/detector/v1/',newURLSearchParams({ 'content': 'ContentDetector.AI is an accurate and free AI Detector and AI Content Detector that can be used to detect any AI-generated content. It provides a probability score based on the likelihood that the text content was generated by AI tools or chatbots.'
}), { headers: {'accept':'application/json','x-magicapi-key':'API_KEY' } });
fetch('https://api.magicapi.dev/api/v1/capix/free/detector/v1/', { method:'POST', headers: {'accept':'application/json','x-magicapi-key':'API_KEY' }, body:newURLSearchParams({ 'content': 'ContentDetector.AI is an accurate and free AI Detector and AI Content Detector that can be used to detect any AI-generated content. It provides a probability score based on the likelihood that the text content was generated by AI tools or chatbots.'
})});
This code returns response like this:
{"ai_percentage":66.66666666666666,"average_score":42.94423105622707,"content_label":"May Have AI","gptzero_me_label":"ai","sentence_scores":[ [ "In the bustling metropolis of Neo City, where technology reigned supreme, a peculiar phenomenon began to unfold.",
35.899437137314855 ], [ "Citizens reported receiving mysterious messages simply saying \"hello\" on their electronic devices, be it their holographic screens or their neural implants.",
74.62703649255953 ], [ "The message seemed to emanate from an unknown source, sparking curiosity and a sense of unease among the populace.",
18.306219538806836 ] ]}