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

# Environment Variables

> Presenton can be customized and secured using environment variables. These variables control access, integrations, and model providers.

### 🔧 Core Configuration

* **`CAN_CHANGE_KEYS`**

  Controls whether users can view or modify API keys via the interface.
  Set to `"false"` to keep keys hidden and locked, or `"true"` to allow modification.

  *Example:*

  ```bash theme={null}
  CAN_CHANGE_KEYS="false"
  ```

* **`LLM`**

  Select the Large Language Model (LLM) provider to use.
  Supported values: `"openai"`, `"google"`, `"anthropic"`, `"ollama"`, `"custom"`

  *Example:*

  ```bash theme={null}
  LLM="openai"
  ```

* **`DISABLE_IMAGE_GENERATION`** *(optional)*

  Disables image generation for slides.
  Supported values: `"true"`, `"false"`

  *Example:*

  ```bash theme={null}
  DISABLE_IMAGE_GENERATION="true"
  ```

* **`DATABASE_URL`** *(optional)*

  Defines the external database connection URL.
  If not provided, the application will default to using SQLite for local storage.
  Supports both PostgreSQL and MySQL connection strings.

  *Examples:*

  ```bash theme={null}
  DATABASE_URL="postgresql://user:password@host:port/dbname"
  DATABASE_URL="mysql://user:password@host:port/dbname"
  ```

***

### 🧠 Model Provider Specific Variables

* **`WEB_GROUNDING`** *(Optional)*

  Uses web search and other tools to improve presentation quality.
  Supported LLM: `"openai"`, `"google"`, `"anthropic"`

  *Example:*

  ```bash theme={null}
  WEB_GROUNDING="true"
  ```

#### 🔹 OpenAI

* **`OPENAI_API_KEY`**

  Required if `LLM="openai"`

  *Example:*

  ```bash theme={null}
  OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxx"
  ```

* **`OPENAI_MODEL`** *(Optional)*

  Defaults to `gpt-4.1` if not specified

  *Example:*

  ```bash theme={null}
  OPENAI_MODEL="gpt-4o"
  ```

#### 🔹 Google

* **`GOOGLE_API_KEY`**

  Required if `LLM="google"`

  *Example:*

  ```bash theme={null}
  GOOGLE_API_KEY="AIzaSyXXXXXXXXXXXX"
  ```

* **`GOOGLE_MODEL`** *(Optional)*

  Defaults to `models/gemini-2.0-flash` if not specified

  *Example:*

  ```bash theme={null}
  GOOGLE_MODEL="models/gemini-1.5-pro"
  ```

> ⚠️ Image generation is not supported in EU regions with Google.

#### 🔹 Anthropic

* **`ANTHROPIC_API_KEY`**

  Required if `LLM="anthropic"`

  *Example:*

  ```bash theme={null}
  ANTHROPIC_API_KEY="sk-ant-xxxxxxxxxxxx"
  ```

* **`ANTHROPIC_MODEL`** *(Optional)*

  Defaults to `claude-3-5-sonnet-20241022` if not specified

  *Example:*

  ```bash theme={null}
  ANTHROPIC_MODEL="claude-3-opus-20240229"
  ```

#### 🔹 Ollama

* **`OLLAMA_URL`** *(Optional)*

  URL of your custom Ollama server. Useful if you're self-hosting.

  *Example:*

  ```bash theme={null}
  OLLAMA_URL="http://localhost:11434"
  ```

* **`OLLAMA_MODEL`**

  Required if `LLM="ollama"`

  *Example:*

  ```bash theme={null}
  OLLAMA_MODEL="llama3.2:3b"
  ```

#### 🔹 Custom (OpenAI-compatible LLMs)

* **`CUSTOM_LLM_URL`**

  Required if `LLM="custom"`

  *Example:*

  ```bash theme={null}
  CUSTOM_LLM_URL="https://api.your-custom-llm.com/v1"
  ```

* **`CUSTOM_LLM_API_KEY`** *(Optional)*

  API key for custom LLM provider

  *Example:*

  ```bash theme={null}
  CUSTOM_LLM_API_KEY="your_custom_key"
  ```

* **`CUSTOM_MODEL`**

  Required if `LLM="custom"`

  *Example:*

  ```bash theme={null}
  CUSTOM_MODEL="llama3.2:3b"
  ```

* **`TOOL_CALL`** *(Optional)*

  If `LLM="custom"`, uses Tool Call for structured outputs instead of JSON Schema.

  *Example:*

  ```bash theme={null}
  TOOL_CALL="true"
  ```

* **`DISABLE_THINKING`** *(Optional)*

  If `LLM="custom"`, disables thinking for Custom Models.

  *Example:*

  ```bash theme={null}
  DISABLE_THINKING="true"
  ```

***

