- via OpenAI's official text completion API
- using "text-davinci-003"
- not free, but you have some free credits to try it out
- need OPENAI_API_KEY
- Powered by transitive-bullshit/chatgpt-api
To deploy your instance of this API with Vercel, either click this button
or follow these steps:
- clone/fork this repository
- import this project into Vercel
- enter the environment variable OPENAI_API_KEY = your_openai_api_key
- API will be available at https://your-vercel-project-name.vercel.app/api/chat
- Note that the above URL is just an example. You can find your own URL in the Vercel dashboard.
{
"message": "Hello, how are you?"
}
e.g. curl
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"message": "Can you chat?"
}' \
'https://your-vercel-project-name.vercel.app/api/chat'
- Response
{
"response": "I can chat, but I'm not sure what you mean."
}