canonical: https://jentic.com/apis/hirak.site/hirak-translation

# Hirak Site Hirak Translation API

Jentic publishes the only available OpenAPI specification for Hirak Translation API, keeping it validated and agent-ready. Hirak Translation translates text between 21 widely used languages and can detect the source language for an unlabelled string. The three-endpoint surface - POST /translate, GET /languages, and POST /detect - is authenticated with an X-API-Key header and is intended for chat translation, simple localisation tasks, and language-detection pre-processing in agent pipelines. Because the surface is small, integration is fast and the API behaves predictably under load.

## For AI agents

Translate text between 21 languages, detect the language of a string, and list supported languages. Authenticated with an X-API-Key header.

## Scope

Does not handle speech translation, document translation with formatting, or transliteration - use for plain-text translation and language detection across 21 languages only.

## Capabilities

- Translate a string between any two supported languages with POST /translate
- Detect the source language of an unlabelled string with POST /detect
- Enumerate the 21 supported languages via GET /languages before submitting
- Localise short user-generated content such as chat or comments
- Pre-process inbound text by detecting language before routing to a localised handler
- Run cheap on-demand translation in agent workflows that don't need a heavyweight MT engine

## Use cases

### Chat Translation in Customer Support

Support tools translate inbound messages so agents can read them in their own language and reply in the customer's. POST /translate handles the round trip and POST /detect identifies the source language up front, so an agent can build a working chat translator without integrating a major MT vendor.

Example prompt: On every inbound chat message, call POST /detect to find the source language, then POST /translate to convert the body into en for the support agent.

### User Generated Content Localisation

Forums and review sites localise short user-generated content for visitors. With a 21-language coverage list and a per-call /translate endpoint, an agent can translate comments lazily on render and cache the results without provisioning a translation pipeline.

Example prompt: When a visitor with locale fr-FR loads a review written in en, call POST /translate with from=en, to=fr and cache the result keyed on the review ID.

### Language-Aware Routing

Multi-region products route inbound emails or tickets to the team that speaks the message's language. POST /detect returns the language code, which the agent uses to pick the right queue. Combined with /languages this also catches messages in unsupported scripts before they hit human agents.

Example prompt: For each inbound ticket body, call POST /detect and route the ticket to the matching language queue, falling back to en if the language code is not in the supported list.

### AI Agent Multilingual Helper

An AI assistant works across languages by translating user input into English before reasoning and translating the answer back. Through Jentic, the agent searches for the translate operation, loads the schema, and executes POST /translate with the user's vault-stored X-API-Key.

Example prompt: When the user types in es, search Jentic for 'translate text', execute POST /translate to convert to en, run the agent's reasoning, then translate the response back to es with another /translate call.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/translate` | Translate text between two languages |
| POST | `/detect` | Detect the language of a string |
| GET | `/languages` | List supported languages |

## Key resources

- **Translate** — Translate a string between two languages.
- **Detect** — Detect the language of a string.
- **Languages** — List the 21 supported languages.

## Why Jentic

- **Setup:** Wiring the Hirak Translation API by hand means sending an X-API-Key header and posting text bodies to the translate or detect endpoint across its supported languages. Through Jentic you install once, import the Hirak Translation API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The Hirak Translation API takes text in the request body rather than exposing scopable resource ids, so scoping stays at the operation level: limit the agent to the operations it needs, such as translating text or detecting a language. You choose that set, so the languages lookup can stand alone if you leave out translation.
- **Credential handling:** Your Hirak Translation X-API-Key is stored once, encrypted, by your own Jentic One instance and injected into the X-API-Key header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'translate text' or 'detect the language of text', and Jentic returns POST /translate or POST /detect with its body schema so the agent picks the right one without reading the reference docs.

## Related APIs

- **OpenAI API** — GPT-4 can translate and reason about text in one call across far more languages.
- **MessageBird Language Detection API** — Dedicated language detection API from MessageBird's NLP suite.
- **Abstract API** — Bundle of utility APIs that pair with Hirak Translation for validation of post-translation text.

## FAQ

### Why is there no official OpenAPI spec for Hirak Translation API?

Hirak does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Hirak Translation API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Hirak Translation API use?

The Hirak Translation API uses an X-API-Key header on every call to /translate, /detect, and /languages. Through Jentic, the X-API-Key value is held in your Jentic One instance and injected at execution time so the raw key never enters the agent context.

### How many languages does the API support?

The engine supports 21 widely used languages. Call GET /languages to receive the full list, and pass the matching language codes to POST /translate's from and to parameters.

### What are the rate limits for the Hirak Translation API?

The OpenAPI specification does not declare specific rate limits. Hirak enforces per-key quotas, so check your plan dashboard and batch translate calls when localising large documents to avoid hitting daily caps.

### How do I detect a language and translate it through Jentic?

Run pip install jentic, then await client.search('detect language of text') followed by client.search('translate text'). Execute POST /detect first, then POST /translate with the detected source code as the from parameter.

### Does the API translate documents or only short strings?

POST /translate accepts text in the request body. For documents, split content into paragraph-sized strings and call /translate per chunk, then re-assemble in order to preserve formatting.

### Can I limit what my agent is allowed to do with the Hirak Translation API?

Yes. Because you run Jentic One yourself, your own rules decide which of the three operations the agent may call, so you can grant only what a task needs. Since the API takes text in the request body rather than exposing scopable resource ids, scoping stays at the operation level: you can allow POST /translate and POST /detect while leaving the rest out, or expose only GET /languages as a standalone lookup. Your self-hosted instance also holds the X-API-Key and injects it at execution time, so the agent never handles the raw credential.
