Checkpoints allow you to save translation progress automatically and resume from where you left off if the process is interrupted. This is essential for large documents, unstable connections, or long-running translations.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strickvl/tinbox/llms.txt
Use this file to discover all available pages before exploring further.
Why Use Checkpoints?
Checkpoints solve several critical problems:- Interruption Recovery - Resume if translation is stopped or crashes
- Cost Protection - Don’t lose money from partial translations
- Progress Preservation - Save hours of translation work
- Flexible Workflows - Pause and resume at your convenience
- Network Resilience - Handle connection issues gracefully
Basic Usage
Enable Checkpointing
Add the--checkpoint-dir flag to enable automatic checkpointing:
Automatic Resume
If translation is interrupted, simply run the same command again:- Detect the existing checkpoint
- Validate it matches the current configuration
- Load completed chunks/pages
- Resume from the next incomplete section
Checkpoints are automatically cleaned up when translation completes successfully.
How Checkpoints Work
Translation Begins
When you start a translation with
--checkpoint-dir, Tinbox creates a checkpoint file:Progress Saved Automatically
After each page or chunk is translated, Tinbox saves:
- Completed pages/chunks
- Failed pages (if any)
- Translated content
- Token usage and cost
- Time elapsed
- Glossary state (if using glossaries)
Interruption Occurs
If translation is interrupted (Ctrl+C, crash, connection loss), the checkpoint preserves all progress.
Resume from Checkpoint
Run the same command again. Tinbox:
- Loads the checkpoint
- Validates configuration matches
- Skips completed work
- Continues from the next item
Checkpoint Frequency
Control how often checkpoints are saved:Checkpoint Validation
Checkpoints are validated against the current configuration to ensure consistency:Validated Fields
- Source language
- Target language
- Model provider and name
- Translation algorithm
Output file path and checkpoint frequency can change without invalidating the checkpoint.
Working with Different Document Types
Text Files (Context-Aware Algorithm)
- Completed chunks
- Context from the last chunk (for continuity)
- Glossary entries (if enabled)
PDF Files (Page Algorithm)
- Completed pages by page number
- Failed pages (if any)
- Per-page translations
Combining with Other Features
Checkpoints + Glossaries
Checkpoints preserve glossary state:- All completed translations
- Current glossary entries
- Terms detected so far
- Glossary state is restored
- New terms continue to be added
- Consistency is maintained
Checkpoints + Cost Limits
- Translation stops gracefully
- Checkpoint saves all progress
- You can resume with a higher limit:
Checkpoint File Structure
Checkpoint files are JSON and contain:Advanced Usage
Multiple Checkpoints
Each input file gets its own checkpoint:Checkpoint Directory Management
Manual Checkpoint Cleanup
Checkpoints are cleaned up automatically on success, but you can manually remove them:Best Practices
Always Use for Large Docs
Enable checkpoints for any document expected to take >5 minutes
Low Frequency for Expensive
Use
--checkpoint-frequency 1 for cloud models to protect investmentOrganize by Project
Use project-specific checkpoint directories
Version Control
Add
checkpoints/ to .gitignoreTroubleshooting
Checkpoint not being loaded- Verify you’re using the same
--checkpoint-dir - Check that configuration matches (model, languages, algorithm)
- Ensure checkpoint file exists and is valid JSON
- You changed model, language, or algorithm
- Translation will start fresh (checkpoint is invalid)
- Use identical settings to resume
- Rare, but can happen if process is killed during checkpoint write
- Delete the checkpoint file and restart:
- Checkpoint may have been deleted or not created
- Check that
--checkpoint-dirdirectory exists and is writable - Verify checkpoint file is present before resuming
Complete Example
Here’s a complete workflow using checkpoints:Next Steps
Large Documents
Learn more about handling large documents
Using Glossaries
Combine checkpoints with glossary functionality
Translating PDFs
Use checkpoints for long PDF translations
CLI Reference
Complete command-line reference