> ## Documentation Index
> Fetch the complete documentation index at: https://docs.10x.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure environment variables for your app

> Store API keys and credentials in the Environment panel so the AI can reference them when generating networking code for your iOS app.

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.

<Warning>
  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.
</Warning>

## 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:

| Integration | Variables populated automatically             |
| ----------- | --------------------------------------------- |
| Supabase    | `SUPABASE_URL`, `SUPABASE_ANON_KEY`           |
| Superwall   | Superwall API key and application credentials |

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.

<Tip>
  See [Add a Supabase backend](/integrations/supabase) for a full walkthrough of linking your Supabase project.
</Tip>

## 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.

<Steps>
  <Step title="Open the Environment tab">
    In the preview panel, click **Environment**.
  </Step>

  <Step title="Add a new variable">
    Scroll below the Integrations section to the key-value store and click **Add variable** (or the `+` button).
  </Step>

  <Step title="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.
  </Step>

  <Step title="Save">
    Click **Save** to commit your changes. Unsaved changes are highlighted until you save.
  </Step>
</Steps>

## 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.
