Skip to main content

Image Predictions

The image component provides methods for processing and analyzing images using VLM Run’s models.

Process an Image

Process an image passing zod schema

Process an image using local file

TypeScript Interfaces

Error Handling

Best Practices

  1. Image Formats
    • Supported formats: JPG, JPEG, PNG
    • Ensure proper image quality
    • Consider image size limits
  2. Performance
    • Use URLs for remote images
    • Process multiple images in one request when possible
    • Handle timeouts appropriately
  3. Error Handling
    • Validate image files before processing
    • Handle both API and file system errors
    • Implement proper error recovery