# API reference

> Every GPTZero API endpoint for AI detection, with request and response schemas. Try requests in your browser.

- **OpenAPI Version:** `3.2.0`
- **API Version:** `2.0.0`
- **Terms of service:** <https://gptzero.me/terms-of-use.html>
- **Contact:** GPTZero Devs <https://gptzero.me/contact-us>

Detect AI-generated text in documents and files, and check their citations for hallucinations. Send text or files, and get back AI probabilities for the whole document, each paragraph and each sentence, or a check of every citation.

Create an API key on the [API page of the GPTZero app](https://app.gptzero.me/app/api).

## Contents

**Operations**

- [POST /v2/predict/text](#scalar-operation-post-v2predicttext)
- [POST /v2/predict/files](#scalar-operation-post-v2predictfiles)
- [POST /v3/ai/patterns/stream](#scalar-operation-post-v3aipatternsstream)
- [POST /v2/hallucination-check/text](#scalar-operation-post-v2hallucination-checktext)
- [POST /v2/hallucination-check/files](#scalar-operation-post-v2hallucination-checkfiles)
- [POST /v2/bibliography-scan/text](#scalar-operation-post-v2bibliography-scantext)
- [POST /v2/bibliography-scan/files](#scalar-operation-post-v2bibliography-scanfiles)
- [GET /v3/usage-stats](#scalar-operation-get-v3usage-stats)
- [GET /v2/model-versions/ai-scan](#scalar-operation-get-v2model-versionsai-scan)

**Schemas**

- [DocumentPredictionsV3](#scalar-schema-documentpredictionsv3)
- [UsageStats](#scalar-schema-usagestats)
- [HallucinationCheckLateError](#scalar-schema-hallucinationchecklateerror)
- [DocumentContentError](#scalar-schema-documentcontenterror)
- [HallucinationCheckResult](#scalar-schema-hallucinationcheckresult)
- [ExcludedSpan](#scalar-schema-excludedspan)
- [AiPatternStreamEvent](#scalar-schema-aipatternstreamevent)
- [AiPatternHit](#scalar-schema-aipatternhit)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.gptzero.me`
  - **Description:** Production

<a id="scalar-context-global-authentication"></a>

## Authentication

- **ApiKey**: API key in header `x-api-key`

  Your GPTZero API key, sent in the `x-api-key` header. Create one on the [API page of the GPTZero app](https://app.gptzero.me/app/api).

## Operations

<a id="scalar-operation-post-v2predicttext"></a>

### Detect AI in text

- **Method:** `POST`
- **Path:** `/v2/predict/text`
- **Operation ID:** `predictText`
- **Tags:** 

Detects AI in a single text input and returns probabilities for the document, each paragraph and each sentence.

Text longer than your plan's character limit is rejected with a `400`. On API plans, the limit is 150,000 characters. The language is detected automatically, and non-English text is scanned with the multilingual model.

If you're evaluating the detector for research, read [how to interpret the multi-class output](https://gptzero.me/news/chicago-booth-2026/). For research questions about the API, [contact our research team](https://gptzero.me/resources/researchers). For anything else, [contact us](https://gptzero.me/contact-us).

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Request body

The text to scan, and optionally the model version to use.

**Content type:** `application/json`

- **`document` (required)**: `string`

  The text to scan.
- **`modelVersion`**: `string`

  The model version to use. Defaults to the latest version. `GET /v2/model-versions/ai-scan` lists the available versions, and the [release notes](https://docs.superhuman.com/d/Project-engineering-import_doYGpUuF477/GPTZero-Release-Notes-Model-and-API_suN_Kut5#_luA8d53F) say what changed in each. An unknown version is rejected with a `400` that lists the valid ones.

**Example: Short example**

```json
{
  "document": "The quick brown fox jumps over the lazy dog. It was a bright, cold day in April, and the clocks were striking thirteen.",
  "modelVersion": ""
}
```

**Example: Human and AI mixed**

```json
{
  "document": "Climate change refers to the long-term shift in global weather patterns caused by human activity, particularly the emission of greenhouse gases into the atmosphere. The most significant greenhouse gas is carbon dioxide, which is primarily produced by burning fossil fuels such as coal, oil, and gas. The consequences of climate change are already visible in the form of rising temperatures, melting glaciers and ice caps, and more frequent extreme weather events such as hurricanes, droughts, and floods. These changes have significant impacts on ecosystems, biodiversity, and human health, including increased risk of respiratory diseases, food and water shortages, and the spread of infectious diseases. To address climate change, it is essential to reduce greenhouse gas emissions through a range of measures, including increased use of renewable energy sources, greater energy efficiency, and improved transportation systems. Climate change has likely led to the decline of some of Scotland's mountain plants, according to new research. Scientists said many of the species relied on snow cover remaining high on hills until late spring and even summer to ensure a moist environment. They also said plants that thrived on lower ground in warmer conditions were spreading to mountain habitats. Species found to be in decline include snow pearlwort, alpine lady-fern and alpine speedwell. The research by the Botanical Society of Britain and Ireland (BSBI) has taken 20 years to complete and has been published in the new Plant Atlas. Data used to produce the report included more than three million plant records of 2,555 species collected by hundreds of botanists across Scotland.",
  "modelVersion": ""
}
```

#### Responses

##### 200 The scan result for the document.

**Content type:** `application/json`

[DocumentPredictionsV3](#scalar-schema-documentpredictionsv3)

The scan result. Each document is split into sentences and grouped into paragraphs, so you can use the result at the level of detail you need.

**Example: AI Example**

```json
{
  "version": "2026-10-07-base",
  "neatVersion": "4.1o",
  "scanId": "cc817f5a-5fc9-443b-a4f6-8636625bbe6d",
  "documents": [
    {
      "paragraphs": [
        {
          "start_sentence_index": 0,
          "num_sentences": 1,
          "completely_generated_prob": 0
        },
        {
          "start_sentence_index": 1,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        },
        {
          "start_sentence_index": 3,
          "num_sentences": 1,
          "completely_generated_prob": 0
        },
        {
          "start_sentence_index": 4,
          "num_sentences": 5,
          "completely_generated_prob": 0.8871651474786718
        },
        {
          "start_sentence_index": 9,
          "num_sentences": 1,
          "completely_generated_prob": 0
        },
        {
          "start_sentence_index": 10,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        },
        {
          "start_sentence_index": 13,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        },
        {
          "start_sentence_index": 16,
          "num_sentences": 1,
          "completely_generated_prob": 0.8181818033057853
        }
      ],
      "completely_generated_prob": 1,
      "average_generated_prob": 1,
      "predicted_class": "ai",
      "confidence_score": 1,
      "confidence_category": "high",
      "overall_burstiness": 0,
      "writing_stats": {},
      "excluded_spans": [
        {
          "start": 0,
          "end": 56,
          "text": "The Natural Splendor of Uganda: A Symphony of Landscapes",
          "reason": "header"
        },
        {
          "start": 385,
          "end": 404,
          "text": "The Mountain Realms",
          "reason": "header"
        },
        {
          "start": 1089,
          "end": 1105,
          "text": "The Great Waters",
          "reason": "header"
        }
      ],
      "confidence_thresholds_raw": {
        "identity": {
          "ai": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "human": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "mixed": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          }
        }
      },
      "sentences": [
        {
          "generated_prob": 0,
          "sentence": "The Natural Splendor of Uganda: A Symphony of Landscapes",
          "perplexity": 0,
          "should_mask": true,
          "masking_reason": "header",
          "class_probabilities": {
            "human": 1,
            "ai": 0,
            "paraphrased": 0
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999980210411515,
          "sentence": "Uganda stands as a testament to nature's extraordinary diversity, where every vista tells a story of ecological richness and pristine beauty.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000001978958848370778,
            "ai": 0.9998728061027473,
            "paraphrased": 0.00012521493840426658
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999983073568068,
          "sentence": "From its mist-shrouded mountains to its sprawling savannas, the country presents an unparalleled tapestry of natural wonders that has rightfully earned it the title \"Pearl of Africa.\"",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000001692643193177586,
            "ai": 0.9998432384812528,
            "paraphrased": 0.00015506887555403017
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0,
          "sentence": "The Mountain Realms",
          "perplexity": 0,
          "should_mask": true,
          "masking_reason": "header",
          "class_probabilities": {
            "human": 1,
            "ai": 0,
            "paraphrased": 0
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999972416772258,
          "sentence": "In the country's southwestern corner, the Bwindi Impenetrable Forest rises from the earth like a green cathedral.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000027583227741391423,
            "ai": 0.999893534013077,
            "paraphrased": 0.00010370766414880827
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999951779058746,
          "sentence": "This ancient forest, dating back over 25,000 years, harbors some of the world's last remaining mountain gorillas.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000004822094125448558,
            "ai": 0.9998852129884145,
            "paraphrased": 0.00010996491746003815
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999990652570051,
          "sentence": "The forest canopy, a dense weave of emerald leaves and twisted vines, creates an otherworldly atmosphere where sunlight filters through in ethereal beams.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 9.34742994955385e-7,
            "ai": 0.9998183062335544,
            "paraphrased": 0.00018075902345066175
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999971206400704,
          "sentence": "The Rwenzori Mountains, aptly named the \"Mountains of the Moon,\" pierce the clouds with their snow-capped peaks, despite their location near the equator.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000028793599296736205,
            "ai": 0.9998699342099456,
            "paraphrased": 0.00012718643012472273
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999985178042853,
          "sentence": "Their slopes host unique alpine vegetation, creating surreal landscapes where giant lobelias and eternal flowers bloom in the thin mountain air.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000014821957147034552,
            "ai": 0.9998890880908813,
            "paraphrased": 0.00010942971340400456
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0,
          "sentence": "The Great Waters",
          "perplexity": 0,
          "should_mask": true,
          "masking_reason": "header",
          "class_probabilities": {
            "human": 1,
            "ai": 0,
            "paraphrased": 0
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999979898591667,
          "sentence": "Uganda's waterways form the lifeblood of its ecosystems.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000002010140833340089,
            "ai": 0.9998817306882586,
            "paraphrased": 0.00011625917090804393
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999959867282704,
          "sentence": "The mighty Nile River begins its epic northward journey here, emerging from Lake Victoria in a spectacular display at Murchison Falls, where the river forces its way through a narrow gorge before cascading 43 meters into the waters below.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000004013271729573632,
            "ai": 0.9998775507595532,
            "paraphrased": 0.00011843596871719255
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999918614891428,
          "sentence": "Lake Victoria, Africa's largest lake, paints the horizon with endless shades of blue, its waters teeming with life and its shores dotted with verdant islands.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000008138510857231606,
            "ai": 0.9998466134338406,
            "paraphrased": 0.0001452480553021157
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999861015637365,
          "sentence": "The serene Lake Bunyonyi, surrounded by terraced hills, mirrors the sky like a scattered handful of sapphires.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00001389843626359499,
            "ai": 0.9998595359794004,
            "paraphrased": 0.0001265655843360758
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999893852078551,
          "sentence": "Its 29 islands create a maze of tranquil waterways, each telling its own story through the ages.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000010614792144939003,
            "ai": 0.9998629427099942,
            "paraphrased": 0.000126442497860894
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999887009810703,
          "sentence": "The crystal-clear waters provide sanctuary to numerous bird species, their calls creating a natural symphony at dawn and dusk.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000011299018929754121,
            "ai": 0.9998304211726994,
            "paraphrased": 0.000158279808370863
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999232418438999,
          "sentence": "Savanna Splendor",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000767581561001135,
            "ai": 0.9997585079262891,
            "paraphrased": 0.0001647339176108374
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        }
      ],
      "class_probabilities": {
        "human": 0,
        "ai": 1,
        "mixed": 0
      },
      "confidence_scores_raw": {
        "identity": {
          "ai": 1,
          "mixed": 0,
          "human": 0
        }
      },
      "subclass": {
        "ai": {
          "predicted_class": "pure_ai",
          "result_message": "",
          "confidence_score": 1,
          "confidence_category": "high",
          "class_probabilities": {
            "pure_ai": 1,
            "ai_paraphrased": 0
          },
          "confidence_scores_raw": {
            "identity": {
              "pure_ai": 1,
              "ai_paraphrased": 0
            }
          },
          "confidence_thresholds_raw": {
            "identity": {
              "ai_paraphrased": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              },
              "pure_ai": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              }
            }
          }
        }
      },
      "pageNumber": 0,
      "neatVersion": "4.1o",
      "version": "2026-10-07-base",
      "language": "en",
      "result_message": "Our detector is highly confident that the text is written by AI.",
      "result_sub_message": null,
      "document_classification": "AI_ONLY",
      "inputText": "The Natural Splendor of Uganda: A Symphony of Landscapes\n\nUganda stands as a testament to nature's extraordinary diversity, where every vista tells a story of ecological richness and pristine beauty. From its mist-shrouded mountains to its sprawling savannas, the country presents an unparalleled tapestry of natural wonders that has rightfully earned it the title \"Pearl of Africa.\"\n\nThe Mountain Realms\n\nIn the country's southwestern corner, the Bwindi Impenetrable Forest rises from the earth like a green cathedral. This ancient forest, dating back over 25,000 years, harbors some of the world's last remaining mountain gorillas. The forest canopy, a dense weave of emerald leaves and twisted vines, creates an otherworldly atmosphere where sunlight filters through in ethereal beams. The Rwenzori Mountains, aptly named the \"Mountains of the Moon,\" pierce the clouds with their snow-capped peaks, despite their location near the equator. Their slopes host unique alpine vegetation, creating surreal landscapes where giant lobelias and eternal flowers bloom in the thin mountain air.\n\nThe Great Waters\n\nUganda's waterways form the lifeblood of its ecosystems. The mighty Nile River begins its epic northward journey here, emerging from Lake Victoria in a spectacular display at Murchison Falls, where the river forces its way through a narrow gorge before cascading 43 meters into the waters below. Lake Victoria, Africa's largest lake, paints the horizon with endless shades of blue, its waters teeming with life and its shores dotted with verdant islands.\n\nThe serene Lake Bunyonyi, surrounded by terraced hills, mirrors the sky like a scattered handful of sapphires. Its 29 islands create a maze of tranquil waterways, each telling its own story through the ages. The crystal-clear waters provide sanctuary to numerous bird species, their calls creating a natural symphony at dawn and dusk.\n\nSavanna Splendor\n",
      "document_id": "677a87ae-deb1-41b4-8dab-31a8586c600f"
    }
  ]
}
```

**Example: Human Example**

```json
{
  "version": "2026-10-07-base",
  "neatVersion": "4.1o",
  "scanId": "6539f3cc-dc92-4897-9c1e-6fe0e8e553c5",
  "documents": [
    {
      "paragraphs": [
        {
          "start_sentence_index": 0,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 1,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 2,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 3,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 4,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 5,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 6,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 7,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        },
        {
          "start_sentence_index": 8,
          "num_sentences": 1,
          "completely_generated_prob": 0.11111110864197542
        }
      ],
      "completely_generated_prob": 0.000002638903989464778,
      "average_generated_prob": 0,
      "predicted_class": "human",
      "confidence_score": 0.9999973610960106,
      "confidence_category": "high",
      "overall_burstiness": 0,
      "writing_stats": {},
      "excluded_spans": [],
      "confidence_thresholds_raw": {
        "identity": {
          "ai": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "human": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "mixed": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          }
        }
      },
      "sentences": [
        {
          "generated_prob": 0.00001695215909826684,
          "sentence": "Climate change has likely led to the decline of some of Scotland's mountain plants, according to new research.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999830478409018,
            "ai": 0.000009350365643269741,
            "paraphrased": 0.000007601793454997101
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.000019025130784783104,
          "sentence": "Scientists said many of the species relied on snow cover remaining high on hills until late spring and even summer to ensure a moist environment.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999809748692152,
            "ai": 0.000008283947276714392,
            "paraphrased": 0.000010741183508068713
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00001833077672076306,
          "sentence": "They also said plants that thrived on lower ground in warmer conditions were spreading to mountain habitats.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999816692232792,
            "ai": 0.000007920057397278696,
            "paraphrased": 0.000010410719323484363
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.000019308688996057323,
          "sentence": "Species found to be in decline include snow pearlwort, alpine lady-fern and alpine speedwell.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.999980691311004,
            "ai": 0.0000069214957188472986,
            "paraphrased": 0.000012387193277210022
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.000016376271739264107,
          "sentence": "The research by the Botanical Society of Britain and Ireland (BSBI) has taken 20 years to complete and has been published in the new Plant Atlas.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999836237282608,
            "ai": 0.000003867481437142892,
            "paraphrased": 0.000012508790302121217
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00001586960683403393,
          "sentence": "Data used to produce the report included more than three million plant records of 2,555 species collected by hundreds of botanists across Scotland.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999841303931659,
            "ai": 0.000005660224276716205,
            "paraphrased": 0.000010209382557317725
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00001807447724873643,
          "sentence": "Climate change, habitat loss and the spread of non-native species were found to key threats to the health of British and Irish native plants.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999819255227512,
            "ai": 0.000008332637130803927,
            "paraphrased": 0.000009741840117932502
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.000015552746016343592,
          "sentence": "BSBI said devastating losses of species in Scotland were among the findings.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999844472539836,
            "ai": 0.0000037558231842355505,
            "paraphrased": 0.000011796922832108043
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00001975537563773773,
          "sentence": "Almost the entire British population of snow pearlwort is found on Ben Lawers, but half of the Perthshire mountain's known colonies have disappeared over the last 40 years.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999802446243623,
            "ai": 0.000006413849164626382,
            "paraphrased": 0.000013341526473111346
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        }
      ],
      "class_probabilities": {
        "human": 0.9999973610960106,
        "ai": 0.000002638903989464778,
        "mixed": 0
      },
      "confidence_scores_raw": {
        "identity": {
          "human": 0.9999973610960106,
          "ai": 0.000002638903989464778,
          "mixed": 0
        }
      },
      "subclass": {},
      "pageNumber": 0,
      "neatVersion": "4.1o",
      "version": "2026-10-07-base",
      "language": "en",
      "result_message": "Our detector is highly confident that the text is written entirely by a human.",
      "result_sub_message": null,
      "document_classification": "HUMAN_ONLY",
      "inputText": "Climate change has likely led to the decline of some of Scotland's mountain plants, according to new research.\n\nScientists said many of the species relied on snow cover remaining high on hills until late spring and even summer to ensure a moist environment.\n\nThey also said plants that thrived on lower ground in warmer conditions were spreading to mountain habitats.\n\nSpecies found to be in decline include snow pearlwort, alpine lady-fern and alpine speedwell.\n\nThe research by the Botanical Society of Britain and Ireland (BSBI) has taken 20 years to complete and has been published in the new Plant Atlas.\n\nData used to produce the report included more than three million plant records of 2,555 species collected by hundreds of botanists across Scotland.\n\nClimate change, habitat loss and the spread of non-native species were found to key threats to the health of British and Irish native plants.\n\nBSBI said devastating losses of species in Scotland were among the findings.\n\nAlmost the entire British population of snow pearlwort is found on Ben Lawers, but half of the Perthshire mountain's known colonies have disappeared over the last 40 years.\n\n",
      "document_id": "07054da3-002f-4ebe-be3c-b2ee606dab47"
    }
  ]
}
```

**Example: Mixed Example**

```json
{
  "version": "2026-10-07-base",
  "neatVersion": "4.1o",
  "scanId": "b879b4a5-bff5-4769-bc3f-e3c9441cc631",
  "documents": [
    {
      "paragraphs": [
        {
          "start_sentence_index": 0,
          "num_sentences": 5,
          "completely_generated_prob": 0.8871651474786718
        },
        {
          "start_sentence_index": 5,
          "num_sentences": 6,
          "completely_generated_prob": 0.00001474742012248794
        }
      ],
      "completely_generated_prob": 0.4998983080822626,
      "average_generated_prob": 0.45454545454545453,
      "predicted_class": "mixed",
      "confidence_score": 0.9997966161645252,
      "confidence_category": "high",
      "overall_burstiness": 0,
      "writing_stats": {},
      "excluded_spans": [],
      "confidence_thresholds_raw": {
        "identity": {
          "ai": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "human": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "mixed": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          }
        }
      },
      "sentences": [
        {
          "generated_prob": 0.8601431513000043,
          "sentence": "Climate change refers to the long-term shift in global weather patterns caused by human activity, particularly the emission of greenhouse gases into the atmosphere.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.13985684869999573,
            "ai": 0.860080264047143,
            "paraphrased": 0.00006288725286125271
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.8840458987865201,
          "sentence": "The most significant greenhouse gas is carbon dioxide, which is primarily produced by burning fossil fuels such as coal, oil, and gas.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.11595410121347993,
            "ai": 0.8839888582437148,
            "paraphrased": 0.000057040542805346504
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.8973404094573101,
          "sentence": "The consequences of climate change are already visible in the form of rising temperatures, melting glaciers and ice caps, and more frequent extreme weather events such as hurricanes, droughts, and floods.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.10265959054268992,
            "ai": 0.8972973823580007,
            "paraphrased": 0.00004302709930941283
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.8874048237981196,
          "sentence": "These changes have significant impacts on ecosystems, biodiversity, and human health, including increased risk of respiratory diseases, food and water shortages, and the spread of infectious diseases.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.11259517620188045,
            "ai": 0.8873610936128831,
            "paraphrased": 0.00004373018523650361
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.8747253374858968,
          "sentence": "To address climate change, it is essential to reduce greenhouse gas emissions through a range of measures, including increased use of renewable energy sources, greater energy efficiency, and improved transportation systems.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.1252746625141032,
            "ai": 0.8746886109979123,
            "paraphrased": 0.00003672648798451191
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00041757535419889813,
          "sentence": "Climate change has likely led to the decline of some of Scotland's mountain plants, according to new research.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.999582424645801,
            "ai": 0.00039704049088568164,
            "paraphrased": 0.00002053486331321647
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.000049386262775884634,
          "sentence": "Scientists said many of the species relied on snow cover remaining high on hills until late spring and even summer to ensure a moist environment.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999506137372242,
            "ai": 0.000028520337715030326,
            "paraphrased": 0.000020865925060854304
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00004312149169902387,
          "sentence": "They also said plants that thrived on lower ground in warmer conditions were spreading to mountain habitats.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.999956878508301,
            "ai": 0.000018342438716775265,
            "paraphrased": 0.000024779052982248608
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00005489174386815009,
          "sentence": "Species found to be in decline include snow pearlwort, alpine lady-fern and alpine speedwell.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999451082561318,
            "ai": 0.000024827206730778337,
            "paraphrased": 0.000030064537137371754
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00006273521110077273,
          "sentence": "The research by the Botanical Society of Britain and Ireland (BSBI) has taken 20 years to complete and has been published in the new Plant Atlas.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9999372647888992,
            "ai": 0.000025465453715225507,
            "paraphrased": 0.00003726975738554722
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.00010658247344823163,
          "sentence": "Data used to produce the report included more than three million plant records of 2,555 species collected by hundreds of botanists across Scotland.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.9998934175265518,
            "ai": 0.00008076759855196871,
            "paraphrased": 0.000025814874896262927
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        }
      ],
      "class_probabilities": {
        "human": 0,
        "ai": 0.00020338383547475767,
        "mixed": 0.9997966161645252
      },
      "confidence_scores_raw": {
        "identity": {
          "ai": 0.00020338383547475767,
          "mixed": 0.9997966161645252,
          "human": 0
        }
      },
      "subclass": {
        "mixed": {
          "predicted_class": "concatenated",
          "result_message": "",
          "confidence_score": 1,
          "confidence_category": "high",
          "class_probabilities": {
            "concatenated": 1,
            "polished": 0
          },
          "confidence_scores_raw": {
            "identity": {
              "polished": 0,
              "concatenated": 1
            }
          },
          "confidence_thresholds_raw": {
            "identity": {
              "polished": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              },
              "concatenated": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              }
            }
          }
        }
      },
      "pageNumber": 0,
      "neatVersion": "4.1o",
      "version": "2026-10-07-base",
      "language": "en",
      "result_message": "Our detector is highly confident that the text may include parts written by AI.",
      "result_sub_message": null,
      "document_classification": "MIXED",
      "inputText": "Climate change refers to the long-term shift in global weather patterns caused by human activity, particularly the emission of greenhouse gases into the atmosphere. The most significant greenhouse gas is carbon dioxide, which is primarily produced by burning fossil fuels such as coal, oil, and gas. The consequences of climate change are already visible in the form of rising temperatures, melting glaciers and ice caps, and more frequent extreme weather events such as hurricanes, droughts, and floods. These changes have significant impacts on ecosystems, biodiversity, and human health, including increased risk of respiratory diseases, food and water shortages, and the spread of infectious diseases. To address climate change, it is essential to reduce greenhouse gas emissions through a range of measures, including increased use of renewable energy sources, greater energy efficiency, and improved transportation systems. \nClimate change has likely led to the decline of some of Scotland's mountain plants, according to new research. Scientists said many of the species relied on snow cover remaining high on hills until late spring and even summer to ensure a moist environment. They also said plants that thrived on lower ground in warmer conditions were spreading to mountain habitats. Species found to be in decline include snow pearlwort, alpine lady-fern and alpine speedwell. The research by the Botanical Society of Britain and Ireland (BSBI) has taken 20 years to complete and has been published in the new Plant Atlas. Data used to produce the report included more than three million plant records of 2,555 species collected by hundreds of botanists across Scotland.\n\n",
      "document_id": "f3805cd0-ba10-45a8-a5a6-1dc334bab8c5"
    }
  ]
}
```

**Example: Polished Example**

```json
{
  "version": "2026-10-07-base",
  "neatVersion": "4.1o",
  "scanId": "628fecec-2501-46da-82d8-72a898f46712",
  "documents": [
    {
      "paragraphs": [
        {
          "start_sentence_index": 0,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        },
        {
          "start_sentence_index": 3,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        },
        {
          "start_sentence_index": 6,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        }
      ],
      "completely_generated_prob": 0.4999886724203496,
      "average_generated_prob": 1,
      "predicted_class": "mixed",
      "confidence_score": 0.9999773448406992,
      "confidence_category": "high",
      "overall_burstiness": 0,
      "writing_stats": {},
      "excluded_spans": [],
      "confidence_thresholds_raw": {
        "identity": {
          "ai": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "human": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "mixed": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          }
        }
      },
      "sentences": [
        {
          "generated_prob": 0.9999411413124761,
          "sentence": "New research suggests that climate change has contributed to the decline of certain mountain plants in Scotland.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00005885868752384852,
            "ai": 0.00007782294815153435,
            "paraphrased": 0.9998633183643246
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.999939628659479,
          "sentence": "Scientists have noted that many of these species depend on snow cover remaining on the hills until late spring and even summer to maintain a moist environment.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00006037134052097413,
            "ai": 0.00009187568348947698,
            "paraphrased": 0.9998477529759896
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999455653308462,
          "sentence": "However, warmer conditions are allowing plants that typically thrive at lower altitudes to spread into mountain habitats.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000544346691537009,
            "ai": 0.00009553581863068314,
            "paraphrased": 0.9998500295122156
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999179640454987,
          "sentence": "Species experiencing decline include the snow pearlwort, alpine lady-fern, and alpine speedwell.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.0000820359545012585,
            "ai": 0.00006774505604634601,
            "paraphrased": 0.9998502189894524
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999235341636542,
          "sentence": "This research, conducted by the Botanical Society of Britain and Ireland (BSBI), took 20 years to complete and has been published in the new Plant Atlas.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00007646583634570206,
            "ai": 0.00007440329871015414,
            "paraphrased": 0.9998491308649441
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999145297424988,
          "sentence": "The report draws on over three million plant records of 2,555 species collected by hundreds of botanists across Scotland.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00008547025750109694,
            "ai": 0.00006908087089890541,
            "paraphrased": 0.9998454488716
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9998896107379448,
          "sentence": "Key threats to the health of native plants in Britain and Ireland include climate change, habitat loss, and the spread of non-native species.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00011038926205515625,
            "ai": 0.00005920262883122423,
            "paraphrased": 0.9998304081091136
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999091944712326,
          "sentence": "The BSBI highlighted the devastating loss of species in Scotland as one of the significant findings.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00009080552876741817,
            "ai": 0.000058972990137791734,
            "paraphrased": 0.9998502214810948
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        },
        {
          "generated_prob": 0.9999050235781073,
          "sentence": "Notably, almost the entire British population of snow pearlwort is located on Ben Lawers, yet half of the known colonies on this Perthshire mountain have vanished over the past 40 years.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00009497642189271164,
            "ai": 0.0000681422442619353,
            "paraphrased": 0.9998368813338454
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": "polished"
        }
      ],
      "class_probabilities": {
        "human": 0,
        "ai": 0.000022655159300801648,
        "mixed": 0.9999773448406992
      },
      "confidence_scores_raw": {
        "identity": {
          "ai": 0.000022655159300801648,
          "mixed": 0.9999773448406992,
          "human": 0
        }
      },
      "subclass": {
        "mixed": {
          "predicted_class": "polished",
          "result_message": "We are highly confident that this text was originally written by a human and improved using AI",
          "confidence_score": 1,
          "confidence_category": "high",
          "class_probabilities": {
            "concatenated": 0,
            "polished": 1
          },
          "confidence_scores_raw": {
            "identity": {
              "polished": 1,
              "concatenated": 0
            }
          },
          "confidence_thresholds_raw": {
            "identity": {
              "polished": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              },
              "concatenated": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              }
            }
          }
        }
      },
      "pageNumber": 0,
      "neatVersion": "4.1o",
      "version": "2026-10-07-base",
      "language": "en",
      "result_message": "Our detector is highly confident that the text may include parts written by AI.",
      "result_sub_message": null,
      "document_classification": "MIXED",
      "inputText": "New research suggests that climate change has contributed to the decline of certain mountain plants in Scotland. Scientists have noted that many of these species depend on snow cover remaining on the hills until late spring and even summer to maintain a moist environment. However, warmer conditions are allowing plants that typically thrive at lower altitudes to spread into mountain habitats.\nSpecies experiencing decline include the snow pearlwort, alpine lady-fern, and alpine speedwell. This research, conducted by the Botanical Society of Britain and Ireland (BSBI), took 20 years to complete and has been published in the new Plant Atlas. The report draws on over three million plant records of 2,555 species collected by hundreds of botanists across Scotland.\nKey threats to the health of native plants in Britain and Ireland include climate change, habitat loss, and the spread of non-native species. The BSBI highlighted the devastating loss of species in Scotland as one of the significant findings. Notably, almost the entire British population of snow pearlwort is located on Ben Lawers, yet half of the known colonies on this Perthshire mountain have vanished over the past 40 years.\n",
      "document_id": "cf370d8d-49f8-4d3e-9b68-fb260da492df"
    }
  ]
}
```

**Example: Paraphrased Example**

```json
{
  "version": "2026-10-07-base",
  "neatVersion": "4.1o",
  "scanId": "99c1531d-6257-44b5-8256-4022bb51c9fb",
  "documents": [
    {
      "paragraphs": [
        {
          "start_sentence_index": 0,
          "num_sentences": 3,
          "completely_generated_prob": 0.850090677245877
        },
        {
          "start_sentence_index": 3,
          "num_sentences": 1,
          "completely_generated_prob": 0
        },
        {
          "start_sentence_index": 4,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        },
        {
          "start_sentence_index": 6,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        },
        {
          "start_sentence_index": 8,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        },
        {
          "start_sentence_index": 10,
          "num_sentences": 1,
          "completely_generated_prob": 0
        },
        {
          "start_sentence_index": 11,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        },
        {
          "start_sentence_index": 13,
          "num_sentences": 2,
          "completely_generated_prob": 0.8254776901813464
        }
      ],
      "completely_generated_prob": 1,
      "average_generated_prob": 1,
      "predicted_class": "ai",
      "confidence_score": 1,
      "confidence_category": "high",
      "overall_burstiness": 0,
      "writing_stats": {},
      "excluded_spans": [
        {
          "start": 375,
          "end": 415,
          "text": "The good things about electric cars are:",
          "reason": "header"
        },
        {
          "start": 1071,
          "end": 1104,
          "text": "Electric cars have some problems:",
          "reason": "header"
        }
      ],
      "confidence_thresholds_raw": {
        "identity": {
          "ai": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "human": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          },
          "mixed": {
            "reject": 0.33,
            "low": 0.6,
            "medium": 0.8
          }
        }
      },
      "sentences": [
        {
          "generated_prob": 0.9999584222438985,
          "sentence": "People have said that electric vehicles are a key part of making transportation more environmentally friendly.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000041577756101474574,
            "ai": 0.000013057493072758007,
            "paraphrased": 0.9999453647508257
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999665258223968,
          "sentence": "Electric vehicles (EVs) have gotten a lot of attention and money because people around the world are trying to cut down on carbon emissions and slow down climate change.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003347417760325455,
            "ai": 0.000015176660577328875,
            "paraphrased": 0.9999513491618194
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999676821623771,
          "sentence": "This paper's goal is to look at all the many aspects of EVs and analyse their pros and cons.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003231783762293248,
            "ai": 0.000015176678224318814,
            "paraphrased": 0.9999525054841527
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0,
          "sentence": "The good things about electric cars are:",
          "perplexity": 0,
          "should_mask": true,
          "masking_reason": "header",
          "class_probabilities": {
            "human": 1,
            "ai": 0,
            "paraphrased": 0
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999653280643248,
          "sentence": "Effect on the Environment: EVs cut down on greenhouse gas emissions a lot, especially when they run on renewable energy.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003467193567511431,
            "ai": 0.000013954115433061735,
            "paraphrased": 0.9999513739488918
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.99996415754367,
          "sentence": "Not having tailpipe emissions is a big part of making the air in cities cleaner.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003584245633005219,
            "ai": 0.000013472054492840642,
            "paraphrased": 0.9999506854891771
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999553065247506,
          "sentence": "Energy Efficiency: Electric cars are naturally more efficient than cars with internal combustion engines.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000044693475249376955,
            "ai": 0.000013367097305469505,
            "paraphrased": 0.9999419394274451
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.999953977802226,
          "sentence": "Directly turning electrical energy into power is more efficient, which means that less energy is used overall.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000046022197774064636,
            "ai": 0.000012557219035433414,
            "paraphrased": 0.9999414205831905
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999649878303083,
          "sentence": "Performance Benefits: Electric motors can give you instant torque, which makes acceleration smooth and quick.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000035012169691728696,
            "ai": 0.000014229326437907466,
            "paraphrased": 0.9999507585038704
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999540676422511,
          "sentence": "When combined with low centre of gravity designs, this trait frequently makes handling better and driving more enjoyable.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00004593235774885146,
            "ai": 0.000013524644985258875,
            "paraphrased": 0.9999405429972659
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0,
          "sentence": "Electric cars have some problems:",
          "perplexity": 0,
          "should_mask": true,
          "masking_reason": "header",
          "class_probabilities": {
            "human": 1,
            "ai": 0,
            "paraphrased": 0
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": false,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999634506836224,
          "sentence": "Limited Range and Range Anxiety: Even though EVs have come a long way, they still don't have as much range as gas-powered cars.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003654931637771874,
            "ai": 0.000014652338850208465,
            "paraphrased": 0.9999487983447721
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.999960403633639,
          "sentence": "This restriction, together with extended charging periods, makes potential customers worried about range.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003959636636100675,
            "ai": 0.000014853991580838333,
            "paraphrased": 0.9999455496420582
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999578498941872,
          "sentence": "Charging Infrastructure: The fact that there isn't a lot of uniform charging infrastructure is still a big problem.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.000042150105812783775,
            "ai": 0.000012459547941352707,
            "paraphrased": 0.9999453903462459
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        },
        {
          "generated_prob": 0.9999631641531335,
          "sentence": "The fact that charging stations are not always available, especially in rural or underdeveloped urban areas, makes long-distance travel more difficult.",
          "perplexity": 0,
          "should_mask": false,
          "masking_reason": null,
          "class_probabilities": {
            "human": 0.00003683584686649316,
            "ai": 0.000017812652920882997,
            "paraphrased": 0.9999453515002126
          },
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null,
          "highlight_sentence_for_ai": true,
          "special_highlight_type": null
        }
      ],
      "class_probabilities": {
        "human": 0,
        "ai": 1,
        "mixed": 0
      },
      "confidence_scores_raw": {
        "identity": {
          "ai": 1,
          "mixed": 0,
          "human": 0
        }
      },
      "subclass": {
        "ai": {
          "predicted_class": "ai_paraphrased",
          "result_message": "We are highly confident this text was originally AI, but rewritten by AI or a human",
          "confidence_score": 0.9999949213003358,
          "confidence_category": "high",
          "class_probabilities": {
            "pure_ai": 0.000005078699664102363,
            "ai_paraphrased": 0.9999949213003358
          },
          "confidence_scores_raw": {
            "identity": {
              "pure_ai": 0.000005078699664102363,
              "ai_paraphrased": 0.9999949213003358
            }
          },
          "confidence_thresholds_raw": {
            "identity": {
              "ai_paraphrased": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              },
              "pure_ai": {
                "reject": 0.33,
                "low": 0.6,
                "medium": 0.8
              }
            }
          }
        }
      },
      "pageNumber": 0,
      "neatVersion": "4.1o",
      "version": "2026-10-07-base",
      "language": "en",
      "result_message": "Our detector is highly confident that the text is written by AI.",
      "result_sub_message": null,
      "document_classification": "AI_ONLY",
      "inputText": "People have said that electric vehicles are a key part of making transportation more environmentally friendly. Electric vehicles (EVs) have gotten a lot of attention and money because people around the world are trying to cut down on carbon emissions and slow down climate change. This paper's goal is to look at all the many aspects of EVs and analyse their pros and cons.\n\nThe good things about electric cars are:\n\nEffect on the Environment: EVs cut down on greenhouse gas emissions a lot, especially when they run on renewable energy. Not having tailpipe emissions is a big part of making the air in cities cleaner.\n\nEnergy Efficiency: Electric cars are naturally more efficient than cars with internal combustion engines. Directly turning electrical energy into power is more efficient, which means that less energy is used overall.\n\nPerformance Benefits: Electric motors can give you instant torque, which makes acceleration smooth and quick. When combined with low centre of gravity designs, this trait frequently makes handling better and driving more enjoyable.\n\nElectric cars have some problems:\n\nLimited Range and Range Anxiety: Even though EVs have come a long way, they still don't have as much range as gas-powered cars. This restriction, together with extended charging periods, makes potential customers worried about range.\n\nCharging Infrastructure: The fact that there isn't a lot of uniform charging infrastructure is still a big problem. The fact that charging stations are not always available, especially in rural or underdeveloped urban areas, makes long-distance travel more difficult.\n",
      "document_id": "0be940df-43e4-4567-bfd7-aa957bebbd65"
    }
  ]
}
```

##### 400 The request failed validation. The \`error\` field says what was wrong.

##### 401, 403, 429, 500

- `401` The API key is missing or expired.
- `403` The API key doesn't belong to any account.
- `429` You've hit your plan's word limit or hourly rate limit. If you're on a paid plan and still see this, check that your key is sent in the \`x-api-key\` header. A key that isn't sent correctly can leave you on the free plan's rate limit.
- `500` Something went wrong on our side while processing the request. Retry the request, and contact us if it keeps failing.

**Content type:** `application/json`

[DocumentContentError](#scalar-schema-documentcontenterror)

An error response. `error` describes the problem, and the HTTP status code says what kind of error it is.

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "error": ""
}
```

<a id="scalar-operation-post-v2predictfiles"></a>

### Detect AI in files

- **Method:** `POST`
- **Path:** `/v2/predict/files`
- **Operation ID:** `predictFiles`

Detects AI in uploaded files and returns one result per file.

You can upload up to 250 files per request, each up to 50 MB. Text extracted from each file is truncated to your plan's character limit (150,000 characters on API plans).

If you're evaluating the detector for research, read [how to interpret the multi-class output](https://gptzero.me/news/chicago-booth-2026/). For research questions about the API, [contact our research team](https://gptzero.me/resources/researchers). For anything else, [contact us](https://gptzero.me/contact-us).

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Request body

The files to scan, sent as `multipart/form-data`.

**Content type:** `multipart/form-data`

- **`files` (required)**: `array of any`

  The files to scan. Send each file as a separate `files` part.
- **`modelVersion`**: `string`

  The model version to use. Defaults to the latest version. `GET /v2/model-versions/ai-scan` lists the available versions, and the [release notes](https://docs.superhuman.com/d/Project-engineering-import_doYGpUuF477/GPTZero-Release-Notes-Model-and-API_suN_Kut5#_luA8d53F) say what changed in each. An unknown version is rejected with a `400` that lists the valid ones.
- **`version`**: `string`, deprecated

  **Deprecated.** Use `modelVersion` instead. If you send both, neither is used and the scan runs on the default model.

<a id="scalar-example-2"></a>

**Generated example:**

```json
{
  "files": [],
  "modelVersion": ""
}
```

#### Responses

##### 200 The scan results, one entry in \`documents\` per file.

**Content type:** `application/json`

[DocumentPredictionsV3](#scalar-schema-documentpredictionsv3)

The scan result. Each document is split into sentences and grouped into paragraphs, so you can use the result at the level of detail you need.

<a id="scalar-example-3"></a>

**Generated example:**

```json
{
  "version": "",
  "neatVersion": "",
  "documents": [
    {
      "class_probabilities": {
        "ai": 0,
        "human": 0,
        "mixed": 0
      },
      "confidence_category": "high",
      "confidence_score": 1,
      "paragraphs": [
        {
          "completely_generated_prob": 1,
          "num_sentences": 1,
          "start_sentence_index": 1
        }
      ],
      "predicted_class": "",
      "sentences": [
        {
          "generated_prob": 0,
          "perplexity": 1,
          "sentence": "",
          "highlight_sentence_for_ai": true,
          "should_mask": true,
          "masking_reason": null,
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null
        }
      ],
      "result_message": "",
      "result_sub_message": null,
      "document_classification": "",
      "version": "",
      "document_id": "",
      "subclass": {
        "ai": {
          "confidence_category": "high",
          "predicted_class": "pure_ai",
          "confidence_score": 0,
          "class_probabilities": {
            "pure_ai": 0,
            "ai_paraphrased": 0
          },
          "result_message": ""
        },
        "mixed": {
          "confidence_category": "high",
          "predicted_class": "concatenated",
          "confidence_score": 0,
          "class_probabilities": {
            "concatenated": 0,
            "polished": 0
          },
          "result_message": ""
        }
      },
      "excluded_spans": [
        {
          "start": 1,
          "end": 1,
          "text": "",
          "reason": ""
        }
      ]
    }
  ],
  "scanId": ""
}
```

##### 400 The request failed validation, or text couldn't be extracted from one of the files. The \`error\` field says what was wrong. When a file couldn't be read, \`code\` is \`file\_text\_unreadable\`; check that the file has text in it, then upload it again. When text extraction is temporarily unavailable, \`code\` is \`text\_extraction\_unavailable\`; retry the request in a few minutes.

**Content type:** `application/json`

- **`code`**: `string`
- **`error`**: `string`

<a id="scalar-example-4"></a>

**Generated example:**

```json
{
  "error": "",
  "code": ""
}
```

##### 401, 403, 429, 500

- `401` The API key is missing or expired.
- `403` The API key doesn't belong to any account.
- `429` You've hit your plan's word limit or hourly rate limit. If you're on a paid plan and still see this, check that your key is sent in the \`x-api-key\` header. A key that isn't sent correctly can leave you on the free plan's rate limit.
- `500` Something went wrong on our side while processing the request. Retry the request, and contact us if it keeps failing.

**Content type:** `application/json`

[DocumentContentError](#scalar-schema-documentcontenterror)

An error response. `error` describes the problem, and the HTTP status code says what kind of error it is.

[Generated example](#scalar-example-1)

<a id="scalar-operation-post-v3aipatternsstream"></a>

### Stream AI patterns

- **Method:** `POST`
- **Path:** `/v3/ai/patterns/stream`
- **Operation ID:** `streamAiPatterns`

Finds AI writing patterns in a document, such as the rule of three, and explains each match in plain language.

Results stream back as [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). Each event is a `data: <json>` line, where `<json>` is an `AiPatternStreamEvent` for one sentence and the patterns it matched. Sentences with no matches are skipped. The stream ends when the connection closes.

The server sends a `:keepalive` comment every 30 seconds, which SSE clients ignore. If processing fails after the stream has started, the status is already `200`, so the error arrives as a final `data: {"error": "Error in streaming AI patterns"}` event. Check each event for an `error` field.

AI Patterns isn't on by default. Your API key has to be allow-listed for it.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Request body

One document to scan, given either as text (`inputText`) or as the ID of an earlier Advanced Scan (`document_id`).

**Required:** `true`

**Content type:** `application/json`

- **`documents` (required)**: `array`, maxItems: `1`

  The document to scan. Send exactly one.

  **Items:**

  **One of:**
  - `object`

    **Required fields:** `inputText`
  - `object`

    **Required fields:** `document_id`
  * **`document_id`**: `string`, format: `uuid`

    The ID of a document from an earlier Advanced Scan. The text is loaded from that document, and the matches are saved back onto its sentences.
  * **`inputText`**: `string`, maxLength: `150000`

    The text to scan, up to 150,000 characters. Longer text is rejected with a `400`, not truncated.

<a id="scalar-example-5"></a>

**Generated example:**

```json
{
  "documents": [
    {}
  ]
}
```

#### Responses

##### 200 An open event stream. Each \`data:\` line is one \`AiPatternStreamEvent\`.

**Content type:** `text/event-stream`

[AiPatternStreamEvent](#scalar-schema-aipatternstreamevent)

One sentence that matched at least one AI writing pattern. Sent as the payload of one `data:` line.

<a id="scalar-example-6"></a>

**Generated example:**

```json
{
  "document_index": 1,
  "sentence_index": 1,
  "sentence": "",
  "interpretability_designation": "",
  "patterns": [
    {
      "domain_id": "",
      "pattern_id": "",
      "pattern_name": "",
      "display_name": "",
      "category": "",
      "description": "",
      "display_description": "",
      "explanation": "",
      "relevance": 1,
      "k_times": null
    }
  ]
}
```

##### 400, 403, 429, 500

- `400` The request failed validation. Usually \`documents\` had more than one document, the document had neither or both of \`inputText\` and \`document\_id\`, or the text was over 150,000 characters.
- `403` Your API key isn't allow-listed for AI Patterns. \[Contact us]\(https\://gptzero.me/contact-us) to request access.
- `429` You've hit your plan's word limit or the rate limit for expensive AI endpoints.
- `500` Something went wrong on our side while processing the request. Retry the request, and contact us if it keeps failing.

**Content type:** `application/json`

[DocumentContentError](#scalar-schema-documentcontenterror)

An error response. `error` describes the problem, and the HTTP status code says what kind of error it is.

[Generated example](#scalar-example-1)

<a id="scalar-operation-post-v2hallucination-checktext"></a>

### Check text for hallucinations

- **Method:** `POST`
- **Path:** `/v2/hallucination-check/text`
- **Operation ID:** `hallucinationCheckText`
- **Tags:** 

Checks the citations in one document for hallucinations. Finds each bibliography entry and claim, checks whether each cited source exists and supports the claim, and returns the sources it matched.

Each request uses credits from your plan - credit calculation is detailed [here](https://support.gptzero.me/articles/8011707113-how-are-credits-used-calculated).

If you don't have enough credits left and your plan doesn't allow overage, the check is rejected with a `429` and `code: out_of_credits`, and you aren't charged. This can happen after the bibliography is read, once the response has started: then the response status is `200` and the body is `{ "error": ..., "status": 429, "code": "out_of_credits" }`, so check for `error` before reading the result.

The check holds the connection open until it finishes, which can take several minutes for long documents. If the request times out with a `504` and your API key saves scans, a check that finishes afterwards is still charged and appears in your scan history. Text longer than your plan's character limit is rejected with a `400`. On API plans, the limit is 150,000 characters.

When your API key saves scans, the result is saved to your scan history and has an `id`. Otherwise nothing is stored.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Request body

**Content type:** `application/json`

- **`document` (required)**: `string`

<a id="scalar-example-7"></a>

**Generated example:**

```json
{
  "document": "Evaluating the Gun Control Debate Perhaps the most cited argument against the implementation of gun control is the second amendment to the United States constitution which opponents of gun control contend guarantees a near-unlimited right for individual Americans to own firearms of any variety [1].  Works Cited [1] Carroll, Lauren. \"Obama: US Spends More On Military Than Next 8 Nations Combined.\" PolitiFact. N.p., 2015. Web."
}
```

#### Responses

##### 200 The hallucination check result for the document, or a \`HallucinationCheckLateError\` if the check failed after the response started.

**Content type:** `application/json`

[HallucinationCheckResult](#scalar-schema-hallucinationcheckresult) | [HallucinationCheckLateError](#scalar-schema-hallucinationchecklateerror)

<a id="scalar-example-8"></a>

**Generated example:**

```json
{
  "id": "",
  "version": 1,
  "bibliographic_citations": [
    {
      "ai_scan": {
        "predicted_class": "human",
        "score": 1
      },
      "citation_exists": {
        "hallucination_label": null,
        "hallucination_explanation": null,
        "justification": null,
        "score": null,
        "status": "exist"
      },
      "claim_reference": {
        "has_reference": true
      },
      "id": 1,
      "citation_type": null,
      "citation_object": null,
      "indices": {
        "end": 1,
        "start": 1
      },
      "text": ""
    }
  ],
  "claims": [
    {
      "agree_with_citation": {
        "justification": null,
        "stance": "support"
      },
      "bibliographic_citation_ids": [
        1
      ],
      "claim_type": "cited",
      "id": 1,
      "indices": {
        "end": 1,
        "start": 1
      },
      "is_cited_in_bibliography": {
        "check_worthy": null,
        "is_cited": true,
        "justification": null,
        "score": 1
      },
      "text": ""
    }
  ],
  "sources": [
    {
      "authors": [
        ""
      ],
      "citation_id": null,
      "citation_match": {
        "authors_match_score": 1,
        "citation_does_not_match": true,
        "citation_match": true,
        "confidence": 1,
        "doi_match_score": 1,
        "hallucination_explanation": null,
        "hallucination_label": null,
        "justification": null,
        "llm_match_score": null,
        "publication_date_match_score": 1,
        "publisher_match_score": 1,
        "score": 1,
        "title_match_score": 1,
        "url_match_score": 1,
        "additionalProperty": "anything"
      },
      "citation_object": {
        "access_date": null,
        "authors": [
          ""
        ],
        "doi": null,
        "publication_date": null,
        "publisher": null,
        "title": null,
        "url": null,
        "additionalProperty": "anything"
      },
      "citations": {
        "apa": "",
        "bibtex": "",
        "chicago": "",
        "ieee": "",
        "mla": ""
      },
      "claim_id": null,
      "content": null,
      "date": "",
      "id": 1,
      "justification": null,
      "relevant_chunk": null,
      "sourcerer_name": "",
      "stance": null,
      "title": null,
      "url": null
    }
  ],
  "inputText": ""
}
```

##### 429 You've run out of credits, or you've hit your plan's rate limit. \`code\` is \`out\_of\_credits\` when the check would cost more than you have left.

**Content type:** `application/json`

- **`code`**: `string`
- **`error`**: `string`

<a id="scalar-example-9"></a>

**Generated example:**

```json
{
  "error": "",
  "code": ""
}
```

##### 500 Something went wrong on our side while processing the request. Retry the request, and contact us if it keeps failing.

**Content type:** `application/json`

- **`error`**: `string`

<a id="scalar-example-10"></a>

**Generated example:**

```json
{
  "error": ""
}
```

<a id="scalar-operation-post-v2hallucination-checkfiles"></a>

### Check files for hallucinations

- **Method:** `POST`
- **Path:** `/v2/hallucination-check/files`
- **Operation ID:** `hallucinationCheckFiles`
- **Tags:** 

Checks the citations in each uploaded file for hallucinations, and returns one result per file.

Each file is checked against your remaining credits on its own. If any file's check fails, the request fails with that file's error, and you're still charged for the other files whose checks finished. See [Check text for hallucinations](/api-reference/#POST/v2/hallucination-check/text) for how credit limits and errors work.

If text can't be extracted from a file after the response has started, the status stays `200` and the body is `{ "error": ..., "status": 400, "code": "file_text_unreadable" }` or `"text_extraction_unavailable"`. Check for `error` before reading the results. Before the response starts, the same failure is a `400` with that `code`.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Request body

The files to scan, sent as `multipart/form-data`.

**Content type:** `multipart/form-data`

- **`files` (required)**: `array of any`

  The files to scan. Send each file as a separate `files` part.

<a id="scalar-example-11"></a>

**Generated example:**

```json
{
  "files": []
}
```

#### Responses

##### 200 The hallucination check results, one per file, or a \`HallucinationCheckLateError\` if text extraction or a check failed after the response started.

**Content type:** `application/json`

array of [HallucinationCheckResult](#scalar-schema-hallucinationcheckresult) | [HallucinationCheckLateError](#scalar-schema-hallucinationchecklateerror)

<a id="scalar-example-12"></a>

**Generated example:**

```json
[
  {
    "id": "",
    "version": 1,
    "bibliographic_citations": [
      {
        "ai_scan": {
          "predicted_class": "human",
          "score": 1
        },
        "citation_exists": {
          "hallucination_label": null,
          "hallucination_explanation": null,
          "justification": null,
          "score": null,
          "status": "exist"
        },
        "claim_reference": {
          "has_reference": true
        },
        "id": 1,
        "citation_type": null,
        "citation_object": null,
        "indices": {
          "end": 1,
          "start": 1
        },
        "text": ""
      }
    ],
    "claims": [
      {
        "agree_with_citation": {
          "justification": null,
          "stance": "support"
        },
        "bibliographic_citation_ids": [
          1
        ],
        "claim_type": "cited",
        "id": 1,
        "indices": {
          "end": 1,
          "start": 1
        },
        "is_cited_in_bibliography": {
          "check_worthy": null,
          "is_cited": true,
          "justification": null,
          "score": 1
        },
        "text": ""
      }
    ],
    "sources": [
      {
        "authors": [
          ""
        ],
        "citation_id": null,
        "citation_match": {
          "authors_match_score": 1,
          "citation_does_not_match": true,
          "citation_match": true,
          "confidence": 1,
          "doi_match_score": 1,
          "hallucination_explanation": null,
          "hallucination_label": null,
          "justification": null,
          "llm_match_score": null,
          "publication_date_match_score": 1,
          "publisher_match_score": 1,
          "score": 1,
          "title_match_score": 1,
          "url_match_score": 1,
          "additionalProperty": "anything"
        },
        "citation_object": {
          "access_date": null,
          "authors": [
            ""
          ],
          "doi": null,
          "publication_date": null,
          "publisher": null,
          "title": null,
          "url": null,
          "additionalProperty": "anything"
        },
        "citations": {
          "apa": "",
          "bibtex": "",
          "chicago": "",
          "ieee": "",
          "mla": ""
        },
        "claim_id": null,
        "content": null,
        "date": "",
        "id": 1,
        "justification": null,
        "relevant_chunk": null,
        "sourcerer_name": "",
        "stance": null,
        "title": null,
        "url": null
      }
    ],
    "inputText": ""
  }
]
```

##### 400 The request failed validation, or text couldn't be extracted from one of the files. The \`error\` field says what was wrong. When a file couldn't be read, \`code\` is \`file\_text\_unreadable\`; check that the file has text in it, then upload it again. When text extraction is temporarily unavailable, \`code\` is \`text\_extraction\_unavailable\`; retry the request in a few minutes.

**Content type:** `application/json`

- **`code`**: `string`
- **`error`**: `string`

<a id="scalar-example-13"></a>

**Generated example:**

```json
{
  "error": "",
  "code": ""
}
```

##### 429 You've run out of credits, or you've hit your plan's rate limit. \`code\` is \`out\_of\_credits\` when the check would cost more than you have left.

**Content type:** `application/json`

- **`code`**: `string`
- **`error`**: `string`

<a id="scalar-example-14"></a>

**Generated example:**

```json
{
  "error": "",
  "code": ""
}
```

##### 500 Something went wrong on our side while processing the request. Retry the request, and contact us if it keeps failing.

**Content type:** `application/json`

- **`error`**: `string`

<a id="scalar-example-15"></a>

**Generated example:**

```json
{
  "error": ""
}
```

<a id="scalar-operation-post-v2bibliography-scantext"></a>

### Bibliography scan (text) ⚠️ Deprecated

- **Method:** `POST`
- **Path:** `/v2/bibliography-scan/text`
- **Operation ID:** `bibliographyScanText`
- **Tags:** 

**Deprecated.** Use [`POST /v2/hallucination-check/text`](/api-reference/#POST/v2/hallucination-check/text) instead. Requests to this path get a `308` redirect to it, with a `Deprecation` header and a `Link` header naming the new path. Most HTTP clients follow a `308` and resend the same request.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Responses

##### 308 Redirects to \`/v2/hallucination-check/text\`.

**Headers:**

- **`Location`**

  The new path, with your query string.

  `string`
- **`Deprecation`**

  Always `true`.

  `string`

<a id="scalar-operation-post-v2bibliography-scanfiles"></a>

### Bibliography scan (files) ⚠️ Deprecated

- **Method:** `POST`
- **Path:** `/v2/bibliography-scan/files`
- **Operation ID:** `bibliographyScanFiles`
- **Tags:** 

**Deprecated.** Use [`POST /v2/hallucination-check/files`](/api-reference/#POST/v2/hallucination-check/files) instead. Requests to this path get a `308` redirect to it, with a `Deprecation` header and a `Link` header naming the new path. Most HTTP clients follow a `308` and resend the same request.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Responses

##### 308 Redirects to \`/v2/hallucination-check/files\`.

**Headers:**

- **`Location`**

  The new path, with your query string.

  `string`
- **`Deprecation`**

  Always `true`.

  `string`

<a id="scalar-operation-get-v3usage-stats"></a>

### Get usage stats

- **Method:** `GET`
- **Path:** `/v3/usage-stats`
- **Operation ID:** `getUsageStats`
- **Tags:** 

Returns how many credits you have used and have left in the current billing cycle, and your plan. Each request uses credits from your plan - credit calculation is detailed [here](https://support.gptzero.me/articles/8011707113-how-are-credits-used-calculated).

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Responses

##### 200 Your usage for the current billing cycle.

**Content type:** `application/json`

[UsageStats](#scalar-schema-usagestats)

Your usage in the current billing cycle.

API (Enterprise) plans are billed by usage and don't have a credit limit, so `credits_left` is `null` on those plans.

<a id="scalar-example-16"></a>

**Generated example:**

```json
{
  "data": {
    "credits_left": 429569,
    "credits_used": 70431,
    "cycle_start": 1739985107,
    "cycle_end": 1742342400,
    "plan": "Professional"
  }
}
```

<a id="scalar-operation-get-v2model-versionsai-scan"></a>

### List model versions

- **Method:** `GET`
- **Path:** `/v2/model-versions/ai-scan`
- **Operation ID:** `listModelVersions`
- **Tags:** 

Returns the model versions you can pass as `modelVersion`. The list can include versions that aren't released yet, so check the [release notes](https://docs.superhuman.com/d/Project-engineering-import_doYGpUuF477/GPTZero-Release-Notes-Model-and-API_suN_Kut5#_luA8d53F) for which ones are approved for use and what each one improves.

**Servers:** [Inherited servers](#scalar-context-global-servers)

#### Authentication

No authentication required.

#### Responses

##### 200 The available model versions.

**Content type:** `application/json`

`array of string`

**Example: Example**

```json
[
  "2026-09-13-base",
  "2026-06-10-multilingual",
  "2026-10-07-base",
  "2026-03-11-base",
  "2025-11-13-base",
  "2025-11-09-multilingual",
  "2026-08-09-base",
  "2026-10-05-base",
  "2026-08-01-base"
]
```

## Schemas

<a id="scalar-schema-documentpredictionsv3"></a>

### DocumentPredictionsV3

**Type:** `object`

The scan result. Each document is split into sentences and grouped into paragraphs, so you can use the result at the level of detail you need.

- **`documents`**: `array`

  **Items:**
  - **`average_generated_prob`**: `number`, minimum: `0`, maximum: `1`, deprecated

    **Internal.** Don't use this field to evaluate the detector. The average probability that each sentence was generated by AI.
  - **`class_probabilities`**: `object`

    The probability the detector assigns to each class, from 0 to 1. The probability of `predicted_class` is the chance the prediction is correct.
    - **`ai`**: `number`, minimum: `0`, maximum: `1`
    - **`human`**: `number`, minimum: `0`, maximum: `1`
    - **`mixed`**: `number`, minimum: `0`, maximum: `1`
  - **`completely_generated_prob`**: `number`, minimum: `0`, maximum: `1`, deprecated

    The probability that the whole document was generated by AI, with little or no human involvement. From 0 to 1.
  - **`confidence_category`**: `string`, possible values: `"high", "medium", "low", "reject"`

    How confident the detector is in `predicted_class`. The thresholds are set so that `high` confidence has an error rate under 1%.
    - `high`, `medium`, `low`: the confidence band.
    - `reject`: the confidence is at or below the `reject` threshold, too low to call.
  - **`confidence_score`**: `number`

    **Internal.** A normalized confidence score used for visualization. Show `confidence_category` to your users instead.
  - **`document_classification`**: `string`

    A simpler classification of the document.
    - `HUMAN_ONLY`: the document is most likely written mostly by a human.
    - `MIXED`: part of the document has a strong AI signature, or the whole document has a weak one.
    - `AI_ONLY`: the document was written entirely by AI.
  - **`document_id`**: `string`

    The ID of the scanned document.
  - **`excluded_spans`**: array of [ExcludedSpan](#scalar-schema-excludedspan)

    The parts of the document that were masked out of AI scoring.
  - **`paragraphs`**: `array`

    The paragraphs in the document. A paragraph is text separated by newlines.

    **Items:**
    - **`completely_generated_prob`**: `number`

      **Internal.** Kept for backward compatibility. Don't use this field.
    - **`num_sentences`**: `integer`

      The number of sentences in the paragraph.
    - **`start_sentence_index`**: `integer`

      The index in `sentences` of the paragraph's first sentence.
  - **`predicted_class`**: `string`

    The class the detector thinks is most likely. Use it with `class_probabilities` to see how likely the prediction is to be correct, and with `result_message` for what to show your users.
    - `human`: the document contains only human text.
    - `ai`: the document contains only AI text.
    - `mixed`: the document contains both human and AI text.
  - **`result_message`**: `string`

    The message GPTZero shows for this result. You can show it to your users. It's one of:
    - "Our detector is highly confident that the text is written by AI"
    - "Our detector is highly confident that the text may include parts written by AI"
    - "Our detector is highly confident that the text is written entirely by a human"
    - "Our detector is moderately confident that the text is written by AI"
    - "Our detector is moderately confident that the text may include parts written by AI"
    - "Our detector is moderately confident that the text is written entirely by a human"
    - "Our detector is highly uncertain about this document. The writing style and content are not particularly AI-like"
  - **`result_sub_message`**: `string | null`

    More detail or context for `result_message`, if there is any.
  - **`sentences`**: `array`

    The sentences in the document, in order.

    **Items:**
    - **`generated_prob`**: `number`, minimum: `0`, maximum: `1`

      The probability that the sentence was generated by AI, from 0 to 1.
    - **`highlight_sentence_for_ai`**: `boolean`

      Whether GPTZero would highlight the sentence as AI-written. It's `true` when both the sentence's `generated_prob` and its paragraph's `completely_generated_prob` are over a threshold.
    - **`interpretability_alpha`**: `number | null`

      **Internal.** Available to allow-listed customers only. The highlight intensity for the sentence in Advanced Scan.
    - **`interpretability_designation`**: `string | null`

      **Internal.** Available to allow-listed customers only. Whether the sentence contributes to the `human` or `ai` class, which sets its Advanced Scan highlight color.
    - **`interpretability_normalized_value`**: `number | null`

      **Internal.** Available to allow-listed customers only. The sentence's normalized contribution to the document's prediction in Advanced Scan, used to group sentences into low, medium and high impact.
    - **`interpretability_value`**: `number | null`

      **Internal.** Available to allow-listed customers only. The raw interpretability value from Advanced Scan.
    - **`masking_reason`**: `string | null`

      Why the sentence is masked, for example `references`, `table` or `code_block`. `null` when `should_mask` is `false`.
    - **`perplexity`**: `integer`

      The perplexity of the sentence. The lower it is, the more likely the sentence was written by AI.
    - **`sentence`**: `string`

      The text of the sentence.
    - **`should_mask`**: `boolean`

      Whether the sentence is left out of AI scoring and highlighting, for example because it's part of a reference list, table or code block.
  - **`subclass`**: `object`

    A more specific class, set only when `predicted_class` is `ai` or `mixed`. It has either an `ai` or a `mixed` key, never both.
    - For `ai`: `pure_ai` is the direct output of an LLM, and `ai_paraphrased` is AI text run through a paraphraser or bypasser.
    - For `mixed`: `concatenated` is AI and human writing joined together, and `polished` is human writing polished with AI.

    **Any of:**
    - `object`
      - **`ai`**: `object`
        - **`class_probabilities`**: `object`

          The probability the detector assigns to each class, from 0 to 1. The probability of `predicted_class` is the chance the prediction is correct.
          - **`ai_paraphrased`**: `number`, format: `float`, minimum: `0`, maximum: `1`
          - **`pure_ai`**: `number`, format: `float`, minimum: `0`, maximum: `1`
        - **`confidence_category`**: `string`, possible values: `"high", "medium", "low", "reject"`

          How confident the detector is in `predicted_class`. The thresholds are set so that `high` confidence has an error rate under 1%.
          - `high`, `medium`, `low`: the confidence band.
          - `reject`: the confidence is at or below the `reject` threshold, too low to call.
        - **`confidence_score`**: `number`, format: `float`, minimum: `0`, maximum: `1`

          **Internal.** A normalized confidence score used for visualization. Show `confidence_category` to your users instead.
        - **`predicted_class`**: `string`, possible values: `"pure_ai", "ai_paraphrased"`

          The subclass the detector thinks is most likely. Use it with `class_probabilities` to see how likely the prediction is to be correct.
        - **`result_message`**: `string`

          A message you can show your users to explain the subclass, for example "We are highly confident that this text has been rewritten by AI, an AI paraphraser or AI bypasser".
      - **`mixed`**: `object`
        - **`class_probabilities`**: `object`

          The probability the detector assigns to each class, from 0 to 1. The probability of `predicted_class` is the chance the prediction is correct.
          - **`concatenated`**: `number`, format: `float`, minimum: `0`, maximum: `1`
          - **`polished`**: `number`, format: `float`, minimum: `0`, maximum: `1`
        - **`confidence_category`**: `string`, possible values: `"high", "medium", "low", "reject"`

          How confident the detector is in `predicted_class`. The thresholds are set so that `high` confidence has an error rate under 1%.
          - `high`, `medium`, `low`: the confidence band.
          - `reject`: the confidence is at or below the `reject` threshold, too low to call.
        - **`confidence_score`**: `number`, format: `float`, minimum: `0`, maximum: `1`

          **Internal.** A normalized confidence score used for visualization. Show `confidence_category` to your users instead.
        - **`predicted_class`**: `string`, possible values: `"concatenated", "polished"`

          The subclass the detector thinks is most likely. Use it with `class_probabilities` to see how likely the prediction is to be correct.
        - **`result_message`**: `string`

          A message you can show your users to explain the subclass, for example "We are highly confident that this text has been rewritten by AI, an AI paraphraser or AI bypasser".
    - `object`
      - **`mixed`**: `object`
        - **`class_probabilities`**: `object`

          The probability the detector assigns to each class, from 0 to 1. The probability of `predicted_class` is the chance the prediction is correct.
          - **`concatenated`**: `number`, format: `float`, minimum: `0`, maximum: `1`
          - **`polished`**: `number`, format: `float`, minimum: `0`, maximum: `1`
        - **`confidence_category`**: `string`, possible values: `"high", "medium", "low", "reject"`

          How confident the detector is in `predicted_class`. The thresholds are set so that `high` confidence has an error rate under 1%.
          - `high`, `medium`, `low`: the confidence band.
          - `reject`: the confidence is at or below the `reject` threshold, too low to call.
        - **`confidence_score`**: `number`, format: `float`, minimum: `0`, maximum: `1`

          **Internal.** A normalized confidence score used for visualization. Show `confidence_category` to your users instead.
        - **`predicted_class`**: `string`, possible values: `"concatenated", "polished"`

          The subclass the detector thinks is most likely. Use it with `class_probabilities` to see how likely the prediction is to be correct.
        - **`result_message`**: `string`

          A message you can show your users to explain the subclass, for example "We are highly confident that this text was originally written by a human and improved using AI".
  - **`version`**: `string`

    The version of the detector that produced this result.
- **`neatVersion`**: `string`

  The short-form version of the detector that produced this result, in the form `x.y{model_indicator}`. For example, `4.1o` or `4.1m`. See the [release notes](https://docs.superhuman.com/d/Project-engineering-import_doYGpUuF477/GPTZero-Release-Notes-Model-and-API_suN_Kut5#_luA8d53F).
- **`scanId`**: `string`

  The ID of the dashboard scan this result is linked to, if there is one.
- **`version`**: `string`

  The long-form version of the detector that produced this result, in the form `yyyy-mm-dd-{model_name}`. For example, `2026-10-07-base` or `2026-06-10-multilingual`. See the [release notes](https://docs.superhuman.com/d/Project-engineering-import_doYGpUuF477/GPTZero-Release-Notes-Model-and-API_suN_Kut5#_luA8d53F).

<a id="scalar-example-17"></a>

**Generated example:**

```json
{
  "version": "",
  "neatVersion": "",
  "documents": [
    {
      "class_probabilities": {
        "ai": 0,
        "human": 0,
        "mixed": 0
      },
      "confidence_category": "high",
      "confidence_score": 1,
      "paragraphs": [
        {
          "completely_generated_prob": 1,
          "num_sentences": 1,
          "start_sentence_index": 1
        }
      ],
      "predicted_class": "",
      "sentences": [
        {
          "generated_prob": 0,
          "perplexity": 1,
          "sentence": "",
          "highlight_sentence_for_ai": true,
          "should_mask": true,
          "masking_reason": null,
          "interpretability_value": null,
          "interpretability_normalized_value": null,
          "interpretability_designation": null,
          "interpretability_alpha": null
        }
      ],
      "result_message": "",
      "result_sub_message": null,
      "document_classification": "",
      "version": "",
      "document_id": "",
      "subclass": {
        "ai": {
          "confidence_category": "high",
          "predicted_class": "pure_ai",
          "confidence_score": 0,
          "class_probabilities": {
            "pure_ai": 0,
            "ai_paraphrased": 0
          },
          "result_message": ""
        },
        "mixed": {
          "confidence_category": "high",
          "predicted_class": "concatenated",
          "confidence_score": 0,
          "class_probabilities": {
            "concatenated": 0,
            "polished": 0
          },
          "result_message": ""
        }
      },
      "excluded_spans": [
        {
          "start": 1,
          "end": 1,
          "text": "",
          "reason": ""
        }
      ]
    }
  ],
  "scanId": ""
}
```

<a id="scalar-schema-usagestats"></a>

### UsageStats

**Type:** `object`

Your usage in the current billing cycle.

API (Enterprise) plans are billed by usage and don't have a credit limit, so `credits_left` is `null` on those plans.

- **`data`**: `object`
  - **`credits_left`**: `number | null`

    The number of credits you have left in the current billing cycle. Null on API (Enterprise) plans, which don't have a credit limit.
  - **`credits_used`**: `number | null`

    The number of credits you have used in the current billing cycle. Null if your usage couldn't be found.
  - **`cycle_end`**: `number | null`

    When the current billing cycle ends, as a Unix timestamp in seconds. Null if there's no active subscription.
  - **`cycle_start`**: `number | null`

    When the current billing cycle started, as a Unix timestamp in seconds. Null if there's no active subscription.
  - **`plan`**: `string | null`

    The name of your plan.
  - **`words_left`**: `number | null`, deprecated

    **Deprecated.** Use `credits_left` instead.
  - **`words_used`**: `number | null`, deprecated

    **Deprecated.** Use `credits_used` instead.

<a id="scalar-example-18"></a>

**Generated example:**

```json
{
  "data": {
    "credits_left": 429569,
    "credits_used": 70431,
    "cycle_start": 1739985107,
    "cycle_end": 1742342400,
    "plan": "Professional"
  }
}
```

<a id="scalar-schema-hallucinationchecklateerror"></a>

### HallucinationCheckLateError

**Type:** `object`

A failure after the response started, so the status code is already `200`. `status` is the status code the error would have had. On `POST /v2/hallucination-check/files` this includes a file whose text couldn't be extracted.

- **`error` (required)**: `string`

  What went wrong.
- **`status` (required)**: `integer`

  The status code the error would have had, such as `429`.
- **`code`**: `string`

  `out_of_credits` when the check would cost more than you have left. On `POST /v2/hallucination-check/files`, `file_text_unreadable` when a file couldn't be read, or `text_extraction_unavailable` when text extraction is temporarily unavailable.

<a id="scalar-example-19"></a>

**Generated example:**

```json
{
  "error": "",
  "status": 1,
  "code": ""
}
```

<a id="scalar-schema-documentcontenterror"></a>

### DocumentContentError

**Type:** `object`

An error response. `error` describes the problem, and the HTTP status code says what kind of error it is.

- **`error`**: `string`

<a id="scalar-example-20"></a>

**Generated example:**

```json
{
  "error": ""
}
```

<a id="scalar-schema-hallucinationcheckresult"></a>

### HallucinationCheckResult

**Type:** `object`

- **`bibliographic_citations` (required)**: `array`

  The citations found in the text.

  **Items:**
  - **`ai_scan`**: `object | null`

    The AI detection result for the citation text.
    - **`predicted_class`**: `string`, possible values: `"human", "ai", "mixed"`

      The class the detector thinks is most likely.
    - **`score`**: `number`

      The confidence in `predicted_class`.
  - **`citation_exists`**: `object | null`

    Whether the cited work exists.
    - **`hallucination_explanation`**: `string | null`

      Why the citation got its hallucination label, if it has one.
    - **`hallucination_label`**: `string | null`

      The hallucination label for the citation, if there is one.
    - **`justification`**: `string | null`

      Why the citation was judged to exist or not.
    - **`score`**: `number | null`

      The confidence in `status`.
    - **`status`**: `string`, possible values: `"exist", "exist_with_issues", "fake", "unsure", "unknown"`

      Whether the citation exists.
  - **`citation_object`**: `object | null`

    The parsed citation details.
  - **`citation_type`**: `string | null`

    The type of citation, if it could be parsed.
  - **`claim_reference`**: `object | null`

    Whether any claim refers to this citation.
    - **`has_reference`**: `boolean`

      Whether a claim refers to this citation.
  - **`id`**: `integer`

    The ID of the citation.
  - **`indices`**: `object`

    Where the citation is in the text.
    - **`end`**: `integer`

      The index where the citation ends (exclusive).
    - **`start`**: `integer`

      The index where the citation starts (inclusive).
  - **`text`**: `string`

    The citation as it appears in the text.
- **`claims`**: `array`

  The claims found in the text.

  **Items:**
  - **`agree_with_citation`**: `object | null`

    Whether the cited sources support the claim.
    - **`justification`**: `string | null`

      Why the sources were judged to support the claim or not.
    - **`stance`**: `string | null`, possible values: `"support", "contradict", "partial support", "partial contradict", "mixed", "stance_unknown", "strongly support", "slightly agree", "neutral", "slightly disagree", "strongly contradict"`

      Whether the sources agree with the claim.
  - **`bibliographic_citation_ids`**: `array`

    The IDs of the citations linked to the claim.

    **Items:**

    `integer`

    A citation ID.
  - **`claim_type`**: `string`, possible values: `"cited", "uncited"`

    Whether the claim has an in-text citation.
  - **`id`**: `integer`

    The ID of the claim.
  - **`indices`**: `object`

    Where the claim is in the text.
    - **`end`**: `integer`

      The index where the claim ends (exclusive).
    - **`start`**: `integer`

      The index where the claim starts (inclusive).
  - **`is_cited_in_bibliography`**: `object | null`

    Whether the claim is cited in the bibliography.
    - **`check_worthy`**: `boolean | null`

      Whether the claim is worth checking for a citation.
    - **`is_cited`**: `boolean`

      Whether the claim is cited in the bibliography.
    - **`justification`**: `string | null`

      Why the claim was judged to be cited or not.
    - **`score`**: `number`

      The confidence in `is_cited`.
  - **`text`**: `string`

    The claim as it appears in the text.
- **`id`**: `string`

  The ID of the saved scan. Missing when your API key doesn't save scans.
- **`inputText`**: `string`

  The text that was scanned.
- **`sources`**: `array`

  The sources found for the claims and citations.

  **Items:**
  - **`authors`**: `array`

    The authors of the source.

    **Items:**

    `string`

    An author's name.
  - **`citation_id`**: `integer | null`

    The ID of the citation this source matches, if any.
  - **`citation_match`**: `object | null`

    How well the source matches the citation.
    - **`authors_match_score`**: `number`

      How well the authors match.
    - **`citation_does_not_match`**: `boolean`

      Whether the source doesn't match the citation.
    - **`citation_match`**: `boolean`

      Whether the source matches the citation.
    - **`confidence`**: `number`

      The overall confidence in the match result.
    - **`doi_match_score`**: `number`

      How well the DOI matches.
    - **`hallucination_explanation`**: `string | null`

      Why the citation looks hallucinated, if it does.
    - **`hallucination_label`**: `string | null`

      The hallucination label for the citation.
    - **`justification`**: `string | null`

      Why the source was judged to match or not.
    - **`llm_match_score`**: `number | null`

      How well the citation and source match, as judged by an LLM.
    - **`publication_date_match_score`**: `number`

      How well the publication date matches.
    - **`publisher_match_score`**: `number`

      How well the publisher matches.
    - **`score`**: `number`

      The combined match score.
    - **`title_match_score`**: `number`

      How well the title matches.
    - **`url_match_score`**: `number`

      How well the URL matches.
  - **`citation_object`**: `object | null`

    The source's citation details, normalized.
    - **`access_date`**: `string | null`

      When the source was accessed.
    - **`authors`**: `array`

      The authors in the citation details.

      **Items:**

      `string`

      An author's name.
    - **`doi`**: `string | null`

      The DOI of the source.
    - **`publication_date`**: `string | null`

      When the source was published.
    - **`publisher`**: `string | null`

      The publisher of the source.
    - **`title`**: `string | null`

      The title of the source.
    - **`url`**: `string | null`

      The canonical URL of the source.
  - **`citations`**: `object | null`

    The source formatted as a citation in several styles.
    - **`apa`**: `string`

      The citation in APA style.
    - **`bibtex`**: `string`

      The citation in BibTeX style.
    - **`chicago`**: `string`

      The citation in Chicago style.
    - **`ieee`**: `string`

      The citation in IEEE style.
    - **`mla`**: `string`

      The citation in MLA style.
  - **`claim_id`**: `integer | null`

    The ID of the claim this source supports, if any.
  - **`content`**: `string | null`

    A snippet of the source's content.
  - **`date`**: `string`

    When the source was published or retrieved.
  - **`id`**: `integer`

    The ID of the source.
  - **`justification`**: `string | null`

    Why this source was chosen.
  - **`relevant_chunk`**: `string | null`

    The part of the source that's relevant to the claim or citation.
  - **`sourcerer_name`**: `string`

    The name of the system that found the source.
  - **`stance`**: `string | null`

    Whether the source agrees with the claim.
  - **`title`**: `string | null`

    The title of the source.
  - **`url`**: `string | null`

    The URL of the source.
- **`version`**: `integer`

  The version of the response format.

<a id="scalar-example-21"></a>

**Generated example:**

```json
{
  "id": "",
  "version": 1,
  "bibliographic_citations": [
    {
      "ai_scan": {
        "predicted_class": "human",
        "score": 1
      },
      "citation_exists": {
        "hallucination_label": null,
        "hallucination_explanation": null,
        "justification": null,
        "score": null,
        "status": "exist"
      },
      "claim_reference": {
        "has_reference": true
      },
      "id": 1,
      "citation_type": null,
      "citation_object": null,
      "indices": {
        "end": 1,
        "start": 1
      },
      "text": ""
    }
  ],
  "claims": [
    {
      "agree_with_citation": {
        "justification": null,
        "stance": "support"
      },
      "bibliographic_citation_ids": [
        1
      ],
      "claim_type": "cited",
      "id": 1,
      "indices": {
        "end": 1,
        "start": 1
      },
      "is_cited_in_bibliography": {
        "check_worthy": null,
        "is_cited": true,
        "justification": null,
        "score": 1
      },
      "text": ""
    }
  ],
  "sources": [
    {
      "authors": [
        ""
      ],
      "citation_id": null,
      "citation_match": {
        "authors_match_score": 1,
        "citation_does_not_match": true,
        "citation_match": true,
        "confidence": 1,
        "doi_match_score": 1,
        "hallucination_explanation": null,
        "hallucination_label": null,
        "justification": null,
        "llm_match_score": null,
        "publication_date_match_score": 1,
        "publisher_match_score": 1,
        "score": 1,
        "title_match_score": 1,
        "url_match_score": 1,
        "additionalProperty": "anything"
      },
      "citation_object": {
        "access_date": null,
        "authors": [
          ""
        ],
        "doi": null,
        "publication_date": null,
        "publisher": null,
        "title": null,
        "url": null,
        "additionalProperty": "anything"
      },
      "citations": {
        "apa": "",
        "bibtex": "",
        "chicago": "",
        "ieee": "",
        "mla": ""
      },
      "claim_id": null,
      "content": null,
      "date": "",
      "id": 1,
      "justification": null,
      "relevant_chunk": null,
      "sourcerer_name": "",
      "stance": null,
      "title": null,
      "url": null
    }
  ],
  "inputText": ""
}
```

<a id="scalar-schema-excludedspan"></a>

### ExcludedSpan

**Type:** `object`

A part of the document that was masked out of AI scoring.

- **`end`**: `integer`

  The index in the document where the masked text ends.
- **`reason`**: `string`

  Why the text was masked.
- **`start`**: `integer`

  The index in the document where the masked text starts.
- **`text`**: `string`

  The masked text.

<a id="scalar-example-22"></a>

**Generated example:**

```json
{
  "start": 1,
  "end": 1,
  "text": "",
  "reason": ""
}
```

<a id="scalar-schema-aipatternstreamevent"></a>

### AiPatternStreamEvent

**Type:** `object`

One sentence that matched at least one AI writing pattern. Sent as the payload of one `data:` line.

- **`document_index`**: `integer`

  The index of the document in the request. Always `0`, since a request has one document.
- **`interpretability_designation`**: `string`

  The AI detection class for the sentence, for example `ai` or `human`.
- **`patterns`**: array of [AiPatternHit](#scalar-schema-aipatternhit)

  The patterns the sentence matched.
- **`sentence`**: `string`

  The text of the sentence.
- **`sentence_index`**: `integer`

  The zero-based index of the sentence in the document. Sentences are numbered the same way as in the AI detection endpoints.

<a id="scalar-example-23"></a>

**Generated example:**

```json
{
  "document_index": 1,
  "sentence_index": 1,
  "sentence": "",
  "interpretability_designation": "",
  "patterns": [
    {
      "domain_id": "",
      "pattern_id": "",
      "pattern_name": "",
      "display_name": "",
      "category": "",
      "description": "",
      "display_description": "",
      "explanation": "",
      "relevance": 1,
      "k_times": null
    }
  ]
}
```

<a id="scalar-schema-aipatternhit"></a>

### AiPatternHit

**Type:** `object`

One AI writing pattern matched in a sentence.

- **`category`**: `string`

  The category of the pattern, for example `Language and grammar`.
- **`description`**: `string`

  The canonical description of the pattern.
- **`display_description`**: `string`

  The description of the pattern as shown in the GPTZero app.
- **`display_name`**: `string`

  The name of the pattern as shown in the GPTZero app.
- **`domain_id`**: `string`

  The taxonomy the pattern belongs to. Always `ai-patterns`.
- **`explanation`**: `string`

  Why this sentence matched the pattern, in plain language.
- **`k_times`**: `number | null`

  How many times more often the pattern shows up in AI text than in human text. Null when there's no measurement.
- **`pattern_id`**: `string`

  The stable ID of the pattern, for example `rule_of_three`.
- **`pattern_name`**: `string`

  The canonical name of the pattern.
- **`relevance`**: `number`

  How strongly the sentence shows the pattern.

<a id="scalar-example-24"></a>

**Generated example:**

```json
{
  "domain_id": "",
  "pattern_id": "",
  "pattern_name": "",
  "display_name": "",
  "category": "",
  "description": "",
  "display_description": "",
  "explanation": "",
  "relevance": 1,
  "k_times": null
}
```
