ChatPDF Setup Guide

Get your ChatPDF up and running in 3 simple steps

1

Get GROQ API Key

GROQ provides fast AI inference. You'll need a free API key to use ChatPDF.

  1. Visit console.groq.com
  2. Sign up for a free account
  3. Navigate to API Keys section
  4. Create a new API key
  5. Copy your API key (keep it secure!)
2

Configure Environment

Create a .env.local file in your project root and add your API key:

# Add this to your .env.local file
NEXT_PUBLIC_GROQ_API_KEY=your_groq_api_key_here

Important: Never commit your API key to version control. The .env.local file should be in your .gitignore.

3

Test Your Setup

Restart your development server and test the PDF chat functionality:

npm run dev
Working correctly:
  • • "Ready to process PDFs" message
  • • PDF upload works
  • • Chat responses appear
Issues:
  • • "Service not ready" message
  • • API key configuration errors
  • • Chat not responding

Test Your API Key

You can test your API key here before using it in the application:

This only checks the format - your key is not sent anywhere.

Troubleshooting

Common Issues:

  • API key not working: Make sure you copied the full key and it's in .env.local
  • Service not ready: Restart your development server after adding the API key
  • PDF not processing: Check browser console for detailed error messages
  • Chat not responding: Verify your GROQ account has available credits

Need Help?

Check the browser console (F12) for detailed error messages, or visit the GROQ documentation for API-related issues.