def translate(self, text, model_id=None, source=None, target=None,
                  **kwargs):
        """
        Translate.

        Translates the input text from the source language to the target language.

        :param list[str] text: Input text in UTF-8 encoding. Multiple entries will result
        in multiple translations in the response.
        :param str model_id: A globally unique string that identifies the underlying model
        that is used for translation.
        :param str source: Translation source language code.
        :param str target: Translation target language code.
        :param dict headers: A `dict` containing the request headers
        :return: A `DetailedResponse` containing the result, headers and HTTP status code.
        :rtype: DetailedResponse
        """

        if text is None:
            raise ValueError('text must be provided')

        headers = {}
        if 'headers' in kwargs:
            headers.update(kwargs.get('headers'))
        sdk_headers = get_sdk_headers('language_translator', 'V3', 'translate')
        headers.update(sdk_headers)

        params = {'version': self.version}

        data = {
            'text': text,
            'model_id': model_id,
            'source': source,
            'target': target
        }

        url = '/v3/translate'
        response = self.request(
            method='POST',
            url=url,
            headers=headers,
            params=params,
            json=data,
            accept_json=True)
        return response