Skip to main content
Environment variables in 10x are per-project key-value pairs that the AI reads when writing code that calls external services. Instead of hardcoding credentials in your prompts or generated source files, you store them here and the AI references them by key name automatically.
Never paste production secrets directly into your prompt. Use the Environment panel to store sensitive values so they stay out of your chat history and generated code.

Where to find environment variables

Click the Environment tab in the preview panel on the right side of 10x. The panel has two sections: Integrations at the top and a custom key-value store below it.

Managed integrations

Some integrations have dedicated setup flows that auto-populate the correct environment variables when you link them: When you connect one of these integrations, you don’t need to enter the values manually — 10x fills them in from your linked account. To set them up, click the integration row and follow the connection steps.
See Add a Supabase backend for a full walkthrough of linking your Supabase project.

Add a custom variable

For any other API your app needs — a third-party service, a REST endpoint, a private key — you can add your own key-value pairs.
1

Open the Environment tab

In the preview panel, click Environment.
2

Add a new variable

Scroll below the Integrations section to the key-value store and click Add variable (or the + button).
3

Enter the key and value

Type the variable name (e.g. OPENAI_API_KEY) and its value. The value is masked by default — click the field to reveal it.
4

Save

Click Save to commit your changes. Unsaved changes are highlighted until you save.

Sensitive values

All variable values are masked in the UI by default. Click a value field to reveal it. This applies to both custom variables and the values populated by managed integrations.

How the AI uses environment variables

When you ask the AI to add a feature that calls an external service, it looks at the keys you have configured and references them by name in the generated Swift code. For example, if you have OPENAI_API_KEY set, the AI will write code that reads that constant rather than embedding a placeholder string. The AI uses key names, not the raw values, when generating code. Your secrets are never written into the source files.