Truthlocks MAIP wrapper for OpenAI — auto-generate cryptographic receipts for every API call
Project description
truthlocks-openai
Cryptographic receipt generation for every OpenAI API call. Part of the Truthlocks MAIP (Machine-Attested Identity Protocol) ecosystem.
Installation
pip install truthlocks-openai
Quick Start
from truthlocks_openai import MAIPOpenAIWrapper
# Create the receipt-generating wrapper
wrapper = MAIPOpenAIWrapper()
# Make API calls -- receipts are generated automatically
response, receipt = wrapper.chat_completions_create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
# receipt contains a cryptographic proof of the API call
print(receipt.receipt_id)
API
| Class | Description |
|---|---|
MAIPOpenAIWrapper |
Drop-in wrapper for the OpenAI client that auto-generates MAIP receipts for every API call |
What You Get
- Tamper-proof audit trail for every chat completion, embedding, and moderation call
- Cryptographic receipts anchored to a transparency log with sub-40 ms latency
- Zero-config drop-in wrapper -- swap one line and receipts flow automatically
- Compliance-ready evidence packages for SOC 2 Type II, ISO 27001, and EU AI Act
How It Works
truthlocks-openai is a thin wrapper around maip-ai-connectors, the core Truthlocks MAIP SDK for Python. It re-exports the OpenAI-specific wrapper so you can install only what you need.
Requirements
- Python >= 3.9
- A Truthlocks API key (get one free)
Documentation
Full guides, API reference, and examples: docs.truthlocks.com/sdk/openai
License
Apache 2.0 -- see LICENSE.
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 truthlocks_openai-1.0.1.tar.gz.
File metadata
- Download URL: truthlocks_openai-1.0.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb4a69199bff69942ead208bf088aeffdfbddb7c98c5128ae2ed3693787c209
|
|
| MD5 |
71866d59d6d7b1d4fcba068150ebe634
|
|
| BLAKE2b-256 |
671b29d1a5c6697057d5b72295b98c66d8def54427ef1d21c8436db43748ca72
|
File details
Details for the file truthlocks_openai-1.0.1-py3-none-any.whl.
File metadata
- Download URL: truthlocks_openai-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a6d05361b700bae107d1f0dfd7049f89e3d689c31ad68cd277f9ec29c3f0e83
|
|
| MD5 |
d508379252f4b3efaeb4177386874f10
|
|
| BLAKE2b-256 |
0161561fbf7cf30773acfcd913a41d0e4ac50b5dc3daff8512c03f763c97b953
|