Overview

Hirak Translation API provides text translation between 21 widely-used languages with high accuracy and no request limits. It is straightforward to use with a simple POST request containing the source text, source language, and target language. The unlimited request policy makes it ideal for prototyping and small production projects.

Beginner Tip

Specify both the source and target language using ISO 639-1 two-letter codes (e.g., "en" for English, "fr" for French) — if you leave the source language blank, the API will attempt auto-detection.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

translated text
source language
target language
confidence score

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "translatedText": "Bonjour le monde",
  "detectedSourceLanguage": "en",
  "targetLanguage": "fr"
}

Field Reference

translation The translated text in the target language
source ISO 639-1 code of the source language used (or auto-detected) for translation
target ISO 639-1 code of the target language the text was translated into
characters Number of characters in the input text that were translated

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://translate.hirak.site/api/v1/translate";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

403 Forbidden API key is not provided or is invalid
Pass your API key in the "x-api-key" header on every request
Unsupported language error The requested language pair is not among the 21 supported languages
Check the API documentation for the full list of supported language codes before sending a request
Partial or cut-off translation The input text exceeds the per-request character limit
Break long texts into smaller chunks and translate each separately, then concatenate results

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Intermediate
Listing details not endpoint-verified

Alternatives to Hirak Translation

Technical alternatives for different use cases.

Free translation with multiple language support

Better For

Data privacy (LibreTranslate can be self-hosted)

Trade-off

Free translation without self-hosting complexity

Similar APIs

View All →