@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LibreTranslate
@version 1.8.4
@auth ApiKey api_key in formData
@endpoints 7
@toc detect(1), frontend(1), health(1), languages(1), suggest(1), translate(1), translate_file(1)

@group detect
@endpoint POST /detect
@required {q: str}
@optional {api_key: str}
@returns(200)
@errors {400, 403, 429, 500}

@endgroup

@group frontend
@endpoint GET /frontend/settings
@returns(200)

@endgroup

@group health
@endpoint GET /health
@returns(200)

@endgroup

@group languages
@endpoint GET /languages
@returns(200)

@endgroup

@group suggest
@endpoint POST /suggest
@required {q: str, s: str, source: str, target: str}
@returns(200)
@errors {403}

@endgroup

@group translate
@endpoint POST /translate
@required {q: any, source: str, target: str}
@optional {format: str(text/html)=text, alternatives: int=0, api_key: str}
@returns(200)
@errors {400, 403, 429, 500}

@endgroup

@group translate_file
@endpoint POST /translate_file
@required {file: any, source: str, target: str}
@optional {api_key: str}
@returns(200)
@errors {400, 403, 429, 500}

@endgroup

@end
