{"openapi":"3.1.0","info":{"title":"Sadolar API","description":"\n**Sadolar API** — o'zbek tili uchun nutq sintezi (TTS) va nutqni aniqlash (STT).\n\n* Avtorizatsiya: `Authorization: Bearer sk_sadolar_...` (kalitni kabinetda yarating).\n* Barcha og'ir vazifalar navbat orqali bajariladi: so'rov `job` qaytaradi, natijani `GET /v1/jobs/{id}` bilan kuting.\n* `POST /v1/tts` da `\"wait\": true` bersangiz, server 60 soniyagacha kutib, tayyor natijani qaytaradi.\n* Kredit: TTS — 1 belgi = 1 kredit; STT — 1 daqiqa = 100 kredit. Xato bo'lsa kredit qaytariladi.\n* Tezlik chegarasi: har bir kalit uchun daqiqasiga N so'rov (tarifga bog'liq); oshsa — `429` va `Retry-After`.\n","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/narxlar":{"get":{"summary":"Pricing","operationId":"pricing_narxlar_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tolov/{plan}":{"get":{"summary":"Checkout","operationId":"checkout_tolov__plan__get","parameters":[{"name":"plan","in":"path","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tolov/{provider}/callback":{"post":{"summary":"Payment Callback","operationId":"payment_callback_tolov__provider__callback_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/til/{lang}":{"get":{"summary":"Set Lang","operationId":"set_lang_til__lang__get","parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"keyin","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Keyin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/kirish":{"get":{"summary":"Login Page","operationId":"login_page_kirish_get","parameters":[{"name":"keyin","in":"query","required":false,"schema":{"type":"string","default":"/kabinet","title":"Keyin"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Login Post","operationId":"login_post_kirish_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_post_kirish_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/royxat":{"get":{"summary":"Register Page","operationId":"register_page_royxat_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Register Post","operationId":"register_post_royxat_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_register_post_royxat_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chiqish":{"post":{"summary":"Logout","operationId":"logout_chiqish_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_logout_chiqish_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/kabinet":{"get":{"summary":"Cabinet","operationId":"cabinet_kabinet_get","parameters":[{"name":"yangi","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Yangi"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/studio/tts":{"get":{"summary":"Tts Page","operationId":"tts_page_studio_tts_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/studio/stt":{"get":{"summary":"Stt Page","operationId":"stt_page_studio_stt_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/studio/subtitr":{"get":{"summary":"Subs Page","operationId":"subs_page_studio_subtitr_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/agent":{"get":{"summary":"Agent Page","operationId":"agent_page_agent_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-hujjat":{"get":{"summary":"Api Docs","operationId":"api_docs_api_hujjat_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api-misollar":{"get":{"summary":"Api Examples","operationId":"api_examples_api_misollar_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tez-orada":{"get":{"summary":"Roadmap","operationId":"roadmap_tez_orada_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tez-orada/{slug}":{"get":{"summary":"Roadmap Item","operationId":"roadmap_item_tez_orada__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"ok","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Ok"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Waitlist Post","operationId":"waitlist_post_tez_orada__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_waitlist_post_tez_orada__slug__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shartlar":{"get":{"summary":"Terms","operationId":"terms_shartlar_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin":{"get":{"summary":"Admin","operationId":"admin_admin_get","parameters":[{"name":"qidir","in":"query","required":false,"schema":{"type":"string","default":"","title":"Qidir"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foydalanuvchi/{uid}":{"post":{"summary":"Admin User","operationId":"admin_user_admin_foydalanuvchi__uid__post","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","title":"Uid"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_user_admin_foydalanuvchi__uid__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/tts":{"post":{"summary":"App Tts","operationId":"app_tts_app_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/normalize":{"post":{"summary":"App Normalize","operationId":"app_normalize_app_normalize_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/stt":{"post":{"summary":"App Stt","operationId":"app_stt_app_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_app_stt_app_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/jobs/{jid}":{"get":{"summary":"App Job","operationId":"app_job_app_jobs__jid__get","parameters":[{"name":"jid","in":"path","required":true,"schema":{"type":"string","title":"Jid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fayl/jobs/{jid}/{name}":{"get":{"summary":"Web File","operationId":"web_file_fayl_jobs__jid___name__get","parameters":[{"name":"jid","in":"path","required":true,"schema":{"type":"string","title":"Jid"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"yuklab","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Yuklab"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/keys":{"post":{"summary":"App Key Create","operationId":"app_key_create_app_keys_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/keys/{kid}/revoke":{"post":{"summary":"App Key Revoke","operationId":"app_key_revoke_app_keys__kid__revoke_post","parameters":[{"name":"kid","in":"path","required":true,"schema":{"type":"integer","title":"Kid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/agents":{"post":{"summary":"App Agent Save","operationId":"app_agent_save_app_agents_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/agent/turn":{"post":{"summary":"App Agent Turn","description":"Push-to-talk navbati: audio -> STT -> LLM -> TTS. LLM kaliti bo'lmasa, faqat transkript qaytadi.","operationId":"app_agent_turn_app_agent_turn_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_app_agent_turn_app_agent_turn_post"}}},"required":true},"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":["Hisob"],"summary":"Ovozlar ro'yxati","description":"Mavjud ovozlar. `available=false` bo'lgan ovozlar dvigateli ulanmagan (masalan GPU talab qiladi).","operationId":"v1_voices_v1_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me":{"get":{"tags":["Hisob"],"summary":"Balans va tarif","operationId":"v1_me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tts":{"post":{"tags":["Nutq sintezi (TTS)"],"summary":"Matndan nutq yaratish","description":"Matn avtomatik normallashtiriladi (raqamlar, sanalar, so'm, foiz → so'zlar; kirill → lotin).\nJavob: vazifa obyekti. Tayyor bo'lgach `result.audio_mp3` / `result.audio_wav` havolalaridan yuklab oling\n(o'sha API kalit bilan).","operationId":"v1_tts_v1_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stt":{"post":{"tags":["Nutqni aniqlash (STT)"],"summary":"Audio/videodan matn","description":"Fayl navbatga qo'yiladi. Natija: matn, vaqt belgilari bilan segmentlar, TXT/SRT/VTT fayllar.","operationId":"v1_stt_v1_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v1_stt_v1_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"tags":["Vazifalar"],"summary":"Vazifa holati","description":"`status`: queued (navbatda) → running (ishlanmoqda) → done (tayyor) | error (xato).","operationId":"v1_job_v1_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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/{name}":{"get":{"tags":["Vazifalar"],"summary":"Natija faylini yuklab olish","description":"`name`: audio.mp3, audio.wav, transcript.txt, transcript.srt, transcript.vtt","operationId":"v1_job_file_v1_jobs__job_id___name__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_admin_user_admin_foydalanuvchi__uid__post":{"properties":{"csrf":{"type":"string","title":"Csrf","default":""},"delta":{"type":"integer","title":"Delta","default":0},"izoh":{"type":"string","title":"Izoh","default":""},"plan":{"type":"string","title":"Plan","default":""},"faol":{"type":"string","title":"Faol","default":""}},"type":"object","title":"Body_admin_user_admin_foydalanuvchi__uid__post"},"Body_app_agent_turn_app_agent_turn_post":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"history":{"type":"string","title":"History","default":"[]"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"type":"string","title":"Text","default":""},"voice":{"type":"string","title":"Voice","default":""}},"type":"object","required":["agent_id"],"title":"Body_app_agent_turn_app_agent_turn_post"},"Body_app_stt_app_stt_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"kind":{"type":"string","title":"Kind","default":"stt"}},"type":"object","required":["file"],"title":"Body_app_stt_app_stt_post"},"Body_login_post_kirish_post":{"properties":{"login":{"type":"string","title":"Login"},"parol":{"type":"string","title":"Parol"},"keyin":{"type":"string","title":"Keyin","default":"/kabinet"}},"type":"object","required":["login","parol"],"title":"Body_login_post_kirish_post"},"Body_logout_chiqish_post":{"properties":{"csrf":{"type":"string","title":"Csrf","default":""}},"type":"object","title":"Body_logout_chiqish_post"},"Body_register_post_royxat_post":{"properties":{"login":{"type":"string","title":"Login"},"parol":{"type":"string","title":"Parol"},"ism":{"type":"string","title":"Ism","default":""},"rozilik":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rozilik"}},"type":"object","required":["login","parol"],"title":"Body_register_post_royxat_post"},"Body_v1_stt_v1_stt_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Audio yoki video fayl (mp3, wav, ogg, m4a, mp4 ...)"},"subtitles":{"type":"boolean","title":"Subtitles","description":"true — subtitr vazifasi sifatida belgilash","default":false}},"type":"object","required":["file"],"title":"Body_v1_stt_v1_stt_post"},"Body_waitlist_post_tez_orada__slug__post":{"properties":{"kontakt":{"type":"string","title":"Kontakt"},"izoh":{"type":"string","title":"Izoh","default":""}},"type":"object","required":["kontakt"],"title":"Body_waitlist_post_tez_orada__slug__post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TTSIn":{"properties":{"text":{"type":"string","maxLength":50000,"title":"Text","description":"O'zbekcha matn (lotin yoki kirill)"},"voice":{"type":"string","title":"Voice","description":"Ovoz identifikatori, masalan `malika` (GET /v1/voices)","default":""},"speed":{"type":"number","maximum":2.0,"minimum":0.5,"title":"Speed","description":"Tezlik (0.5–2.0)","default":1.0},"pitch":{"type":"number","maximum":6.0,"minimum":-6.0,"title":"Pitch","description":"Ohang, yarim tonlarda (−6…+6)","default":0.0},"wait":{"type":"boolean","title":"Wait","description":"true bo'lsa, 60 soniyagacha kutib, tayyor natijani qaytaradi","default":false}},"type":"object","required":["text"],"title":"TTSIn"},"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"}}},"tags":[{"name":"Nutq sintezi (TTS)","description":"Matnni o'zbekcha nutqqa aylantirish"},{"name":"Nutqni aniqlash (STT)","description":"Audio/videodan matn va subtitr olish"},{"name":"Vazifalar","description":"Navbatdagi vazifalar holati va natija fayllari"},{"name":"Hisob","description":"Balans va ovozlar ro'yxati"}]}