Feedback on first step documentation

In the API introductory documentation at this link instructions are given on how to authenticate in Python, Node.js and via curl.

Only the curl item includes the API key variable. The python and Node.js examples only include organization and project variables.

While it says to configure the API key as an environmental variable, we are not told how to supply those variables with the python script which authenticates.

So this is the example Python script. Note absense of Authorisation variable:

from openai import OpenAI

client = OpenAI(
  organization='org-*************************',
  project='$PROJECT_ID',
)

I recommend an update to specify exactly how API key is specified when using Python.

4 Likes