references/quickml.md
## Overview
QuickML is Catalyst's no-code AutoML platform. Upload a dataset, configure the problem type, train a model, and call it via SDK/API. No ML expertise required.
---
## Workflow
1. **Import Dataset** — CSV/Excel from Stratus, Data Store export, or direct upload
2. **Configure Training** — Select target column, problem type, algorithm
3. **Train** — QuickML runs feature engineering, model selection, cross-validation
4. **Deploy** — Deploy the best model as an endpoint
5. **Predict** — Call predictions from functions or external services
---
## Problem Types
| Type | Use Case | Example |
|------|----------|---------|
| `classification` | Classify into categories | Spam/Not Spam, Churn/No Churn |
| `regression` | Predict numerical values | Price prediction, Sales forecasting |
| `multi_label` | Multiple simultaneous labels | Tag assignment, Multi-category |
---
## SDK — Prediction
```javascript
const quickML = catalystApp.quickML();
// Get a model
const model = quickML.model(MODEL_ID); // Model ID from console
// Single prediction
const result = await model.predict({
feature1: 'value1',
feature2: 42,
feature3: 'category_a'
});
// { prediction: 'positive', confidence: 0.87 }
// Batch prediction
const batchResult = await model.batchPredict([
{ feature1: 'val1', feature2: 10 },
{ feature1: 'val2', feature2: 20 }
]);
```
---
## REST API
```
# Single prediction
POST /api/v1/ml/models/{model_id}/predict
Authorization: Zoho-oauthtoken {token}
{
"feature1": "value",
"feature2": 42
}
```
---
## Pricing
| Resource | Free Tier | Cost |
|----------|-----------|------|
| Training compute | 1 model/month | $0.10/model/hour |
| Predictions | 500/month | $0.001/prediction |
| Model storage | 1 model active | $5/model/month |
## Common Errors
| Error | Cause | Fix |
|-------|-------|-----|
| Model training stuck in `PROCESSING` | Dataset too small (< 50 rows) or all rows have the same target value | Add more varied data; QuickML requires at least 50 rows with distribution across classes |
| Prediction returns `null` | Feature columns in prediction request don't match training column names exactly | Match feature names case-sensitively to training dataset headers |
| `Model not deployed` error on predict | Model trained but deployment step skipped | Explicitly deploy model from Console → QuickML → Deploy before calling prediction API |
| Free tier prediction limit hit | 500 predictions/month free tier exhausted | Upgrade plan or wait for next calendar month reset |
references/zia-services.md
## Overview
Catalyst Zia provides pre-trained AI/ML models as serverless APIs. No model training required — call the SDK methods and get results.
Pricing: Pay-per-call. Refer to the `catalyst-pricing` skill for current rates and free tier details.
> **All Zia methods are called directly on the `zia` object** — there are no sub-objects like `textAnalytics()`, `OCR()`, or `faceAnalytics()`.
---
## DC Restrictions
| Service | Availability |
|---------|-------------|
| Identity Scanner (Facial Comparison / Aadhaar) | **IN DC only** |
| AutoML / QuickML | **Not available** in EU, AU, IN, JP, SA, CA |
| All other Zia services | All data centers |
---
## Text Analytics
```javascript
const zia = catalystApp.zia();
// Sentiment Analysis
const sentimentResult = await zia.getSentimentAnalysis(
['I love this product!'], // array of text strings
['optional', 'keywords'] // optional keyword hints
);
// Named Entity Recognition (NER)
const nerResult = await zia.getNERPrediction([
'John works at Zoho in Chennai'
]);
// Keyword Extraction
const keywordsResult = await zia.getKeywordExtraction([
'Catalyst is a cloud backend platform.'
]);
// All Text Analytics combined
const allResult = await zia.getTextAnalytics(
['Zoho Corporation is a multinational technology company.'],
['Zoho'] // optional keywords
);
```
---
## OCR (Optical Character Recognition)
```javascript
const zia = catalystApp.zia();
// Basic OCR
const result = await zia.extractOpticalCharacters(
fs.createReadStream('./invoice.png')
);
// With options (model type, language)
const panResult = await zia.extractOpticalCharacters(
fs.createReadStream('./pan.webp'),
{ modelType: 'PAN' }
);
```
Supported formats: JPG, PNG, WEBP
---
## Face Analytics
```javascript
const zia = catalystApp.zia();
// Face detection with attributes (age, gender, emotion, smile)
const faceResult = await zia.analyseFace(
fs.createReadStream('./face.png')
);
// Facial Comparison / E-KYC (⚠️ IN DC only — part of Identity Scanner)
const compareResult = await zia.compareFace(sourceImageStream, queryImageStream);
// { match: true/false, confidence: 0–1 }
```
---
## Object Detection
```javascript
const zia = catalystApp.zia();
const detections = await zia.detectObject(
fs.createReadStream('./sample.webp')
);
// [{ label: 'car', confidence: 0.94, ... }]
```
---
## Barcode Scanner
```javascript
const zia = catalystApp.zia();
const barcodes = await zia.scanBarcode(
fs.createReadStream('./barcode.png'),
{ format: 'code39' } // optional; use 'ALL' for auto-detect
);
```
Supported formats: QR Code, Code 128, EAN, UPC, Data Matrix, PDF417, and more.
---
## Moderation
```javascript
const zia = catalystApp.zia();
const result = await zia.moderateImage(
fs.createReadStream('./image.png'),
{ mode: 'moderate' } // 'basic', 'moderate', or 'advanced' (default)
);
```
---
## Common Patterns
### OCR → Data Store pipeline
```javascript
module.exports = async (context, basicIO) => {
const { image_row_id } = basicIO.getArgument(); // singular, not getArguments()
// Get image from Stratus
const bucket = catalystApp.stratus().bucket('myapp-files');
const imageStream = await bucket.getObject('images/doc.png');
// Run OCR
const zia = catalystApp.zia();
const ocrResult = await zia.extractOpticalCharacters(imageStream);
// Store extracted text
await catalystApp.datastore().table('OCRResults').insertRow({
SourceRowID: image_row_id,
ExtractedText: JSON.stringify(ocrResult),
ProcessedAt: new Date().toISOString()
});
basicIO.write({ status: 'success' }); // write(), not setOutput()
context.closeWithSuccess();
};
```
## Common Errors
| Error | Cause | Fix |
|-------|-------|-----|
| OCR returns empty string | Image resolution too low or file format not supported | Use JPG/PNG/WEBP at ≥ 150 DPI; avoid scanned PDFs without embedded text |
| `API limit exceeded` on Zia call | Free tier Zia API call quota exhausted | Upgrade plan; cache Zia results for identical inputs to reduce repeat calls |
| `Invalid file format` on image analysis | Unsupported MIME type sent | Supported formats: JPG, PNG, WEBP; convert before sending |
| Zia response latency > 5s | Large image or complex document sent synchronously | For bulk processing, use a Job function + async dispatch rather than a Basic I/O function |
| Identity Scanner or AutoML not available | DC restriction | Identity Scanner: IN DC only. AutoML/QuickML: not available in EU, AU, IN, JP, SA, CA |
SKILL.md
---
name: catalyst-zia
description: "Catalyst Zia Services and QuickML — OCR, Face Analytics, Text Analytics, Object Detection, Barcode Reader, Content Moderation, and AutoML predictions. Trigger on 'Zia', 'QuickML', 'OCR', 'face detection', 'text analytics', 'AutoML', 'ML model', or 'train a model on Catalyst'. DC restrictions: Identity Scanner is IN DC only; AutoML/QuickML is not available in EU, AU, IN, JP, SA, CA data centers."
metadata:
version: "2.0.0"
---
## How It Works
1. **Identify the capability** — OCR, Face Analytics, Text Analytics, Object Detection, Barcode Reader, Content Moderation (Zia Services), or AutoML/predictions (QuickML).
2. **Load `references/zia-services.md`** — for all Zia API calls with Node.js and Python examples.
3. **Load `references/quickml.md`** — for AutoML workflow (dataset upload → training → prediction) and pricing.
4. **Show both SDK examples** — Zia reference includes Node.js and Python; provide both or ask the user which platform they're using.
## Triggers
Use this skill for: "Zia", "QuickML", "OCR", "face detection", "text analytics", "object detection", "barcode reader", "content moderation", "AutoML", "ML model", "predict", "Zia Services", "image recognition", "sentiment analysis", "train a model on Catalyst", or "Zia API".
## References
| Reference | Load when the query is about… |
|-----------|-------------------------------|
| `references/zia-services.md` | All Zia APIs — Text Analytics, OCR, Face Analytics, Object Detection, Barcode Reader, Moderation — SDK examples in Node.js and Python |
| `references/quickml.md` | AutoML workflow, problem types (classification/regression), dataset upload, SDK prediction calls, pricing |