Skip to content
Intura

Reference

Upgrading from 2.x

intura-ai 3.0 only downloads the models you own and runs them. What replaced each 2.x call, type, error and CLI command.

What changed in 3.0

3.0 is only "download a model you own and run it". The hosted endpoints are removed, along with their result types. A model now runs in your process, on your CPU, and predict returns a plain dict or list.

Intura() no longer needs a key to construct: only a call that reaches the API does. onnxruntime, tokenizers and numpy are plain dependencies now, so the local extra is empty.

What replaced what

2.x3.0
client.guardrails.pii_detection.mask(text)client.models.load("guardrails-pii-detection-id").predict(text) returns the spans; mask them yourself
client.guardrails.prompt_injection.detect(text=...)client.models.load("guardrails-prompt-injection-id").predict(text)
client.fraud.chat_scam.detect(message) / email_phishing.detect(body)load("fraud-chat-scam-id") / load("fraud-email-phishing-en"), then .predict(text)
client.chat.commerce_intent.classify(message)client.models.load("chat-commerce-intent-id").predict(message)
client.documents.*, client.storage.uploadremoved, no local successor yet
Inference, PromptInjectionVerdict, PIIResult, PhishingVerdict, ScamVerdict, IntentResult, DocumentVerdict, Extraction, EntitySpanremoved. predict returns plain dicts (see What predict returns)
verdict.thresholds, thresholds= per callThe cut-offs are in model.serving; apply your own rule to model.labels if you need different ones
client.verify_key(), client.info(), client.health(), Intura.endpoints()removed. client.library.list() checks a key
QuotaExceeded, PayloadTooLarge, UnsupportedMediaTyperemoved
Intura() without a key raisedconstructs. The first call that needs the key raises
pip install "intura-ai[local]"pip install intura-ai (the extra is now empty)
CLI run, info, health, verify, endpointsintura-ai predict, library, models, download

What still works

client.models.list(), links(), download(), client.library.list() and LocalModel.load(path).predict(text) work as they did in 2.2.

Upgrade step by step

  1. pip install --upgrade intura-ai
  2. Replace each hosted call with client.models.load(slug).predict(text), using the table above. Load each model once, at start-up, and keep it.
  3. Where you read fields off a result object, read the dict keys instead. What predict returns lists them for each kind of model.
  4. Where you passed thresholds=, read the cut-offs from model.serving and apply your own rule.

Pin intura-ai<3 if you still need the 2.x client while you move:

bash
pip install "intura-ai<3"