Translate

Streaming Translation (Chinese↔English)

0calls
4 credits / call

Want translations to appear character by character, typewriter style? This streaming translation endpoint delivers exactly that.

Overview

Unlike traditional translation APIs that return the full result at once, this endpoint streams the translated text to you token by token (the way ChatGPT replies appear). It is well suited to chat apps, live captions, and any scenario that benefits from immediate feedback.

What it does

  • Chinese↔English translation: bidirectional translation between Chinese and English
  • Auto detection: not sure of the source language? Set it to auto and we will detect it for you
  • Token-by-token streaming: results stream back smoothly, like a typewriter, for a more responsive UX
  • Audio playback: some results include audio links you can use for read-aloud playback

Supported languages

Focused on Chinese↔English translation. Available options:

  • Chinese (Simplified or Traditional)
  • English
  • auto (auto detection)

Request body

query
stringrequired

Text content to translate

to_lang
stringrequired

Target language. Supported values: Chinese, English

from_lang
stringoptional

Source language. Supported values: Chinese, English, auto (auto detection). Defaults to auto.

tone
stringoptional

Tone parameter (optional)

Response

200 / OK

SSE streaming response. Content-Type is text/event-stream.

TEXT

400 / Bad Request

Invalid request parameters.

JSON

500 / Internal Server Error

Translation service error.

JSON