Translate text from one language to another for multilingual communication, content localization, and language learning
Basic usage
Send a text input to translate it into another language
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('Helsinki-NLP/opus-mt-en-zh');// provide the model with inputconst input = "Hello, how are you? Beautiful day today, isn't it?";// send to the modelconst { error, output } = await model.run(input);// observe the outputconsole.log({ error, output });