ComfyUI > Nodes > ComfyUI-UniversalToolkit > Text Translator API (UTK)

ComfyUI Node: Text Translator API (UTK)

Class Name

TextTranslatorAPI_UTK

Category
UniversalToolkit/Tools
Author
whmc76 (Account age: 1110days)
Extension
ComfyUI-UniversalToolkit
Latest Updated
2026-03-16
Github Stars
0.07K

How to Install ComfyUI-UniversalToolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-UniversalToolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-UniversalToolkit in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Translator API (UTK) Description

TextTranslatorAPI_UTK enables seamless multilingual text translation using various APIs, with automatic service switching and detailed logging for efficient large-scale tasks.

Text Translator API (UTK):

The TextTranslatorAPI_UTK node is a versatile tool designed to facilitate text translation across multiple languages using various translation service providers. It supports both free and paid APIs, including Google Translate, LibreTranslate, MyMemory, DeepL, Azure Translator, and GLM-4 Flash, among others. This node is particularly beneficial for users who require seamless translation capabilities within their workflows, offering an automatic mode that prioritizes free APIs and switches to alternatives if a service fails. It enhances user experience by supporting native language names and intelligently detecting whether an API key is required for a given service. Additionally, the node provides detailed logging for debugging and error handling, ensuring smooth operation even in the face of network or API failures. Its ability to handle batch translations and list inputs makes it a powerful tool for managing large-scale translation tasks efficiently.

Text Translator API (UTK) Input Parameters:

text

The text parameter is the string of text that you wish to translate. It serves as the primary input for the translation process. The content of this parameter directly impacts the translation output, as it determines what will be translated into the target language. There are no specific minimum or maximum values for this parameter, but it should be a valid string that the translation service can process.

target_lang

The target_lang parameter specifies the language code of the language into which you want the text to be translated. This parameter is crucial as it directs the translation service to produce the output in the desired language. The language code should be a valid ISO 639-1 code, such as "en" for English or "fr" for French. There are no default values, so you must specify this parameter for each translation request.

source_lang

The source_lang parameter indicates the language code of the original text. By default, it is set to "auto," allowing the translation service to automatically detect the source language. However, specifying this parameter can improve translation accuracy, especially when dealing with languages that might be easily confused. Like target_lang, this should be a valid ISO 639-1 code.

api_key

The api_key parameter is used to provide the necessary authentication credentials for accessing certain translation services that require it. Not all services need an API key, but for those that do, this parameter is essential for successful translation. If an API key is required and not provided, the translation request will fail. There is no default value, and it should be a valid key obtained from the service provider.

Text Translator API (UTK) Output Parameters:

translated_text

The translated_text parameter contains the result of the translation process. It is the text translated into the target language specified by the target_lang parameter. This output is crucial as it provides the user with the desired translation, allowing them to utilize the translated content in their projects or workflows.

provider_name

The provider_name parameter indicates the name of the translation service provider used for the translation. This information is useful for tracking which service was utilized, especially when multiple providers are available. It helps in understanding the source of the translation and can be used for debugging or optimizing future translation requests.

status_message

The status_message parameter provides a summary of the translation process, indicating whether it was successful or if there were any errors. This output is important for users to quickly assess the outcome of their translation request and take appropriate action if needed. It includes success messages or detailed error descriptions to aid in troubleshooting.

Text Translator API (UTK) Usage Tips:

  • Ensure that you have a valid API key for services that require authentication to avoid translation failures.
  • Use the automatic source language detection feature by setting source_lang to "auto" for convenience, but specify the source language when accuracy is critical.
  • Take advantage of the detailed logging provided by the node to troubleshoot any issues that arise during the translation process.
  • Consider using batch translation capabilities for handling large volumes of text efficiently, reducing the need for multiple individual requests.

Text Translator API (UTK) Common Errors and Solutions:

Error: {provider} requires an API key but none provided

  • Explanation: This error occurs when a translation service that requires an API key is selected, but no key is provided.
  • Solution: Obtain a valid API key from the service provider and include it in the api_key parameter.

Error: Translation failed with {provider}: {result}

  • Explanation: This error indicates that the translation request was unsuccessful, possibly due to network issues or incorrect parameters.
  • Solution: Check the network connection and ensure that all input parameters are correctly specified. Review the detailed error message for specific guidance.

Error: Azure Translator error: {str(e)}

  • Explanation: This error suggests that an exception occurred while using the Azure Translator service, potentially due to incorrect API usage or service unavailability.
  • Solution: Verify the API key and parameters, and consult Azure's documentation for any service-specific requirements or limitations.

Text Translator API (UTK) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-UniversalToolkit
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Text Translator API (UTK)