Overview
The AI Detection feature of our API is a powerful tool designed to analyze text and predict whether it was generated by an AI, written by a human, or contains elements of both. It outputs the likelihood of each scenario as a percentage, providing valuable insights for content verification, authenticity checks, and understanding the nature of the text's origin.
Endpoint
POST https://www.the-ghost-ai-api.com/detection/ai-v2/
Request Parameters
To utilize the AI Detection feature, send a POST request with the following parameter in the body:
- text (required): The text you want to analyze. This should be a string of the content for which you are seeking an AI, mixed, or human origin prediction.
Headers
Authorization (required): To authenticate your request, include your API key in the request headers using the format "Api-Key 92AbXyzP.QWERtyuiopASDFGHJKLzxcvBNM123456".
Response
The API responds with a JSON object that includes one of the two possibilities:
- 200: The API returns a JSON object containing the probabilities that the text is AI-generated, human-written, or a mix of both, represented as percentages.
- 500: If the request fails, the API returns a JSON object with an error key:
- error: A string detailing the nature of the error encountered during the request.
Example Request
POST https://www.the-ghost-ai-api.com/detection/ai-v2/ Headers: { "Authorization": "Api-Key 92AbXyzP.QWERtyuiopASDFGHJKLzxcvBNM123456" } Body: {"text": "This text will be analyzed for its origin." }
Example Success Response
{"turnitin":{"ai":0,"mixed":0,"human":1},"openai":{"ai":0,"mixed":0,"human":1},"gptzero":{"ai":0,"mixed":0,"human":1},"writer":{"ai":0,"mixed":0,"human":1},"crossplag":{"ai":0,"mixed":0,"human":1},"copyleaks":{"ai":0,"mixed":0,"human":1},"sapling":{"ai":0,"mixed":0,"human":1},"contentatscale":{"ai":0,"mixed":0,"human":1},"zerogpt":{"ai":0,"mixed":0,"human":1},"human":{"ai":0,"mixed":0,"human":1},"sentences":[{"generatedProb":0.00078487244900316,"sentence":"Text to detect","perplexity":0,"highlightSentenceForAi":false}]}
Example Error Response
{ "error": "API key missing or invalid." }
Notes
- The accuracy of the predictions may vary based on the complexity and length of the text. It is recommended to use substantial text samples for more reliable detection results.
- Keep your API key confidential to prevent unauthorized usage.
For further assistance or more detailed inquiries, please consult our support resources or reach out to our customer service team.