1. Prepare an API key
Create or select an API key in the console and send it in theAuthorization header:
2. List available models
Call the model list first so you do not hard-code a model that is unavailable to the current key.id as the model name in later requests.
3. Send your first text request
choices[0].message.content.