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

# Environment Variables & Secrets

> Pass configuration and credentials into a sandbox

```bash CLI theme={null}
prime sandbox create python:3.11-slim \
  --env APP_ENV=staging \
  --env LOG_LEVEL=debug \
  --secret API_KEY=sk-abc123 \
  --secret DB_PASSWORD=hunter2
```

```python Python theme={null}
sandbox = client.create(
    CreateSandboxRequest(
        name="configured-runner",
        docker_image="python:3.11-slim",
        environment_vars={"APP_ENV": "staging", "LOG_LEVEL": "debug"},
        secrets={"API_KEY": "sk-abc123", "DB_PASSWORD": "hunter2"},
    )
)
```

Both are injected as standard environment variables. The CLI flags take `KEY=VALUE` and can repeat.

* **Environment variables** are stored in plain text and visible when you inspect the sandbox.
* **Secrets** are encrypted at rest, never returned in API responses, and obfuscated in CLI output. Use them for API keys, passwords, and anything you wouldn't want in logs.

For a single command, pass env vars on the command instead: see [Run a command](./commands#run-a-command).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.