{"openapi":"3.1.0","info":{"title":"Humanora API","version":"1.0.0","description":"Humanize and detect AI text. Uses the same word allowance as the Humanora app."},"servers":[{"url":"https://app.humanora.app/api/v1"}],"security":[{"bearer":[]}],"paths":{"/humanize":{"post":{"operationId":"humanize","summary":"Humanize text","description":"Requires the `humanize` scope. Charges words on success only.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeRequest"}}}},"responses":{"200":{"description":"Rewritten text","headers":{"X-Words-Remaining":{"schema":{"type":"integer"}},"X-Words-Allowance":{"schema":{"type":"integer"}},"X-Words-Reset":{"schema":{"type":"string","format":"date-time"}},"X-Request-Id":{"schema":{"type":"string"}},"X-Words-Charged":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Humanization"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}}}},"/detect":{"post":{"operationId":"detect","summary":"Detect AI-generated text","description":"Requires the `detect` scope. Free; shares the hourly detection limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","description":"15–1,500 words"}}}}}},"responses":{"200":{"description":"Detection","headers":{"X-Words-Remaining":{"schema":{"type":"integer"}},"X-Words-Allowance":{"schema":{"type":"integer"}},"X-Words-Reset":{"schema":{"type":"string","format":"date-time"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Detection"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/usage":{"get":{"operationId":"usage","summary":"Allowance, limits and this key's usage","responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/me":{"get":{"operationId":"me","summary":"The calling key","responses":{"200":{"description":"Key","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key: hum_live_…"}},"responses":{"Error":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"HumanizeRequest":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","minLength":50,"description":"Up to 1,500 words"},"tone":{"type":"string","enum":["standard","casual","academic","formal"],"default":"standard"},"level":{"type":"string","enum":["simple","intermediate","advanced"],"default":"intermediate"}}},"Humanization":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"humanization"},"output":{"type":"string"},"tone":{"type":"string"},"level":{"type":"string"},"words_charged":{"type":"integer"},"credits":{"type":"object","properties":{"remaining":{"type":"integer"},"allowance":{"type":"integer"},"resets_at":{"type":"string","format":"date-time"}}},"created_at":{"type":"string","format":"date-time"}}},"Detection":{"type":"object","properties":{"object":{"const":"detection"},"score":{"type":"number"},"label":{"enum":["ai","mixed","human"]},"words":{"type":"integer"},"sentences":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"},"score":{"type":"number"}}}},"method":{"type":"string"},"created_at":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}}}}