IndustryPeter Founder1.8k reads on WeChat中文原文

AI Media Buying: What to Do When Algorithms Learn to Buy Traffic

Cover: AI Media Buying: What to Do When Algorithms Learn to Buy Traffic

Keywords in this article: Claude Code, Gemini, ChatGPT, OBS Studio, PWA, Meta

The domain rotation system I mentioned in my last article is really just one practical example of AI inside a media buying setup.

Looking at the bigger picture, a lot of people keep asking: “Will AI algorithms replace media buyers?” Where does the media buyer’s path go from here, and what should we be trying as affiliates?

I think AI’s real value has never been replacing media buyers. It’s amplifying their efficiency and creativity. For a media buyer, AI isn’t an opponent, it’s leverage.

In this article I want to talk through a few cases: when algorithms start learning audiences, optimizing and buying traffic, what do we do? I’ll give three examples I use in my day-to-day work.

1. AI that writes, draws and crunches numbers: full automation from creatives to reports

Tools: Claude Code + Gemini + ChatGPT + Google Sheets

In a media buyer’s daily work, creatives and data upkeep take up the most time. Now both can be done automatically.

Claude Code handles code generation. It’s the best fit for connecting to the APIs of traffic sources and affiliate networks.

Gemini and ChatGPT handle copy and image creatives. For example, I first fine-tune 1-2 image ads by hand, then have them imitate those in bulk to generate 1:1 image ads for Facebook. The creatives that come out this way won’t be too far off.

Fourteen batch-generated 1:1 image ad creatives, numbered 1 to 14 and pixelated

Google Sheets is the warehouse and the timer hub for everything that gets generated.

For example, I use it to automatically consolidate all my reports every day at 12 midnight and send the results to Gmail: which ads brought in the most revenue, which regions had the highest ROI.

When your data comes from multiple trackers and multiple traffic sources, it saves you time. Of course there are other alternatives, like building your own tracking system. That will certainly take more time, too.

Daily Gmail report 'BeMob data updated' for 2025-11-08: totals, RollerAds revenue, top 3 campaigns, ROI sheet attached Gmail inbox with a 'BeMob data updated' report email every day from Nov 1 to 8, 2025, each with a Bemob_real_ROI sheet

2. Claude + Sora 2: from static images to video ad creatives

Tools: Claude Code + OBS Studio + Sora 2 (1–3 minutes to generate a 10–15 second video)

Making a 10-15 second video ad, even the simplest way, used to take several stages: script, motion effects, editing, export and so on.

Now that whole process can be almost fully automated.

Again, Claude Code plays the role of generating the underlying code: animated HTML.

OBS Studio handles the screen recording, automatically capturing the animation and turning it into video creatives for your campaigns.

OBS Studio browser source settings recording a local HTML animation at 1080x1920 with a custom 30 fps frame rate

Sora 2 generates video from AI prompts + a reference image. Combined with the first two, you can turn out creatives in bulk extremely fast.

You use AI to write the prompts (English prompts are recommended), then refine the video based on them. For Facebook/TikTok video ads, under 15 seconds works better. Repeat until you have the 3-5 videos you think are best, then remove the watermark with a third-party tool.

For example: I have Claude write the HTML for a “Zeus lightning effect”, record 10 seconds of it with OBS, then use ChatGPT to generate the copy and a reference image, and Sora 2 outputs versions in different styles based on the reference image and the prompt. That gives me 3–5 videos in different forms that I can use for A/B testing.

Drafts screen on a phone showing six AI-generated Zeus lightning videos, each in a different style

3. PWA Game: AI lets media buyers “build products” too

In the past, it was very hard for an affiliate to have a product of their own. But now, with AI tools, you can recreate a small game or tool of your own in just a few hours.

What is a PWA?

A PWA (Progressive Web App) is a web application built with HTML, CSS and JavaScript. You can think of it as a web version of an app.

I use Claude Code to quickly generate a game template, then feed it free images and assets, and the AI changes the color scheme, copy and reward logic. The finished PWA can have ads embedded, for example AdSense or a smartlink for monetization.

Affiliates used to depend on finding offers; now they can build them. AI can let you own a product of your own.

For example, you can build an incentive PWA app and run Facebook ads to it for traffic arbitrage.

Create PWA builder: landing page design settings with a phone preview of a Sweet Bonanza app install page

4. Closing: AI won’t replace media buyers, but media buyers who understand AI are more likely to make it through this tough fight

As I see it, the point of all this automated multiplication isn’t to have AI run our ads for us. It’s to make AI the bridge between us and the algorithms.

Platform algorithms keep evolving. Meta’s “Andromeda” algorithm can already judge whether a creative is good or bad in real time, and TikTok GMV Max has also shifted the focus to content marketing. In an era like this, creatives, content and audiences will all end up handed over to AI, and what a media buyer has left to hold onto is judgment and strategy.

I’ve also recently started dabbling in AI content creation on social media. 👉 If you’re interested, come swap notes with me on X.

Peter Yang's X profile @affnom_y: 10 years in Affiliate, paid traffic and AI ad automation, one-person company, Hong Kong