POST
/
v2
/
text
/
sync
Python
import os, requests


# Set API key ENV variable or replace with your own API key
API_KEY = os.getenv("AIORNOT_API_KEY")
TEXT_ENDPOINT = "https://api.aiornot.com/v2/text/sync"

data = {
    "text": "Your text content to analyze goes here..."
}

resp = requests.post(
    TEXT_ENDPOINT,
    headers={"Authorization": f"Bearer {API_KEY}"},
    data=data,
    params={
        "external_id": "my-tracking-id"  # Optional
    }
)
resp.raise_for_status()
print(resp.json())
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "report": {
    "ai_text": {
      "confidence": 0.95,
      "is_detected": true,
      "verdict": "ai"
    }
  },
  "metadata": {
    "word_count": 150,
    "character_count": 750,
    "token_count": 200
  },
  "external_id": "<string>"
}

Authorizations

Authorization
string
header
required

Your API key as the Bearer token in the Authorization header.

Query Parameters

external_id
string | null

An optional external identifier for tracking this text analysis

Body

application/x-www-form-urlencoded

Response

200
application/json

Successful Response

The response is of type object.