# detectAIGeneratedImage

**Identifier:** `winston_detectAIGeneratedImage`

**Provider:** [Winston AI](https://kirha.com/providers/winston.md)

Detect if an image is AI-generated using Winston's AI image detection service. Analyzes image metadata, C2PA data, and uses machine learning to differentiate between human and AI-generated images.

## Run it with the CLI

```bash
kirha tools run winston_detectAIGeneratedImage \
  --input '{
    "url": "<url>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "winston_detectAIGeneratedImage",
  "input": {
    "url": "<url>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "url": {
      "description": "Public URL of the image (JPG, PNG or WEBP, at least 256x256 pixels)",
      "type": "string"
    }
  },
  "required": [
    "url"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "aiProbability": {
      "description": "Probability from 0 to 1 that the image was AI-generated",
      "type": "number"
    },
    "aiWatermarkDetected": {
      "description": "Whether an AI watermark was detected",
      "type": "boolean"
    },
    "aiWatermarkIssuers": {
      "description": "Information about detected AI watermark issuers",
      "items": {},
      "type": "array"
    },
    "c2pa": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "activeManifest": {
              "additionalProperties": false,
              "properties": {
                "alg": {
                  "type": "string"
                },
                "assertions": {
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "claimGenerator": {
                  "type": "string"
                },
                "credentials": {
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "ingredientPaths": {
                  "items": {},
                  "type": "array"
                },
                "ingredients": {
                  "items": {},
                  "type": "array"
                },
                "taUrl": {
                  "type": "string"
                },
                "thumbnail": {
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "title": {
                  "type": "string"
                },
                "vendor": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "manifests": {
              "additionalProperties": {},
              "propertyNames": {
                "type": "string"
              },
              "type": "object"
            }
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "C2PA (Content Credentials) metadata if present, binary thumbnail data removed"
    },
    "context": {
      "type": "string"
    },
    "creditsRemaining": {
      "description": "Number of API credits remaining",
      "type": "number"
    },
    "creditsUsed": {
      "description": "Number of API credits used for this request",
      "type": "number"
    },
    "exif": {
      "additionalProperties": {},
      "description": "EXIF metadata from the image",
      "propertyNames": {
        "type": "string"
      },
      "type": "object"
    },
    "humanProbability": {
      "description": "Probability from 0 to 1 that the image was created by a human",
      "type": "number"
    },
    "mimeType": {
      "description": "MIME type of the analyzed image",
      "type": "string"
    },
    "score": {
      "description": "Human likelihood from 0 to 100, higher means more likely human-made",
      "type": "number"
    },
    "version": {
      "description": "Version of the detection model used",
      "type": "string"
    }
  },
  "required": [
    "context",
    "score",
    "humanProbability",
    "aiProbability"
  ],
  "type": "object"
}
```

-----

[All Winston AI tools](https://kirha.com/providers/winston.md) · [< Back to tools list](https://kirha.com/tools.md)