Go SDK
Go SDK for Tinfoil’s secure AI inference API
GitHub: tinfoil-go

Overview
The Tinfoil Go SDK is a wrapper around the OpenAI Go 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
New to Go? Start here - Project Setup
New to Go? Start here - Project Setup
If you don’t have a Go module set up yet, initialize a new one:
tinfoil-go currently relies on a specific feature in go-sev-guest that hasn’t been upstreamed yet. This requires adding the following line to your go.mod:
Migration from OpenAI
Migrating from OpenAI to Tinfoil is straightforward. The client is designed to be compatible with the OpenAI Go client:tinfoil.NewClient() returns a standard OpenAI client with built-in security features.
Usage
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
Qwen3-VL 30B
Qwen3-VL 30B
Llama 3.3 70B
Llama 3.3 70B
GPT-OSS 120B
GPT-OSS 120B
Qwen3 Coder 480B
Qwen3 Coder 480B
Qwen3 Coder 32B
Qwen3 Coder 32B
Audio Models
Whisper Large V3 Turbo
Whisper Large V3 Turbo
Embedding Models
Nomic Embed Text
Nomic Embed Text

