---
title: 环境变量
description: 了解 Geistdocs 中使用的环境变量
type: reference
summary: Geistdocs 所需的 AI 聊天和生产 URL 配置环境变量。
prerequisites:
  - /docs/getting-started
related:
  - /docs/configuration
  - /docs/deployment
---

Geistdocs 的某些功能需要设置特定的环境变量。

## `AI_GATEWAY_API_KEY`

AI 网关的 API 密钥。用于驱动 AI 聊天功能。

<Callout>部署到 Vercel 时会自动设置此项。</Callout>

## `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL`

Geistdocs 站点的生产环境 URL。部署到 Vercel 时会自动设置此项。

应采用 `localhost:3000` 的格式（即不带协议前缀）。这是 Vercel 在将项目部署时设置该环境变量的方式。