Skip to main content
You can classify an image either from a file or a URL.
This section explains how to make a request using a file. For a URL, the process is similar, with the main difference being the endpoint to call in step 1.

Submission guidelines

Given the highly variable nature of images, it is recommended to follow these simple guidelines:
  • Send the “closest” image to the source to the system: this means, for example, not sending screenshots or photos of screens.
  • Image analysis models are not currently trained to recognize photos of documents: therefore, the result, in case of submission of images of that type, is not reliable.
  • In the case of images taken from social media, the most accurate results are obtained by sending images without overlaid texts or modifications typical of social sharing.
  • If available from other sources, avoid submitting social links due to the post-processing of various platforms.

Submit an image using the API

To classify an image, you need to make a POST request to /api/classification with the required parameters (for details on the parameters, refer to the API Reference section).
In response you will receive the identifier of the classified image.

Retrieve the results

Use the provided identifier to retrieve the classification results by making a GET request to /api/classification/{identifier} (for details on how to structure this request, see the API Reference section).
The response will contain the classification results for the image in JSON format. In the response, you will find a results array, which includes the classification results for each model used, and a verdicts array, which contains the results for each heuristic applied.
The classification may not be finished yet! If the classification is not yet complete, continue sending the GET request until the result is available.

Heatmap

The heatmap functionality (provided by the Ardē model) aims to assist in analyzing image details. An image submitted without a heatmap might be detected as human, while an analysis of the same image with a heatmap could highlight artificial traits. This is due to how the models interpret the images provided as input. If the heatmap is available for your user, you can request the heatmap analysis by providing the argument with_heatmap=true
The heatmap computation will take a while. Upon completion, the result will also include a model named Ardē:
The score value represent the total area that is human or artificial. In the example, the result means that 20% of the image was classified as artificial. You can also downlaod the heatmap as a colored image by using the appropriate endpoint.

Smart Full Analysis

Smart Full Analysis is an advanced analysis mode designed to get the most out of the image classification process. A proprietary scoring algorithm automatically identifies and selects the areas of the image with the highest informative content, so that the analysis focuses on the most relevant details. The approach works like an optimized detection map:
  1. the image is split into a targeted selection of high-value crops;
  2. each crop is analyzed and classified by the most advanced model available in the Revelio family;
  3. the results of the single crops are combined into an overall verdict, taking into account the information collected from the different areas of the image.
The result is a more selective, efficient and in-depth analysis that makes the most of the Revelio models.
Smart Full Analysis is an advanced, smart version of both the standard full analysis and the heatmap: when it is enabled, it replaces both of them.
with_smart_analysis and with_heatmap cannot be combined: a request with both set to true is rejected with a 422 error.
If Smart Full Analysis is included in your pricing plan, you can enable it by providing the argument with_smart_analysis=true:
If Smart Full Analysis is not included in your pricing plan, the with_smart_analysis parameter is ignored and the image is analyzed with the standard scope.

XAI (eXplainable AI)

Not just a verdict. Discover what the artificial intelligence observed to reach its decision. Why did Revelio classify an image or a video as AI-generated? Which elements of the content caught its attention the most? With the new XAI – eXplainable AI feature, identifAI takes a further step towards greater transparency and interpretability of its classification models. XAI is a new analysis scope that enriches the verdicts of Revelio with a set of visual and descriptive tools, designed to help you understand where the model focused its attention during the analysis.

From classification to understanding

When XAI is enabled, the Revelio models do not just return a verdict: they also generate information about the points of attention that characterized the classification process. This information is turned into three complementary tools:

Attention Map

See where the attention is focused. A visual representation overlaid on the original content, which highlights the areas the model focused on the most. An immediate and intuitive way to explore what Revelio observed.

Attention Graph

Explore the analysis in more depth. A graph showing the trend and the peaks of the attention of the model, offering a more technical and detailed perspective for those who want to dig deeper into the behaviour of the algorithm.

AI-Powered Explanation

From images to words. A natural-language description of the regions that received the most attention, available in multiple languages, to make the information produced by the model even more accessible and easy to interpret.

More transparency, more tools to interpret the results

