# Chinese Hanzi to Pinyin Converter

> Chinese Hanzi to Pinyin Converter is a paid API for AI agents from api.cn402.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Converts Chinese characters (Hanzi) to Hanyu Pinyin romanization with tone marks or tone numbers

## Facts

- Endpoint: GET https://api.cn402.com/hanzi/pinyin
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-cn402-com-beeb2bae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WJezqrky202NvoPcqeO5K

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-cn402-com-beeb2bae
```

Example prompt: Convert this Chinese text to pinyin with tone marks for me: '你好，我叫李明，很高兴认识你。'

## When to prefer this

Use this endpoint when you need accurate Hanyu Pinyin romanization with proper tone marks for Chinese (Mandarin) text — ideal for text-to-speech pipelines, language learning apps, pronunciation guides, or annotating Chinese content for non-native readers. Prefer this over generic translation APIs when you specifically need phonetic output rather than meaning translation.

## Known failure modes

- Non-Chinese input returns an error or empty result
- Invalid or malformed characters may not be converted
- Network timeout for very long text inputs
- HTTP 402 if payment header is missing or insufficient
- Rare characters (obscure Hanzi) may not have pinyin mappings

## How this service works

Chinese pinyin, hanzi to pinyin, Mandarin romanization, 拼音转换, Chinese phonetic, Hanyu Pinyin with tones, 普通话拼音, Chinese to Latin, Mandarin transliteration, tone marks numbers. Convert Chinese characters to Pinyin (Hanyu Pinyin) with tone marks. For AI agents handling Chinese text-to-speech, Chinese language learning apps.

## Output

Returns the Pinyin romanization of the input Chinese characters, with tone marks (e.g. nǐ hǎo) or tone numbers (e.g. ni3 hao3) indicating the Mandarin tones for each syllable

## Example request

```json
{
 "text": "你好",
 "format": "tone_numbers"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "style": {
   "type": "string",
   "description": "Style (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-cn402-com-beeb2bae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cn402.com](https://www.zero.xyz/host/api.cn402.com/llms.txt)
