Implement the Layercode Webhook SSE API in your Next.js API Routes backend.
GOOGLE_GENERATIVE_AI_API_KEY
- Your Google AI API keyLAYERCODE_API_KEY
- Your Layercode API key found in the Layercode dashboard settingsLAYERCODE_WEBHOOK_SECRET
- Your Layercode pipeline’s webhook secret, found in the Layercode dashboard (go to your pipeline, click Edit in the Your Backend Box and copy the webhook secret shown)NEXT_PUBLIC_LAYERCODE_PIPELINE_ID
- The Layercode pipeline ID for your voice agent. Find this ID in Layercode dashboard