{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoshort-org/json-schema/autoshort-org-video-detail-schema.json",
  "title": "VideoDetail",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoshort-org-openapi.json#/components/schemas/VideoDetail",
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "GENERATING_SCRIPT",
        "GENERATING_VOICE",
        "FETCHING_MEDIA",
        "RENDERING",
        "COMPLETED",
        "FAILED",
        "DRAFT"
      ]
    },
    "title": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "language": {
      "type": "string"
    },
    "artStyle": {
      "type": "string"
    },
    "targetDuration": {
      "type": [
        "integer",
        "null"
      ]
    },
    "duration": {
      "type": "number"
    },
    "videoUrl": {
      "type": "string"
    },
    "thumbnailUrl": {
      "type": "string"
    },
    "script": {
      "type": "string"
    },
    "estimatedCompletionTime": {
      "type": "integer",
      "description": "Seconds; only while waiting to start."
    },
    "error": {
      "type": "string",
      "description": "Only when FAILED."
    },
    "blockedReason": {
      "type": "string",
      "enum": [
        "INSUFFICIENT_CREDITS"
      ]
    },
    "blockedMessage": {
      "type": "string"
    },
    "creditsNeeded": {
      "type": "integer"
    },
    "creditsAvailable": {
      "type": "integer"
    },
    "topUpUrl": {
      "type": "string"
    },
    "aiGenerated": {
      "type": "boolean",
      "description": "True when the video must be labelled AI-generated."
    },
    "userImages": {
      "type": "object",
      "additionalProperties": true,
      "description": "Which of your images went to which scene."
    },
    "nextStep": {
      "type": "string",
      "description": "Present on DRAFT videos."
    }
  },
  "additionalProperties": true
}