Python SDK
Python SDK for Tinfoil’s secure AI inference API
GitHub: tinfoil-python
GitHub: tinfoil-python
Overview
The Tinfoil Python SDK provides a drop-in replacement for the official OpenAI Python client, adding automatic attestation verification for secure AI inference. It maintains full compatibility with the OpenAI interface while ensuring your data remains private and secure. View the source code on GitHub.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 R1 - deepseek-r1-0528
DeepSeek R1 - deepseek-r1-0528
Mistral Small 3.1 24B - mistral-small-3-1-24b
Mistral Small 3.1 24B - mistral-small-3-1-24b
Llama 3.3 70B - llama3-3-70b
Llama 3.3 70B - llama3-3-70b
Qwen 2.5 72B - qwen2-5-72b
Qwen 2.5 72B - qwen2-5-72b
Audio Models
Whisper Large V3 Turbo - whisper-large-v3-turbo
Whisper Large V3 Turbo - whisper-large-v3-turbo
Kokoro - kokoro
Kokoro - kokoro
Embedding Models
Nomic Embed Text - nomic-embed-text
Nomic Embed Text - nomic-embed-text
Async Usage
Simply importAsyncTinfoilAI
instead of TinfoilAI
and use await
with each API call: