Inspiration

In the X ecosystem, brand perception can shift in hours from a single viral thread or product drop. Traditional sentiment tools and human intuition are batch-processed and delayed; ad creation remains too manual and disconnected from true public opinion. XPulse closes this gap with an autonomous, Grok-powered advertising engine that continuously monitors public mentions, extracts sentiment and topics in real time, and generates fully-formed, on-brand ad campaigns—all integrated directly into ads.x.com.

What it does

  1. Increasing Traffic & Conversions: Delivering ads that target genuine user interest
  2. Real-Time Monitoring: Streams brand mentions via X API v2, filtering for relevance, intensity, and spam
  3. Insights and Analysis: Grok processes tweets in batches, detecting sarcasm, emotional intensity, and consolidating chatter into 5-8 high-signal topics
  4. Suggestion Layer: Grok generates prioritized recommendations with ready to post tweets.
  5. Multimodal Creative Generation: Produces 2-3 ad variants per suggestion, with a headline, body, CTA< hashtags, and photorealistic images/videos via grok-imagine-v0p9 and Pika Labs. All strictly matching the brand's visual and verbal style that has been derived and analyzed from historical tweets. We build fully formed ad campaigns in under 2 minutes.

How we built it

We integrated a full xAI ecosystem:

  • Grok (grok-4-1-fast-reasoning) for the sentiment analysis, topic consolidation, strategic suggestions, and ad copy generation
  • Grok Vision for creation of a "visual style guide" as well as image/ad generation
  • Pika Labs for video asset generation in video ads
  • VADER Sentiment for fast baseline sentiment scoring for our tweet streams
  • X API v2 for real time mention fetching and historical tweet data per brand
  • TypeScript

Challenges we ran into

  1. Getting Grok Imagine and Pika Labs to generate post-able quality videos.
  2. We solved this by going through historical tweets, ads, and brand posts into Grok to ground the models in the brand’s real marketing patterns, ensuring every generated asset matched the authentic look and voice.
  3. Converting noisy social chatter into actionable insights
  4. Took a lot from this article (https://docs.x.ai/cookbook/examples/sentiment_analysis_on_x) in order to ignore spam and filter for the most important sentiment/key words.
  5. Implementing a UI that makes sense.
  6. We decided to integrate our dashboard and engine into the ads.x.com website itself, through the use of a chrome extension (but we would be happy to code it directly for you guys!!)
  7. Real-time Responsiveness
  8. Balancing Grok call costs and latency while maintaining sub 2 minute execution (pivot to Vader instead of Grok for sentiment analysis) ## Accomplishments that we're proud of In 24 hours, we built an entire pipeline that goes from conversation, to insight, to ad generation that fits all within the X ecosystem. Not only do we create visual brand fidelity across all generated assets, but also the ability to enforce this tone over multi topic campaigns, managing various strategies that target awareness, engagement, conversion, and retention at the same time. We've seamlessly integrated this into ads.x.com, and it fits right into the ad creation workflow.

What we learned

We originally wanted to create an X crisis responder. This led us to realize that real-time intelligence is only valuable when it's immediately actionable. Not only knowing but UNDERSTANDING what people are saying and thinking is everything. Embedding insights directly where ads are created removes a large part of marketing that has long since been just guess work.

What's next for XPulse

We originally wanted access to the X Ads API, but unfortunately were unable to obtain it. Here's what we would have done with it:

  • Predictive ad performance scoring. Large scale A/B testing.
  • Auto-generated Ad Groups and campaigns. If you see an ad you like, it can immediately be implemented within the Ads page, along with strategic decisions regarding bidding, target demographics, etc.
  • Historical analysis of brand tone to include former advertisements and ads/posts across other platforms.

Thanks for reading through! We'd love to ship this for you guys :)

Built With

  • grok
Share this project:

Updates