# n8n-nodes-winston-ai ⚡️

[![CI](https://github.com/gowinston-ai/winston-ai-n8n/actions/workflows/CI.yml/badge.svg)](https://github.com/gowinston-ai/winston-ai-n8n/actions/workflows/CI.yml)
![TypeScript](https://img.shields.io/badge/code-TypeScript-blue?logo=typescript)

This is an n8n community node that lets you access all Winston AI analysis endpoints in your n8n workflows.

[Winston AI](https://gowinston.ai/) provides industry-leading tools to:

* Detect whether a text was generated by AI or written by a human
* Detect AI-generated images
* Scan content for plagiarism on the public web
* Compare two texts for similarity

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow-automation platform.

[Installation](#installation)  |  [Operations](#operations)  |  [Credentials](#credentials)  |  [Compatibility](#compatibility)  |  [Usage](#usage)  |  [Resources](#resources)  |  [Version history](#version-history)

---

## Installation 💻

Follow the n8n [community-nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/)


## Operations 🕹️

| Resource           | Operation (value)      | Description |
|--------------------|------------------------|-------------|
| AI Text Detection  | Scan AI generated text (`scan-ai-text`) | Analyse a text and return Winston AI’s *Human Score* plus optional sentence-level scores. |
| AI Image Detection | Scan AI generated image (`scan-ai-image`) | Determine the likelihood that an image was generated by AI, plus metadata such as EXIF, MIME type and watermark detection. |
| Plagiarism         | Scan for plagiarism (`scan-plagiarism`) | Check text for plagiarism by searching the web for matching content. Optional language / country filtering and source exclusion supported. |
| Text Compare       | Compare texts (`compare-texts`) | Compare two texts and return a similarity score and detailed match information. |

## Credentials 🔐

The node requires a Winston AI API key.

1. Sign in to the [Winston AI dashboard](https://dev.gowinston.ai/) and generate an API key.
2. In n8n, create new **Winston AI API** credentials:
   * Field **API Key** → paste your key.
3. Use these credentials in any Winston AI node. The key will be sent in the `Authorization` header as `Bearer <token>`.

## Compatibility

* Minimum n8n version: **1.0.0** (tested on 1.24)
* Requires Node.js **≥ 20.15**

## Usage 📊

1. Add the **Winston AI** node to your workflow.
2. Choose a *Resource* and *Operation*.
3. Configure the mandatory fields (e.g. *Text*, *Image URL*, *First Text*, *Second Text*).
4. Execute the node. The JSON response from the Winston AI API is returned in the output data.

Example: Detect AI-generated text
```text
Resource: AI Text Detection
Operation: Scan AI generated text
Text: "This paragraph was written by ChatGPT…"
→ Returns score, sentence-level analysis, attack detection flags, credits info, etc.
```

## Resources

* Winston AI API Docs: 
  * [AI text detection](https://docs.gowinston.ai/api-reference/v2/ai-content-detection/post)
  * [AI image detection](https://docs.gowinston.ai/api-reference/v2/image-detection/post)
  * [Plagiarism](https://docs.gowinston.ai/api-reference/v2/plagiarism/post)
  * [Text compare](https://docs.gowinston.ai/api-reference/v2/text-compare/post)
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)

## Version history

| Version | Date       | Notes |
|---------|------------|-------|
| 1.0.0   | 2025-07-25 | Initial release with text detection, image detection, plagiarism scan and text compare. |
