Caption API script_alignment_mismatch: what it means and how to fix it
If script_text mismatches the speech, POST /v1/video-captions fails with script_alignment_mismatch or script_alignment_failed. Simplify or omit it.

script_alignment_mismatch and script_alignment_failed are the two typed job errors Sume's caption API returns when the script_text you supplied cannot be aligned to the speech in the video. The suggested next action is simplify_script_text_or_omit: shorten or simplify the script to match what is said, or omit script_text and burn the transcript wording instead.
This page follows the Video captions docs, read 2026-09-29. The docs do not publish the matching threshold, so treat the guidance below as practical advice, not a rule.
What does script_text actually do?
When provided, Sume keeps speech-to-text word timings as the source of truth and aligns the burned-in wording to your script. So the script sets the wording while the speech sets the timing, and a script that differs a lot from what is said gives the aligner nothing to match.
Which options fit which situation?
| Situation | Send |
|---|---|
| Speech matches your script, want exact wording | script_text |
| Script drifted from the spoken words | Omit script_text, burn the transcript |
| You know the timing yourself | words or cues (skips speech-to-text) |
| Silent clip | cues or segments |
How do I fix a failing script?
- Compare the script with what is actually said and edit the script to match the speech.
- If the script is Korean, use a Hangul style; Korean copy on a Latin style is a separate
400. - If the script still fails, omit it, or send
wordswith exact times.
curl -X POST https://api.sume.com/v1/video-captions \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: video-caption-script-002" \
-d '{
"video_url": "https://example.com/clean.mp4",
"style": "punch",
"script_text": "Say hello to the Sume developer platform."
}'Do failed jobs still charge?
The docs give a $0.20 fixed estimate per accepted job and do not describe refunds for alignment failures specifically. Sume's generation docs say failed jobs release or refund the reservation where applicable; check GET /v1/usage for what a specific job settled at.
Which other caption errors should I know?
| Code | Meaning |
|---|---|
caption_no_speech | Silent clip; use cues (next_action: use_overlay_captions) |
caption_hangul_text_latin_style | Korean copy on slam, punch or tiktok-green |
caption_font_requires_hangul_style | A Hangul font on a Latin style |
script_alignment_mismatch, script_alignment_failed | script_text cannot be aligned to the speech |
Sources
Related posts
More in Developers
- Claude Code permissions ask rule for paid MCP tools
An ask rule in Claude Code settings prompts every time a named MCP tool runs, even if an allow rule matches. Rules for Sume's paid tools and their limits.
- claude -p with --mcp-config: run Sume video tools from a script
Use claude --bare -p with --mcp-config and --allowedTools to call Sume's hosted MCP tools in CI; read mcp_server_errors so an unloaded server fails the job.
- Claude Code hooks not firing on an MCP tool: 6 causes
A PreToolUse hook that never fires on an MCP tool usually has a matcher problem: a bare server name, a plugin's scoped name, or a missing .*. Fixes for Sume.
- Claude Code managed-mcp.json exclusive: allow the Sume server
An exclusive managed-mcp.json fixes the MCP servers Claude Code may use. What to put in it for Sume's hosted server, and what Claude Code 2.1.282 added.
Written by Sume