Skip to content

Instantly share code, notes, and snippets.

@iceener
Created October 25, 2023 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iceener/9604bbaa7fbdaf144353b3874f2535e0 to your computer and use it in GitHub Desktop.
Save iceener/9604bbaa7fbdaf144353b3874f2535e0 to your computer and use it in GitHub Desktop.
Hello OpenAI
curl -X POST \
https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer OPENAI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"messages": [{ "role": "user", "content": "Hello!" }],
"model": "gpt-3.5-turbo"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment