# AI Image Detection Response

> Response structure and field definitions for the Copyleaks AI Image Detection API, including summary scores and RLE mask data.

The Copyleaks AI Image Detection API returns a detailed response containing the analysis summary, image information, and a Run-Length Encoded (RLE) mask to identify AI-generated regions.

## Response Properties

<ParamField path="model" type="string">
  The version of the AI detection model used for the analysis.
</ParamField>
<ParamField path="result" type="object">
  Contains the Run-Length Encoded (RLE) mask data. This can be used to visualize the AI-detected regions of the image.
  <Expandable title="properties">
    <ParamField path="starts" type="array<integer>">
      An array of starting positions for each AI-detected segment in the flattened 1D image array.
    </ParamField>
    <ParamField path="lengths" type="array<integer>">
      An array of lengths for each AI-detected segment, corresponding to the `starts` array.
    </ParamField>
  </Expandable>
</ParamField>
<ParamField path="summary" type="object">
  An object containing the overall proportion of human vs. AI-generated pixels.
  <Expandable title="properties">
    <ParamField path="human" type="float">
      The proportion of the image determined to be human-created. The value ranges from `0.0` to `1.0`.
    </ParamField>
    <ParamField path="ai" type="float">
      The proportion of the image determined to be AI-generated. The value ranges from `0.0` to `1.0`.
    </ParamField>
  </Expandable>
</ParamField>
<ParamField path="isAiDetected" type="boolean">
  Indicates whether the image was determined to be AI-generated.
</ParamField>
<ParamField path="imageInfo" type="object">
  An object containing metadata about the analyzed image.
  <Expandable title="properties">
    <ParamField path="shape" type="object">
      The dimensions of the image.
      <Expandable title="properties">
        <ParamField path="height" type="integer">
          The height of the image in pixels.
        </ParamField>
        <ParamField path="width" type="integer">
          The width of the image in pixels.
        </ParamField>
      </Expandable>
    </ParamField>
    <ParamField path="metadata" type="object">
      Optional metadata extracted from the image file.
      <Expandable title="properties">
        <ParamField path="issuedTime" type="string">
          The timestamp (if available in EXIF data) indicating when the image was created.
        </ParamField>
        <ParamField path="issuedBy" type="string">
          The AI service or tool that created the image, if this information is present in the metadata.
        </ParamField>
        <ParamField path="appOrDeviceUsed" type="string">
          The application or device used to create the image, if available in the metadata.
        </ParamField>
        <ParamField path="contentSummary" type="string">
          A summary of how the image was generated., if available in the metadata.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>
<ParamField path="scannedDocument" type="object">
  Metadata about the scan operation itself.
  <Expandable title="properties">
    <ParamField path="scanId" type="string">
      The unique identifier for this scan, provided by you in the request.
    </ParamField>
    <ParamField path="credits" type="integer">
      The actual number of credits consumed by the scan.
    </ParamField>
    <ParamField path="expectedCredits" type="integer">
      The expected number of credits for the scan.
    </ParamField>
    <ParamField path="creationTime" type="string">
      The ISO 8601 timestamp indicating when the scan was created.
    </ParamField>
  </Expandable>
</ParamField>

## Example Response

```json
{
  "model": "ai-image-1-ultra",
  "result": {
    "starts": [0, 512, 1536, 2560],
    "lengths": [256, 512, 768, 1024]
  },
  "summary": {
    "human": 0.3,
    "ai": 0.7
  },
  "isAiDetected": true,
  "imageInfo": {
    "shape": {
      "height": 1024,
      "width": 768
    },
    "metadata": {
      "issuedTime": "2025-07-23T12:44:05",
      "issuedBy": "OpenAI",
      "appOrDeviceUsed": "OpenAI-API",
      "contentSummary": "Created using generative AI"
    }
  },
  "scannedDocument": {
    "scanId": "my-scan-id-1",
    "credits": 1,
    "expectedCredits": 1,
    "creationTime": "2023-01-10T10:07:58.9459512Z"
  }
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="AI Image Detection Guide" icon="image" href="/guides/ai-detector/ai-image-detection/">Learn how to submit an image for AI detection and interpret the results.</Card>
  <Card title="AI Image Detection API Reference" icon="code" href="/reference/actions/ai-image-detector/check/">Explore the complete API reference for the AI Image Detection endpoint.</Card>
  
</CardGroup>
