{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mediacaption-api/json-schema/mediacaption-api-transcription-schema.json",
  "title": "Transcription",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mediacaption-api-transcriptions-api-openapi.yml#/components/schemas/Transcription",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "transcriptionId",
    "source",
    "status",
    "language",
    "sourceUrl",
    "durationSec",
    "expiresAt",
    "createdAt",
    "completedAt",
    "transcript"
  ],
  "properties": {
    "transcriptionId": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "public",
        "ai"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "completed",
        "failed"
      ]
    },
    "language": {
      "type": "string"
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri"
    },
    "durationSec": {
      "type": [
        "number",
        "null"
      ]
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "transcript": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/TranscriptSegment"
      }
    },
    "error": {
      "type": "string"
    }
  },
  "$defs": {
    "TranscriptSegment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "startSec",
        "durationSec",
        "text"
      ],
      "properties": {
        "startSec": {
          "type": "number",
          "minimum": 0
        },
        "durationSec": {
          "type": "number",
          "minimum": 0
        },
        "text": {
          "type": "string"
        }
      }
    }
  }
}