{
  "info": {
    "title": "Litestar API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "DetailedHealth",
        "operationId": "HealthDetailedHealth",
        "responses": {
          "200": {
            "description": "Request fulfilled, document follows",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      }
                    ]
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/batch/analyze": {
      "post": {
        "summary": "AnalyzeVideoBatch",
        "operationId": "BatchAnalyzeAnalyzeVideoBatch",
        "responses": {
          "201": {
            "description": "Document created, URL follows",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchAnalysisResponse"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/": {
      "get": {
        "summary": "ServeBatchUi",
        "operationId": "ServeBatchUi",
        "responses": {
          "200": {
            "description": "Request fulfilled, document follows",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/stream": {
      "get": {
        "summary": "ServeStreamUi",
        "operationId": "StreamServeStreamUi",
        "responses": {
          "200": {
            "description": "Request fulfilled, document follows",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "BatchAnalysisResponse": {
        "properties": {
          "video_filename": {
            "type": "string"
          },
          "total_segments": {
            "type": "integer"
          },
          "total_duration": {
            "type": "number"
          },
          "segments": {
            "items": {
              "$ref": "#/components/schemas/VideoSegmentAnalysis"
            },
            "type": "array"
          },
          "gcs_path": {
            "type": "string"
          },
          "processing_time": {
            "type": "number"
          }
        },
        "type": "object",
        "required": [
          "gcs_path",
          "processing_time",
          "segments",
          "total_duration",
          "total_segments",
          "video_filename"
        ],
        "title": "BatchAnalysisResponse"
      },
      "ModelOutput": {
        "properties": {
          "social_signal": {
            "type": "string"
          },
          "start_time": {
            "type": "number"
          },
          "end_time": {
            "type": "number"
          },
          "reasoning": {
            "type": "string"
          },
          "feedback": {
            "type": "string"
          },
          "confidence": {
            "type": "string"
          },
          "intensity": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "confidence",
          "end_time",
          "feedback",
          "intensity",
          "reasoning",
          "social_signal",
          "start_time"
        ],
        "title": "ModelOutput"
      },
      "VideoSegmentAnalysis": {
        "properties": {
          "segment_number": {
            "type": "integer"
          },
          "start_time": {
            "type": "number"
          },
          "end_time": {
            "type": "number"
          },
          "duration": {
            "type": "number"
          },
          "model_outputs": {
            "items": {
              "$ref": "#/components/schemas/ModelOutput"
            },
            "type": "array",
            "default": []
          },
          "model_thoughts": {
            "type": "string",
            "default": ""
          },
          "timestamp": {
            "type": "string"
          },
          "video_tokens": {
            "type": "integer",
            "default": 0
          },
          "audio_tokens": {
            "type": "integer",
            "default": 0
          },
          "text_tokens": {
            "type": "integer",
            "default": 0
          },
          "total_tokens": {
            "type": "integer",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "duration",
          "end_time",
          "segment_number",
          "start_time",
          "timestamp"
        ],
        "title": "VideoSegmentAnalysis"
      }
    }
  }
}
