{"openapi":"3.1.0","info":{"title":"Plumes API","version":"1.0.0","description":"Rewrite AI-generated text so that it sounds natural, and estimate whether a text was written by an AI.\n\nAuthenticate with `Authorization: Bearer plumes_sk_…` (create keys in your account, Pro and Premium plans). Errors use the format `{\"error\": {\"type\": \"…\", \"message\": \"…\"}}`."},"servers":[{"url":"https://plumes.dev"}],"paths":{"/v1/humanize":{"post":{"summary":"Rewrite a text so that it sounds human","responses":{"200":{"description":"Rewritten text (JSON), or Server-Sent Events when stream=true","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeOut"}},"text/event-stream":{}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Plan without API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Text too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Rewriting engine unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeIn"}}}},"security":[{"bearerAuth":[]}]}},"/v1/detect":{"post":{"summary":"Estimate whether a text was written by an AI","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Plan without API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Text too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Rewriting engine unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectIn"}}}},"security":[{"bearerAuth":[]}]}},"/v1/usage":{"get":{"summary":"Plan, words used and remaining this month","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"Monthly quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Plan without API access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Text too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Rewriting engine unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}},"security":[{"bearerAuth":[]}]}},"/v1/options":{"get":{"summary":"Available tones, intensities and languages (no authentication)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"HumanizeIn":{"examples":[{"intensity":"balanced","text":"In today's fast-paced world, communication plays a crucial role…","tone":"professional"}],"properties":{"text":{"description":"Text to rewrite (at least 15 words).","maxLength":60000,"minLength":1,"title":"Text","type":"string"},"tone":{"default":"standard","description":"Writing tone, see GET /v1/options.","title":"Tone","type":"string"},"intensity":{"default":"balanced","description":"light | balanced | strong.","title":"Intensity","type":"string"},"language":{"default":"","description":"Output language code (fr, en, es, de, it, pt). Empty: same as input.","title":"Language","type":"string"},"use_style":{"default":false,"description":"Imitate your 'Your style' reference texts (Pro and Premium).","title":"Use Style","type":"boolean"},"stream":{"default":false,"description":"Stream the result as Server-Sent Events (events 'delta' then 'done').","title":"Stream","type":"boolean"}},"required":["text"],"title":"HumanizeIn","type":"object"},"UsageOut":{"properties":{"words_charged":{"title":"Words Charged","type":"integer"},"words_remaining":{"title":"Words Remaining","type":"integer"}},"required":["words_charged","words_remaining"],"title":"UsageOut","type":"object"},"HumanizeOut":{"properties":{"id":{"title":"Id","type":"string"},"output":{"title":"Output","type":"string"},"words":{"title":"Words","type":"integer"},"tone":{"title":"Tone","type":"string"},"intensity":{"title":"Intensity","type":"string"},"language":{"title":"Language","type":"string"},"ai_score_before":{"title":"Ai Score Before","type":"integer"},"ai_score_after":{"title":"Ai Score After","type":"integer"},"usage":{"$ref":"#/components/schemas/UsageOut"}},"required":["id","output","words","tone","intensity","language","ai_score_before","ai_score_after","usage"],"title":"HumanizeOut","type":"object"},"DetectIn":{"properties":{"text":{"description":"Text to analyse (20 to 2000 words).","maxLength":120000,"minLength":1,"title":"Text","type":"string"}},"required":["text"],"title":"DetectIn","type":"object"},"ErrorDetail":{"properties":{"type":{"title":"Type","type":"string"},"message":{"title":"Message","type":"string"}},"required":["type","message"],"title":"ErrorDetail","type":"object"},"ErrorOut":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"title":"ErrorOut","type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key (plumes_sk_…)"}}}}
