{
  "openapi": "3.1.0",
  "info": {
    "title": "NanoClip Public API",
    "version": "0.1.0",
    "description": "Upload video or audio and extract transcript, speaker, face, scene, and retake intelligence."
  },
  "paths": {
    "/v1/projects/upload": {
      "post": {
        "summary": "Create Upload Project",
        "operationId": "create_upload_project_v1_projects_upload_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadProjectResponse"
                }
              }
            }
          },
          "413": {
            "description": "Upload exceeds the maximum file size"
          },
          "415": {
            "description": "Unsupported upload content type"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/projects/{project_id}/upload/complete": {
      "post": {
        "summary": "Complete Upload",
        "operationId": "complete_upload_v1_projects__project_id__upload_complete_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompleteUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/transcript": {
      "post": {
        "summary": "Create Transcript",
        "operationId": "create_transcript_v1_projects__project_id__transcript_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptCommandResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Transcript",
        "operationId": "get_transcript_v1_projects__project_id__transcript_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionResultResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/vision": {
      "post": {
        "summary": "Create Vision",
        "operationId": "create_vision_v1_projects__project_id__vision_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceDetectionRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisionCommandResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Vision",
        "operationId": "get_vision_v1_projects__project_id__vision_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisionResultResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/retake-removal": {
      "post": {
        "summary": "Create Retake Removal",
        "description": "Dispatch a retake-removal analysis on an uploaded project source.\n\nIdempotent on command_id=`retake_removal`: replaying the request after\nthe first call returns the existing command's current status without\nre-charging or re-dispatching.",
        "operationId": "create_retake_removal_v1_projects__project_id__retake_removal_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetakeRemovalRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetakeRemovalCommandResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get Retake Removal",
        "description": "Return retake-removal decisions for a project.\n\nStatus surfaces: queued / running / completed / failed. Decisions\n(words/remove_spans/keep_intervals) are populated only when\nstatus == \"completed\". The runner persists decisions at\nworkspaces/{ws}/jobs/{job}/artifacts/retake_removal/decisions.json.",
        "operationId": "get_retake_removal_v1_projects__project_id__retake_removal_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetakeRemovalResultResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}": {
      "get": {
        "summary": "Get Project",
        "operationId": "get_project_v1_projects__project_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "summary": "Get Me",
        "description": "Describe the authenticated key: workspace, scopes, live limits, today's\nusage, and the wallet balance + pricing catalog.\n\nAuth requires only a valid key \u2014 there is no scope gate, so any key can\ndescribe itself and the caller can pre-flight scopes and estimate cost\nagainst the live wallet before a multi-gigabyte upload. Limits reflect the\nrunning config (env-resolved, not code defaults) and usage_today reuses the\nsame daily counters the quota enforcement reads. ``credit_balance_cents`` is\na real ``null`` (never a fake 0) when credit billing is disabled for the\ndeployment; ``agent_context.balance_note`` explains it.",
        "operationId": "get_me_v1_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AnalysisCommandStatus": {
        "type": "string",
        "enum": [
          "queued",
          "processing",
          "completed"
        ],
        "title": "AnalysisCommandStatus",
        "description": "202 dispatch acknowledgment for an analysis command.\n\n``failed`` is deliberately absent: a failed command never reaches this\nwire \u2014 the POST either re-dispatches (idempotent retry) or raises 503\n(see _existing_command_response's gate)."
      },
      "AnalysisResultStatus": {
        "type": "string",
        "enum": [
          "queued",
          "processing",
          "completed",
          "failed"
        ],
        "title": "AnalysisResultStatus",
        "description": "Analysis lifecycle as reported by the result GET endpoints."
      },
      "CompleteUploadResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatus"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "source": {
            "$ref": "#/components/schemas/ProjectSourceResponse"
          },
          "source_size_bytes": {
            "type": "integer",
            "title": "Source Size Bytes"
          },
          "duration": {
            "type": "number",
            "title": "Duration"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status",
          "created_at",
          "source",
          "source_size_bytes",
          "duration"
        ],
        "title": "CompleteUploadResponse"
      },
      "FaceDetectionRequest": {
        "properties": {
          "requested_outputs": {
            "items": {
              "type": "string",
              "enum": [
                "faces",
                "face_tracks",
                "scenes"
              ]
            },
            "type": "array",
            "title": "Requested Outputs"
          }
        },
        "type": "object",
        "title": "FaceDetectionRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MeApiKey": {
        "properties": {
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "prefix",
          "scopes"
        ],
        "title": "MeApiKey"
      },
      "MeBilling": {
        "properties": {
          "credit_balance_cents": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credit Balance Cents"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "pricing": {
            "$ref": "#/components/schemas/MePricing"
          }
        },
        "type": "object",
        "required": [
          "currency",
          "pricing"
        ],
        "title": "MeBilling"
      },
      "MeLimits": {
        "properties": {
          "requests_per_minute_per_key": {
            "type": "integer",
            "title": "Requests Per Minute Per Key"
          },
          "projects_per_day": {
            "type": "integer",
            "title": "Projects Per Day"
          },
          "analysis_commands_per_day": {
            "type": "integer",
            "title": "Analysis Commands Per Day"
          },
          "max_upload_bytes": {
            "type": "integer",
            "title": "Max Upload Bytes"
          }
        },
        "type": "object",
        "required": [
          "requests_per_minute_per_key",
          "projects_per_day",
          "analysis_commands_per_day",
          "max_upload_bytes"
        ],
        "title": "MeLimits"
      },
      "MePricing": {
        "properties": {
          "transcript_per_uploaded_hour_cents": {
            "type": "integer",
            "title": "Transcript Per Uploaded Hour Cents"
          },
          "diarization_addon_per_hour_cents": {
            "type": "integer",
            "title": "Diarization Addon Per Hour Cents"
          },
          "vision_per_minute_cents": {
            "type": "integer",
            "title": "Vision Per Minute Cents"
          },
          "retake_removal_per_minute_cents": {
            "type": "integer",
            "title": "Retake Removal Per Minute Cents"
          }
        },
        "type": "object",
        "required": [
          "transcript_per_uploaded_hour_cents",
          "diarization_addon_per_hour_cents",
          "vision_per_minute_cents",
          "retake_removal_per_minute_cents"
        ],
        "title": "MePricing"
      },
      "MeResponse": {
        "properties": {
          "workspace": {
            "$ref": "#/components/schemas/MeWorkspace"
          },
          "api_key": {
            "$ref": "#/components/schemas/MeApiKey"
          },
          "limits": {
            "$ref": "#/components/schemas/MeLimits"
          },
          "usage_today": {
            "$ref": "#/components/schemas/MeUsageToday"
          },
          "billing": {
            "$ref": "#/components/schemas/MeBilling"
          },
          "agent_context": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Agent Context"
          }
        },
        "type": "object",
        "required": [
          "workspace",
          "api_key",
          "limits",
          "usage_today",
          "billing",
          "agent_context"
        ],
        "title": "MeResponse"
      },
      "MeUsageToday": {
        "properties": {
          "projects_created": {
            "type": "integer",
            "title": "Projects Created"
          },
          "analysis_commands": {
            "type": "integer",
            "title": "Analysis Commands"
          },
          "day_resets_at": {
            "type": "string",
            "title": "Day Resets At"
          }
        },
        "type": "object",
        "required": [
          "projects_created",
          "analysis_commands",
          "day_resets_at"
        ],
        "title": "MeUsageToday"
      },
      "MeWorkspace": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "MeWorkspace"
      },
      "ProjectDetailResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatus"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "source": {
            "$ref": "#/components/schemas/ProjectSourceResponse"
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration"
          },
          "source_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Size Bytes"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status",
          "created_at",
          "source"
        ],
        "title": "ProjectDetailResponse",
        "description": "Detail view of a project, including the billing basis upload/complete\nestablished. ``duration``, ``source_size_bytes``, ``width``, ``height``\nare ``null`` until upload/complete has probed the source; ``width`` and\n``height`` stay ``null`` for audio sources, which have no dimensions."
      },
      "ProjectSourceResponse": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "media_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media Kind"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ProjectSourceResponse"
      },
      "ProjectStatus": {
        "type": "string",
        "enum": [
          "created",
          "uploading",
          "ready",
          "failed"
        ],
        "title": "ProjectStatus",
        "description": "Public project lifecycle: creation \u2192 upload \u2192 analyzable (or failed).\n\nOne of three distinct status vocabularies on the /v1 wire (REE-75) \u2014\nproject lifecycle, command dispatch, and analysis result are different\nstate machines and are declared as different enums on purpose."
      },
      "RetakeRemovalCommandResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "analysis": {
            "type": "string",
            "const": "retake_removal",
            "title": "Analysis"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisCommandStatus"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "analysis",
          "status",
          "created_at"
        ],
        "title": "RetakeRemovalCommandResponse"
      },
      "RetakeRemovalKeepInterval": {
        "properties": {
          "start": {
            "type": "number",
            "title": "Start"
          },
          "end": {
            "type": "number",
            "title": "End"
          }
        },
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "title": "RetakeRemovalKeepInterval"
      },
      "RetakeRemovalRequest": {
        "properties": {
          "language": {
            "type": "string",
            "enum": [
              "bg",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "et",
              "fi",
              "fr",
              "he",
              "hr",
              "hu",
              "it",
              "lt",
              "lv",
              "mt",
              "nl",
              "pl",
              "pt",
              "ro",
              "ru",
              "sk",
              "sl",
              "sv",
              "uk"
            ],
            "title": "Language",
            "description": "Transcript language base tag. Use one of the supported values, such as en or he.",
            "examples": [
              "en",
              "he"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "language"
        ],
        "title": "RetakeRemovalRequest",
        "description": "Request body for POST /v1/projects/{id}/retake-removal.\n\nIntentionally minimal: language is the only knob. The LLM model is\nserver-side."
      },
      "RetakeRemovalResultResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisResultStatus"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "words": {
            "items": {
              "$ref": "#/components/schemas/RetakeRemovalWord"
            },
            "type": "array",
            "title": "Words"
          },
          "remove_spans": {
            "items": {
              "$ref": "#/components/schemas/RetakeRemovalSpan"
            },
            "type": "array",
            "title": "Remove Spans"
          },
          "keep_intervals": {
            "items": {
              "$ref": "#/components/schemas/RetakeRemovalKeepInterval"
            },
            "type": "array",
            "title": "Keep Intervals"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status"
        ],
        "title": "RetakeRemovalResultResponse"
      },
      "RetakeRemovalSpan": {
        "properties": {
          "remove_word_start": {
            "type": "integer",
            "title": "Remove Word Start"
          },
          "remove_word_end": {
            "type": "integer",
            "title": "Remove Word End"
          }
        },
        "type": "object",
        "required": [
          "remove_word_start",
          "remove_word_end"
        ],
        "title": "RetakeRemovalSpan"
      },
      "RetakeRemovalWord": {
        "properties": {
          "i": {
            "type": "integer",
            "title": "I"
          },
          "start": {
            "type": "number",
            "title": "Start"
          },
          "end": {
            "type": "number",
            "title": "End"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "confidence": {
            "type": "number",
            "title": "Confidence"
          },
          "source": {
            "type": "string",
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "i",
          "start",
          "end",
          "text",
          "confidence",
          "source"
        ],
        "title": "RetakeRemovalWord"
      },
      "TranscriptCommandResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "analysis": {
            "type": "string",
            "const": "transcript",
            "title": "Analysis"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisCommandStatus"
          },
          "requested_outputs": {
            "items": {
              "type": "string",
              "enum": [
                "text",
                "speakers",
                "utterances",
                "words"
              ]
            },
            "type": "array",
            "title": "Requested Outputs"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "analysis",
          "status",
          "requested_outputs",
          "created_at"
        ],
        "title": "TranscriptCommandResponse"
      },
      "TranscriptionRequest": {
        "properties": {
          "language": {
            "type": "string",
            "enum": [
              "bg",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "et",
              "fi",
              "fr",
              "he",
              "hr",
              "hu",
              "it",
              "lt",
              "lv",
              "mt",
              "nl",
              "pl",
              "pt",
              "ro",
              "ru",
              "sk",
              "sl",
              "sv",
              "uk"
            ],
            "title": "Language",
            "description": "Transcript language base tag. Use one of the supported values, such as en or he.",
            "examples": [
              "en",
              "he"
            ]
          },
          "requested_outputs": {
            "items": {
              "type": "string",
              "enum": [
                "text",
                "speakers",
                "utterances",
                "words"
              ]
            },
            "type": "array",
            "title": "Requested Outputs"
          },
          "diarize": {
            "type": "boolean",
            "title": "Diarize",
            "description": "Request speaker diarization. Billed separately at $0.05/audio-hour.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "language"
        ],
        "title": "TranscriptionRequest"
      },
      "TranscriptionResultResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "analysis": {
            "type": "string",
            "const": "transcript",
            "title": "Analysis",
            "default": "transcript"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisResultStatus"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "agent_context": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Agent Context"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "default": ""
          },
          "words": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Words"
          },
          "utterances": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Utterances"
          },
          "speakers": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Speakers"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status"
        ],
        "title": "TranscriptionResultResponse"
      },
      "UploadProjectRequest": {
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Content Type",
            "description": "MIME type of the upload. Accepted: video/mp4, video/quicktime, video/webm, audio/mpeg, audio/mp4, audio/x-m4a, audio/aac, audio/wav, audio/x-wav, audio/flac, audio/x-flac, audio/ogg, audio/webm. Unsupported types return 415. Audio sources are transcript-only (vision and retake-removal return 422)."
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          }
        },
        "type": "object",
        "required": [
          "filename",
          "content_type"
        ],
        "title": "UploadProjectRequest"
      },
      "UploadProjectResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatus"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "source": {
            "$ref": "#/components/schemas/ProjectSourceResponse"
          },
          "upload_url": {
            "type": "string",
            "title": "Upload Url"
          },
          "upload_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Upload Headers"
          },
          "upload_expires_in_seconds": {
            "type": "integer",
            "title": "Upload Expires In Seconds"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status",
          "created_at",
          "source",
          "upload_url",
          "upload_headers",
          "upload_expires_in_seconds"
        ],
        "title": "UploadProjectResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VisionAsdStatus": {
        "properties": {
          "ran": {
            "type": "boolean",
            "title": "Ran"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "assigned": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned"
          },
          "carried": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Carried"
          }
        },
        "type": "object",
        "required": [
          "ran"
        ],
        "title": "VisionAsdStatus",
        "description": "Whether active-speaker detection ran for this job, and what it produced.\n\nDetections that were never scored omit `speak_conf` entirely, so this record\nis the only way to tell \"never ran\" from \"ran and scored nothing\". Active-\nspeaker detection needs at least two simultaneously tracked faces, so\nsingle-speaker footage produces no scores by design."
      },
      "VisionCommandResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "analysis": {
            "type": "string",
            "const": "vision",
            "title": "Analysis"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisCommandStatus"
          },
          "requested_outputs": {
            "items": {
              "type": "string",
              "enum": [
                "faces",
                "face_tracks",
                "scenes"
              ]
            },
            "type": "array",
            "title": "Requested Outputs"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "analysis",
          "status",
          "requested_outputs",
          "created_at"
        ],
        "title": "VisionCommandResponse"
      },
      "VisionResultResponse": {
        "properties": {
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "analysis": {
            "type": "string",
            "const": "vision",
            "title": "Analysis",
            "default": "vision"
          },
          "status": {
            "$ref": "#/components/schemas/AnalysisResultStatus"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "agent_context": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Agent Context"
          },
          "faces": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Faces"
          },
          "face_tracks": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Face Tracks"
          },
          "scenes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Scenes"
          },
          "asd": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VisionAsdStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "status"
        ],
        "title": "VisionResultResponse"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.nanoclip.ai"
    }
  ]
}
