---
title: "Validate external file URL"
method: POST
path: "/orders/validate"
tags: ["Orders"]
---

# Validate external file URL

`POST /orders/validate`

## Request

- Base URL: `https://barevalue.com/api/v1`
- URL: `https://barevalue.com/api/v1/orders/validate`
- Auth: HTTP bearer

Pre-flight check of an audio file by link, without creating an order: the file is fetched, its duration measured, and the speech and content checks an order goes through are run on it. A check that cannot run on our side is reported as unavailable (`available: false`, a null finding) and never makes the file invalid. A link that cannot be fetched, a file over 750 MB or audio that cannot be read answers 400 with `valid: false` and an `error` code. Not offered until the account email is confirmed (403 `email_verification_required`): submit directly, the same checks run and nothing is charged if the audio is refused.

## Request body

- ValidateRequest
  - `file_url` string, uri, required: Public URL of the audio file to validate

## Response `200`

Validation result

- ValidateResponse
  - `valid` boolean: false only when a check that ran found the file unsuitable. A check that could not run never makes the file invalid.
  - `duration_minutes` number: Duration of the audio in minutes, to two decimals.
  - `checks` object: One entry per check that is switched on. A check that could not run on our side has passed: true, available: false, a null finding and a note; the same check runs again when the order is submitted.
    - `speech_check` object: Does the audio contain spoken content.
      - `passed` boolean, required: false when too little speech was measured. true when the check passed or could not run.
      - `has_speech` boolean, nullable, required: Whether speech was found. null when the check could not run.
      - `available` boolean: Present, and false, only when the check could not run.
      - `note` string: Present only when the check could not run: says so in words.
    - `content_check` object: Is the content a podcast or interview and not music.
      - `passed` boolean, required: false when the file was classified as music. true when the check passed or could not run.
      - `is_spoken_content` boolean, nullable, required: false when the file was classified as music. null when the check could not run.
      - `available` boolean: Present, and false, only when the check could not run.
      - `note` string: Present only when the check could not run: says so in words.
  - `message` string: Present when valid is false: why the file was found unsuitable.

## Other responses

- `400`: The file could not be checked: `valid` is false and `error` is url_error, file_too_large, download_failed or invalid_audio, with a `message`.
- `401`: Missing or invalid API key
- `403`: email_verification_required: pre-checks are available once the account email is confirmed. Submit the order directly.
- `422`: Validation failed

---

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