You can paste the command below into your terminal to run your first API request. Make sure to replace $HYPRLAB_API_KEY with your secret API key.
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Say this is a test!"
}
]
}'
This request queries the gpt-3.5-turbo model to complete the text starting with a prompt of “Say this is a test”. You should get a response back that resembles the following: