{"openapi":"3.1.0","info":{"title":"OlokaTTS Gateway","description":"High-fidelity 48kHz Vietnamese Neural TTS Gateway powered by Kaggle Dual Tesla T4 Workers","version":"1.0.0"},"paths":{"/login":{"get":{"tags":["Authentication"],"summary":"Login Page","operationId":"login_page_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Next"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Authentication"],"summary":"Login Action","operationId":"login_action_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_action_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/register":{"get":{"tags":["Authentication"],"summary":"Register Page","operationId":"register_page_register_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Authentication"],"summary":"Register Action","operationId":"register_action_register_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_register_action_register_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google":{"get":{"tags":["Authentication"],"summary":"Google Oauth Login","operationId":"google_oauth_login_auth_google_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google/callback":{"get":{"tags":["Authentication"],"summary":"Google Oauth Callback","operationId":"google_oauth_callback_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"get":{"tags":["Authentication"],"summary":"Logout Action","operationId":"logout_action_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Authentication"],"summary":"Logout Action","operationId":"logout_action_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me":{"get":{"tags":["Authentication"],"summary":"Get Current User Profile","operationId":"get_current_user_profile_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings":{"get":{"tags":["User Settings & BYOK"],"summary":"Settings Page","operationId":"settings_page_settings_get","parameters":[{"name":"welcome","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Welcome"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","title":"Msg"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/kaggle":{"post":{"tags":["User Settings & BYOK"],"summary":"Update Kaggle Credentials","operationId":"update_kaggle_credentials_settings_kaggle_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_kaggle_credentials_settings_kaggle_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/kaggle/test":{"post":{"tags":["User Settings & BYOK"],"summary":"Test Kaggle Credentials","operationId":"test_kaggle_credentials_api_user_kaggle_test_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/password":{"post":{"tags":["User Settings & BYOK"],"summary":"Change Password","operationId":"change_password_settings_password_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_change_password_settings_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/api-keys/create":{"post":{"tags":["User Settings & BYOK"],"summary":"Create Api Key Endpoint","operationId":"create_api_key_endpoint_api_user_api_keys_create_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/user/api-keys/{key_id}/revoke":{"post":{"tags":["User Settings & BYOK"],"summary":"Revoke Api Key Endpoint","operationId":"revoke_api_key_endpoint_api_user_api_keys__key_id__revoke_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/api-keys/{key_id}/delete":{"post":{"tags":["User Settings & BYOK"],"summary":"Delete Api Key Endpoint","operationId":"delete_api_key_endpoint_api_user_api_keys__key_id__delete_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/regenerate-api-key":{"post":{"tags":["User Settings & BYOK"],"summary":"Regenerate Api Key","operationId":"regenerate_api_key_settings_regenerate_api_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Root","operationId":"admin_root_admin__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Root","operationId":"admin_root_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/analytics":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Analytics Page","operationId":"admin_analytics_page_admin_analytics_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/settings":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Settings Page","operationId":"admin_settings_page_admin_settings_get","parameters":[{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Portal Views"],"summary":"Update Admin Settings","operationId":"update_admin_settings_admin_settings_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_admin_settings_admin_settings_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Jobs Page","operationId":"admin_jobs_page_admin_jobs_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"ALL","title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs/{job_id}/retry":{"post":{"tags":["Admin Portal Views"],"summary":"Retry Job","operationId":"retry_job_admin_jobs__job_id__retry_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs/{job_id}/cancel":{"post":{"tags":["Admin Portal Views"],"summary":"Cancel Job","operationId":"cancel_job_admin_jobs__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs/purge-storage":{"post":{"tags":["Admin Portal Views"],"summary":"Purge Audio Storage","operationId":"purge_audio_storage_admin_jobs_purge_storage_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_purge_audio_storage_admin_jobs_purge_storage_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/queue/flush":{"post":{"tags":["Admin Portal Views"],"summary":"Flush Pending Queue","operationId":"flush_pending_queue_admin_queue_flush_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/voices":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Voices Page","operationId":"admin_voices_page_admin_voices_get","parameters":[{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voices/{voice_id}/toggle-pick":{"post":{"tags":["Admin Portal Views"],"summary":"Toggle Voice Editor Pick","operationId":"toggle_voice_editor_pick_admin_voices__voice_id__toggle_pick_post","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voices/{voice_id}/toggle-enable":{"post":{"tags":["Admin Portal Views"],"summary":"Toggle Voice Enable","operationId":"toggle_voice_enable_admin_voices__voice_id__toggle_enable_post","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voices/{voice_id}/update":{"post":{"tags":["Admin Portal Views"],"summary":"Update Voice Metadata","operationId":"update_voice_metadata_admin_voices__voice_id__update_post","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_voice_metadata_admin_voices__voice_id__update_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voices/samples/{sample_id}/delete":{"post":{"tags":["Admin Portal Views"],"summary":"Delete Clone Sample","operationId":"delete_clone_sample_admin_voices_samples__sample_id__delete_post","parameters":[{"name":"sample_id","in":"path","required":true,"schema":{"type":"string","title":"Sample Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Users Page","operationId":"admin_users_page_admin_users_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/create":{"post":{"tags":["Admin Portal Views"],"summary":"Admin Create User","operationId":"admin_create_user_admin_users_create_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_create_user_admin_users_create_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/toggle-active":{"post":{"tags":["Admin Portal Views"],"summary":"Toggle User Active","operationId":"toggle_user_active_admin_users__user_id__toggle_active_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/toggle-role":{"post":{"tags":["Admin Portal Views"],"summary":"Toggle User Role","operationId":"toggle_user_role_admin_users__user_id__toggle_role_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/reset-password":{"post":{"tags":["Admin Portal Views"],"summary":"Reset User Password","operationId":"reset_user_password_admin_users__user_id__reset_password_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_user_password_admin_users__user_id__reset_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logs":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Logs Page","operationId":"admin_logs_page_admin_logs_get","parameters":[{"name":"level","in":"query","required":false,"schema":{"type":"string","default":"ALL","title":"Level"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys":{"get":{"tags":["Admin Portal Views"],"summary":"Admin Api Keys Page","operationId":"admin_api_keys_page_admin_api_keys_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}/toggle-status":{"post":{"tags":["Admin Portal Views"],"summary":"Admin Toggle Key Status","operationId":"admin_toggle_key_status_admin_api_keys__key_id__toggle_status_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}/delete":{"post":{"tags":["Admin Portal Views"],"summary":"Admin Delete Key","operationId":"admin_delete_key_admin_api_keys__key_id__delete_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tts/jobs":{"post":{"tags":["TTS"],"summary":"Create Tts Job","operationId":"create_tts_job_v1_tts_jobs_post","parameters":[{"name":"force_local","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Local"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSJobCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["TTS"],"summary":"List Recent Jobs","operationId":"list_recent_jobs_v1_tts_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TTSJobResponse"},"title":"Response List Recent Jobs V1 Tts Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tts/jobs/{job_id}":{"get":{"tags":["TTS"],"summary":"Get Tts Job","operationId":"get_tts_job_v1_tts_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tts/jobs/{job_id}/audio":{"get":{"tags":["TTS"],"summary":"Get Job Audio","operationId":"get_job_audio_v1_tts_jobs__job_id__audio_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voices":{"get":{"tags":["Voices"],"summary":"List Presets","operationId":"list_presets_v1_voices_get","parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","title":"Region"}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","title":"Gender"}},{"name":"editors_pick","in":"query","required":false,"schema":{"type":"boolean","title":"Editors Pick"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoicePresetResponse"},"title":"Response List Presets V1 Voices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voices/samples":{"get":{"tags":["Voices"],"summary":"List Voice Samples","operationId":"list_voice_samples_v1_voices_samples_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VoiceSampleResponse"},"type":"array","title":"Response List Voice Samples V1 Voices Samples Get"}}}}}},"post":{"tags":["Voices"],"summary":"Upload Voice Sample","operationId":"upload_voice_sample_v1_voices_samples_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_voice_sample_v1_voices_samples_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSampleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voices/samples/{filename}":{"get":{"tags":["Voices"],"summary":"Get Sample Audio","operationId":"get_sample_audio_v1_voices_samples__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/log":{"post":{"tags":["Internal Worker"],"summary":"Log Worker Event","operationId":"log_worker_event_api_worker_log_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/register":{"post":{"tags":["Internal Worker"],"summary":"Register Worker","operationId":"register_worker_api_worker_register_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/heartbeat":{"post":{"tags":["Internal Worker"],"summary":"Worker Heartbeat","operationId":"worker_heartbeat_api_worker_heartbeat_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/jobs/pull":{"post":{"tags":["Internal Worker"],"summary":"Pull Job","operationId":"pull_job_api_worker_jobs_pull_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/jobs/{job_id}/prompt-audio":{"get":{"tags":["Internal Worker"],"summary":"Get Prompt Audio","operationId":"get_prompt_audio_api_worker_jobs__job_id__prompt_audio_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/jobs/{job_id}/complete":{"post":{"tags":["Internal Worker"],"summary":"Complete Job","operationId":"complete_job_api_worker_jobs__job_id__complete_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_complete_job_api_worker_jobs__job_id__complete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/worker/jobs/{job_id}/fail":{"post":{"tags":["Internal Worker"],"summary":"Fail Job","operationId":"fail_job_api_worker_jobs__job_id__fail_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/speech":{"post":{"tags":["OpenAI Compatibility"],"summary":"Openai Speech","description":"OpenAI-compatible speech endpoint: POST /v1/audio/speech","operationId":"openai_speech_v1_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAISpeechRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/status":{"get":{"tags":["Admin & Monitor"],"summary":"Get System Status","operationId":"get_system_status_api_admin_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/kaggle/push":{"post":{"tags":["Admin & Monitor"],"summary":"Trigger Kaggle Push","operationId":"trigger_kaggle_push_api_admin_kaggle_push_post","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/kaggle/stop":{"post":{"tags":["Admin & Monitor"],"summary":"Trigger Kaggle Stop","operationId":"trigger_kaggle_stop_api_admin_kaggle_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/pair":{"get":{"tags":["MCP Pairing & Authentication"],"summary":"Mcp Pair Page","operationId":"mcp_pair_page_mcp_pair_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/pair/approve":{"post":{"tags":["MCP Pairing & Authentication"],"summary":"Mcp Pair Approve","operationId":"mcp_pair_approve_mcp_pair_approve_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_mcp_pair_approve_mcp_pair_approve_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/pair/generate":{"post":{"tags":["MCP Pairing & Authentication"],"summary":"Create Preapproved Pair Code","description":"Allows a logged-in user to generate a pair code directly from web settings.","operationId":"create_preapproved_pair_code_api_mcp_pair_generate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mcp/pair/status":{"get":{"tags":["MCP Pairing & Authentication"],"summary":"Check Pairing Status","description":"API endpoint for polling session status.","operationId":"check_pairing_status_api_mcp_pair_status_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/status":{"get":{"tags":["Status"],"summary":"Public System Status","description":"Lightweight public status check for AI clients and MCP.","operationId":"public_system_status_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_admin_create_user_admin_users_create_post":{"properties":{"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"role":{"type":"string","title":"Role","default":"user"}},"type":"object","required":["username","email","password"],"title":"Body_admin_create_user_admin_users_create_post"},"Body_change_password_settings_password_post":{"properties":{"old_password":{"type":"string","title":"Old Password"},"new_password":{"type":"string","title":"New Password"},"confirm_new_password":{"type":"string","title":"Confirm New Password"}},"type":"object","required":["old_password","new_password","confirm_new_password"],"title":"Body_change_password_settings_password_post"},"Body_complete_job_api_worker_jobs__job_id__complete_post":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"duration":{"type":"number","title":"Duration"},"audio_duration_seconds":{"type":"number","title":"Audio Duration Seconds"},"sample_rate":{"type":"integer","title":"Sample Rate","default":48000},"execution_time":{"type":"number","title":"Execution Time"},"processing_time_seconds":{"type":"number","title":"Processing Time Seconds"},"audio_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio File"}},"type":"object","required":["worker_id","audio_file"],"title":"Body_complete_job_api_worker_jobs__job_id__complete_post"},"Body_login_action_login_post":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"next":{"type":"string","title":"Next","default":"/"}},"type":"object","required":["username","password"],"title":"Body_login_action_login_post"},"Body_mcp_pair_approve_mcp_pair_approve_post":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"Body_mcp_pair_approve_mcp_pair_approve_post"},"Body_purge_audio_storage_admin_jobs_purge_storage_post":{"properties":{"days":{"type":"integer","title":"Days","default":7}},"type":"object","title":"Body_purge_audio_storage_admin_jobs_purge_storage_post"},"Body_register_action_register_post":{"properties":{"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"confirm_password":{"type":"string","title":"Confirm Password"}},"type":"object","required":["username","email","password","confirm_password"],"title":"Body_register_action_register_post"},"Body_reset_user_password_admin_users__user_id__reset_password_post":{"properties":{"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"Body_reset_user_password_admin_users__user_id__reset_password_post"},"Body_update_admin_settings_admin_settings_post":{"properties":{"max_chars_per_job":{"type":"string","title":"Max Chars Per Job","default":"3000"},"max_concurrency":{"type":"string","title":"Max Concurrency","default":"3"},"worker_idle_timeout_minutes":{"type":"string","title":"Worker Idle Timeout Minutes","default":"15"},"allow_public_registration":{"type":"string","title":"Allow Public Registration","default":"false"},"allow_guest_demo":{"type":"string","title":"Allow Guest Demo","default":"false"},"default_voice":{"type":"string","title":"Default Voice","default":"Hải Đăng"},"default_speed":{"type":"string","title":"Default Speed","default":"1.0"},"default_temp":{"type":"string","title":"Default Temp","default":"0.7"},"fallback_to_local_cpu":{"type":"string","title":"Fallback To Local Cpu","default":"false"},"master_kaggle_username":{"type":"string","title":"Master Kaggle Username","default":""},"master_kaggle_key":{"type":"string","title":"Master Kaggle Key","default":""},"mcp_require_auth":{"type":"string","title":"Mcp Require Auth","default":"false"},"google_client_id":{"type":"string","title":"Google Client Id","default":""},"google_client_secret":{"type":"string","title":"Google Client Secret","default":""},"admin_google_email":{"type":"string","title":"Admin Google Email","default":"phucsd@gmail.com"},"google_redirect_uri":{"type":"string","title":"Google Redirect Uri","default":""}},"type":"object","title":"Body_update_admin_settings_admin_settings_post"},"Body_update_kaggle_credentials_settings_kaggle_post":{"properties":{"kaggle_username":{"type":"string","title":"Kaggle Username"},"kaggle_key":{"type":"string","title":"Kaggle Key"}},"type":"object","required":["kaggle_username","kaggle_key"],"title":"Body_update_kaggle_credentials_settings_kaggle_post"},"Body_update_voice_metadata_admin_voices__voice_id__update_post":{"properties":{"name":{"type":"string","title":"Name"},"region":{"type":"string","title":"Region"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name","region"],"title":"Body_update_voice_metadata_admin_voices__voice_id__update_post"},"Body_upload_voice_sample_v1_voices_samples_post":{"properties":{"name":{"type":"string","title":"Name"},"ref_text":{"type":"string","title":"Ref Text"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["name","file"],"title":"Body_upload_voice_sample_v1_voices_samples_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OpenAISpeechRequest":{"properties":{"model":{"type":"string","title":"Model","default":"olokatts-v3-turbo"},"input":{"type":"string","title":"Input"},"voice":{"type":"string","title":"Voice","default":"Phạm Tuyên"},"response_format":{"type":"string","title":"Response Format","default":"wav"},"speed":{"type":"number","title":"Speed","default":1.0}},"type":"object","required":["input"],"title":"OpenAISpeechRequest"},"TTSJobCreate":{"properties":{"prompt":{"type":"string","minLength":1,"title":"Prompt","description":"Nội dung văn bản cần đọc"},"voice_type":{"type":"string","title":"Voice Type","description":"'preset' hoặc 'clone'","default":"preset"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id","description":"Tên giọng preset hoặc ID mẫu clone"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice","description":"Alias cho voice_id"},"ref_sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Sample Id","description":"ID mẫu giọng nếu là clone"},"speed":{"type":"number","maximum":2.0,"minimum":0.5,"title":"Speed","description":"Tốc độ đọc","default":1.0},"temperature":{"type":"number","maximum":1.5,"minimum":0.1,"title":"Temperature","description":"Độ biến thiên cảm xúc","default":0.7},"silence_p":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Silence P","description":"Thời gian ngắt nghỉ giữa các câu","default":0.15}},"type":"object","required":["prompt"],"title":"TTSJobCreate"},"TTSJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"prompt":{"type":"string","title":"Prompt"},"voice_type":{"type":"string","title":"Voice Type"},"voice_id":{"type":"string","title":"Voice Id"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"sample_rate":{"type":"integer","title":"Sample Rate","default":48000},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"execution_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time"},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed","default":1.0},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":0.7},"silence_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Silence P","default":0.15},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","prompt","voice_type","voice_id","status","created_at"],"title":"TTSJobResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoicePresetResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"voice_id":{"type":"string","title":"Voice Id"},"gender":{"type":"string","title":"Gender"},"region":{"type":"string","title":"Region"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_editors_pick":{"type":"boolean","title":"Is Editors Pick","default":false},"preview_audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Audio Url"}},"type":"object","required":["id","name","voice_id","gender","region"],"title":"VoicePresetResponse"},"VoiceSampleResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"VoiceSampleResponse"},"WorkerHeartbeatRequest":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"vram_used_mb":{"type":"integer","title":"Vram Used Mb","default":0},"status":{"type":"string","title":"Status","default":"ready"},"current_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Job Id"}},"type":"object","required":["worker_id"],"title":"WorkerHeartbeatRequest"},"WorkerRegisterRequest":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"gpu_index":{"type":"integer","title":"Gpu Index","default":0},"gpu_name":{"type":"string","title":"Gpu Name","default":"Tesla T4"},"vram_total_mb":{"type":"integer","title":"Vram Total Mb","default":15360}},"type":"object","required":["worker_id"],"title":"WorkerRegisterRequest"}}}}