> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# coreav check

> Check a file against an upload policy and print the verdict as JSON.

`coreav check --policy POLICY FILE` checks an MP4, MOV, Matroska or WebM file against an upload policy and prints the verdict ([`coreav.verdict/1`](https://github.com/coreav-dev/coreav/blob/main/docs/schema/verdict-v1.md)) on standard output. A policy is a [`coreav.policy/1`](https://github.com/coreav-dev/coreav/blob/main/docs/schema/policy-v1.md) JSON file that sets limits on codecs, resolution, duration, size and more.

| Exit status | Meaning |
| - | - |
| 0 | The file is accepted. |
| 1 | The file is rejected. The verdict on standard output lists the reasons. |
| 2 | The policy is not valid. |

## Example

```console theme={null}
$ coreav check --policy web-upload.json input.mp4
{
  "policy": "web-upload",
  "reasons": [],
  "schema": "coreav.verdict/1",
  "verdict": "accept"
}
```

The repository has example policies in [`docs/schema/policy-examples`](https://github.com/coreav-dev/coreav/tree/main/docs/schema/policy-examples).

## Options

```text theme={null}
Check an MP4, MOV, Matroska or WebM file against an upload policy and print the verdict as JSON

Usage: coreav check --policy <POLICY> <FILE>

Arguments:
  <FILE>  The file to check

Options:
      --policy <POLICY>  The policy: a `coreav.policy/1` JSON file (docs/schema/policy-v1.md)
  -h, --help             Print help
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.