Data privacy
Data privacy is our top priority.
Hex offers first-class support for data privacy through initiatives like Workspace Magic opt-out, Bring Your Own Key (BYOK), and EU data residency.
Workspace Magic opt-out
Hex admins can opt-out their entire workspace from Magic from the Settings > Magic settings page. Opting out of Magic at the Magic settings-level will disable Magic for all users.

Third-party partner interactions
- Neither Hex nor our third-party model partners train models using data from Hex customers, which eliminates the risk of intellectual property leakage through passed context. This means a model won’t spit out your code to someone else. Our LLM providers have a zero retention policy, so your data is never stored.
- Hex uses Customer Database Metadata like schemas and Customer Data project code and output content as model context. This means that any sensitive information in your projects, table or column names, or in your code, could be passed to a model for inference.
- Magic is built on Hex’s secure data platform. These features are protected by secure practices and policies, are included in our third-party audits and bug bounty program, and safeguarded by the principle of least-privilege. You can learn more on our Data Privacy and Usage FAQ, Trust Center, and read our Hex Magic Product Specific Terms.
Bring Your Own Key (BYOK)
When using your own API key, please note that Hex does not take responsibility for any cost incurred by the API calls. We encourage you to set up billing alerts for your API keys to monitor usage and costs.
When you enable Magic, Enterprise admins can specify their own API key for Magic to use when making OpenAI API calls. This allows all OpenAI calls be be routed to the customer's own OpenAI instance. By specifying your own API key, all embedding requests in our RAG system will use your API key.
To use an API key generated in OpenAI, head to Settings > Magic and select the Add an API key button at the right side of the Model provider setting (Under Model settings).

Once a key has been added, you can add a new API key from the refresh button at the right side of the Model provider setting.
BYOK is currently only available for OpenAI, but support for Anthropic is coming soon. Please reach out to [email protected] if you'd like to use Anthropic for Magic.
EU data residency
By default, EU customers will use an EU OpenAI instance for Magic to ensure data is processed in the EU. This feature is only available to EU customers on EU Multi-tenant or Single-tenant stacks.
To learn more about how OpenAI handles EU data, please see OpenAI's EU Data Processing Addendum.