{"openapi":"3.1.0","info":{"title":"Jeongeo TTS Server","version":"0.1.0"},"paths":{"/signup":{"post":{"summary":"Signup","description":"Free API key by email — instant. A registered email gets the key mailed to it.","operationId":"signup_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Account","description":"Your plan and this month's usage: email, tier, chars_used_this_month, chars_quota (null on paid = no character limit) and expires.","operationId":"account_account_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/voices":{"get":{"summary":"Voices","description":"Voice list. Preview each at GET /voices/{id}/sample (wav).","operationId":"voices_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voices/{vid}/sample":{"get":{"summary":"Voice Sample","description":"보이스 미리듣기 — 첫 요청 때 생성해 캐시.","operationId":"voice_sample_voices__vid__sample_get","parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string","title":"Vid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tts/demo":{"post":{"summary":"Tts Demo","description":"No-signup Korean demo → wav. Short input, two voices, and a usage limit. Sign up for a free key to do more.","operationId":"tts_demo_tts_demo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lexicon":{"get":{"summary":"Lexicon List","description":"Pronunciation dictionary (Creator: 50 entries, Pro: 200 entries).","operationId":"lexicon_list_lexicon_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]},"post":{"summary":"Lexicon Put","description":"Add or update one pronunciation entry (Creator: 50, Pro: 200).","operationId":"lexicon_put_lexicon_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LexEntry"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"summary":"Lexicon Del","description":"Remove one pronunciation entry (Creator or Pro plan).","operationId":"lexicon_del_lexicon_delete","parameters":[{"name":"term","in":"query","required":true,"schema":{"type":"string","title":"Term"}},{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/tts/preview":{"post":{"summary":"Tts Preview","description":"Single-line synthesis → wav. Counts toward the free quota.","operationId":"tts_preview_tts_preview_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Line"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/tts/generate":{"post":{"summary":"Tts Generate","description":"Batch synthesis → zip of wav files (NN_voice.wav). For scripts and game-dialogue CSVs.","operationId":"tts_generate_tts_generate_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/tts/project":{"post":{"summary":"Tts Project","description":"Production package → ZIP with full WAV/MP3, SRT/VTT and per-line WAV files.","operationId":"tts_project_tts_project_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/billing/status":{"get":{"summary":"Billing Status","description":"Whether card checkout is currently available (`enabled`) and whether it runs in test mode. Call this before showing a purchase button.","operationId":"billing_status_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/checkout":{"post":{"summary":"Billing Checkout","description":"Create a card checkout session for a plan. Returns the payment page URL — paying is a human action, so the API only hands back the link.","operationId":"billing_checkout_billing_checkout_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/billing/portal":{"get":{"summary":"Billing Portal","description":"Subscription management (cancel / change card) portal URL. Hosted by the payment provider. Card subscribers only — 404 if this account has no subscription.","operationId":"billing_portal_billing_portal_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/health":{"get":{"summary":"Health","description":"Liveness and identity: which product this is and whether it is ready to serve.","operationId":"health_health_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"DemoRequest":{"properties":{"text":{"type":"string","maxLength":150,"minLength":1,"title":"Text"},"voice":{"type":"string","maxLength":8,"title":"Voice","default":"calm-f"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["text"],"title":"DemoRequest","description":"가입 전 자기 문장 체험. 공개 CPU 보호를 위해 의도적으로 선택 폭이 작다."},"GenerateRequest":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/Line"},"type":"array","maxItems":50,"title":"Lines"}},"type":"object","required":["lines"],"title":"GenerateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LexEntry":{"properties":{"term":{"type":"string","title":"Term"},"reading":{"type":"string","title":"Reading"}},"type":"object","required":["term","reading"],"title":"LexEntry"},"Line":{"properties":{"text":{"type":"string","maxLength":500,"title":"Text"},"voice":{"type":"string","maxLength":8,"title":"Voice","default":"calm-f"},"speed":{"type":"number","title":"Speed","default":1.05},"lang":{"type":"string","maxLength":8,"title":"Lang","default":"ko"}},"type":"object","required":["text"],"title":"Line"},"ProjectRequest":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/Line"},"type":"array","maxItems":50,"title":"Lines"},"pause_ms":{"type":"integer","maximum":2000.0,"minimum":0.0,"title":"Pause Ms","default":350},"normalize":{"type":"boolean","title":"Normalize","default":true}},"type":"object","required":["lines"],"title":"ProjectRequest","description":"편집·게시용 납품 패키지 요청."},"SignupRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"}},"type":"object","required":["email"],"title":"SignupRequest"},"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":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your API key. Sign up at /signup to get one instantly."}}}}