---
title: "Translate text (SSE)"
method: POST
path: "/hiro_translation/translate"
tags: ["Patent Basic Data"]
---

# Translate text (SSE)

`POST /hiro_translation/translate`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/hiro_translation/translate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/hiro_translation/translate/post.ts> (a function with typed inputs; its response is checked against the schema)

Translate `content` from source to target language and stream segments over SSE. Choose the strategy with `mode`: `fast` (default) segmented, `stream` sliding-window, `raw` direct model pass-through.

## Request body

- T010HiroTranslationTranslateRequest
  - `content` string, required: Source text to translate. Must not be blank. Default max 65536 characters.
  - `sourceLanguageCode` object, required: Source language code.
  - `targetLanguageCode` object, required: Target language code; must differ from source.
  - `mode` string: Translation mode: `fast` (default) segmented, `stream` sliding-window, `raw` direct pass-through. Example: `fast`.

## Response `200`

Successful translate text (sse) response.

- T010HiroTranslationTranslateResponse
  - `_meta` object: Billing metadata on the SSE JSON body (not an HTTP header).
  - `state` string, required: Execution status
  - `progress` string: Translation progress as ``current/total`` segments (e.g. ``3/10``). `raw` is typically ``1/1``.
  - `textOriginal` string, required: Source segment text
  - `textTranslated` string, required: Translated segment text
  - `translatedCharacterCount` integer, required: Character count of this translated segment

## Other responses

- `400`: Validation failed before the stream starts. Body is always `{"error":"..."}`; no `TYPE` field and no billing header.
- `413`: Payload too large. `content` exceeds `RD_MAX_TEXT_CHARS` (default 65536) or `Content-Length` exceeds `RD_MAX_REQUEST_BYTES` (default 262144). Body is `{"error":"..."}` with no billing header.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
