# Detect AI-Generated Content — Winston AI

> Investigates whether AI-generated content is present within the given text. See the documentation

- Key: `winston_ai-detect-ai-content`
- Type: Action (Write)
- Version: 0.0.2
- App: Winston AI (`winston_ai`) — https://pipedream.com/apps/winston-ai.md
- This page (HTML): https://pipedream.com/apps/winston-ai/actions/detect-ai-content
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/winston_ai/actions/detect-ai-content/detect-ai-content.mjs

## Description

Investigates whether AI-generated content is present within the given text. [See the documentation](https://docs.gowinston.ai/api-reference/predict/post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `text` | `string` | Yes | The text to scan. Minimum 300 characters. Texts under 600 characters may produce unreliable results and should be avoided. Maximum 100 000 characters per request. |
| `language` | `string` | No | 2 letter language code. |
| `sentences` | `boolean` | No | Whether the response should include an array of sentences and their scores. |
| `version` | `string` | No | The model version to use. Winston AI's latest and most accurate version is '3.0'. Using 'latest' will ensure you are always using the latest version. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "winston_ai",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "winston_ai-detect-ai-content",
  arguments: {
    text: "Text",
    language: "Language",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "winston_ai-detect-ai-content",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    winston_ai: { authProvisionId: "apn_xxxxxxx" },
    text: "Text",
    language: "Language",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "winston_ai-detect-ai-content",
    "configured_props": {
      "winston_ai": { "authProvisionId": "apn_xxxxxxx" },
      "text": "Text",
      "language": "Language"
    }
  }'
```

---

- App: https://pipedream.com/apps/winston-ai.md · All apps: https://pipedream.com/apps
