Browse docsshow

Quickstart

Submit your first verification in five minutes. You'll need an account and an API key — see Authentication if you don't have one.

1. Install

python
pip install tobeverified

2. Set your API key

Both SDKs read TBV_API_KEY from the environment.

bash
export TBV_API_KEY=tbv_live_...

3. Submit a verification

python
from tobeverified import TBV

tbv = TBV()  # reads TBV_API_KEY from env

result = tbv.verify(
    prompt="Is this customer message a refund request?",
    context={"message": "I'd like my money back."},
    allowed_verdicts=["yes", "no"],
    confidence_threshold=0.85,
)

print(result["final_verdict"], result["final_tier"])
# → 'yes' 'agent'

4. What just happened

verify() is fire-and-wait. Under the hood:

  1. 1. SDK posts to /v1/tasks with your prompt + context.
  2. 2. Your verification agent runs (LLM judge with policy + typologies, returns {verdict, confidence, rationale}).
  3. 3. If confidence ≥ confidence_threshold, the task completes with that verdict.
  4. 4. Otherwise the task moves to human_needed and shows up at review.tobeverified.com.
  5. 5. SDK polls until terminal state, then returns.

5. Non-blocking version

Don't want to wait? Submit and poll separately.

python
task = tbv.submit(
    prompt="Is this safe to publish?",
    context={"text": "..."},
    allowed_verdicts=["safe", "unsafe", "needs_review"],
    confidence_threshold=0.9,
)
print(task["id"])

# Later — poll once or wait
state = tbv.get(task["id"])
final = tbv.wait(task["id"], timeout=300)

Next