LibreTranslate translate API

The translate API from LibreTranslate — 4 operation(s) for translate.

Operations 4

GET /languages Get Supported Languages
POST /detect Detect Language of Text
POST /translate Translate Text
POST /translate_file Translate a File

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/libre-translate-translate-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

libre-translate-translate-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LibreTranslate misc Translate API
  version: 1.9.6
  description: Free and Open Source Machine Translation API.
  license:
    name: AGPL-3.0
servers:
- url: /
tags:
- name: translate
paths:
  /languages:
    get:
      summary: Get Supported Languages
      tags:
      - translate
      responses:
        '200':
          description: List of supported languages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/languages'
  /detect:
    post:
      summary: Detect Language of Text
      tags:
      - translate
      responses:
        '200':
          description: Detections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/detections'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Banned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '429':
          description: Slow down
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-slow-down'
        '500':
          description: Detection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                q:
                  description: Text to detect
                api_key:
                  description: API key
              required:
              - q
  /translate:
    post:
      summary: Translate Text
      tags:
      - translate
      responses:
        '200':
          description: Translation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/translate'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Banned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '429':
          description: Slow down
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-slow-down'
        '500':
          description: Translation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                q:
                  description: Text(s) to translate
                source:
                  description: Source language code or "auto" for auto detection
                target:
                  description: Target language code
                format:
                  description: "Format of source text:\n * `text` - Plain text\n * `html` - HTML markup\n"
                alternatives:
                  description: Preferred number of alternative translations
                api_key:
                  description: API key
              required:
              - q
              - source
              - target
  /translate_file:
    post:
      summary: Translate a File
      tags:
      - translate
      responses:
        '200':
          description: Translated file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/translate-file'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Banned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '429':
          description: Slow down
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-slow-down'
        '500':
          description: Translation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: File to translate
                  format: binary
                source:
                  description: Source language code or "auto" for auto detection
                target:
                  description: Target language code
                api_key:
                  description: API key
              required:
              - file
              - source
              - target
components:
  schemas:
    detections:
      type: array
      items:
        type: object
        properties:
          language:
            type: string
            description: Language code
            example: en
          confidence:
            type: number
            format: float
            description: Confidence value
            minimum: 0
            maximum: 100
            example: 100
    languages:
      type: array
      items:
        type: object
        description: Supported language
        properties:
          code:
            type: string
            description: Language code
          name:
            type: string
            description: Human-readable language name (in English)
          targets:
            type: array
            description: Supported target language codes
            items:
              type: string
    error-response:
      type: object
      properties:
        error:
          type: string
          description: Error message
    translate-file:
      type: object
      properties:
        translatedFileUrl:
          type: string
          description: Translated file url
    error-slow-down:
      type: object
      properties:
        error:
          type: string
          description: Reason for slow down
    translate:
      type: object
      required:
      - translatedText
      properties:
        translatedText:
          oneOf:
          - type: string
          - type: array
          description: Translated text(s)
        detectedLanguage:
          oneOf:
          - type: object
            properties:
              language:
                type: string
                description: Language code
              confidence:
                type: number
                format: float
                description: Confidence value
                minimum: 0
                maximum: 100
                example: 100
          - type: array
            items:
              type: object
              properties:
                language:
                  type: string
                  description: Language code
                confidence:
                  type: number
                  format: float
                  description: Confidence value
                  minimum: 0
                  maximum: 100
                  example: 100
        alternatives:
          oneOf:
          - type: array
            items:
              type: string
          - type: array
            items:
              type: array
              items:
                type: string
          description: Alternative translations