GTGeneral Translation, Inc.

Language infrastructure for AI

Internationalize AI apps instantly.
A translation toolkit for AI engineers.


shell

Copy

npm i generaltranslation

Internationalize instantly ⚡

Just write your prompt and that's it.

General Translation offers low-latency prompt translation and caching, letting your AI apps support over a hundred languages stress-free.

Get Started, or see Pricing

javascript

Copy

import GT from 'generaltranslation'

const gt = new GT({
	apiKey: process.env.GT_API_KEY // your API key
});

async function main() {

	const prompt = 'Write me a story about ';
	const input = 'gatos con espadas';

	const translatedPrompt = await gt.getPrompt([
		prompt, { text: input, translate: false }
	], 'es');

	console.log(translatedPrompt); // 'Escríbeme una historia sobre gatos con espadas'

};

main()

Read the docs.


Can my AI model understand ?

Use the generaltranslation JavaScript toolkit to get data on which LLMs speak which languages. Language information is completely free and requires no API key.

javascript

Copy

import { getModelLanguages } from 'generaltranslation'

async function main() {
	const languages = await getModelLanguages('gpt-4-turbo')
	console.log(languages) // ['en', 'fr', ... ]
}

main()

Read the docs.