Machine Learning · NLP · REST API

SMS Classifier API

Clasifica mensajes SMS en categorías usando DistilBERT fine-tuned sobre un dataset multilingüe (ES + EN).

v2.0.0 · live
Endpoints
GET /classify Clasificador simple GET /classify/batch Clasificador por lotes GET /categories Categorías con ejemplos
Ejemplo de respuesta · POST /classify
"text":       "Tu código OTP es 482910. No lo compartas.",
"prediction": {
  "category":   "otp_verification",
  "confidence": 0.9821
},
"top_3": [
  { "category": "otp_verification",  "confidence": 0.9821 },
  { "category": "security_alert",    "confidence": 0.0091 },
  { "category": "customer_service",  "confidence": 0.0044 }
]
Ejemplo de respuesta · POST /classify/batch
"results": [
  {
    "text":       "Se debitó $45.000 de tu tarjeta en Falabella.",
    "prediction": { "category": "transaction", "confidence": 0.9743 },
    "top_3": [ ... ]
  },
  {
    "text":       "Tu pedido #45231 está en camino.",
    "prediction": { "category": "delivery_logistics", "confidence": 0.9612 },
    "top_3": [ ... ]
  }
],
"total":      2,
"from_cache": 0
Stack tecnológico
Python 3.11 FastAPI DistilBERT multilingual HuggingFace Transformers PyTorch CPU Pydantic v2 Docker