> For the complete documentation index, see [llms.txt](https://docs.degirum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.degirum.com/degirum-tools/environment-variables.md).

# Environment Variables

A reference for constants and environment variables used by DeGirum Tools.

{% hint style="info" %}
This reference is based on DeGirum Tools version 0.24.1.
{% endhint %}

Environment variables supply defaults to scripts and applications built with DeGirum Tools. Storing environment variables in an `.env` or `env.ini` file automatically supplies default values.

### AI Hub, AI Server, and Model Zoos

| Variable                  | Purpose                                                                                                                                                                                                                                                                                                                                   | Example values                                                     |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| `AISERVER_HOSTNAME_OR_IP` | Address of an AI Server on your LAN for local inference. Used when `@local` or AI Server backends are selected.                                                                                                                                                                                                                           | `localhost`, `192.168.0.101`                                       |
| `CLOUD_ZOO_URL`           | Path to a model zoo on AI Hub or your own storage. Defaults to `degirum/public` if unset.                                                                                                                                                                                                                                                 | `degirum/degirum`, `degirum/public`                                |
| `DEGIRUM_CLOUD_TOKEN`     | API token for accessing AI Hub model zoos. Required when connecting with the `@cloud` backend. If not set, PySDK uses the token installed with the [CLI token command](https://docs.degirum.com/pysdk/user-guide-pysdk/command-line-interface#manage-ai-hub-tokens) (install subcommand). Set this variable to override the stored token. | Access token generated on the AI Hub.                              |
| `MODEL_ZOO_URL`           | Path or URL to a model zoo. Overrides the default zoo location if set.                                                                                                                                                                                                                                                                    | `/path/to/local/zoo`, <https://hub.degirum.com/workspace/my\\_zoo> |

### Input Devices

| Variable    | Purpose                                              | Example values            |
| ----------- | ---------------------------------------------------- | ------------------------- |
| `AUDIO_ID`  | Microphone index or WAV file path.                   | `0`, `input.wav`          |
| `CAMERA_ID` | Camera index or video path to capture video streams. | `0`, `rtsp://host/stream` |

### S3 Object Storage

| Variable        | Purpose                                                     | Example values     |
| --------------- | ----------------------------------------------------------- | ------------------ |
| `S3_ACCESS_KEY` | Access key for MinIO or other S3 compatible object storage. | `minio-access-key` |
| `S3_SECRET_KEY` | Secret key for object storage services.                     | `minio-secret-key` |
