{"openapi":"3.1.0","info":{"title":"Parlat API","version":"0.1.0"},"paths":{"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"delete":{"tags":["auth"],"summary":"Delete Me","description":"Permanently delete the current user and cascade-delete owned rows.\n\nCascade is enforced by the ON DELETE CASCADE FKs on\n  api_keys, payments, usage_logs, recordings, dictionary_entries,\n  user_styles, password_reset_tokens, referrals, promo_redemptions.\nRefund payments are kept on a different table (none today) — when\nthat lands, gate this endpoint behind a separate audit-friendly path.","operationId":"delete_me_auth_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/create-payment":{"post":{"tags":["billing"],"summary":"Create Payment","description":"Create a YooKassa payment for Pro subscription (290 RUB/month).","operationId":"create_payment_billing_create_payment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/webhook":{"post":{"tags":["billing"],"summary":"Yookassa Webhook","description":"Handle YooKassa payment notifications with HMAC + IP verification.","operationId":"yookassa_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel Subscription","description":"Opt out of auto-renewal. Plan stays active until plan_expires_at.\n\nClears payment_method_id so the renewal cron won't charge again.","operationId":"cancel_subscription_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/history":{"get":{"tags":["billing"],"summary":"Payment History","description":"Paginated payment history for the current user.","operationId":"payment_history_billing_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage/me":{"get":{"tags":["usage"],"summary":"Get Usage","operationId":"get_usage_usage_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/models/":{"get":{"tags":["models"],"summary":"List Models","operationId":"list_models_models__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/ModelInfo"},"type":"object","title":"Response List Models Models  Get"}}}}}}},"/models/{model_key}":{"get":{"tags":["models"],"summary":"Get Model","operationId":"get_model_models__model_key__get","parameters":[{"name":"model_key","in":"path","required":true,"schema":{"type":"string","title":"Model Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings":{"get":{"tags":["recordings"],"summary":"List Recordings","description":"List current user's recordings with pagination.","operationId":"list_recordings_recordings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["recordings"],"summary":"Create Recording","description":"Create a recording from transcript text (for dictations saved from web/desktop).","operationId":"create_recording_recordings_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings/{recording_id}":{"get":{"tags":["recordings"],"summary":"Get Recording","description":"Get a single recording by ID.","operationId":"get_recording_recordings__recording_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"integer","title":"Recording Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["recordings"],"summary":"Delete Recording","description":"Delete a recording and its audio file if present.","operationId":"delete_recording_recordings__recording_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"integer","title":"Recording Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recordings/{recording_id}/process":{"post":{"tags":["recordings"],"summary":"Process Recording","description":"Apply an LLM template to a recording's transcript.","operationId":"process_recording_recordings__recording_id__process_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"integer","title":"Recording Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dictionary":{"get":{"tags":["dictionary"],"summary":"List Entries","description":"List all dictionary entries for the current user.","operationId":"list_entries_dictionary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DictionaryEntryOut"},"type":"array","title":"Response List Entries Dictionary Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["dictionary"],"summary":"Add Entry","description":"Add a single dictionary entry.","operationId":"add_entry_dictionary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictionaryEntryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictionaryEntryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/dictionary/{entry_id}":{"put":{"tags":["dictionary"],"summary":"Update Entry","description":"Update an existing dictionary entry.","operationId":"update_entry_dictionary__entry_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictionaryEntryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictionaryEntryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dictionary"],"summary":"Delete Entry","description":"Delete a dictionary entry.","operationId":"delete_entry_dictionary__entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dictionary/import":{"post":{"tags":["dictionary"],"summary":"Bulk Import","description":"Bulk import dictionary entries.","operationId":"bulk_import_dictionary_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/style":{"get":{"tags":["style"],"summary":"Get Style","description":"Get the user's style configuration.","operationId":"get_style_style_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleOut"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["style"],"summary":"Update Style","description":"Create or update the user's style configuration.","operationId":"update_style_style_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/style/preview":{"post":{"tags":["style"],"summary":"Preview Style","description":"Apply user's style to text via LLM. Pro only.","operationId":"preview_style_style_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StylePreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StylePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/style/analyze-channel":{"post":{"tags":["style"],"summary":"Analyze Channel","description":"Parse Telegram channel and analyze writing style. Pro only.\n\nSlowAPI's @limiter.limit decorator inspects the wrapped function for a\nparameter named ``request: starlette.requests.Request``; if it finds\nsomething else (e.g. the pydantic body) it raises at call time. Keep\n``request: Request`` as the first kwarg.","operationId":"analyze_channel_style_analyze_channel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/stats":{"get":{"tags":["stats"],"summary":"Get Stats","description":"Get aggregated usage statistics for the current user.","operationId":"get_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOverview"}}}}},"security":[{"HTTPBearer":[]}]}},"/stats/history":{"get":{"tags":["stats"],"summary":"Get History","description":"Get daily usage history for the last N days.","operationId":"get_history_stats_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DayStats"},"title":"Response Get History Stats History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/referral":{"get":{"tags":["referral"],"summary":"Get Referral Info","description":"Get the user's referral code and invitation stats.","operationId":"get_referral_info_referral_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralInfo"}}}}},"security":[{"HTTPBearer":[]}]}},"/referral/apply":{"post":{"tags":["referral"],"summary":"Apply Referral Code","description":"Apply a referral code. Both referrer and referee get a month of Pro.","operationId":"apply_referral_code_referral_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/correct":{"post":{"tags":["correct"],"summary":"Correct Text","description":"Pro-only LLM correction. Personalized with user's dictionary + style.","operationId":"correct_text_api_correct_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/update/check":{"get":{"tags":["update"],"summary":"Check Update","description":"Return update manifest if newer version available, 204 if up-to-date.\n\nTauri v2 sends target like 'darwin-aarch64', 'darwin-x86_64', 'windows-x86_64'.\nWe return a flat manifest with the URL/signature for the requested platform.\n\nupdate_info.json schema:\n{\n  \"version\": \"0.3.14\",\n  \"notes\": \"...\",\n  \"pub_date\": \"...\",\n  \"url\": \"...\",                  # Windows URL (legacy flat format)\n  \"signature\": \"...\",            # Windows signature\n  \"darwin\": {                    # legacy: aarch64 (older clients)\n    \"url\": \"...\",\n    \"signature\": \"...\"\n  },\n  \"darwin_aarch64\": {\"url\": \"...\", \"signature\": \"...\"},\n  \"darwin_x86_64\":  {\"url\": \"...\", \"signature\": \"...\"}\n}","operationId":"check_update_update_check_get","parameters":[{"name":"target","in":"query","required":false,"schema":{"type":"string","default":"windows-x86_64","title":"Target"}},{"name":"current_version","in":"query","required":false,"schema":{"type":"string","default":"0.0.0","title":"Current Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys":{"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Key","operationId":"revoke_key_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","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/transcribe":{"post":{"tags":["v1-transcribe"],"summary":"Transcribe","operationId":"transcribe_v1_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_v1_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/transcribe/url":{"post":{"tags":["v1-transcribe"],"summary":"Transcribe Url","operationId":"transcribe_url_v1_transcribe_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/promo/redemptions":{"get":{"tags":["promo"],"summary":"My Redemptions","description":"List promo codes the current user has redeemed (newest first).","operationId":"my_redemptions_promo_redemptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedemptionList"}}}}},"security":[{"HTTPBearer":[]}]}},"/promo/redeem":{"post":{"tags":["promo"],"summary":"Redeem Promo","description":"Apply a promo code — adds free_days to the user's Pro plan.","operationId":"redeem_promo_promo_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/promo":{"get":{"tags":["admin-promo"],"summary":"List Promo Codes","operationId":"list_promo_codes_admin_promo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoList"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin-promo"],"summary":"Create Promo Code","operationId":"create_promo_code_admin_promo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/promo/{code}/redemptions":{"get":{"tags":["admin-promo"],"summary":"Admin Code Redemptions","description":"Per-code redemption breakdown — which users activated this code, when.","operationId":"admin_code_redemptions_admin_promo__code__redemptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRedemptionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo/{code}":{"delete":{"tags":["admin-promo"],"summary":"Disable Promo Code","description":"Soft-disable a promo code. Existing redemptions are preserved; further use returns 410.","operationId":"disable_promo_code_admin_promo__code__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","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":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/warmup":{"get":{"summary":"Warmup","description":"Hit by desktop client on startup to ensure models are loaded.","operationId":"warmup_api_warmup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdminRedemptionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminRedemptionOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AdminRedemptionList"},"AdminRedemptionOut":{"properties":{"code":{"type":"string","title":"Code"},"days_granted":{"type":"integer","title":"Days Granted"},"redeemed_at":{"type":"string","format":"date-time","title":"Redeemed At"},"user_email":{"type":"string","title":"User Email"}},"type":"object","required":["code","days_granted","redeemed_at","user_email"],"title":"AdminRedemptionOut"},"ApplyCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ApplyCodeRequest"},"ApplyCodeResponse":{"properties":{"message":{"type":"string","title":"Message"},"pro_days_granted":{"type":"integer","title":"Pro Days Granted"}},"type":"object","required":["message","pro_days_granted"],"title":"ApplyCodeResponse"},"Body_transcribe_v1_transcribe_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"language":{"type":"string","title":"Language","default":"auto"},"correct":{"type":"boolean","title":"Correct","default":true}},"type":"object","required":["file"],"title":"Body_transcribe_v1_transcribe_post"},"BulkImportRequest":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/DictionaryEntryCreate"},"type":"array","title":"Entries"}},"type":"object","required":["entries"],"title":"BulkImportRequest"},"BulkImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["imported"],"title":"BulkImportResponse"},"CancelResponse":{"properties":{"message":{"type":"string","title":"Message"},"plan_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Expires At"}},"type":"object","required":["message","plan_expires_at"],"title":"CancelResponse"},"ChannelRequest":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ChannelRequest"},"CorrectionRequest":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"CorrectionRequest"},"CorrectionResponse":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"CorrectionResponse"},"CreateKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateKeyRequest"},"CreateKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","key","name","created_at"],"title":"CreateKeyResponse"},"CreatePaymentRequest":{"properties":{"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["user_id"],"title":"CreatePaymentRequest"},"CreatePaymentResponse":{"properties":{"payment_url":{"type":"string","title":"Payment Url"},"payment_id":{"type":"string","title":"Payment Id"}},"type":"object","required":["payment_url","payment_id"],"title":"CreatePaymentResponse"},"CreatePromoRequest":{"properties":{"free_days":{"type":"integer","maximum":36500.0,"minimum":1.0,"title":"Free Days"},"code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Code"},"max_uses":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","required":["free_days"],"title":"CreatePromoRequest"},"DayStats":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"words":{"type":"integer","title":"Words"},"recordings":{"type":"integer","title":"Recordings"},"minutes":{"type":"number","title":"Minutes"}},"type":"object","required":["date","words","recordings","minutes"],"title":"DayStats"},"DictionaryEntryCreate":{"properties":{"word":{"type":"string","title":"Word"},"category":{"type":"string","title":"Category","default":"terms"},"replacement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement"}},"type":"object","required":["word"],"title":"DictionaryEntryCreate"},"DictionaryEntryOut":{"properties":{"id":{"type":"integer","title":"Id"},"word":{"type":"string","title":"Word"},"replacement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement"},"category":{"type":"string","title":"Category"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","word","replacement","category","created_at"],"title":"DictionaryEntryOut"},"DictionaryEntryUpdate":{"properties":{"word":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Word"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"replacement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replacement"}},"type":"object","title":"DictionaryEntryUpdate"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KeyMeta"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"KeyList"},"KeyMeta":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","created_at","last_used_at","revoked_at"],"title":"KeyMeta"},"ModelInfo":{"properties":{"url":{"type":"string","title":"Url"},"size_mb":{"type":"integer","title":"Size Mb"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"platform":{"type":"string","title":"Platform"}},"type":"object","required":["url","size_mb","languages","platform"],"title":"ModelInfo"},"PaymentHistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"yookassa_payment_id":{"type":"string","title":"Yookassa Payment Id"},"amount_rub":{"type":"integer","title":"Amount Rub"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","yookassa_payment_id","amount_rub","status","created_at"],"title":"PaymentHistoryItem"},"PaymentHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PaymentHistoryResponse"},"ProcessRequest":{"properties":{"template":{"type":"string","title":"Template"},"custom_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Prompt"}},"type":"object","required":["template"],"title":"ProcessRequest"},"ProcessResponse":{"properties":{"processed_result":{"type":"string","title":"Processed Result"},"template_name":{"type":"string","title":"Template Name"}},"type":"object","required":["processed_result","template_name"],"title":"ProcessResponse"},"PromoList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PromoOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PromoList"},"PromoOut":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"free_days":{"type":"integer","title":"Free Days"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"uses_count":{"type":"integer","title":"Uses Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"}},"type":"object","required":["id","code","free_days","max_uses","uses_count","expires_at","description","created_at","disabled_at"],"title":"PromoOut"},"RecordingCreate":{"properties":{"transcript":{"type":"string","title":"Transcript"},"language":{"type":"string","title":"Language","default":"ru"},"duration_seconds":{"type":"integer","title":"Duration Seconds","default":0}},"type":"object","required":["transcript"],"title":"RecordingCreate"},"RecordingListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecordingOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"RecordingListOut"},"RecordingOut":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"words_count":{"type":"integer","title":"Words Count"},"language":{"type":"string","title":"Language"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"processed_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processed Result"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","duration_seconds","words_count","language","transcript","processed_result","template_name","status","created_at"],"title":"RecordingOut"},"RedeemRequest":{"properties":{"code":{"type":"string","maxLength":40,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"RedeemRequest"},"RedeemResponse":{"properties":{"message":{"type":"string","title":"Message"},"days_granted":{"type":"integer","title":"Days Granted"},"plan_expires_at":{"type":"string","format":"date-time","title":"Plan Expires At"}},"type":"object","required":["message","days_granted","plan_expires_at"],"title":"RedeemResponse"},"RedemptionList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RedemptionOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RedemptionList"},"RedemptionOut":{"properties":{"code":{"type":"string","title":"Code"},"days_granted":{"type":"integer","title":"Days Granted"},"redeemed_at":{"type":"string","format":"date-time","title":"Redeemed At"}},"type":"object","required":["code","days_granted","redeemed_at"],"title":"RedemptionOut"},"ReferralInfo":{"properties":{"code":{"type":"string","title":"Code"},"link":{"type":"string","title":"Link"},"invited_count":{"type":"integer","title":"Invited Count"},"activated_count":{"type":"integer","title":"Activated Count"}},"type":"object","required":["code","link","invited_count","activated_count"],"title":"ReferralInfo"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"StatsOverview":{"properties":{"today_words":{"type":"integer","title":"Today Words"},"week_words":{"type":"integer","title":"Week Words"},"month_words":{"type":"integer","title":"Month Words"},"total_recordings":{"type":"integer","title":"Total Recordings"},"total_minutes":{"type":"number","title":"Total Minutes"}},"type":"object","required":["today_words","week_words","month_words","total_recordings","total_minutes"],"title":"StatsOverview"},"StyleOut":{"properties":{"tone":{"type":"string","title":"Tone"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"}},"type":"object","required":["tone","examples"],"title":"StyleOut"},"StylePreviewRequest":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"StylePreviewRequest"},"StylePreviewResponse":{"properties":{"original":{"type":"string","title":"Original"},"formatted":{"type":"string","title":"Formatted"}},"type":"object","required":["original","formatted"],"title":"StylePreviewResponse"},"StyleUpdate":{"properties":{"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"examples":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Examples"}},"type":"object","title":"StyleUpdate"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"TranscribeResponse":{"properties":{"text":{"type":"string","title":"Text"},"language":{"type":"string","title":"Language"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"words_count":{"type":"integer","title":"Words Count"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["text","language","duration_seconds","words_count","request_id"],"title":"TranscribeResponse"},"TranscribeUrlRequest":{"properties":{"url":{"type":"string","title":"Url"},"language":{"type":"string","title":"Language","default":"auto"},"correct":{"type":"boolean","title":"Correct","default":true}},"type":"object","required":["url"],"title":"TranscribeUrlRequest"},"UsageResponse":{"properties":{"words_used":{"type":"integer","title":"Words Used"},"words_limit":{"type":"integer","title":"Words Limit"},"plan":{"type":"string","title":"Plan"},"is_pro":{"type":"boolean","title":"Is Pro"},"plan_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Expires At"},"auto_renewal":{"type":"boolean","title":"Auto Renewal","default":false},"is_admin":{"type":"boolean","title":"Is Admin","default":false}},"type":"object","required":["words_used","words_limit","plan","is_pro"],"title":"UsageResponse"},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}