I confirmed that I could access http://localhost:11434/api/generate from the terminal and receive a response in JSON format. I also found that by adding stream: false ...