CJK Subtitle Rendering API
One rendering approach for three writing systems
Render styled Chinese, Japanese, and Korean captions into video through one API. CJK scripts share a family of line-breaking concerns — no word spaces, full-width punctuation that can’t start a line, and bottom-heavy reading shapes — and ZapCap handles them the same way generic subtitle tools don’t. Pick a language below for the script-specific detail.
What Chinese, Japanese, and Korean have in common
CJK subtitle rendering means laying out Chinese, Japanese, and Korean captions so lines break at phrase boundaries, not between any two characters. Unlike latin text, CJK needs Unicode line-breaking and kinsoku rules to decide where a line may end; ZapCap applies those rules per script before burning captions into the MP4.
No reliable word spaces
Chinese and Japanese have no spaces between words at all. Korean has spaces, but they don’t map to safe break points the way latin spaces do. Naive splitters produce single-character lines and orphaned particles.
Full-width punctuation rules
Sentence punctuation (。 , 、) and closing brackets must not start a line across all three scripts — the shared kinsoku family of rules pulls them onto the previous line.
Bottom-heavy reading shape
Professional CJK subtitling prefers a shorter top line over a shorter bottom one — the opposite of latin convention. The major streaming style guides formalize this for each language.
The same transcript, two different renderers
Translation: identical. Layout: not. The same failures show up across CJK — here on Chinese; the per-language pages show the script-specific cases.
source transcript · 两分钟就好,真的。
好 ,
真的。
真的。
How ZapCap renders CJK captions
Phrase-aware segmentation
Captions are split at phrase boundaries, not at fixed character counts — across Chinese, Japanese, and Korean. Words and verb stems stay whole.
Shared kinsoku punctuation
Full-width sentence punctuation and closing brackets are pulled onto the previous line; opening brackets attach to the next. The same rule family applies to all three scripts.
Bottom-heavy, max two lines
When wrapping is needed, the shorter line lands on top — matching the per-language streaming guides. Three-line cues are split into two cues instead.
One language code per render
Set language to zh, ja, or ko on the render task. Simplified vs Traditional Chinese is a transcript choice, not a separate code.
Brand-term dictionary
Add product names and approved transliterations to the dictionary — transcription hints that bias recognition toward your brand terms. Carry an approved transcript through and the text renders verbatim.
Per-script font fallback chains
Renders with PingFang / Hiragino / Noto Sans CJK stacks server-side, picked per language. No client-side font availability — what you see in the MP4 is what every viewer sees.
Built on published references — not magic
CJK line breaking isn’t bespoke. It’s documented by Unicode, the W3C’s per-language layout requirements, and the major streaming subtitling guidelines. ZapCap implements them; this page cites them.
If you’re evaluating us against another captioning vendor, ask whether they implement these per script. The answers tell you a lot.
- Unicode Line Breaking Algorithm (UAX #14) — the basis for language-aware line breaks across CJK. unicode.org/reports/tr14
- W3C · Requirements for Japanese Text Layout (JLREQ) — kinsoku shori; the model for CJK line-break prohibition. w3.org/TR/jlreq
- W3C · Requirements for Korean / Chinese Text Layout — per-language layout requirements (KLREQ / CLREQ). w3.org/TR/clreq
- MDN · CSS line-break — language-aware line-breaking property. developer.mozilla.org
Render CJK captions in one task call
Set language to zh, ja, or ko on the render task. Optional: send an approved translation (skip retranscription) and a brand-term dictionary to bias recognition toward your product names.
- Set language "zh" / "ja" / "ko" per source video
- Bring your own translation via the SRT-to-burned-in workflow
- Mix with caption style templates — CJK with a Beast preset works
- One source video → multiple language renders, consistent style
// CJK caption render — set the language per source video
// No SDK — call the REST API with fetch.
// Chinese -> zh, Japanese -> ja, Korean -> ko
// fetch IDs from GET /templates
const task = await fetch(`https://api.zapcap.ai/videos/${videoId}/task`, {
method: 'POST',
headers: { 'x-api-key': process.env.ZAPCAP_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
templateId: '<TEMPLATE_UUID>',
language: 'zh', // or 'ja' / 'ko'
renderOptions: {
subsOptions: { emphasizeKeywords: true },
},
// Transcription hints — biases recognition toward your brand terms.
dictionary: ['ACME', 'TurboMax'],
notification: {
type: 'webhook',
notificationsFor: ['render'],
recipient: 'https://acme.com/hooks/zapcap',
},
}),
}).then(r => r.json());
// Bring-your-own translation — render an approved transcript verbatim
const task2 = await fetch(`https://api.zapcap.ai/videos/${videoId}/task`, {
method: 'POST',
headers: { 'x-api-key': process.env.ZAPCAP_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
templateId: '<TEMPLATE_UUID>',
language: 'ja',
transcript: cjkApprovedTranscript,
notification: {
type: 'webhook',
notificationsFor: ['render'],
recipient: 'https://acme.com/hooks/zapcap',
},
}),
}).then(r => r.json());Before you ship CJK captions
Six checks the rendering pipeline can’t do for you.
- Pick the right language code. zh, ja, or ko per source video. For Chinese, decide Simplified or Traditional in the transcript — they’re not separate codes.
- Confirm kinsoku at the breaks. No full-width punctuation or closing bracket stranded at the start of a line in the rendered MP4.
- Define a brand-term dictionary. Product names and approved transliterations bias transcription; bring an approved transcript for copy that must not be re-translated.
- Cap at two lines, bottom-heavy. Split into multiple cues if a single one exceeds the per-line character count.
- Safe-zone check on 9:16. CJK caption boxes are visually heavier; overrun shows up faster than on latin scripts.
- Native-speaker pass on the rendered MP4, not the source transcript. Layout problems only show up at render time.
Use cases that need CJK rendering
CJK subtitle rendering questions
Kinsoku is the family of line-break rules that stop certain characters, including full-width sentence punctuation and closing brackets, from starting a line. ZapCap pulls those characters onto the previous line automatically for Chinese, Japanese, and Korean renders.
Render CJK subtitles through the API
Language-aware line breaks, shared kinsoku punctuation, a brand-term dictionary, and bring-your-own translation — for Chinese, Japanese, and Korean in one API. Pricing is $0.10/min of rendered video.