def predict(self, document_path: str, model_name: str, consent_id: str = None) -> Prediction:
        """Run inference and create prediction on document.
        This method takes care of creating and uploading a document specified by document_path.
        as well as running inference using model specified by model_name to create prediction on the document.

        >>> from las import ApiClient
        >>> api_client = ApiClient(endpoint='<api endpoint>')
        >>> api_client.predict(document_path='document.jpeg', model_name='invoice')

        :param document_path: Path to document to run inference on
        :type document_path: str
        :param model_name: The name of the model to use for inference
        :type model_name: str
        :param consent_id: An identifier to mark the owner of the document handle
        :type consent_id: str
        :return: Prediction on document
        :rtype: Prediction
        :raises InvalidCredentialsException: If the credentials are invalid
        :raises TooManyRequestsException: If limit of requests per second is reached
        :raises LimitExceededException: If limit of total requests per month is reached
        :raises requests.exception.RequestException: If error was raised by requests
        """

        content_type = self._get_content_type(document_path)
        consent_id = consent_id or str(uuid4())
        document_id = self._upload_document(document_path, content_type, consent_id)
        prediction_response = self.post_predictions(document_id, model_name)
        return Prediction(document_id, consent_id, model_name, prediction_response)