Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Follow publication

Member-only story

How I Coded a Story Generator using OpenAI’s GPT-3.

Cee Lopez
Bootcamp
Published in
7 min readApr 14, 2023

Are you a writer who has writer’s block? Are you looking for inspiration for your next story? Look no further than OpenAI’s GPT-3 API. In this article, we will explore how to build a short story generator using OpenAI’s GPT-3 API.

What is OpenAI’s GPT-3 API?

OpenAI’s GPT-3 API is a language generation tool that uses deep learning to generate text. The model is trained on a large corpus of text and can generate text in a variety of styles and genres. It has been used to create everything from poetry to chatbots to computer code.

Image of the Final Product

Building a Short Story Generator

For this tutorial, we will be building a short story generator that takes user input and generates a short story based on that input. We will be using JavaScript and the Fetch API to make requests to the OpenAI GPT-3 API.

How to Get an OpenAI API Key

To use the OpenAI GPT-3 API, you’ll need to sign up for an OpenAI API key. Here’s how:

  1. Go to the OpenAI API page and click the “Sign Up for the API” button.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Bootcamp
Bootcamp

Published in Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

No responses yet

Write a response