Skip to main content
Five-minute quickstart

Put one governed call on the wire.

Choose Python or TypeScript. Keep your language choice through every code sample. You will finish with a verdict your app can use right away.

1. Install your SDK

Both SDKs are live at version 0.0.3. Pick either tab. The docs remember your choice as you move through the site.

Install

One platform contract, two first-class SDKs.

Python / TypeScript
terminal
pip install trinitite==0.0.3

2. Add a test key

Set the key and its matching environment. Test mode lets you exercise every verdict path without sending test controls into production.

Environment

Use a test key for your first integration.

Python / TypeScript
.env
TRINITITE_API_KEY=trnt_test_...
TRINITITE_ENV=test

Environment keyring

The key prefix must match the environment

Key prefix
trnt_test_...
Use
Forced verdicts and CI

Need a key? Request a sandbox tenant.

3. Make the call

Set your baseline once, then call the model you already chose. The SDK sends the request through the same governed path in both languages.

Code

First governed call

The tabs stay in sync with the language you chose above.

Python / TypeScript
first_call.py
from trinitite import Trinitite

tr = Trinitite()
tr.govern(frameworks=["soc2"], mode="enforce")

response = tr.client(
"openai",
credential="cred_openai_prod",
).chat.completions.create(
model="gpt-4o",
messages=[{
"role": "user",
"content": "Refund order 4821.",
}],
)

result = tr.result(response)
print(result.verdict)
GovernanceResult
First result
GovernanceResult
passed
verdict
passed
violations
[]
receipt
dlir_01J7FIRSTCALL

The verdict drives the app path. The receipt records the decision.

First call complete

Your app now has a decision it can use

The verdict drives the next code path. The explanation helps your team improve it. The receipt keeps the proof.

4. Use the verdict

The lowercase verdict is the stable branch for your app. Start with the three paths most apps need, then add masking, human review, and failure handling.

Branch on the result

The app path stays simple even when the rules grow.

Python / TypeScript
handle_result.py
if result.verdict == "passed":
show(result.body)
elif result.verdict == "corrected":
show(result.body)
log_changes(result.diff)
elif result.verdict == "blocked":
show_safe_fallback()
elif result.verdict == "masked":
keep_tokens_outside_trust_boundary()
elif result.verdict == "hitl":
queue_for_review()
else:
follow_error_policy()

You are ready for the mental model

You now have the key idea: your model call stays familiar, while the app gains a clear result and the organization gains a shared trail for testing and improvement.

Learn the core concepts