openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 5.99 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"http://libretranslate.local"}],"info":{"title":"LibreTranslate","version":"1.3.10","x-apisguru-categories":["text"],"x-origin":[{"format":"openapi","url":"https://libretranslate.com/spec","version":"3.0"}],"x-providerName":"libretranslate.local"},"paths":{"/detect":{"post":{"description":"","requestBody":{"$ref":"#/components/requestBodies/postDetect"},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/detections"}}},"description":"Detections"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Invalid request"},"403":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Banned"},"429":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-slow-down"}}},"description":"Slow down"},"500":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Detection error"}},"summary":"Detect the language of a single text","tags":["translate"]}},"/frontend/settings":{"get":{"description":"","responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/frontend-settings"}}},"description":"frontend settings"}},"summary":"Retrieve frontend specific settings","tags":["frontend"]}},"/languages":{"get":{"description":"","responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/languages"}}},"description":"List of languages"}},"summary":"Retrieve list of supported languages","tags":["translate"]}},"/suggest":{"post":{"description":"","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"example":"es","type":"string"}}}},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/suggest-response"}}},"description":"Success"},"403":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Not authorized"}},"summary":"Submit a suggestion to improve a translation","tags":["feedback"]}},"/translate":{"post":{"description":"","requestBody":{"$ref":"#/components/requestBodies/postDetect"},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/translate"}}},"description":"Translated text"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Invalid request"},"403":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Banned"},"429":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-slow-down"}}},"description":"Slow down"},"500":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Translation error"}},"summary":"Translate text from a language to another","tags":["translate"]}},"/translate_file":{"post":{"description":"","requestBody":{"content":{"multipart/form-data":{"schema":{"example":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"string"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/translate-file"}}},"description":"Translated file"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Invalid request"},"403":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Banned"},"429":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-slow-down"}}},"description":"Slow down"},"500":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/error-response"}}},"description":"Translation error"}},"summary":"Translate file from a language to another","tags":["translate"]}}},"components":{"requestBodies":{"postDetect":{"content":{"application/x-www-form-urlencoded":{"schema":{"example":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"string"}}}}},"schemas":{"detections":{"items":{"properties":{"confidence":{"description":"Confidence value","example":0.6,"format":"float","maximum":1,"minimum":0,"type":"number"},"language":{"description":"Language code","example":"en","type":"string"}},"type":"object"},"type":"array"},"error-response":{"properties":{"error":{"description":"Error message","type":"string"}},"type":"object"},"error-slow-down":{"properties":{"error":{"description":"Reason for slow down","type":"string"}},"type":"object"},"frontend-settings":{"properties":{"apiKeys":{"description":"Whether the API key database is enabled.","type":"boolean"},"charLimit":{"description":"Character input limit for this language (-1 indicates no limit)","type":"integer"},"frontendTimeout":{"description":"Frontend translation timeout","type":"integer"},"keyRequired":{"description":"Whether an API key is required.","type":"boolean"},"language":{"properties":{"source":{"properties":{"code":{"description":"Language code","type":"string"},"name":{"description":"Human-readable language name (in English)","type":"string"}},"type":"object"},"target":{"properties":{"code":{"description":"Language code","type":"string"},"name":{"description":"Human-readable language name (in English)","type":"string"}},"type":"object"}},"type":"object"},"suggestions":{"description":"Whether submitting suggestions is enabled.","type":"boolean"},"supportedFilesFormat":{"description":"Supported files format","items":{"type":"string"},"type":"array"}},"type":"object"},"languages":{"items":{"properties":{"code":{"description":"Language code","type":"string"},"name":{"description":"Human-readable language name (in English)","type":"string"},"targets":{"description":"Supported target language codes","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"suggest-response":{"properties":{"success":{"description":"Whether submission was successful","type":"boolean"}},"type":"object"},"translate":{"properties":{"translatedText":{"description":"Translated text(s)","oneOf":[{"type":"string"},{"items":{},"type":"array"}]}},"type":"object"},"translate-file":{"properties":{"translatedFileUrl":{"description":"Translated file url","type":"string"}},"type":"object"}}}}