chinese
Convert Chinese (Hanzi) text to pinyin romanization.
Convert Chinese (Hanzi) text to pinyin romanization. Choose tone marks (symbol, e.g. hàn yǔ), numbered tones (han4 yu3), or no tones. Auto-segments words and returns the full pinyin string plus a per-syllable array. Deterministic, keyless — useful for transliteration, pronunciation, search indexing, and TTS prep.
get/api/chinese/pinyin
Request
- Base URL: https://2s.io
- URL: https://2s.io/api/chinese/pinyin
- Auth: API key in header PAYMENT-SIGNATURE
Query parameters
textstring required
Text.
tone'symbol' | 'num' | 'none'
Tone.
segmentedboolean
Include the per-word segment array.
trial1
Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.
Response
(unresolved $ref)
Changes
No recorded changes to this operation across all 1 revision of this API.