With XAI, identifAI provides new information to support the interpretation of the results, complementing the traditional classification with a visual, analytical and descriptive perspective. A step forward towards an increasingly transparent, understandable and accessible artificial intelligence.

Available on the web platform and via API

XAI is currently available for the analysis of images and videos, both through the identifAI web platform and via API, so that it can be easily integrated into your existing workflows.
What about audio? We’re working on it! Our goal is to soon extend these capabilities to the analysis of audio content too.
Data Transfer Notice: Enabling this feature transfers your image data to our EU cloud infrastructure for model inference.The AI-powered explanations are generated with models that are not developed by identifAI.

Enable XAI using the API

XAI is governed by the following parameters of the API used for image classification and of the API used for image classification from URL: If XAI is included in your pricing plan, you can enable it, together with the AI-powered explanations in Italian, as follows:
If XAI is not included in your pricing plan, the with_xai parameter is ignored and the image is analyzed without XAI.
The AI-powered explanations must be enabled in your pricing plan too: if your plan includes XAI but not the AI-powered explanations, a request with with_llm_xai=true is rejected with a 403 error. An unsupported llm_xai_language is rejected with a 400 error. In both cases the request is rejected before the image is analyzed and no credits are consumed.

XAI maps and explanations in the results

When XAI is enabled, each per-model result in results that produced at least one XAI map contains an explanations array, which lists every map of the model, with its AI-powered explanation:
The AI-powered explanations are deferred results: they are produced after the main analysis, without delaying it. The verdict, the classification results and the list of the XAI maps are available as soon as the submission status becomes done, while the descriptions are filled in afterwards: follow the deferred_status field of the classification result, or set deferred_webhook_url to be notified when they are complete. description is null when:
  • the AI-powered explanations were not requested (with_llm_xai not set): the maps are listed anyway, so that you can download them;
  • the explanation is not available yet, because the deferred results are still in progress;
  • the explanation was requested but could not be generated. If this happens because of a technical error, deferred_status is errored, while the explanations generated for the other maps are still returned: see Deferred results. The credits of the AI-powered explanations that cannot be generated are refunded.
Please note that:
  • the explanations are returned only by the single classification result endpoint: they are not included in the lists of classifications nor in the payload sent to webhook_url. The notification sent to deferred_webhook_url contains the descriptions in its xai and heatmaps fields;
  • the per-model results, and therefore the explanations, are returned only if your pricing plan exposes the details of the models;
  • when the heatmap is requested, it is listed with type heatmap (and method null) on the result of the Ardē model; when the Smart Full Analysis is enabled, its heatmap is listed on the results of the models that produced it.

Download the Attention Map and the Attention Graph

The Attention Map and the Attention Graph can be downloaded as images with the XAI map download endpoint, by providing the model that produced the map (as reported in the model field of the per-model results), the XAI method (legrad, transformer_attribution or attention_rollout) and the type of map (attention_map, the default, or attention_graph):
The maps produced depend on the model: the explanations of each per-model result list the type and the method of every available map, also when the AI-powered explanations were not requested. If no map of the requested model, method and type is available, the endpoint returns a 404 error.
When XAI is combined with the Smart Full Analysis, its heatmap can be downloaded as usual with the heatmap download endpoint.

Guidelines on interpreting results

Regarding the interpretation of the result, the advice is to focus on:
  • Revelio as the main result for the verdict (platform’s default choice), with higher confidence if faces and people are present.
  • Aide for a detailed analysis with the support of the heatmap feature.
  • Morphing to be considered only in the presence of faces.
  • Ellen, if the image comes from sources where the use of photo editing tools has been ascertained in the past.
  • V01 and Brokenwand only in the case of very old images (and therefore potentially generated with systems no longer in use today).
In addition, for heatmap analysis, we recommend to:
  • Pay close attention to the size of the submitted images: heatmap analysis is particularly demanding from a computational point of view and processing time increases significantly based on image size. The guideline recommends submitting images with a resolution lower than 2k (or 4 megapixels).

See also

Classify a video

Find out how to start a video classification and discover whether your video is authentic or artificially generated

Classify a speech

Find out how to start a speech classification and discover whether your speech is authentic or artificially generated