
Dify is an open-source platform for building LLM applications. With Privatemode, every inference request is encrypted end to end and processed inside attested and verified confidential computing environments. Documents, embeddings, and conversations are stored on your infrastructure.
Building AI apps in Dify shouldn't mean exposing your data

Dify’s chatbots, agents, and workflows work best with powerful cloud models. With a conventional AI provider, however, prompts and document content used for RAG or embedding generation are available in plaintext during processing on the provider’s infrastructure. Self-hosting Dify does not change this.
The Privatemode proxy runs next to your Dify stack. Before any data leaves your system, the proxy uses remote attestation to verify that the Privatemode service is running in an expected confidential computing environment. Only after successful verification is the data encrypted and sent to that environment. Confidential computing protects the data during processing from both the infrastructure provider and us.
If you do not have a Privatemode API key yet, generate one for free here.
The proxy verifies the integrity of the Privatemode service using confidential computing-based remote attestation. The proxy also encrypts all data before sending and decrypts data it receives.
Clone Dify Community Edition and run the given commands. Open http://localhost and create your admin account. All services, including Postgres, Weaviate, and Redis, run locally.
In Dify, go to Settings, then Model Provider, then Marketplace, and search for OpenAI-API-Compatible to install it. This plugin handles the connection to Privatemode without any custom code.
Then add three model types in the Model Provider settings, all pointing to http://host.docker.internal:8080/v1:
Pick your model IDs from the Privatemode model overview. Set the API key to any placeholder value. Authentication is handled by the proxy.
You have successfully integrated Confidential AI into Dify. Create chatbots, agents, or knowledge bases using the configured models.
No. Dify's built-in OpenAI-API-Compatible plugin handles the connection. You configure model names and the base URL, then select the models in Dify apps.
Generate your free API key and set up confidential AI in Dify today.

Want to look for yourself?
