Automotion docs

VALIDATION_ERROR

A field in the movie document failed validation.

HTTP status: 400

What it means

A field in your movie document (or request body) has the wrong type, an out-of-range value, or violates a cross-field rule. The path points at the exact offending field.

Why it happens

  • A field value is outside its allowed range (for example opacity: 1.5 — opacity must be 0–1).
  • An unknown key is present — documents are strict, unknown keys are rejected.
  • A cross-field rule failed, e.g. subtitles with source: "auto" but no voice element in the scene, or duration: "voice" without a voice element.
  • An image element supplies both src and generate (or neither).

How to fix it

  • Read path and message — they identify the exact field and rule.
  • Check the field in the schema reference; every constraint and default is documented there.
  • Validation returns ALL findings in the errors array, so fix everything in one pass.

Example

Every non-2xx response uses the same envelope; path (when present) is the exact JSON path of the offending field, and requestId identifies the request in support conversations:

response.json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Opacity must be between 0 and 1.",
    "path": "scenes[0].elements[1].opacity",
    "docsUrl": "https://automotion.dev/docs/errors/validation_error"
  },
  "requestId": "req_0123456789abcdef0123456789abcdef"
}

See the error index for the full catalog and the API overview for envelope semantics.

On this page