Node.js SDK
client.image
Learn how to process images with the VLM Run Node.js SDK
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
-
Image Formats
- Supported formats: JPG, JPEG, PNG
- Ensure proper image quality
- Consider image size limits
-
Performance
- Use URLs for remote images
- Process multiple images in one request when possible
- Handle timeouts appropriately
-
Error Handling
- Validate image files before processing
- Handle both API and file system errors
- Implement proper error recovery