### 🖼️ Image Providers

* **`IMAGE_PROVIDER`** *(Optional)*

  Select the image provider to use. If `DISABLE_IMAGE_GENERATION` is `"true"`, this variable is ignored.
  Supported values: `"dall-e-3"`, `"gpt-image-1.5"`, `"gemini_flash"`, `"nanobanana_pro"`, `"pexels"`, `"pixabay"`, `"comfyui"`

  *Example:*

  ```bash theme={null}
  IMAGE_PROVIDER="pexels"
  ```

#### 🔹 Pexels

* **`PEXELS_API_KEY`**

  Used to fetch high-quality stock images from [Pexels](https://www.pexels.com).

  *Example:*

  ```bash theme={null}
  PEXELS_API_KEY="vzXXXXXXXXXXXXXX"
  ```

#### 🔹 Pixabay

* **`PIXABAY_API_KEY`**

  Used to fetch stock images from [Pixabay](https://pixabay.com).

  *Example:*

  ```bash theme={null}
  PIXABAY_API_KEY="3883XXXXXXXXXXXXX"
  ```

#### 🔹 DALL·E 3

* **`OPENAI_API_KEY`**

  Required to generate images using DALL·E 3 via the OpenAI API.

  *Example:*

  ```bash theme={null}
  OPENAI_API_KEY="sk-XXXXXXXXXXXXXXXX"
  ```

* **`DALL_E_3_QUALITY`** *(Optional)*

  Controls the output quality. Supported values: `"standard"`, `"hd"` (default: `"standard"`).

  *Example:*

  ```bash theme={null}
  DALL_E_3_QUALITY="hd"
  ```

#### 🔹 GPT Image 1.5

* **`OPENAI_API_KEY`**

  Required if `IMAGE_PROVIDER="gpt-image-1.5"`.

  *Example:*

  ```bash theme={null}
  OPENAI_API_KEY="sk-XXXXXXXXXXXXXXXX"
  ```

* **`GPT_IMAGE_1_5_QUALITY`** *(Optional)*

  Controls the rendering quality. Supported values: `"low"`, `"medium"`, `"high"` (default: `"medium"`).

  *Example:*

  ```bash theme={null}
  GPT_IMAGE_1_5_QUALITY="high"
  ```

#### 🔹 Gemini Flash

* **`GOOGLE_API_KEY`**

  Used to access Gemini Flash Image generation.

  *Example:*

  ```bash theme={null}
  GOOGLE_API_KEY="AIzaSyXXXXXXXXXXXXXX"
  ```

#### 🔹 Nanobanana Pro

* **`GOOGLE_API_KEY`**

  Required if `IMAGE_PROVIDER="nanobanana_pro"`.

  *Example:*

  ```bash theme={null}
  GOOGLE_API_KEY="AIzaSyXXXXXXXXXXXXXX"
  ```

#### 🔹 ComfyUI

Use your local ComfyUI server for image generation. See [ComfyUI Integration](/configurations/comfyui-integration) for setup guide.

* **`COMFYUI_URL`**

  URL of your ComfyUI server.

  *Example:*

  ```bash theme={null}
  COMFYUI_URL="http://192.168.1.100:8188"
  ```

* **`COMFYUI_WORKFLOW`**

  The workflow JSON exported from ComfyUI using "Export (API)".
  Your prompt node must be renamed to **"Input Prompt"** in ComfyUI.

  *Example:*

  ```bash theme={null}
  COMFYUI_WORKFLOW='{"6":{"inputs":{"text":"placeholder","clip":["4",1]},"class_type":"CLIPTextEncode","_meta":{"title":"Input Prompt"}}}'
  ```

> 💡 For ComfyUI setup, it's recommended to configure via the Presenton Settings UI rather than environment variables, as workflow JSON can be large.

***

### 🐳 Docker Examples

**Using cloud providers:**

```bash theme={null}
docker run -it --name presenton -p 5000:80 \
  -e LLM="openai" \
  -e OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxx" \
  -e OPENAI_MODEL="gpt-4o" \
  -e CAN_CHANGE_KEYS="false" \
  -e IMAGE_PROVIDER="dall-e-3" \
  -v "./app_data:/app_data" \
  ghcr.io/presenton/presenton:latest
```

**Using Ollama with Pexels:**

```bash theme={null}
docker run -it --name presenton -p 5000:80 \
  -e LLM="ollama" \
  -e OLLAMA_MODEL="llama3.2:3b" \
  -e OLLAMA_URL="http://host.docker.internal:11434" \
  -e CAN_CHANGE_KEYS="false" \
  -e IMAGE_PROVIDER="pexels" \
  -e PEXELS_API_KEY="your_pexels_key" \
  -v "./app_data:/app_data" \
  ghcr.io/presenton/presenton:latest
```
