{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compeller-ai/json-schema/compeller-ai-compel-payload-schema.json",
  "title": "CompelPayload",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compeller-ai-openapi.yml#/components/schemas/CompelPayload",
  "type": "object",
  "required": [
    "id",
    "title",
    "status",
    "progress",
    "stage",
    "retry_count",
    "eta_seconds",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/CompelStatus"
    },
    "progress": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "progress_percent": {
      "type": "integer",
      "description": "Alias for `progress`."
    },
    "stage": {
      "$ref": "#/$defs/CompelStage"
    },
    "retry_count": {
      "type": "integer"
    },
    "estimated_completion": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "eta_seconds": {
      "type": "integer",
      "format": "int64"
    },
    "rendering_id": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "description": "Populated when a COMPLETED rendering exists."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "react": {
      "$ref": "#/$defs/ReactHandoff"
    }
  },
  "$defs": {
    "CompelStage": {
      "type": "string",
      "description": "Internal pipeline stage exposed for observability. Do not branch on it.",
      "enum": [
        "CREATED",
        "AUDIO_UPLOAD",
        "AUDIO_PROCESSING",
        "AUDIO_ANALYSIS",
        "AUDIO_TRANSCRIBE",
        "BACKDROP_RENDER",
        "READY",
        "SCENES_CREATED",
        "COMPEL_RENDERED",
        "FAILED",
        "CANCELLED",
        "PENDING_ASSETS"
      ]
    },
    "CompelStatus": {
      "type": "string",
      "description": "Public-facing compel status derived from internal state.",
      "enum": [
        "QUEUED",
        "VALIDATING",
        "PROCESSING",
        "RENDERING",
        "COMPLETED",
        "CANCELLED",
        "FAILED_RETRYING",
        "FAILED_FINAL"
      ]
    },
    "ReactHandoff": {
      "type": "object",
      "description": "Agent-facing handoff that tells users how to experience a completed compel in REACT, Compeller's free live performance system.",
      "required": [
        "message",
        "download_url",
        "learn_more"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "download_url": {
          "type": "string",
          "format": "uri"
        },
        "learn_more": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}