Python SDK for the TrustOriginality.ai AI-content detection and provenance API
Project description
TrustOriginality.ai — Python SDK
Thin wrapper around the TrustOriginality.ai REST API for AI-content detection, composite KYC verification and the signed provenance registry.
Install
pip install trustoriginality
# Local dev from repo: pip install ./sdk/python
Quick start
from trustoriginality import TrustOriginality
client = TrustOriginality(api_key="to_live_...") # create keys in the panel under API Keys
# Text
res = client.analyze_text("The content you want to analyze...")
print(res["isAIGeneratedLikely"], res["score"])
# Image — from a local file or a public URL
res = client.analyze_image(file="photo.jpg", name="Campaign visual")
res = client.analyze_image(url="https://example.com/photo.jpg")
# Audio / video work the same way
res = client.analyze_audio(file="voice.mp3")
res = client.analyze_video(url="https://example.com/clip.mp4")
# Composite KYC: ID document + selfie (+ optional voice)
res = client.verify_kyc(document="id-card.jpg", selfie="selfie.jpg", voice="sample.wav")
print(res["riskLevel"], res["recommendation"])
# Provenance registry
res = client.register_provenance(file="original.png", declaration="human-created")
print(res["contentHash"], res["verifyUrl"])
record = client.get_provenance(res["contentHash"])
Errors
All non-2xx responses raise TrustOriginalityError with status_code and the
parsed API payload:
from trustoriginality import TrustOriginality, TrustOriginalityError
try:
client.analyze_image(url="https://example.com/missing.jpg")
except TrustOriginalityError as e:
print(e.status_code, e.payload)
Self-hosted / on-prem (TrustOriginality Box)
Point the client at your Box instead of the cloud panel:
client = TrustOriginality(api_key="unused", base_url="http://box.local:8080")
Note: Box endpoints use /analyze/image style paths; cloud-specific features
(credits, provenance) are panel-only. See TrustOriginality_Box/README.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustoriginality-0.1.0.tar.gz.
File metadata
- Download URL: trustoriginality-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
662193b3a4b07bb1a6c3009706de2ec113d0301cb09ff22579aeb2f80d5fa02f
|
|
| MD5 |
f24cd00b29778fe332bfe89602d8f17d
|
|
| BLAKE2b-256 |
11d4b6a615e792e503fc26b27986d4b18d5da636f3b1f5cbfea1b4282b9a0d93
|
File details
Details for the file trustoriginality-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trustoriginality-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b1275f47ce48d3136d0be56d476cb9407ca48f72a021d938bf0e46f0178c9e
|
|
| MD5 |
2f6a7a45ecda4d34085c6e777a952e67
|
|
| BLAKE2b-256 |
1d6435387fd3c4fe3f585f7a8abd53bb8dc0a3dd799b973b818beaae265b5430
|