{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoposting-ai/json-schema/autoposting-ai-clip-schema.json",
  "title": "Clip",
  "description": "A video clip with transcription status and AI-generated candidates.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoposting-ai-openapi.json#/components/schemas/Clip",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "brandSlug": {
      "type": "string"
    },
    "fileName": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "duration": {
      "type": "integer",
      "description": "Duration in seconds."
    },
    "fileSize": {
      "type": "integer",
      "description": "File size in bytes."
    },
    "transcription": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        }
      }
    },
    "candidates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Candidate"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Candidate": {
      "type": "object",
      "description": "An AI-generated clip candidate within a source video.",
      "properties": {
        "id": {
          "type": "string"
        },
        "startMs": {
          "type": "integer"
        },
        "endMs": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "score": {
          "type": "integer"
        }
      }
    }
  }
}