Automate writing blog posts by openai's API
Get your API keys from the OpenAI dashboard and store as enviroment variables in a .env file.
See the .env.sample file for reference. Only the OPENAI_API_KEY
is required.
Steps -
- Clone this repo
- Install dependencies by running
npm i
oryarn
- Run the server using
yarn dev
- Make a post request to
http://localhost:5005/api/openai/createBlogPost
. You need to provide a body also with theprompt
string.
{
"prompt": "Should AI be writing blog articles"
}