Installation
Quick Start
Configuration
Environment variable (recommended)
Client instance
Methods
classify()
Single-label classification — returns the one best-matching label.tag()
Multi-label tagging — returns all labels that exceed the confidence threshold.Module-level functions
Both methods are also available as top-level convenience functions that use a default client (readsCLASSER_API_KEY from the environment):
Error Handling
| Status | Meaning |
|---|---|
400 | Bad request — invalid parameters |
401 | Unauthorized — missing or invalid API key |
402 | Insufficient balance |
422 | Validation error |
429 | Rate limit exceeded |
Types
ClassifyResponse
TagResponse
TagLabel
ClasserError
Requirements
- Python 3.9+
- httpx