{"openapi":"3.1.0","info":{"title":"Myeongpil API","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","description":"Liveness. Reports whether the service is configured and ready — deliberately does not disclose which backend or model is in use.","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"}}}}}}},"/signup":{"post":{"summary":"Signup","description":"Sign up with an email and get a free API key instantly (0.5M tokens/month).\nA registered email gets the key mailed to it — we never show it in the response.","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"}}}}}}},"/v1/next-step":{"post":{"summary":"Next Step","description":"Ask for the next step toward `goal`, given the steps already taken (`history`). Requests for one key are serialised so the quota check stays exact.","operationId":"next_step_v1_next_step_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/NextStepRequest"}}}},"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":[]}]}},"/v1/feedback":{"post":{"summary":"Submit Feedback","description":"Report how a delegated task turned out — verdict/score/note, keyed by session.","operationId":"submit_feedback_v1_feedback_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/FeedbackRequest"}}}},"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":[]}]}},"/v1/warmup":{"post":{"summary":"Warmup","description":"GPU 워커를 미리 깨운다. 즉시 반환하고 예열은 백그라운드에서 진행.","operationId":"warmup_v1_warmup_post","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":[]}]}},"/billing/status":{"get":{"summary":"Billing Status","description":"결제 가능 여부 + 이 계정의 등급·상한·이번 달 사용액.","operationId":"billing_status_billing_status_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":[]}]}},"/billing/history":{"get":{"summary":"Billing History","description":"이 계정의 결제 내역. 콘솔에 그대로 표시한다 — 언제 얼마를 냈고 토큰을 얼마 받았는지.","operationId":"billing_history_billing_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"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":[]}]}},"/billing/checkout":{"post":{"summary":"Billing Checkout","description":"결제 페이지 URL 생성. 결제 자체는 사람이 하는 행동이라 URL만 돌려준다.","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":"구독 관리(티어 변경·해지·카드 변경) 포털 URL. LS가 호스팅하며 프로레이션·당월 환불 없음·세금을 처리한다.\n선불 팩만 쓴 계정엔 구독이 없어 404. 링크는 서명·만료되므로 누를 때마다 새로 발급한다.","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":[]}]}},"/billing/cap":{"post":{"summary":"Set Cap","description":"월 결제 상한 설정. 등급 천장보다 높게는 못 올린다(자기 보호만 허용).","operationId":"set_cap_billing_cap_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/CapRequest"}}}},"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":[]}]}},"/v1/me":{"get":{"summary":"Me","description":"This month's usage for your key: used_tokens, monthly_tokens, remaining, calls, email and plan.","operationId":"me_v1_me_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":[]}]}}},"components":{"schemas":{"CapRequest":{"properties":{"cap_usd":{"type":"number","title":"Cap Usd"}},"type":"object","required":["cap_usd"],"title":"CapRequest"},"CheckoutRequest":{"properties":{"kind":{"type":"string","title":"Kind"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["kind"],"title":"CheckoutRequest"},"FeedbackRequest":{"properties":{"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"source":{"type":"string","title":"Source","default":"agent"}},"type":"object","title":"FeedbackRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoryStep":{"properties":{"tool":{"type":"string","title":"Tool"},"input":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"is_error":{"type":"boolean","title":"Is Error","default":false}},"type":"object","required":["tool"],"title":"HistoryStep"},"NextStepRequest":{"properties":{"goal":{"type":"string","title":"Goal"},"history":{"items":{"$ref":"#/components/schemas/HistoryStep"},"type":"array","title":"History","default":[]},"session":{"type":"string","title":"Session","default":""},"shim_version":{"type":"string","maxLength":20,"title":"Shim Version","default":""},"max_tokens":{"type":"integer","maximum":8000.0,"minimum":1.0,"title":"Max Tokens","default":2000}},"type":"object","required":["goal"],"title":"NextStepRequest"},"SignupRequest":{"properties":{"email":{"type":"string","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."}}}}