Function Types
Analyze Functions
Visual analysis of images and documents using AI
Analyze functions perform visual analysis on images and videos. They're optimized for extracting information that requires understanding visual layout and appearance of content.
When to Use
Use an Analyze function when you need to:
- Infer visual context from pictures
- Analyze images for specific visual elements
- Ask questions about visual aspects in inputs
Configuration Fields
Required Fields
| Field | Type | Description |
|---|---|---|
functionName | string | Unique identifier for the function |
type | string | Must be "analyze" |
outputSchemaName | string | Human-readable name for your schema |
outputSchema | object | JSON Schema defining the structure to extract |
Optional Fields
| Field | Type | Default | Description |
|---|---|---|---|
displayName | string | - | Human-readable display name |
tags | string[] | - | Tags for organization |
Analyze vs Transform
| Aspect | Analyze | Transform |
|---|---|---|
| Optimized for | Visual content, images | Documents, text |
| Best for | Receipts, photos, scans | PDFs, emails, spreadsheets |
| Processing | Visual-first approach | Text-first approach |
Choose Analyze when the visual appearance of the document is critical for extraction (e.g. identifying cars in a photo of a parking lot, pulling events from a warehouse security video).
Choose Transform for standard document processing where text extraction is the primary need.
Example
{
"functionName": "receipt-analyzer",
"type": "analyze",
"displayName": "Receipt Image Analyzer",
"outputSchemaName": "Receipt Schema",
"outputSchema": {
"type": "object",
"required": ["merchantName", "total"],
"properties": {
"merchantName": {
"type": "string",
"description": "Name of the merchant/store"
},
"merchantAddress": {
"type": "string",
"description": "Store address if visible"
},
"transactionDate": {
"type": "string",
"description": "Date of transaction"
},
"total": {
"type": "number",
"description": "Total amount paid"
},
"paymentMethod": {
"type": "string",
"description": "How the purchase was paid (cash, card, etc.)"
},
"items": {
"type": "array",
"description": "Individual items purchased",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"quantity": { "type": "number" }
}
}
}
}
},
"tags": ["expense", "receipts"]
}Email Integration
Like Transform functions, Analyze functions receive an email address for forwarding documents. The email address is returned in the function response as emailAddress.