/api/v2/document/restorerestore:documentsBase cost: 5Document Restoration
Restore and enhance damaged or faded documents using AI. Remove stains, fix faded text, and improve scan quality.
Quality Multipliers
fast
1x
standard
1.5x
enhanced
2x
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| imageBase64 | string | Yes | Base64 encoded image data of the document to restore |
| fileName | string | No | Original filename of the document |
| fileSize | number | No | Size of the original file in bytes |
| fileType | string | No | MIME type of the original file |
| qualityLevel | string | No | Restoration quality level (higher quality costs more points) |
| enhanceTextClarity | boolean | No | Enhance text clarity and sharpness |
| restoreFadedText | boolean | No | Restore faded and missing text |
| removeStainsSpots | boolean | No | Remove stains, spots, and watermarks |
| removeFoxingAgeSpots | boolean | No | Remove foxing and age-related spots |
| cleanBackgroundArtifacts | boolean | No | Clean background and remove artifacts |
| restoreFadedInk | boolean | No | Restore faded ink and improve contrast |
| reduceNoiseGrain | boolean | No | Reduce noise and grain from scan |
| improveScanReadability | boolean | No | Improve overall scan readability |
| sharpenDocumentDetails | boolean | No | Sharpen document details and edges |
{
"imageBase64": "/9j/4AAQSkZJRgABAQEAYABgAAD...",
"fileName": "old-document.jpg",
"fileSize": 3145728,
"fileType": "image/jpeg",
"qualityLevel": "enhanced",
"enhanceTextClarity": true,
"restoreFadedText": true,
"removeStainsSpots": true,
"removeFoxingAgeSpots": true,
"cleanBackgroundArtifacts": true,
"restoreFadedInk": true,
"reduceNoiseGrain": true,
"improveScanReadability": true,
"sharpenDocumentDetails": true
}{
"success": true,
"data": {
"restored_image": "base64_encoded_restored_image_data...",
"restoration_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"file_name": "document-1709123456789-1234-restored.png",
"processing_time": 3456,
"points_used": 12,
"remaining_points": 88,
"quality_level": "enhanced",
"enhancements_applied": {
"enhanceTextClarity": true,
"restoreFadedText": true,
"removeStainsSpots": true,
"removeFoxingAgeSpots": true,
"cleanBackgroundArtifacts": true,
"restoreFadedInk": true,
"reduceNoiseGrain": true,
"improveScanReadability": true,
"sharpenDocumentDetails": true
},
"extracted_text": "This is any text extracted from the document...",
"metadata": {
"original_file_name": "old-document.jpg",
"original_file_size": 3145728,
"restored_file_size": 2456789,
"timestamp": "2024-01-15T10:30:00Z"
}
}
}