Skip to content
AI Detector

AI Image Detection

POST https://api.copyleaks.com/v1/ai-image-detector/{scanId}/check

The Copyleaks AI Image Detection API provides advanced capabilities to detect whether an image is AI-generated or partially AI-generated. This API uses sophisticated AI models to analyze images and produce a mask that overlays the submitted image, indicating which parts are AI-generated and which are authentic.

scanId string Required

A unique scan id provided by you. We recommend you use the same id in your database to represent the scan in the Copyleaks database. This will help you to debug incidents. Using the same ID for the same file will help you to avoid network problems that may lead to multiple scans for the same file. Learn more about the criteria for creating a Scan ID.

>= 3 characters <= 36 characters

Match pattern: [a-z0-9] !@$^&-+%=_(){}<>';:/.",~|

Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN

The request body is a JSON object containing the image to analyze.

base64 string Required

The base64-encoded image data to be analyzed for AI generation.


Requirements:

  • Minimum 512×512px, maximum 16 megapixels, less than 32MB.
  • Supported formats: PNG, JPEG, BMP, WebP, HEIC/HEIF

Example: "aGVsbG8gd29ybGQ="

filename string Required

The name of the image file including its extension.


Requirements:

  • .png, .bmp, .jpg, .jpeg, .webp, .heic, .heif
  • <= 255 characters

Example: "my-image.png"

model string Required

The AI detection model to use for analysis. You can use either the full model name or its alias:


  • AI Image 1 Ultra: "ai-image-1-ultra-01-09-2025" (full name) or "ai-image-1-ultra" (alias) - AI image detection model. Produces an overlay of the detected AI segments.

Example: "ai-image-1-ultra-01-09-2025" or "ai-image-1-ultra"

sandbox boolean default: "false"

Use sandbox mode to test your integration with the Copyleaks API without consuming any credits.

Submit images for AI detection and get returned mock results, simulating Copyleaks’ API functionality to ensure you have successfully integrated the API.

This feature is intended to be used for development purposes only.

200 OK

The image was successfully analyzed.

Response Schema

The response contains the following fields:

model string
The version of the AI detection model used for analysis.
result object
RLE-encoded mask data. Contains arrays of start positions and lengths for AI-detected regions.
starts array<integer>
Start positions of AI-detected segments in the flattened image array.
lengths array<integer>
Lengths of AI-detected segments corresponding to each start position.
summary object
Summary statistics of the AI detection analysis.
human float
Percentage of pixels suspected to be human-created. Range: 0.0-1.0
ai float
Percentage of pixels suspected to be AI-generated. Range: 0.0-1.0
imageInfo object
Information about the analyzed image.
shape object
Dimensions of the analyzed image.
height integer
Height of the image in pixels.
width integer
Width of the image in pixels.
metadata object
Optional metadata extracted from the image.
issuedTime string
Timestamp when the image was created (if available).
issuedBy string
The AI service or tool that created the image (if detected).
appOrDeviceUsed string
The application or device used to create the image.
scannedDocument object
Metadata about the scan operation.
scanId string
The unique identifier for this scan.
actualCredits integer
The actual number of credits consumed by this scan.
expectedCredits integer
The expected number of credits for this scan.
creationTime string
ISO 8601 timestamp of when the scan was created.

Example Response

A typical response from this endpoint:

Show full example (38 lines)
{
"model": "v1",
"result": {
"starts": [
0,
512,
1536,
2560
],
"lengths": [
256,
512,
768,
1024
]
// ... truncated
400 Bad Request

Invalid request parameters, unsupported image format, or image processing issues.

POST https://api.copyleaks.com/v1/ai-image-detector/my-scan-123/check
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ...",
"filename": "test-image.png",
"sandbox": true,
"model": "ai-image-1-ultra-01-09-2025"
}