Skip to main content

Deferred Results

The analysis of a submission has two phases:
  1. the main analysis produces the verdict and the classification results. When it ends, the submission status becomes done (or errored) and the main results are sent to webhook_url and to your webhooks, as before;
  2. the deferred results are produced afterwards, without delaying the main results. Today they are the AI-powered explanations of the XAI maps and of the heatmap, requested with with_xai and with_llm_xai (see XAI – eXplainable AI) and returned in the description of the explanations of the per-model results.
The deferred results never change the verdict, the classification results or the status of the submission.

Tracking the deferred results

When a submission has deferred results, the classification result (GET /api/classification/{identifier}, GET /api/classification_video/{identifier}, GET /api/classification_audio/{identifier}) also contains: For videos, every analyzed frame in results.images has its own deferred_status. The fields are missing for submissions without deferred results.
expired is not final: if the deferred results complete after the deadline, deferred_status becomes done or errored.
errored does not mean that no explanation is available. When some explanations of the XAI maps or of the heatmap cannot be generated because of a technical error, deferred_status is errored and deferred_errors contains Some explanations of the XAI maps could not be generated, while the explanations generated for the other maps are still returned in explanations. The maps without an explanation stay in explanations with description set to null; a map the model cannot describe also has description null, and is not an error.

Deferred results notification

To be notified when the deferred results are complete, set deferred_webhook_url when you submit an image, a video or a speech (also from URL). It works like webhook_url: it needs the same enablement and has the same domain restrictions and authentication. If it is omitted or empty, no notification is sent. You can also enable the notification on the webhooks configured in the dashboard, with Notify deferred results and an optional dedicated URL. The notification is sent only to the webhooks that received the main result of the submission: for example, a webhook that only notifies artificial results gets no deferred notification for a human result. The notification is sent once, when the deferred results become done, errored or expired: it is not sent for the single steps, nor when the main analysis failed (skipped). For a video, it is sent after the last frame.
Delivery is at least once: the same notification can arrive more than once, so deduplicate it by identifier and deferred_status. An expired notification can be followed by a second notification with the real outcome (done or errored): the later one supersedes the earlier one.