{"openapi":"3.1.0","info":{"title":"DubSmart API","description":"The DubSmart API provides comprehensive AI-powered multimedia processing capabilities including dubbing and text-to-speech services. It offers powerful tools to create, edit, and download AI-generated content, making multilingual and audio content creation simple and customizable.\n\n## AI Dubbing API\n\nThe AI Dubbing API allows efficient dubbing of videos into multiple languages:\n\n• **Create Projects**: Start a new dubbing project by uploading your video and selecting target language(s).\n• **Edit Projects**: Modify existing projects with comprehensive editing capabilities including text editing, speech volume adjustment, segment timestamps, speaker assignment, segment management, and speech regeneration.\n• **Download Results**: Retrieve the final dubbed video or audio.\n\n## Custom Voices API\n\nThe Custom Voices API allows you to create and manage custom voice clones:\n\n• **Upload Voice Sample**: Upload an audio file (20-600 seconds, max 100MB) in MP3, WAV, AAC, M4A, or FLAC format.\n• **Create Custom Voice**: Create a custom voice using the uploaded audio sample.\n• **List Custom Voices**: Retrieve all your custom voices.\n• **Delete Custom Voice**: Remove a custom voice from your account.\n\n### 🎤 Custom Voice Quick Start\n\n**Step 1: Get Upload URL**\n```bash\ncurl -X GET \"https://dubsmart.ai/api/v1/upload?region=EU&fileExtension=mp3\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n```\n\n*Response:*\n```json\n{\n  \"url\": \"https://dubsmartai.s3.eu-central-1.amazonaws.com/voice-cloning/...\",\n  \"key\": \"voice-cloning/user_id/filename.mp3\"\n}\n```\n\n**Step 2: Upload Audio File**\n```bash\ncurl -X PUT -T your_audio_file.mp3 \"https://dubsmartai.s3.eu-central-1.amazonaws.com/voice-cloning/...\"\n```\n\n*Upload your audio file using the presigned URL from Step 1. Supported formats: MP3, WAV, AAC, M4A, FLAC. File size: 20-600 seconds, max 100MB.*\n\n**Step 3: Create Custom Voice**\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/custom-voices/create\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"My Custom Voice\",\n    \"examplePath\": \"voice-cloning/user_id/filename.mp3\"\n  }'\n```\n\n*Response includes the voice ID:*\n```json\n{\n  \"id\": \"67c123...\",\n  \"name\": \"My Custom Voice\",\n  \"examplePath\": \"https://...\",\n  \"createdAt\": \"2024-01-15T10:30:00Z\"\n}\n```\n\n**Step 4: Use Custom Voice in TTS**\n*Use the voice ID from Step 3 response as the voice parameter in TTS projects.*\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/tts/project\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"My TTS Project\",\n    \"input\": [{\"voice\": \"67c123...\", \"text\": \"Hello world!\"}]\n  }'\n```\n\n### 📋 Optional: Manage Custom Voices\n\n**List Your Custom Voices**\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/custom-voices/list\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"limit\": 10}'\n```\n\n**Delete Custom Voice**\n```bash\ncurl -X DELETE \"https://dubsmart.ai/api/v1/custom-voices/VOICE_ID\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n```\n\n## Text-to-Speech (TTS) API\n\nThe TTS API provides advanced text-to-speech conversion capabilities with a simple 5-step workflow:\n\n### 🚀 Quick Start Guide\n\n**Step 1: Get Available Voices**\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/voices\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"limit\": 50, \"filter\": {\"language\": \"en\"}}'\n```\n*Save the `value` field from each voice item - this is what you'll use in Step 2.*\n\n**Voice Types:**\n• **Regular voices**: Use the `value` field (e.g., \"anna_en_v2\")\n• **Custom voices**: Use the `id` field which contains the voice ID\n\n**Step 2: Create TTS Project**\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/tts/project\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"My TTS Project\",\n    \"region\": \"EU\",\n    \"generateImmediately\": true,\n    \"input\": [\n      {\"voice\": \"voice_value_from_step1\", \"text\": \"Hello world!\"},\n      {\"voice\": \"voice_value_from_step1\", \"text\": \"This is amazing.\"}\n    ]\n  }'\n```\n\n> Tip: To generate speech immediately, pass `\"generateImmediately\": true` in the request body. Otherwise, use Step 4.\n\n**Step 3: Get Project Details & Segment IDs (Required for Option B)**\n```bash\ncurl -X GET \"https://dubsmart.ai/api/v1/tts/project/PROJECT_ID\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n```\n*Only needed if you want to generate specific segments. Save the segment IDs from the `input` array.*\n\n**Step 4: Generate Audio**\n\n*Option A: Generate all segments*\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/tts/regenerate\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"id\": \"PROJECT_ID\"}'\n```\n\n*Option B: Generate specific segments only*\n```bash\ncurl -X POST \"https://dubsmart.ai/api/v1/tts/regenerate\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"PROJECT_ID\",\n    \"segmentForRegenerating\": [\"segment_id_1\", \"segment_id_2\"]\n  }'\n```\n\n**Step 5: Download Generated Audio**\n```bash\ncurl -X GET \"https://dubsmart.ai/api/v1/tts/project/PROJECT_ID\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"\n```\n*The response includes `resultUrl` for each segment with presigned download links.*\n\n### 🎯 Key Features\n\n• **Voice Selection**: Choose from hundreds of high-quality AI voices across multiple languages and providers\n• **Segment Management**: Add, edit, or delete text segments with individual voice and parameter settings\n• **Voice Customization**: Adjust stability, similarity, style, volume, and emotion parameters for each segment\n• **Flexible Generation**: Generate entire projects or specific segments as needed\n• **Export Options**: Download individual segments or merged audio files\n\n### 📝 Important Notes\n\n• **Voice Selection**: Always use the `value` field from voices API response:\n  - Regular voices: Contains provider-specific voice identifier (e.g., \"anna_en_v2\")\n  - Custom voices: Contains the custom voice ID\n• **Step 3 is Optional**: Only required if you want to generate specific segments (Option B) instead of all segments (Option A)\n• **Project States**: Projects start in 'Draft' state, become 'Pending' during generation, and 'Done' when complete\n• **Generation Options**: Generate all segments at once OR specific segments using their IDs from Step 3\n• **Audio URLs**: Download links are temporary (1 hour expiry) and regenerated on each API call\n• **Generation Time**: Audio generation typically takes 30-60 seconds depending on text length and voice complexity\n• **Supported Regions**: EU and US regions available for optimized performance\n• **Rate Limits**: Generation requests are subject to your subscription plan limits\n\n## Technical Details\n\n• **Request Format**: API requests can be sent via code or using `curl` commands.\n• **Response Format**: JSON is used for all responses, ensuring easy integration with your application.\n• **Authentication**: An API key is required for all operations.\n• **Rate Limiting**: API calls are subject to rate limits based on your subscription plan.","version":"1.0.0"},"servers":[{"url":"https://dubsmart.ai/api/v1"}],"externalDocs":{"url":"https://dubsmart.ai/dashboard/docs"},"paths":{"/upload":{"get":{"operationId":"upload-uploadFile","summary":"Get upload file url","description":"You will get a URL that you can use to upload the file using a PUT request. You will also get a key to use with project creation.","tags":["Upload"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"region","schema":{"default":"EU","type":"string","enum":["EU","US"]}},{"in":"query","name":"fileExtension","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"key":{"type":"string"}},"required":["url","key"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/custom-voices/create":{"post":{"operationId":"voice-createCustomVoice","summary":"Create custom voice","description":"Create a new custom voice by uploading an audio file. The audio file should be uploaded first using the upload endpoint, then use the returned key as examplePath.","tags":["Voices"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"examplePath":{"type":"string"},"name":{"type":"string"},"cleanAudio":{"default":false,"type":"boolean"}},"required":["examplePath","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"examplePath":{"type":"string"},"cleaning":{"type":["boolean","null"]},"createdAt":{"type":"string"}},"required":["id","name","examplePath","cleaning","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/custom-voices/{id}":{"delete":{"operationId":"voice-deleteCustomVoice","summary":"Delete custom voice","description":"Delete a custom voice by ID","tags":["Voices"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"success":{"type":"boolean"}},"required":["id","success"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/custom-voices/list":{"post":{"operationId":"voice-getCustomVoices","summary":"Get custom voices","tags":["Voices"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"limit":{"default":10,"type":"number"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"examplePath":{"type":"string"},"value":{"type":"string"},"tagIDs":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["elevenlabs","openai","minimax"]},"language":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"cleaning":{"type":["boolean","null"]}},"required":["id","name","examplePath","value","tagIDs","provider"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/voices":{"post":{"operationId":"voice-getVoices","summary":"Get voices","tags":["Voices"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"limit":{"default":10,"type":"number"},"filter":{"type":"object","properties":{"language":{"type":"string"},"accent":{"type":"string"},"gender":{"type":"string"},"age":{"type":"string"},"search":{"type":"string"}}}},"required":["filter"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"examplePath":{"type":"string"},"value":{"type":"string"},"tagIDs":{"type":"array","items":{"type":"string"}},"provider":{"type":"string","enum":["elevenlabs","openai","minimax"]},"language":{"type":"string"},"description":{"type":"string"},"createdAt":{"type":"string"},"cleaning":{"type":["boolean","null"]}},"required":["id","name","examplePath","value","tagIDs","provider"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user":{"get":{"operationId":"user-apiGetMe","summary":"Get me","tags":["User"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"isBlocked":{"type":["string","null"]},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"}},"required":["id","email","isBlocked","minutes","pendingMinutes"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/project":{"post":{"operationId":"projects-dub-createProject","summary":"Create project","description":"If you want to use Voice cloning for this project, you need to use \"voiceCloning\" as a voice parameter. Format for target languages is ISO 3166-1 alpha-2","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previewUrl":{"type":"string"},"originalLanguage":{"type":"string"},"mode":{"default":"SameMediaLength","type":"string","enum":["SameMediaLength","ExtendVideo"]},"region":{"default":"EU","type":"string","enum":["EU","US"]},"highSpeechQuality":{"default":false,"type":"boolean"},"title":{"type":"string","minLength":1,"maxLength":256},"input":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["WEB_URL","LOCAL_FILE"]},"voice":{"default":"voiceCloning","type":"string"},"textCheck":{"default":false,"type":"boolean"}},"required":["path","type"]},"targetLanguages":{"type":"array","items":{"type":"string"}},"speakersAmount":{"type":"number","minimum":0,"maximum":100},"inputSegments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":5000},"start":{"type":"number"},"end":{"type":"number"},"speakerId":{"type":"number"}},"required":["text","start","end","speakerId"]}}},"required":["input","targetLanguages"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"groupId":{"type":["string","null"]},"groupMember":{"type":["boolean","null"]},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Pending","GettingAudio","SplittingAudio","SpeechRecognition","FileUploading","TextValidating","TextValidatingDone","Translating","Analyzing","SpeechSynthesize","GettingVideo","MergingMedia","Finishing"]},"audioPath":{"type":["string","null"]},"videoPath":{"type":["string","null"]},"reducedVideoPath":{"type":["string","null"]},"version":{"type":"string","enum":["V1","V2"]},"videoResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioFullResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"input":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["WEB_URL","LOCAL_FILE"]},"voice":{"type":"string"},"textCheck":{"type":"boolean"}},"required":["path","type","voice","textCheck"],"additionalProperties":false},"speakers":{"type":"array","items":{"type":"string"}},"speakersAmount":{"type":"number"},"originalLanguage":{"type":["string","null"]},"targetLanguage":{"type":"string"},"previewUrl":{"type":["string","null"]},"backgroundSound":{"type":["string","null"]},"backgroundVolume":{"type":"number"},"translatedVoice":{"type":["string","null"]},"originalVoice":{"type":["string","null"]},"mode":{"type":"string","enum":["SameMediaLength","ExtendVideo"]},"originalDuration":{"type":["number","null"]},"highSpeechQuality":{"default":true,"type":["boolean","null"]},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"noAudio":{"type":"boolean"},"userId":{"type":"string"},"archivePath":{"type":["string","null"]},"execution_time":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"exportCount":{"type":"number"},"lastExportedAt":{"type":["string","null"]},"voiceFallbackNotices":{"type":"array","items":{"type":"object","properties":{"speakerIndex":{"type":"number"},"previousVoice":{"type":["string","null"]},"fallbackVoice":{"type":"string"},"fallbackVoiceName":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["speakerIndex","previousVoice","fallbackVoice","fallbackVoiceName","reason","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"groupProjects":{"type":"array","items":{"type":"object","properties":{"targetLanguage":{"type":"string"},"id":{"type":"string"},"groupId":{"type":["string","null"]}},"required":["targetLanguage","id","groupId"],"additionalProperties":false}}},"required":["id","groupId","groupMember","base","stage","audioPath","videoPath","reducedVideoPath","version","videoResult","audioResult","audioFullResult","input","speakers","speakersAmount","originalLanguage","targetLanguage","previewUrl","backgroundSound","backgroundVolume","translatedVoice","originalVoice","mode","originalDuration","highSpeechQuality","minutes","pendingMinutes","noAudio","userId","archivePath","execution_time","region","exportCount","lastExportedAt","voiceFallbackNotices","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"get":{"operationId":"projects-dub-getProjects","summary":"Get projects","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":10,"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"groupId":{"type":["string","null"]},"groupMember":{"type":["boolean","null"]},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Pending","GettingAudio","SplittingAudio","SpeechRecognition","FileUploading","TextValidating","TextValidatingDone","Translating","Analyzing","SpeechSynthesize","GettingVideo","MergingMedia","Finishing"]},"audioPath":{"type":["string","null"]},"videoPath":{"type":["string","null"]},"reducedVideoPath":{"type":["string","null"]},"version":{"type":"string","enum":["V1","V2"]},"videoResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioFullResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"input":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["WEB_URL","LOCAL_FILE"]},"voice":{"type":"string"},"textCheck":{"type":"boolean"}},"required":["path","type","voice","textCheck"],"additionalProperties":false},"speakers":{"type":"array","items":{"type":"string"}},"speakersAmount":{"type":"number"},"originalLanguage":{"type":["string","null"]},"targetLanguage":{"type":"string"},"previewUrl":{"type":["string","null"]},"backgroundSound":{"type":["string","null"]},"backgroundVolume":{"type":"number"},"translatedVoice":{"type":["string","null"]},"originalVoice":{"type":["string","null"]},"mode":{"type":"string","enum":["SameMediaLength","ExtendVideo"]},"originalDuration":{"type":["number","null"]},"highSpeechQuality":{"default":true,"type":["boolean","null"]},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"noAudio":{"type":"boolean"},"userId":{"type":"string"},"archivePath":{"type":["string","null"]},"execution_time":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"exportCount":{"type":"number"},"lastExportedAt":{"type":["string","null"]},"voiceFallbackNotices":{"type":"array","items":{"type":"object","properties":{"speakerIndex":{"type":"number"},"previousVoice":{"type":["string","null"]},"fallbackVoice":{"type":"string"},"fallbackVoiceName":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["speakerIndex","previousVoice","fallbackVoice","fallbackVoiceName","reason","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"groupProjects":{"type":"array","items":{"type":"object","properties":{"targetLanguage":{"type":"string"},"id":{"type":"string"},"groupId":{"type":["string","null"]}},"required":["targetLanguage","id","groupId"],"additionalProperties":false}}},"required":["id","groupId","groupMember","base","stage","audioPath","videoPath","reducedVideoPath","version","videoResult","audioResult","audioFullResult","input","speakers","speakersAmount","originalLanguage","targetLanguage","previewUrl","backgroundSound","backgroundVolume","translatedVoice","originalVoice","mode","originalDuration","highSpeechQuality","minutes","pendingMinutes","noAudio","userId","archivePath","execution_time","region","exportCount","lastExportedAt","voiceFallbackNotices","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"projects-dub-editProject","summary":"Edit project","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":256},"speakers":{"type":"array","items":{"type":"string"}},"backgroundVolume":{"type":"number","minimum":0,"maximum":1.15},"highSpeechQuality":{"type":"boolean"},"id":{"type":"string"},"backgroundSound":{"type":["string","null"]}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"projects-dub-deleteForever","summary":"Delete project","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/segment":{"post":{"operationId":"projects-dub-createSegment","summary":"Create segment","tags":["Segments"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"voice":{"type":"string"},"speakerId":{"type":"number"},"text":{"type":"string"},"translatedText":{"type":"string"}},"required":["projectId","start","end","voice","speakerId","text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"groupId":{"type":["number","null"]},"speakerId":{"type":"number"},"text":{"type":"string"},"translatedText":{"type":["string","null"]},"isChanged":{"type":["boolean","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"start":{"type":"number"},"end":{"type":"number"},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"voice":{"type":"string"},"regeneratedAt":{"type":["string","null"]},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","groupId","speakerId","text","translatedText","isChanged","state","resultUrl","start","end","stability","similarity","style","volume","voice","regeneratedAt","lastRenderHash"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"projects-dub-editSegment","summary":"Edit segment","description":"End and start time are in seconds","tags":["Segments"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"speakerId":{"type":"number"},"text":{"type":"string"},"translatedText":{"type":"string"},"resultUrl":{"type":["string","null"]},"end":{"type":"number"},"start":{"type":"number"},"stability":{"type":"number","minimum":0,"maximum":1},"similarity":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"volume":{"type":"number","minimum":0,"maximum":1.15},"triggerTranslation":{"type":"boolean"},"id":{"type":"string"},"projectId":{"type":"string"}},"required":["id","projectId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"groupId":{"type":["number","null"]},"speakerId":{"type":"number"},"text":{"type":"string"},"translatedText":{"type":["string","null"]},"isChanged":{"type":["boolean","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"start":{"type":"number"},"end":{"type":"number"},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"voice":{"type":"string"},"regeneratedAt":{"type":["string","null"]},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","groupId","speakerId","text","translatedText","isChanged","state","resultUrl","start","end","stability","similarity","style","volume","voice","regeneratedAt","lastRenderHash"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"projects-dub-deleteSegment","summary":"Delete segment","tags":["Segments"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"projectId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/project/{id}":{"get":{"operationId":"projects-dub-getProjectById","summary":"Get project by id","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"groupId":{"type":["string","null"]},"groupMember":{"type":["boolean","null"]},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Pending","GettingAudio","SplittingAudio","SpeechRecognition","FileUploading","TextValidating","TextValidatingDone","Translating","Analyzing","SpeechSynthesize","GettingVideo","MergingMedia","Finishing"]},"audioPath":{"type":["string","null"]},"videoPath":{"type":["string","null"]},"reducedVideoPath":{"type":["string","null"]},"version":{"type":"string","enum":["V1","V2"]},"videoResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"audioFullResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"input":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["WEB_URL","LOCAL_FILE"]},"voice":{"type":"string"},"textCheck":{"type":"boolean"}},"required":["path","type","voice","textCheck"],"additionalProperties":false},"speakers":{"type":"array","items":{"type":"string"}},"speakersAmount":{"type":"number"},"originalLanguage":{"type":["string","null"]},"targetLanguage":{"type":"string"},"previewUrl":{"type":["string","null"]},"backgroundSound":{"type":["string","null"]},"backgroundVolume":{"type":"number"},"translatedVoice":{"type":["string","null"]},"originalVoice":{"type":["string","null"]},"mode":{"type":"string","enum":["SameMediaLength","ExtendVideo"]},"originalDuration":{"type":["number","null"]},"highSpeechQuality":{"default":true,"type":["boolean","null"]},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"noAudio":{"type":"boolean"},"userId":{"type":"string"},"archivePath":{"type":["string","null"]},"execution_time":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"exportCount":{"type":"number"},"lastExportedAt":{"type":["string","null"]},"voiceFallbackNotices":{"type":"array","items":{"type":"object","properties":{"speakerIndex":{"type":"number"},"previousVoice":{"type":["string","null"]},"fallbackVoice":{"type":"string"},"fallbackVoiceName":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["speakerIndex","previousVoice","fallbackVoice","fallbackVoiceName","reason","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"groupProjects":{"type":"array","items":{"type":"object","properties":{"targetLanguage":{"type":"string"},"id":{"type":"string"},"groupId":{"type":["string","null"]}},"required":["targetLanguage","id","groupId"],"additionalProperties":false}},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"groupId":{"type":["number","null"]},"speakerId":{"type":"number"},"text":{"type":"string"},"translatedText":{"type":["string","null"]},"isChanged":{"type":["boolean","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"start":{"type":"number"},"end":{"type":"number"},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"voice":{"type":"string"},"regeneratedAt":{"type":["string","null"]},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","groupId","speakerId","text","translatedText","isChanged","state","resultUrl","start","end","stability","similarity","style","volume","voice","regeneratedAt","lastRenderHash"],"additionalProperties":false}}},"required":["id","groupId","groupMember","base","stage","audioPath","videoPath","reducedVideoPath","version","videoResult","audioResult","audioFullResult","input","speakers","speakersAmount","originalLanguage","targetLanguage","previewUrl","backgroundSound","backgroundVolume","translatedVoice","originalVoice","mode","originalDuration","highSpeechQuality","minutes","pendingMinutes","noAudio","userId","archivePath","execution_time","region","exportCount","lastExportedAt","voiceFallbackNotices","createdAt","updatedAt","segments"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/project/regenerate":{"post":{"operationId":"projects-dub-regenerate","summary":"Regenerate project","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"segmentsForRegenerating":{"type":"array","items":{"type":"string"}},"cloneVoice":{"type":"boolean"},"inlineAudio":{"type":"boolean"}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scheduled":{"type":"boolean"}},"required":["scheduled"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/project/speaker":{"post":{"operationId":"projects-dub-addSpeaker","summary":"Add speaker","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"voice":{"type":"string"}},"required":["projectId","voice"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"projects-dub-removeSpeaker","summary":"Remove speaker","tags":["AI Dubbing"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"projectId","schema":{"type":"string"},"required":true},{"in":"query","name":"speakerId","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tts/project":{"post":{"operationId":"projects-tts-createProject","summary":"Create TTS project","description":"Create a new Text-to-Speech project. To start speech generation immediately, set generateImmediately=true. Otherwise, call /tts/regenerate after editing segments.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":256},"input":{"type":"array","items":{"type":"object","properties":{"voice":{"type":"string"},"text":{"type":"string"}},"required":["voice","text"]}},"region":{"type":"string","enum":["EU","US"]},"generateImmediately":{"default":true,"type":"boolean"}},"required":["title","input","region"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Draft","Pending","TextEditing","SpeechSynthesize","FileUploading","Finishing"]},"playbackRate":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"userId":{"type":"string"},"exportResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"execution_time":{"type":"number"},"isAlreadyGenerated":{"type":"boolean"},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","base","stage","playbackRate","region","userId","exportResult","execution_time","isAlreadyGenerated","minutes","pendingMinutes","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"projects-tts-editProject","summary":"Edit TTS project","description":"Edit TTS project settings including title and playback rate.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":256},"playbackRate":{"type":"number","minimum":0.25,"maximum":4},"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tts/projects":{"get":{"operationId":"projects-tts-getProjects","summary":"Get TTS projects","description":"Get a list of TTS projects for the authenticated user with pagination support.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":10,"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Draft","Pending","TextEditing","SpeechSynthesize","FileUploading","Finishing"]},"playbackRate":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"userId":{"type":"string"},"execution_time":{"type":"number"},"isAlreadyGenerated":{"type":"boolean"},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"exportResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","base","stage","playbackRate","region","userId","execution_time","isAlreadyGenerated","minutes","pendingMinutes","exportResult","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tts/project/{id}":{"get":{"operationId":"projects-tts-getProjectById","summary":"Get TTS project by ID","description":"Get a specific TTS project by ID with all segments and generated audio URLs.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Draft","Pending","TextEditing","SpeechSynthesize","FileUploading","Finishing"]},"input":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"voice":{"type":"string"},"text":{"type":"string"},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"emotion":{"type":["string","null"]},"highSpeechQuality":{"type":"boolean"},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","voice","text","state","resultUrl","stability","similarity","style","volume","emotion","highSpeechQuality","lastRenderHash"],"additionalProperties":false}},"playbackRate":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"userId":{"type":"string"},"exportResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"execution_time":{"type":"number"},"isAlreadyGenerated":{"type":"boolean"},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","base","stage","input","playbackRate","region","userId","exportResult","execution_time","isAlreadyGenerated","minutes","pendingMinutes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"projects-tts-deleteForever","summary":"Delete TTS project","description":"Permanently delete a TTS project and all associated files.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tts/segment":{"put":{"operationId":"projects-tts-editSegment","summary":"Edit TTS segment","description":"Edit a TTS segment including text, voice, and speech parameters like stability and similarity.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"string"},"text":{"type":"string"},"emotion":{"type":["string","null"]},"stability":{"type":"number","minimum":0,"maximum":1},"similarity":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0},"volume":{"type":"number","minimum":0},"highSpeechQuality":{"default":false,"type":"boolean"},"id":{"type":"string"},"projectId":{"type":"string"}},"required":["id","projectId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"voice":{"type":"string"},"text":{"type":"string"},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"emotion":{"type":["string","null"]},"highSpeechQuality":{"type":"boolean"},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","voice","text","state","resultUrl","stability","similarity","style","volume","emotion","highSpeechQuality","lastRenderHash"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"projects-tts-createSegment","summary":"Create TTS segment","description":"Add a new text segment to an existing TTS project.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"string"},"text":{"type":"string"},"projectId":{"type":"string"},"highSpeechQuality":{"type":"boolean"}},"required":["voice","text","projectId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["input"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"projects-tts-deleteSegment","summary":"Delete TTS segment","description":"Delete a specific text segment from a TTS project.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"projectId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tts/regenerate":{"post":{"operationId":"projects-tts-regenerate","summary":"Generate TTS audio","description":"Generate TTS audio for the project. This triggers the audio generation process for specified segments or the entire project. Call this after creating a project to start generating the speech audio.","tags":["TTS"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"segmentForRegenerating":{"type":"array","items":{"type":"string"}},"inlineAudio":{"type":"boolean"}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"base":{"type":"object","properties":{"title":{"type":"string"},"image":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"isDeleted":{"type":"boolean"},"progress":{"type":"number"},"error":{"type":["string","null"]}},"required":["title","image","state","isDeleted","progress","error"],"additionalProperties":false},"stage":{"type":"string","enum":["Draft","Pending","TextEditing","SpeechSynthesize","FileUploading","Finishing"]},"input":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"voice":{"type":"string"},"text":{"type":"string"},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"resultUrl":{"type":["string","null"]},"stability":{"type":"number"},"similarity":{"type":"number"},"style":{"type":"number"},"volume":{"type":"number"},"emotion":{"type":["string","null"]},"highSpeechQuality":{"type":"boolean"},"lastRenderHash":{"type":["string","null"]}},"required":["id","projectId","voice","text","state","resultUrl","stability","similarity","style","volume","emotion","highSpeechQuality","lastRenderHash"],"additionalProperties":false}},"playbackRate":{"type":"number"},"region":{"type":"string","enum":["EU","US"]},"userId":{"type":"string"},"exportResult":{"anyOf":[{"type":"object","properties":{"value":{"type":["string","null"]},"state":{"type":"string","enum":["Done","Error","Pending","Processing"]},"percentage":{"type":["number","null"]},"error":{"type":["string","null"]},"hash":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["value","state","percentage","error","hash","createdAt"],"additionalProperties":false},{"type":"null"}]},"execution_time":{"type":"number"},"isAlreadyGenerated":{"type":"boolean"},"minutes":{"type":"number"},"pendingMinutes":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","base","stage","input","playbackRate","region","userId","exportResult","execution_time","isAlreadyGenerated","minutes","pendingMinutes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Invalid input data"},"code":{"type":"string","description":"The error code","example":"BAD_REQUEST"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"Invalid input data","issues":[]}},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Authorization not provided"},"code":{"type":"string","description":"The error code","example":"UNAUTHORIZED"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Authorization not provided","issues":[]}},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Insufficient access"},"code":{"type":"string","description":"The error code","example":"FORBIDDEN"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"Insufficient access","issues":[]}},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Not found"},"code":{"type":"string","description":"The error code","example":"NOT_FOUND"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found","issues":[]}},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Internal server error"},"code":{"type":"string","description":"The error code","example":"INTERNAL_SERVER_ERROR"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information","example":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error","issues":[]}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Enter your API token"}}}}