Skip to main content

Winston AI Node.js SDK ⚡️

Detect AI-generated text and images, check for plagiarism, fact-check content, and compare text through a fully typed interface with our official Node.js SDK. View on npm · GitHub · Open the developer dashboard

Installation

Install the package with npm:

Requirements

  • Node.js 20 or later
  • A Winston AI API key
Create an API key in the Winston AI developer dashboard. New accounts receive 2,000 free credits, with no credit card required. We recommend storing your key in an environment variable for security reasons:

Quickstart

Import the client, initialize it with your API key, and submit text for analysis:
CommonJS is also supported:

Available methods

Detect AI-generated text

Analyze text, a public file, or a public webpage for signs of AI generation.

Detect AI-generated images

Analyze an image using metadata and Winston AI’s image detection model.

Run advanced image analysis

Inspect an image using forensic signals such as error-level analysis, noise maps, and edge anomalies.

Check for plagiarism

Compare content against sources found across the web.

Fact-check content

Evaluate claims against trusted sources and receive a verdict for each claim.

Compare two texts

Measure similarity and matching word counts between two texts.

Client configuration

Configure automatic retries for transient network and API failures:
Retries apply to network failures and HTTP 408, 409, 429, 500, 502, 503, and 504 responses.

Error handling

The SDK throws a typed error for non-2xx responses and connection failures:

Resources