# AI detections

Assess how likely a passage was machine-generated, sentence by sentence.

## Endpoints

| Method | Path | Scope | Credits | Description |
|---|---|---|---|---|
| POST | `/v1/detections` | `detections:write` | 1 per 1,000 words | Analyze text or a document |

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `text` | string | one of | Input text, up to 15,000 words |
| `document_id` | string | one of | An ingested PDF, up to 50 pages |
| `context` | enum | no | `scientific` (default) — tunes the model to academic prose |

## Response

```json
{
  "object": "detection",
  "id": "det_j2h1k0y86j",
  "context": "scientific",
  "score": 100,
  "label": "ai",
  "confidence": 100,
  "summary": "The text is almost entirely produced using AI, with tiny to no human contribution.",
  "sentence_counts": {
    "high": 4,
    "moderate": 0,
    "low": 0,
    "total": 4
  },
  "sentences": [
    {
      "text": "The nature of dark matter remains one of the most profound open questions in modern cosmology.",
      "level": "high",
      "probability": 0.9948,
      "confidence": 99,
      "label": "ai"
    },
    {
      "text": "Numerous observational campaigns have constrained the parameter space of weakly interacting massive particles.",
      "level": "high",
      "probability": 0.9931,
      "confidence": 99,
      "label": "ai"
    },
    {
      "text": "Direct detection experiments continue to improve sensitivity by orders of magnitude each decade.",
      "level": "high",
      "probability": 0.9895,
      "confidence": 98,
      "label": "ai"
    },
    {
      "text": "Future surveys promise to resolve the tension between competing theoretical frameworks.",
      "level": "high",
      "probability": 0.9902,
      "confidence": 98,
      "label": "ai"
    }
  ]
}
```

- `score` 0–100, `label` ∈ `human | mixed | ai`, `level` ∈ `low | moderate | high`.
- `probability` is the model's per-sentence estimate, not a p-value.

> [!warning] Do not use this to accuse anyone
> Detection is probabilistic. Present it as a signal alongside the evidence, never as proof of
> misconduct, and never as the sole basis for an academic or employment decision. State the false-
> positive risk wherever you surface a score.

Cost is 1 credit per 1,000 words.

## Related

paraphrases · credit
