View on GitHub
tinfoilsh/tinfoil-python
Overview
The Tinfoil Python SDK is a wrapper around the OpenAI Python client that provides secure communication with Tinfoil enclaves. It has the same API as the OpenAI SDK with additional security features including automatic verification that the endpoint is running in a secure Tinfoil enclave, TLS certificate pinning, and attestation validation.Installation
Migration from OpenAI
Migrating from OpenAI to Tinfoil is straightforward:Model Examples
Below are specific examples for each supported model. Click on any model to see its configuration and usage example.Chat Models
GLM-5.2
GLM-5.2
Qwen3-VL 30B
Qwen3-VL 30B
Llama 3.3 70B
Llama 3.3 70B
GPT-OSS 120B
GPT-OSS 120B
Audio Models
Embedding Models
Nomic Embed Text
Nomic Embed Text
Async Usage
Simply importAsyncTinfoilAI instead of TinfoilAI and use await with each API call:

