Environment Setup for Docura (Gemini)
Add your .env.local with Gemini credentials to power Docura’s intelligent document features.
How to add
npm install @google/generative-ai
How to use
// lib/gemini.ts
import { GoogleGenerativeAI } from "@google/generative-ai"
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY!)
export const model = genAI.getGenerativeModel({ model: "gemini-2.5-flash" })
🔑 Required Environment Variables
// .env.local # Gemini GEMINI_API_KEY_PAID=your_gemini_api_key BEARER_TOKEN=your_secure_bearer_token
📦 Installation
Use the following command to install the Gemini SDK:
npm install @google/generative-ai
🧠 Why These Keys Matter
- GEMINI_API_KEY: Used to generate embeddings, answer questions, and reason over documents.
- BEARER_TOKEN: Secures your Docura API endpoints with authentication headers.
These credentials allow Docura’s intelligent agent to read, analyze, and summarize your documents securely.
Learn more from Google Gemini Docs.