Skip to content

Translation

Translate text between languages using Murf AI.

This example assumes using Murf; is in scope and apiKey contains your Murf API key.

1
2
3
4
5
6
7
8
using var client = new MurfClient(apiKey);

// Translate text to a target language using the Murf translation API.
var response = await client.SubpackageText.TranslateAsync(
    targetLanguage: "es-ES",
    texts: ["Hello, how are you?"]);

// The response contains the translated text.