Skip to main content
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={
        "include_annotations": True,  # Optional: Include block-level annotations
        "external_id": "my-tracking-id"  # Optional: External tracking ID
    }
)
resp.raise_for_status()
print(resp.json())
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "report": {
    "ai_text": {
      "confidence": 0.95,
      "is_detected": true,
      "annotations": [
        [
          "This is the first block of text.",
          0.9999
        ],
        [
          "This is the second block of text.",
          0.0012
        ]
      ]
    }
  },
  "metadata": {
    "word_count": 150,
    "character_count": 750,
    "token_count": 200,
    "md5": "ebe5836f4d7dddc3f9a957eff565be21"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.aiornot.com/llms.txt

Use this file to discover all available pages before exploring further.

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

include_annotations
boolean
default:false

Include block-level AI detection annotations in the response

Body

application/x-www-form-urlencoded
text
string
required

The text content to analyze for AI generation (minimum 250 characters, maximum 500,000 characters)

Required string length: 250 - 500000

Response

Successful Response

id
string<uuid>
required

Unique identifier associated with the request

report
object
required
metadata
TextMetadata · object
required
created_at
string<date-time>

Date and time of request processing

external_id
string | null

The external identifier provided in the request, if any