diff --git a/apps/backend/ideas.ts b/apps/backend/ideas.ts index 9ea66ec..316eaba 100644 --- a/apps/backend/ideas.ts +++ b/apps/backend/ideas.ts @@ -4,7 +4,9 @@ import prisma from "@repo/db/client"; import authMiddleware from "./middleware"; import { GoogleGenAI } from '@google/genai'; import {SystemPrompt} from "./constant" +import * as dotenv from 'dotenv'; +dotenv.config(); const router = express.Router(); // Schema validation for idea creation and updates @@ -109,7 +111,7 @@ router.post("/AIIdeaContent", authMiddleware, async (req: any, res: any) => { // Create Google Gemini AI instance const ai = new GoogleGenAI({ - apiKey: "AIzaSyAGXspPFiKkmicShhkyuGnUvqxuaWbBtKE", + apiKey: process.env.GEMINI_API_KEY , }); const config = {