AI ads creator
Study the ads your competitors are actually running, understand why they convert, and generate new ads for your brand: copy, images, and video scripts. All done by AI.
Follow the steps below to set everything up. Takes about 15 minutes.
Setup guide
Steps 1-8 are one-time setup. Steps 9-12 are how you use the tool every time.
VS Code is a free app from Microsoft. It's where you'll open and run the tool. Think of it like Word, but for code.
- Go to code.visualstudio.com
- Click the big Download button
- Open the downloaded file and install it like any other app
- On Mac: drag it into your Applications folder. On Windows: just click "Next" through the installer
Node.js is a small program that runs in the background. You install it once and forget about it. The tool needs it to work.
- Go to nodejs.org
- Click the big green button that says Download Node.js (LTS)
- Open the downloaded file and install it, clicking "Next" / "Continue" through everything, don't change any settings
That's it. You won't need to open Node.js ever again.
Claude Code is the AI assistant that helps you use this tool. It lives inside VS Code.
- Open VS Code
- On the left sidebar, click the Extensions icon (it looks like four small squares)
- In the search bar at the top, type Claude Code
- Find the one by Anthropic and click the blue Install button
- Once installed, it will ask you to sign in. Follow the prompts to create an account. It costs $20/mo on the pro plan (you can cancel anytime)
The tool is free and lives on GitHub (a site where people share code).
- Go to github.com/melnikoff-oleg/ads-ai
- Click the green <> Code button
- Click Download ZIP
- Find the downloaded ZIP file (usually in your Downloads folder) and double-click it to unzip
- You should now have a folder called Ads-AI-main. Move it somewhere easy to find, like your Desktop
- Open VS Code
- Click File in the top menu, then Open Folder...
- Find the Ads-AI-main folder you just downloaded and select it
- If VS Code asks "Do you trust the authors?", click Yes, I trust the authors
You should now see all the project files in the left sidebar.
API keys are like passwords that let the tool use different AI services. You need to sign up for each service (most have free trials) and copy the key they give you.
You need 5 keys. Here's where to get each one:
1. Anthropic (Claude AI) (writes your ad copy)
Go to console.anthropic.com, create an account, go to API Keys, click Create Key, and copy it
2. Google Gemini (analyzes your brand images)
Go to aistudio.google.com/apikey, sign in with your Google account, click Create API Key, and copy it
3. FireCrawl (reads your website)
Go to firecrawl.dev, create an account, and copy your API key from the dashboard
4. Apify (finds competitor ads on Meta)
Go to console.apify.com, create an account, go to Settings, then Integrations, and copy your API token
5. Kie.ai (generates ad images)
Go to kie.ai, create an account, and copy your API key
Save all 5 keys somewhere safe (like a notes app). You'll paste them in the next step.
- In VS Code, look at the left sidebar and find a file called .env.example
- Right-click on it and choose Rename
- Change the name from
.env.exampleto just.env(remove the word "example") and press Enter - Click on the file to open it. You'll see something like this:
ANTHROPIC_API_KEY=
GEMINI_API_KEY=
FIRECRAWL_API_KEY=
APIFY_API_TOKEN=
KIE_AI_API_KEY=- Paste each key right after the = sign, with no spaces. For example:
ANTHROPIC_API_KEY=sk-ant-abc123...
GEMINI_API_KEY=AIzaSy...
FIRECRAWL_API_KEY=fc-...
APIFY_API_TOKEN=apify_api...
KIE_AI_API_KEY=kie-...- Press Cmd+S (Mac) or Ctrl+S (Windows) to save the file
Now you'll use Claude Code to start the tool. This is the easiest part.
- In VS Code, click the Claude Code icon in the left sidebar (it looks like a sparkle ✦)
- A chat panel will open. Type this message and press Enter:
Install the app dependencies and start the dev server- Claude Code will run the commands for you. When it's done, it'll say the server is running.
- Open your web browser (Chrome, Safari, etc.) And go to Localhost:3000. You should see the tool
If anything goes wrong, just ask Claude Code in the chat. It can read the error and fix it for you.
Now the tool is running in your browser. The first thing to do is tell it about your brand.
- You should see the Brand page. If not, click Brand in the left sidebar
- Enter your Website URL (like https://yourbrand.com)
- Optionally add your Instagram handle (like @yourbrand)
- Click "Scrape Brand" and wait about 30 seconds
The tool will crawl your website, pull out your products, download your images, and build a complete brand profile. You'll see everything it found on the page.
- Click Competitors in the left sidebar
- You'll see suggested keywords based on your brand. You can edit them or add your own
- Click Search, and the tool will search the Meta Ad Library and find companies running ads in your space
- It ranks them by how long their ads have been running (longer = they're making money from those ads)
- Click What's Working in the left sidebar
- Click the Analyze button, and the AI will study the top 25 competitor ads
- Wait about a minute. When it's done, you'll see:
- The exact opening lines (hooks) that grab attention, and why they work
- Patterns across all the ads: what copy style, emotional angle, and visual approach keeps showing up
- Click Create in the left sidebar
- Choose how many ad concepts you want (start with 3 to test it out)
- Pick which of your products to feature
- Click Generate and wait a couple of minutes
- Each concept comes with:
- AI-written ad copy (headline, text, and call-to-action)
- An AI-generated image matching the competitor's visual style
- A side-by-side comparison so you can see the original ad next to yours
The tool automatically checks the quality of each concept. Only the good ones are shown.
If you get stuck
The things that actually go wrong, taken from the questions people ask under the video.
The terminal says “command not found: claude”
Installing the Claude Code extension in VS Code does not give you the Claude terminal command. The extension keeps a private copy for its own chat panel. That catches almost everyone, and it is not a broken setup.
To get the command, install Claude Code itself:
# macOS or Linux curl -fsSL https://claude.ai/install.sh | bash # Windows PowerShell irm https://claude.ai/install.ps1 | iex
Then close the terminal window completely and open a new one. Skipping that is the second most common reason it still says not found. Check it worked with Claude --version.
Still not found on a Mac? Your PATH is missing the folder, so run these two lines:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
Claude doctor prints a full health report if you are still stuck. And if you would rather never touch a terminal, the Claude Code desktop app does the same job with buttons.
One thing worth knowing before you install anything: Claude Code needs a paid Claude plan (Pro or higher) or an API account. The free claude.ai plan does not include it, so it can install perfectly and still refuse to sign you in.
There is no .env file in the folder I downloaded
Correct, and on purpose. .env is where your private keys live, so it is deliberately kept out of the repo. A public folder with someone else's API keys in it would be a gift to whoever found it.
You create it yourself, once. The projects now ship a .env.example to copy:
# macOS or Linux cp .env.example .env # Windows PowerShell Copy-Item .env.example .env
Or just make it by hand in VS Code: click the new file icon in the left panel and name it exactly .env, dot and all. Then paste your keys in, one per line, no quotes and no spaces around the =.
Put it in the project root, the folder that has CLAUDE.md in it, not inside app.
If you cannot see the file after making it, some setups hide files that start with a dot. It is there.
The pipeline fails with “429” or a quota error from Gemini
A 429 means you hit a quota on your Google AI key: too many requests per minute, or the daily cap. It is not a bug in the project, and no, this does not require a paid Gemini plan. The claim going round that the paid tier has a $200 minimum is wrong: that number is a spend limit in Google's docs, not an entry price.
Free ways to get under the limit:
- Analyse fewer items per run, lower the top-k and max videos
- Wait and try again: the daily quota resets at midnight Pacific, not 24 hours after your run
Check your own limits at aistudio.google.com/rate-limit. Google stopped publishing the free numbers in its docs, so that dashboard is the only accurate source.
If you get a 404 saying the model does not exist, that is different: Google retires models. List what your key can reach and set GEMINI_MODEL in your .env to one of them:
curl "https://generativelanguage.googleapis.com/v1/models?key=YOUR_KEY"
One warning: Google's pricing page says free tier content is used to improve their products. Do not push client material through a free key.
It says “credit balance too low, add funds”
That message is about the Anthropic API, which is prepaid pay per token. It is not about your Claude subscription, and a Pro or Max subscription never funds an API key. They are two different products with two different bills.
If you meant to use the API, add credit at platform.claude.com under Billing, and switch on auto reload so a long run cannot die halfway.
If you did not mean to use an API key, you probably have one sitting in your environment, and a key set there overrides your subscription login. Check with echo $ANTHROPIC_API_KEY on a Mac. If it prints something, remove it and run /login inside Claude Code to sign in with your subscription instead.
What does this actually cost to run?
Claude Code comes with a Claude subscription: Pro at $20/month, or Max from $100/month for five or twenty times the usage. Usage is included, there is no per-run charge. The free plan does not include Claude Code at all.
Inside Claude Code, /status tells you whether you are on a subscription or an API key, and /usage shows how close you are to your plan limit.
Prices and free tiers move. These were checked in August 2026.
Do I also need to pay for the API keys?
Yes, and it is a separate bill. Mixing the two up is what causes most of the confusion.
The API keys the pipelines use are pay per token, prepaid, and completely separate. A Claude subscription does not fund an API key.
The free tiers genuinely cover trying this out: Apify's free plan includes $5 of usage a month, and a scrape of a few dozen profiles costs cents. Google AI Studio has a free tier for the analysis.
Prices and free tiers move. These were checked in August 2026.