Skip to main content

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

Documentation

Full guides, API reference, and examples: docs.truthlocks.com/sdk/openai

License

Apache 2.0 -- see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

truthlocks_openai-1.0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

truthlocks_openai-1.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

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

Hashes for truthlocks_openai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3fb4a69199bff69942ead208bf088aeffdfbddb7c98c5128ae2ed3693787c209
MD5 71866d59d6d7b1d4fcba068150ebe634
BLAKE2b-256 671b29d1a5c6697057d5b72295b98c66d8def54427ef1d21c8436db43748ca72

See more details on using hashes here.

File details

Details for the file truthlocks_openai-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for truthlocks_openai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6d05361b700bae107d1f0dfd7049f89e3d689c31ad68cd277f9ec29c3f0e83
MD5 d508379252f4b3efaeb4177386874f10
BLAKE2b-256 0161561fbf7cf30773acfcd913a41d0e4ac50b5dc3daff8512c03f763c97b953

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page