Making requests
You can paste the command below into your terminal to run your first API request. Make sure to replace $OXYGEN_API_KEY
with your secret API key.
This request queries the gpt-3.5-turbo
model (which under the hood points to the latest gpt-3.5-turbo
model variant) to complete the text starting with a prompt of "Say this is a test". You should get a response back that resembles the following:
Now that you've generated your first chat completion, let's break down the response object. We can see the finish_reason
is stop
which means the API returned the full chat completion generated by the model without running into any limits. In the choices list, we only generated a single message but you can set the n
parameter to generate multiple messages choices.
Last updated