Node.js SDK
client.document
Learn how to process documents with the VLM Run Node.js SDK
Document Predictions
The document
component provides methods for processing and analyzing documents using VLM Run’s models.
Process a Document
Process a document passing zod schema
Get usage
TypeScript Interfaces
Error Handling
Best Practices
-
Document Formats
- Supported formats: PDF
- Ensure proper document quality
- Consider file size limits
-
Performance
- Use URLs for remote documents when possible
- Handle timeouts appropriately
- Consider document size and complexity
-
Error Handling
- Validate documents before processing
- Handle both API and file system errors
- Implement proper error recovery