Skip to main content

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

  1. Document Formats
    • Supported formats: PDF
    • Ensure proper document quality
    • Consider file size limits
  2. Performance
    • Use URLs for remote documents when possible
    • Handle timeouts appropriately
    • Consider document size and complexity
  3. Error Handling
    • Validate documents before processing
    • Handle both API and file system errors
    • Implement proper error recovery