Building a Blog Title Generator with AI

TL;DR I built a blog title generator on my friend Ryan Robinson’s site using OpenAI’s API.

It’s incredible to finally see AI reach a usable point to built web products easily. I found OpenAI’s GPT-3 API which allows you to submit a “prompt” and get a response from their AI engine. Of course since I built this tool originally in 2022 AI has massively accelerated with the launch of models like GPT-4o.

I started to play around with OpenAI’s API to auto-write descriptions on my site SunriseSunset.io since I had no way to manually write city descriptions for 100,000+ cities.

AI city description on SunriseSunset.io

One of the key things to know about building AI powered tools is how to write prompts that return meaningful results. That’s kind of where the “magic” and creativity comes in. By giving GPT-4o more guidance and relevant information you’ll come out with better results. If you are new to prompts here is a full list of ChatGPT prompts for writers.

After experimenting on SunriseSunset I wanted to build something more useful and luckily my friend Ryan Robinson had the perfect use case.

Ryan needed a blog title generator for his blog which I figured it would be the perfect use of GPT-3. Other blog title generators seemed to just auto-fill your keyword into a preset list of phrases (how boring).

Example of a prompt and AI generated headlines using the OpenAI playground

Using GPT-3 (which stands for Generative Pre-trained Transformer) gives you the ability to dynamically fill a user’s need as if a person is replying. It’s really incredible what you can do. For example even if something has a typo the API will return what you expect.

Example output from the blog title generator

While the blog title generator can give you some great ideas for headlines it’s still recommended to modify them or write your own. It’s just kind of a super charged way to get inspiration for your post.

If you are planning on building a web tool with GPT-4o and OpenAI keep in mind it’s usage based pricing. So if you have a large prompt or a lot of users costs can add up quickly. You’ll likely want to add a captcha or some kind of rate limiting.

As you expand your AI application you can even add your own training models so you get more results you’d want. This is the next step for my learning and the blog title generator. We can feed in headlines and titles we know perform well for the AI to learn from to overall give better results to users.

Try out the blog title generator yourself and let me know how it works for you!

It’s going to be really incredible how these type of tools shape our in the coming years.

Leave a Comment