> ## Documentation Index
> Fetch the complete documentation index at: https://docs.igboapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Machine Translation

> Translate text from one language to another. Returns a string of text representing the translation of a given input.



## OpenAPI

````yaml POST /translate
openapi: 3.0.1
info:
  title: The Igbo API
  description: >-
    An API that enables developers to interact with African language models and
    fetch Igbo word data
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://igboapi.com/api/v2
security:
  - ApiKeyAuth: []
paths:
  /translate:
    post:
      description: >-
        Translate text from one language to another. Returns a string of text
        representing the translation of a given input.
      requestBody:
        description: >-
          The inputs to the translation model describe what language you're
          translating from and to
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TranslationInput'
              type: object
      responses:
        '200':
          description: The translated text of the given input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationOutput'
                type: object
components:
  schemas:
    TranslationInput:
      required:
        - text
        - sourceLanguageCode
        - destinationLanguageCode
      type: object
      properties:
        text:
          type: string
        sourceLanguageCode:
          type: string
          enum:
            - eng
            - ibo
        destinationLanguageCode:
          type: string
          enum:
            - eng
            - ibo
    TranslationOutput:
      required:
        - translation
      type: object
      properties:
        translation:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````