# Environment Variables

{% 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` |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.degirum.com/degirum-tools/environment-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
