Free plan

Translate text

Translate text into another language
POST
/v1/ai/content/translate

About this tool

AI translates your text into the language you choose and keeps the meaning. You can pick a formal or informal tone, keep line breaks, keep placeholders such as {{name}} unchanged, and ask for other wordings. Check important texts with a native speaker.
For example, you paste the messages of your app and get them in Spanish with placeholders still working.

How to use it

  1. Choose this tool.
  2. Paste the text, or add up to 5 files.
  3. Type the language to translate into, and choose a formal or informal tone.
  4. Choose if placeholders and line breaks must stay as they are.
  5. Press Generate, then copy or download the translation.

What you get back

You get the translated text that you can copy or download.
TEST IT LIVE

Try Translate text in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
AI
Plan
Free
Method
POST
Endpoint
/v1/ai/content/translate
Tool ID
ai.content.translate
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Ai
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/ai/content/translate" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'on_unsupported=error' \
  -F 'quality=standard' \
  -F 'target_language=xx'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.ai.content.translate({
    "on_unsupported": "error",
    "quality": "standard",
    "target_language": "xx"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->ai()->content()->translate([
    'on_unsupported' => 'error',
    'quality' => 'standard',
    'target_language' => 'xx',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Translate text or UI strings into a language, with formality, a glossary and checks that placeholders such as {{name}} or %s survive. Readiness: unbenchmarked (see GET /v1/ai/capabilities/content.translate).

Classification: hybrid. Deterministic stages: file type detection from content, native PDF text extraction / OCR for documents, image normalisation (Sharp), deterministic length/format validation of the result.

Translate text works from text and settings, so no file is needed. The required inputs are target_language.

Translate text is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/ai/content/translate with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.