SecureClient verifies the enclave before sending any data — same attestation flow as Tinfoil’s inference API. Every request is authenticated against the container’s attestation report and TLS certificate.
You need two values to connect:
<CONTAINER_URL>— your container’s hostname (e.g.myapp.myorg.containers.tinfoil.dev)<CONFIG_REPO>— the GitHub repo linked to your container, inorg/repoformat
The Rust
SecureClient constructor retains an API-key argument for inference API compatibility, but raw requests through http_client() do not use it. Pass an empty string for custom containers, then add application authentication to individual requests if your service requires it.GET requests
POST requests
Using the local proxy
You can also connect to your container with the standalone Tinfoil Proxy CLI (tinfoil-proxy), which runs a local reverse proxy that verifies attestation and forwards requests:
http://localhost:3301 as if it were your container:
Using the CLI
For one-off verified requests without running a proxy, usetinfoil http:
-H, --header flags, such as -H "Authorization: Bearer <TOKEN>".
If you’ve logged in with tinfoil login, use tinfoil container connect <name> to skip looking up the container URL and config repo by hand — the CLI resolves both from the container name and starts the same verified proxy:
127.0.0.1 by default. Use --bind <ADDRESS> to choose another interface, for example when connecting from another container:

