{
  "components": {
    "schemas": {
      "Body_submit_analysis_v1_analyze_post": {
        "properties": {
          "file": {
            "format": "binary",
            "title": "File",
            "type": "string"
          },
          "tick_ms": {
            "default": 80,
            "title": "Tick Ms",
            "type": "integer"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_submit_analysis_v1_analyze_post",
        "type": "object"
      },
      "EnrollRequest": {
        "properties": {
          "audio_base64": {
            "maxLength": 4000000,
            "title": "Audio Base64",
            "type": "string"
          },
          "audio_format": {
            "default": "float32",
            "enum": [
              "float32",
              "int16",
              "wav",
              "mp3",
              "mulaw8k"
            ],
            "title": "Audio Format",
            "type": "string"
          },
          "consent_obtained": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consent Obtained"
          },
          "label": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "retention_days": {
            "anyOf": [
              {
                "maximum": 3650.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Days"
          }
        },
        "required": [
          "label",
          "audio_base64"
        ],
        "title": "EnrollRequest",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "IdentifyRequest": {
        "properties": {
          "audio_base64": {
            "maxLength": 4000000,
            "title": "Audio Base64",
            "type": "string"
          },
          "audio_format": {
            "default": "float32",
            "enum": [
              "float32",
              "int16",
              "wav",
              "mp3",
              "mulaw8k"
            ],
            "title": "Audio Format",
            "type": "string"
          },
          "threshold": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          }
        },
        "required": [
          "audio_base64"
        ],
        "title": "IdentifyRequest",
        "type": "object"
      },
      "StreamTokenRequest": {
        "properties": {
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pin the token to 'full' or 'sidecar'",
            "title": "Mode"
          },
          "ttl_seconds": {
            "default": 300,
            "maximum": 3600.0,
            "minimum": 30.0,
            "title": "Ttl Seconds",
            "type": "integer"
          }
        },
        "title": "StreamTokenRequest",
        "type": "object"
      },
      "StreamTokenResponse": {
        "properties": {
          "expires_at": {
            "title": "Expires At",
            "type": "integer"
          },
          "token": {
            "title": "Token",
            "type": "string"
          },
          "ws_url": {
            "title": "Ws Url",
            "type": "string"
          }
        },
        "required": [
          "token",
          "expires_at",
          "ws_url"
        ],
        "title": "StreamTokenResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VerifyRequest": {
        "properties": {
          "audio_base64": {
            "maxLength": 4000000,
            "title": "Audio Base64",
            "type": "string"
          },
          "audio_format": {
            "default": "float32",
            "enum": [
              "float32",
              "int16",
              "wav",
              "mp3",
              "mulaw8k"
            ],
            "title": "Audio Format",
            "type": "string"
          },
          "profile_id": {
            "title": "Profile Id",
            "type": "string"
          },
          "threshold": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          }
        },
        "required": [
          "profile_id",
          "audio_base64"
        ],
        "title": "VerifyRequest",
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "VSIP API key (vsip_\u2026). Never expose it in a browser.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "REST endpoints of the VSIP API. All `/v1/*` calls authenticate with your API\nkey: `Authorization: Bearer vsip_\u2026` \u2014 server-side only.\n\nThe real-time Voice Events API is a WebSocket (`wss://api.vsip.online/v1/stream`)\nand is not expressible in OpenAPI; see https://vsip.online/docs/ai for its\nprotocol. Browsers connect to it with a short-lived token from\n`POST /v1/stream/token`.\n",
    "title": "VSIP API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/health": {
      "get": {
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    },
    "/ready": {
      "get": {
        "operationId": "ready_ready_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ready"
      }
    },
    "/v1/analyze": {
      "get": {
        "operationId": "list_jobs_v1_analyze_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List Jobs",
        "tags": [
          "analyze"
        ]
      },
      "post": {
        "operationId": "submit_analysis_v1_analyze_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_submit_analysis_v1_analyze_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Submit Analysis",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/usage": {
      "get": {
        "description": "Monthly audio-minute usage vs the tier allowance.",
        "operationId": "batch_usage_v1_analyze_usage_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Batch Usage",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/{job_id}": {
      "get": {
        "operationId": "get_job_v1_analyze__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get Job",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/profiles": {
      "get": {
        "operationId": "list_profiles_v1_profiles_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List Profiles",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/profiles/enroll": {
      "post": {
        "operationId": "enroll_v1_profiles_enroll_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Enroll",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/profiles/identify": {
      "post": {
        "operationId": "identify_v1_profiles_identify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Identify",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/profiles/usage": {
      "get": {
        "description": "Monthly verify+identify usage vs the tier allowance.",
        "operationId": "profile_usage_v1_profiles_usage_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Profile Usage",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/profiles/verify": {
      "post": {
        "operationId": "verify_v1_profiles_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Verify",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/profiles/{profile_id}": {
      "delete": {
        "operationId": "delete_profile_v1_profiles__profile_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "profile_id",
            "required": true,
            "schema": {
              "title": "Profile Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete Profile",
        "tags": [
          "profiles"
        ]
      }
    },
    "/v1/stream/token": {
      "post": {
        "description": "Call from YOUR BACKEND with the API key (`Authorization: Bearer vsip_\u2026`)\nand give the returned `vst_\u2026` token to the browser, which connects with\n`wss://api.vsip.online/v1/stream?token=vst_\u2026`. The token expires after\n`ttl_seconds` (default 300, max 3600), dies with its API key, and works only\non the stream WebSocket. Never ship the `vsip_` key to a browser.",
        "operationId": "create_stream_token_v1_stream_token_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/StreamTokenRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamTokenResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Mint a short-lived browser token for /v1/stream",
        "tags": [
          "stream"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.vsip.online"
    }
  ]
}
