Create engaging social media captions instantly using AI.
This project is a modern AI-powered caption generator built with Next.js and the Groq API. Users can enter a topic, choose a platform and tone, and generate ready-to-post content with relevant hashtags in seconds.
Designed with simplicity and speed in mind, the app focuses on creating a clean user experience while exploring practical real-world applications of Generative AI.
- AI-generated social media captions
- Platform-specific content generation
- Multiple writing tones
- Smart hashtag generation
- One-click copy support
- Responsive modern UI
- Secure server-side API integration
- Fast AI responses powered by Groq
- TikTok
- X (Twitter)
- Professional
- Casual
- Funny
- Inspirational
- Excited
- Next.js 14
- React 18
- TypeScript
- Tailwind CSS
- Groq API
I wanted to build a lightweight AI tool that solves a simple but common problem: creating engaging captions for different social media platforms quickly.
The project also helped me explore:
- Generative AI workflows
- API integration
- Prompt engineering
- Full-stack development with Next.js
- Clean and responsive frontend design
User Input
|
Next.js API Route
|
Groq API
|
AI Generated Caption
|
Frontend Display
Clone the repository:
git clone https://github.com/zaid1234-11/genAI.gitInstall dependencies:
npm installCreate a .env.local file:
GROQ_API_KEY=your_groq_api_key
GROQ_MODEL=llama-3.3-70b-versatileStart the development server:
npm run devOpen:
http://localhost:3000Request:
{
"topic": "Launching an eco-friendly sneaker brand",
"platform": "Instagram",
"tone": "Excited"
}Response:
{
"success": true,
"post": "Big things are stepping in..."
}This project can be deployed easily using:
- Vercel
- Netlify
Environment variables required:
GROQ_API_KEY
GROQ_MODELThe API key is securely handled on the server side using Next.js API routes.
Avoid exposing keys publicly using:
NEXT_PUBLIC_GROQ_API_KEYPublic environment variables are visible in the browser.
- AI image caption support
- Multi-language generation
- Saved caption history
- Export options
- Social media scheduling integration
- Custom prompt templates
This project is licensed under the MIT License.


