This is the code that comes in conjunction with a tutorial to build a React app using Cohere's Generate endpoint. Please note that this code isn't a perfect match to what is in the tutorial; I've removed some files and for the purposes of serving it as a sample I've consolidated the client and server into one folder for ease of deployment.
Try it here
Get your API key from Cohere and build your own at os.cohere.ai/register.