{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/preflight-social/json-schema/preflight-social-media-schema.json",
  "title": "Media",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/preflight-social-openapi.json#/components/schemas/Media",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "image",
        "video"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_upload",
        "ingesting",
        "processing",
        "ready",
        "failed",
        "deleted"
      ]
    },
    "mimeType": {
      "type": [
        "string",
        "null"
      ]
    },
    "sizeBytes": {
      "type": [
        "integer",
        "null"
      ]
    },
    "durationSeconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "width": {
      "type": [
        "integer",
        "null"
      ]
    },
    "height": {
      "type": [
        "integer",
        "null"
      ]
    },
    "fps": {
      "type": [
        "number",
        "null"
      ]
    },
    "filename": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "A short-lived link to the file itself, once it is ready."
    },
    "previewUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "A short-lived link to a lighter copy of a video for previews; null means use url."
    },
    "previewPending": {
      "type": "boolean",
      "description": "True while that lighter copy is still being made."
    },
    "animated": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "An animated GIF or WebP."
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}