
Getting started with the OpenAI API takes about 10 minutes.
pip install openai or npm install openaiOPENAI_API_KEY=sk-...from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Reference:
TaskLoco™ — The Sticky Note GOAT