Python SDK
Python SDK for Tinfoil’s secure AI inference API
GitHub: 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
DeepSeek V3.1 Terminus
DeepSeek V3.1 Terminus
DeepSeek R1
DeepSeek R1
Mistral Small 3.1 24B
Mistral Small 3.1 24B
Llama 3.3 70B
Llama 3.3 70B
GPT-OSS 120B
GPT-OSS 120B
Qwen3 Coder 480B
Qwen3 Coder 480B
Qwen 2.5 72B
Qwen 2.5 72B
Audio Models
Whisper Large V3 Turbo
Whisper Large V3 Turbo
Kokoro
Kokoro
Embedding Models
Nomic Embed Text
Nomic Embed Text
Async Usage
Simply importAsyncTinfoilAI instead of TinfoilAI and use await with each API call:

