---
title: "Analyzes an image to determine its likelihood of being AI-generated"
method: POST
path: "/v1/ai/classifier/image"
tags: ["classifier"]
---

# Analyzes an image to determine its likelihood of being AI-generated

`POST /v1/ai/classifier/image`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/classifier/image`
- Auth: API key in header `x-magnific-api-key`

Accepts an image file as input and analyzes it to determine the probability that the image was generated by artificial intelligence, providing a confidence score.

## Request body

- ClassifierRequest
  - `image` union, required: Base64-encoded image string or URL pointing to an image.
    - string, byte: Base64-encoded image string.
    - string, uri: URL pointing to an image.
    - string, binary: Binary encoded image string.

## Response `200`

OK - The request has succeeded, and the image has been classified.

- DetectAiImage200Response
  - `data` ResultClassification[], required
    - `class_name` 'not_ai' | 'ai': The type of classification
    - `probability` number: The probability of the classification

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
