Inspiration
We built Viralize to help marketers turn trending topics into ads quickly. Traditional tools are slow and miss real-time opportunities. We wanted a platform that uses Grok AI and real-time X data to generate ads from trends in seconds.
What it does
Viralize is an AI-powered ad generation platform that turns trending topics into video and image ads. It includes the option to generate both video and image based ads, a full-funnel campaign builder that generates strategy and 10–50 variants in one request, and a trends page with location-based filtering and one-click ad generation.
How we built it
We started with core ad generation using Grok API, then added video (OpenAI Sora) and image (xAI) support. Next, we integrated X API v2 for real-time trends and built a campaign builder that uses Grok’s structured outputs for reliable JSON parsing. We then polished the UX with streamlined navigation and error handling, and deployed on Firebase Functions with a Next.js frontend.
Challenges we ran into
Coordinating multiple APIs (Grok, xAI Image, OpenAI Sora, X API) required structured error handling and fallbacks. Ensuring consistent JSON from Grok led us to use structured outputs with fallback parsing. Keeping trends current and generating relevant ads required caching and location-based filtering. Video processing and base64 handling needed efficient memory management. TypeScript strict mode and Next.js SSR required proper interfaces and client-side guards.
Accomplishments that we're proud of
We built a platform that generates complete campaigns in seconds instead of hours, combining Grok AI, X trends, and multi-modal generation in one workflow. Generating 10–50 variants simultaneously enables better A/B testing and the real-time trend integration increases ad relevance by connecting to what’s trending.
What we learned
We learned to use Grok’s structured outputs for reliable parsing, integrate real-time X trends, and combine text, image, and video generation. On the product side, we saw that speed, context, and variety matter, since linking ads to trends improves relevance, and multiple variants improve testing. We also learned to handle complex API integrations, manage serverless architecture, and build production-ready error handling.
Built With
- firebase
- grok-api
- moviepy
- next.ks
- node.js
- openai-sora-api
- python
- react
- typescript
- x-api
Log in or sign up for Devpost to join the conversation.