Action Table - Image
1. Introduction
This tutorial will guide you through using the JamAI Base TypeScript SDK to create a simple receipt information extraction system.
What We'll Build
Snap a photo of your receipt and let AI do the expense report for you!
In this tutorial, we'll create a receipt processing system that:
Takes a receipt image as input
Uploads it to JamAI Base action table
Extracts key information like:
Shop name
Total amount
Prerequisites
Before starting, you'll need:
Node.js 16.x or higher installed
Project ID and Personal Access Token (PAT)
2. Installation and Setup
Installing the SDK
Basic Configuration
Get your Personal Access Token (PAT) here:
Get your Project ID here:
3. Creating Your Action Table
4. Basic Implementation
4.1 Simple Receipt Processor
4.2 Complete Implementation with Error Handling
5. Usage Examples
5.1 Basic Usage
5.2 Batch Processing
6. Best Practices
Error Handling
Always validate input files
Handle network errors gracefully
Performance
Reuse the client instance
Consider batch processing for multiple files
Implement rate limiting for large batches
Security
Use environment variables for credentials
Complete Standalone Example
Save this as receipt_processor.ts:
Running the Example
Save the code as receipt_processor.ts
Create a .env file:
Install dependencies:
Run with:
Or compile and run:
Troubleshooting
Was this helpful?