> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morphllm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prism

> Check whether text was written by an AI model, and which provider's model wrote it.

> [!NOTE]
>
> Prism is in beta. Scores and the response shape may change.

Prism scores text for AI authorship. Send the text. Prism returns the probability that an AI model wrote it, plus a distribution over which provider's model it came from. It generates no text, so there's nothing to parse.

| Model | Endpoint | Minimum length |
| - | - | - |
| `prism-text` | `POST /v1/systemone` | 25 words |

## Check a text

Set your [Morph API key](https://www.morphllm.com/dashboard/api-keys), then run:

```bash theme={null}
export MORPH_API_KEY="YOUR_API_KEY"

curl --fail-with-body https://api.morphllm.com/v1/systemone \
  -H "Authorization: Bearer $MORPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "prism-text",
    "state": "Remote work has fundamentally reshaped how teams collaborate, communicate, and measure productivity. While some organizations initially feared a decline in output, many discovered that flexible arrangements can foster greater autonomy and focus. However, the shift also presents unique challenges, including maintaining company culture, preventing burnout, and ensuring equitable access to opportunities.",
    "questions": {
      "is_ai": {
        "type": "noul",
        "instructions": "This text was written by an AI model."
      }
    }
  }'
```

Put the text in `state`. Read `answers.is_ai.noul`, the probability that an AI model wrote it, from 0 to 1:

```json theme={null}
"is_ai": { "type": "noul", "noul": 1.0, "probabilities": { "yes": 1.0, "no": 0.0 }, "confidence": 1.0 }
```

Above 0.5 means AI. The cutoff is set so that 0.1% of the human-written texts in our evaluation set score above it. To trade more false positives for more catches, pick your own threshold.

## Find which provider wrote it

Add one `choice` question. Its `criteria` lists the providers to choose between, at least two of these 11:

`openai`, `anthropic`, `google`, `deepseek`, `meta-llama`, `qwen`, `z-ai`, `moonshotai`, `minimax`, `x-ai`, `mistralai`

```json theme={null}
"questions": {
  "is_ai": { "type": "noul", "instructions": "This text was written by an AI model." },
  "provider": {
    "type": "choice",
    "instructions": "Which provider's model wrote this text?",
    "criteria": {
      "openai": null, "anthropic": null, "google": null, "deepseek": null,
      "meta-llama": null, "qwen": null, "z-ai": null, "moonshotai": null,
      "minimax": null, "x-ai": null, "mistralai": null
    }
  }
}
```

For the text above, this returned:

```json theme={null}
"provider": {
  "type": "choice",
  "choice": "google",
  "probabilities": {
    "openai": 0.1345, "anthropic": 0.0036, "google": 0.3656, "deepseek": 0.0635,
    "meta-llama": 0.0063, "qwen": 0.2847, "z-ai": 0.0009, "moonshotai": 0.0104,
    "minimax": 0.0118, "x-ai": 0.0001, "mistralai": 0.1187
  },
  "confidence": 0.3656
}
```

`choice` is the most likely provider, and `probabilities` sum to 1 over the options you listed. If you list fewer providers, Prism picks among those only. Use that when you already know the shortlist.

Read `provider` only when `is_ai.noul` is above your threshold. Prism answers the provider question for every text, human-written ones included, and on human text that answer is noise.

## Requests

* `questions` holds exactly one `noul` question and at most one `choice` question over providers. The `noul` question's `instructions` don't change the score.
* Texts must be at least 25 words. Over 300 words, Prism scores the text in windows of whole sentences, up to 300 words each. It calls the text AI when more than 30% of its words are in windows scored as AI.
* The request body is capped at 1 MB.
* `usage.output_tokens` is always 0.

## Errors

* `400`: the text is under 25 words, a question breaks the rules above, or `criteria` names a provider outside the 11. The message says which.
* `401`: missing or invalid key.
* `404`: unknown `model`.
* `429`: your key's rate limit.

Errors use the [Reflex API](https://docs.morphllm.com/api-reference/endpoint/systemone.md) envelope: `{"error": {"message", "type", "param", "code"}}`.

Try it without code in the [AI Detector playground](https://www.morphllm.com/dashboard/playground/detect).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.