The Text Classification Landscape
Every application that processes text eventually needs classification. The question is: build, buy, or customize?
Option 1: Generic Cloud APIs
Examples
- Google Cloud Natural Language
- AWS Comprehend
- Azure Text Analytics
- IBM Watson NLU
What They Offer
Pre-trained models for common tasks:
- Sentiment analysis (positive/negative/neutral)
- Entity extraction (people, places, organizations)
- Language detection
- Content moderation
Pros
- Instant integration: No training required
- Scalable: Handle any volume
- Maintained: Provider handles updates
Cons
- Fixed categories: Can't add custom labels
- Generic accuracy: 70-80% on domain-specific content
- No customization: One-size-fits-all model
- Cost at scale: Per-character or per-request pricing adds up
Best For
- Quick prototypes
- Standard sentiment/entity tasks
- When 75% accuracy is acceptable
Option 2: Build Your Own ML Pipeline
What's Involved
- Data collection and labeling
- Model selection and architecture
- Training infrastructure (GPUs)
- Hyperparameter tuning
- Model serving and scaling
- Monitoring and retraining
Pros
- Full control: Exactly what you need
- Maximum accuracy: Optimized for your data
- No per-request fees: Fixed infrastructure cost
Cons
- High upfront investment: Months of development
- ML expertise required: Data scientists, MLOps engineers
- Infrastructure complexity: GPUs, serving, monitoring
- Ongoing maintenance: Models drift, need retraining
Best For
- Large companies with ML teams
- Core product features worth significant investment
- Unique requirements generic solutions can't meet
Option 3: TinyModels (Custom + Simple)
How It Works
- Describe your categories in plain English
- AI generates training data (or upload your own)
- Fine-tune a model in minutes
- Get an instant API endpoint
Pros
- Custom categories: Your labels, your model
- High accuracy: 85-95% on domain-specific tasks
- No ML expertise: Conversational interface
- Fast iteration: Retrain in minutes, not weeks
- Simple pricing: Per-prediction, no infrastructure costs
Cons
- Text-only: Not for images/audio (yet)
- Newer platform: Less enterprise history
Best For
- Teams needing custom classification without ML overhead
- Rapid prototyping with production-quality results
- Replacing generic APIs that aren't accurate enough
Comparison Table
| Factor | Generic APIs | DIY ML | TinyModels |
|---|---|---|---|
| Setup time | Minutes | Months | Minutes |
| Custom labels | No | Yes | Yes |
| Accuracy (domain) | 70-80% | 90%+ | 85-95% |
| ML expertise | None | Required | None |
| Infrastructure | None | Complex | None |
| Iteration speed | N/A | Slow | Fast |
| Cost model | Per-request | Fixed + variable | Per-prediction |
When to Choose Each
Choose Generic APIs When:
- Standard sentiment/entity extraction is sufficient
- You need something working in hours
- Accuracy requirements are modest
- Volume is low enough that per-request costs are acceptable
Choose DIY ML When:
- Classification is a core competitive advantage
- You have an ML team and infrastructure
- You need maximum control and customization
- Volume justifies fixed infrastructure investment
Choose TinyModels When:
- Generic APIs don't have your categories
- You need custom classification without ML complexity
- Accuracy matters but you can't justify a full ML team
- You want to iterate quickly on classification logic
Migration Path
From Generic API to TinyModels
- Export labeled data: Most generic APIs can export predictions
- Review and correct: Fix mislabeled examples
- Define custom categories: Add labels generic APIs couldn't handle
- Train custom model: Upload data or let AI generate
- A/B test: Run both in parallel, compare accuracy
- Switch over: Update API endpoint
From DIY ML to TinyModels
- Export training data: Your labeled examples
- Upload to TinyModels: CSV with text + label columns
- Train: Fine-tune on your data
- Validate: Compare accuracy metrics
- Simplify: Decommission ML infrastructure
API Specification
Endpoint
POST to https://api.morphllm.com/predict
Request Format
Send a JSON body with:
- model: Your classifier name
- text: The text to classify
Response Format
Returns:
- label: The predicted category
- confidence: Confidence score (0-1)
- all_scores: Scores for all categories
Batch Endpoint
POST to https://api.morphllm.com/predict/batch with an array of texts.
Rate Limits
- Standard: 100 requests/second
- Enterprise: Custom limits available
Get Started
Build a custom classifier in minutes. No ML expertise required. Start now.


