{"openapi":"3.1.0","info":{"title":"TipType Humanizer API","version":"1.0"},"servers":[{"url":"/v1"}],"paths":{"/capabilities":{"get":{"summary":"Get Capabilities","operationId":"get_capabilities_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/usage":{"get":{"summary":"Get Usage","operationId":"get_usage_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/humanize":{"post":{"summary":"Humanize","operationId":"humanize_humanize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeResponse"}},"text/event-stream":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HumanizeRequest":{"properties":{"text":{"type":"string","maxLength":32768,"minLength":30,"title":"Text"},"tone":{"type":"string","enum":["general","academic","blog","formal","informal"],"title":"Tone","default":"general"},"mode":{"type":"string","enum":["strong","standard"],"title":"Mode","description":"Rewriting strength: standard for standard-strength rewriting, or strong (default) for stronger rewriting. Both modes use the same input-unit billing.","default":"strong"},"target_language":{"anyOf":[{"type":"string","enum":["en","zh","ja","es","fr","de"]},{"type":"null"}],"title":"Target Language"},"include_detection":{"type":"boolean","title":"Include Detection","default":false},"stream":{"type":"boolean","title":"Stream","default":false},"preserve_terms":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":20,"title":"Preserve Terms","description":"Optional keywords or phrases from the source to retain verbatim, case-sensitive. Up to 20 terms, 100 characters each and 1,000 characters total. Available with both rewriting strengths and all supported languages."}},"additionalProperties":false,"type":"object","required":["text"],"title":"HumanizeRequest"},"HumanizeResponse":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"language":{"type":"string","title":"Language"},"mode":{"type":"string","enum":["strong","standard"],"title":"Mode"},"detection":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detection"},"usage":{"$ref":"#/components/schemas/HumanizeUsage"},"model_version":{"type":"string","title":"Model Version"}},"type":"object","required":["id","text","language","mode","detection","usage","model_version"],"title":"HumanizeResponse"},"HumanizeUsage":{"properties":{"input_units":{"type":"integer","title":"Input Units"},"charged_units":{"type":"integer","title":"Charged Units"},"remaining_units":{"type":"integer","title":"Remaining Units"}},"type":"object","required":["input_units","charged_units","remaining_units"],"title":"HumanizeUsage"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}