{"openapi":"3.1.0","info":{"title":"VoiceRegen Service API","version":"1.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ValidationErrorResponse":{"type":"object","required":["statusCode","code","error","message"],"properties":{"statusCode":{"type":"integer","enum":[400]},"code":{"type":"string","enum":["FST_ERR_VALIDATION"]},"error":{"type":"string","enum":["Bad Request"]},"message":{"type":"string"}},"additionalProperties":false},"OperationMessage":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"},"statusCode":{"type":"integer"},"errorCode":{"type":"string"},"code":{"type":"string"}},"additionalProperties":true},"SignedUrlResponse":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}},"additionalProperties":false},"RegisterFileRequest":{"type":"object","required":["file_to_register"],"properties":{"file_to_register":{"type":"object","required":["client_file_id"],"properties":{"client_file_id":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"}},"additionalProperties":false}},"additionalProperties":false,"example":{"file_to_register":{"client_file_id":"my-file-001"}}},"RegisterFileFromUrlRequest":{"type":"object","required":["file_to_register"],"properties":{"file_to_register":{"type":"object","required":["client_file_id","source_url"],"properties":{"client_file_id":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"source_url":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"example":{"file_to_register":{"client_file_id":"my-file-001","source_url":"https://example.com/my-audio-file.wav"}}},"StartProcessRequest":{"type":"object","required":["file_id","options"],"properties":{"file_id":{"type":"string","minLength":1},"options":{"type":"object","required":["model"],"properties":{"model":{"type":"string","enum":["voice_regen_v1"],"description":"The model to use for processing"},"webhook":{"type":"boolean"},"webhook_secret":{"type":"string","maxLength":1000},"output_type":{"type":"string","enum":["wav","mp3","flac","aiff","ogg","opus","aac","m4a"],"description":"The output audio format. If omitted, the original file format is used."}},"additionalProperties":false}},"additionalProperties":false,"example":{"file_id":"file-abc123","options":{"model":"voice_regen_v1","webhook":true,"webhook_secret":"my-webhook-secret","output_type":"wav"}}},"StartProcessError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","enum":[100,101,102,103,200,201,202,203,204,205,206,207,300,301,302,303,304,305,307,308,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,426,428,429,431,451,500,501,502,503,504,505,507,511]},"message":{"type":"string"}},"additionalProperties":false},"StartProcessResult":{"type":"object","required":["file_id","error"],"properties":{"file_id":{"type":"string"},"error":{"anyOf":[{"$ref":"#/components/schemas/StartProcessError"},{"type":"null"}]}},"additionalProperties":false},"StartProcessResponse":{"allOf":[{"$ref":"#/components/schemas/StartProcessResult"}],"example":{"file_id":"file-abc123","error":null}},"GetOutputFileUrlRequest":{"type":"object","required":["fileId"],"properties":{"fileId":{"type":"string","minLength":1}},"additionalProperties":false,"example":{"fileId":"file-abc123"}},"UserFile":{"type":"object","required":["id","name","status","updatedTimestamp","createdTimestamp","multi_speaker","inputWaveformLocation","outputWaveformLocation"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"},"file_duration":{"type":"number"},"model":{"type":"string"},"inputFiles":{"type":"array"},"outputFiles":{"type":"array"},"status":{"type":"string"},"updatedTimestamp":{"type":"integer"},"createdTimestamp":{"type":"integer"},"progress":{"type":"number"},"statusMessage":{"type":"string"},"multi_speaker":{"type":"boolean"},"start":{"type":"number"},"end":{"type":"number"}},"additionalProperties":true},"GetFilesStatusRequest":{"type":"object","required":["fileIds"],"properties":{"fileIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1}}},"additionalProperties":false,"example":{"fileIds":["file-abc123","file-def456"]}},"FileProcessingStatus":{"type":"object","required":["id","status","errorCode","progress"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["Pending","InProgress","NotFound","Failed","Succeeded"]},"errorCode":{"type":"integer","enum":[0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18]},"progress":{"type":"number"}},"additionalProperties":false,"example":{"id":"file-abc123","status":"Succeeded","errorCode":0,"progress":100}},"GetFilesStatusResponse":{"type":"array","items":{"$ref":"#/components/schemas/FileProcessingStatus"},"example":[{"id":"file-abc123","status":"Succeeded","errorCode":0,"progress":100},{"id":"file-def456","status":"InProgress","errorCode":0,"progress":45}]},"FileToUpload":{"type":"object","required":["file_id","client_file_id","file_name","file_upload_link","file_upload_expiry"],"properties":{"file_id":{"type":"string"},"client_file_id":{"type":"string"},"file_name":{"type":"string","description":"Base file name without extension."},"file_upload_link":{"type":"string","format":"uri"},"file_upload_expiry":{"type":"integer"},"success":{"type":"boolean"},"error_code":{"type":"integer","enum":[0,500]}},"additionalProperties":false,"example":{"file_id":"file-abc123","client_file_id":"my-file-001","file_name":"audio","file_upload_link":"https://storage.example.com/upload?signature=xyz","file_upload_expiry":1704067200}},"RegisterFileResponse":{"type":"object","description":"Single registered file wrapper; `registered_file` is one object, not an array.","properties":{"registered_file":{"$ref":"#/components/schemas/FileToUpload"}},"additionalProperties":false,"example":{"registered_file":{"file_id":"file-abc123","client_file_id":"my-file-001","file_name":"audio","file_upload_link":"https://storage.example.com/upload?signature=xyz&expires=1234567890","file_upload_expiry":1234567890}}},"RegisteredFile":{"type":"object","required":["file_id","client_file_id","file_name"],"properties":{"file_id":{"type":"string"},"client_file_id":{"type":"string"},"file_name":{"type":"string","description":"Base file name without extension."},"success":{"type":"boolean"},"error_code":{"type":"integer","enum":[0,500]}},"additionalProperties":false,"example":{"file_id":"file-abc123","client_file_id":"my-file-001","file_name":"audio"}},"RegisterFileFromUrlResponse":{"type":"object","description":"Single registered file wrapper; `registered_file` is one object, not an array.","properties":{"registered_file":{"$ref":"#/components/schemas/RegisteredFile"}},"additionalProperties":false,"example":{"registered_file":{"file_id":"file-abc123","client_file_id":"my-file-001","file_name":"audio"}}},"GetOutputFileUrlResponse":{"type":"object","required":["url","expiry"],"properties":{"url":{"type":"string","format":"uri"},"expiry":{"type":"integer"}},"example":{"url":"https://storage.example.com/files/file-abc123/output.wav?signature=xyz&expires=1704067200","expiry":1704067200}}}},"paths":{"/vrg-service-api/api/v1/service-health/ping":{"get":{"operationId":"ping","summary":"Health check ping endpoint","tags":["service-health"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"pong"}},"required":["status"]}}}}}}},"/vrg-service-api/api/v1/registerFile":{"post":{"operationId":"registerFile","summary":"Register a new file for processing, returning an upload URL","tags":["voiceregen"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterFileRequest"}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterFileResponse"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}}}}},"/vrg-service-api/api/v1/registerFileFromUrl":{"post":{"operationId":"registerFileFromUrl","summary":"Register a new file for processing from a user-provided URL","tags":["voiceregen"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterFileFromUrlRequest"}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterFileFromUrlResponse"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}}}}},"/vrg-service-api/api/v1/startProcess":{"post":{"operationId":"startProcess","summary":"Start processing a file","tags":["voiceregen"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProcessRequest"}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProcessResponse"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}}}}},"/vrg-service-api/api/v1/getFilesStatus":{"post":{"operationId":"getFilesStatus","summary":"Get status and progress for multiple files","tags":["voiceregen"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFilesStatusRequest"}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFilesStatusResponse"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}}}}},"/vrg-service-api/api/v1/getOutputFileUrl":{"post":{"operationId":"getOutputFileUrl","summary":"Generate signed URLs for processed outputs (audio/video)","tags":["voiceregen"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOutputFileUrlRequest"}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOutputFileUrlResponse"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationMessage"}}}}}}}},"servers":[{"url":"http://localhost:8085"}],"security":[{"bearerAuth":[]}]}