# Best Shot

The "Best shot" algorithm is intended to choose the most high-quality and well-tuned frame with a face from a video record. This algorithm works as a part of the [liveness](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/api/oz-api/basic-scenarios/liveness) analysis, so here, we describe only the best shot part.

{% hint style="info" %}
Please note: historically, some instances are configured to allow Best Shot only for certain gestures.
{% endhint %}

### Processing steps

1\. Initiate the analysis similar to [Liveness](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/api/oz-api/basic-scenarios/liveness/..#processing-steps), but make sure that `extract_best_shot` is set to `true` as shown below:&#x20;

{% code title="request body" %}

```javascript
{
  "analyses": [{
    "type": "quality",
    "source_media": ["1111aaaa-11aa-11aa-11aa-111111aaaaaa"], // // optional; omit to include all media from the folder
    "params" : {
      "extract_best_shot": true // the mandatory part for the best shot analysis
    }
  }]
}
```

{% endcode %}

If you want to use a webhook for response, add it to the payload at this step, as described [here](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/api/oz-api/use-cases/using-a-webhook-to-get-results).

2\. Check and interpret results in the same way as for the pure [Liveness](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/api/oz-api/basic-scenarios/liveness/..#processing-steps) analysis.

3\. The URL to the best shot is located in the `results_media -> output_images -> original_url` response.
