🧬OpenAI SDK
Also known as OpenAI Client Library, OpenAI Python Library, openai Python package, OpenAI Node SDK
OpenAI's own code kit. Your code calls its models with one short function.
Think of it like
It is like a remote made for one TV. It knows every button on that TV.
Example
Jack's help bot uses the openai package for Python. Each question goes out in one function call. The answer text comes back ready to show.
Why it matters
Many other model makers accept the same request shape. So the same library can often reach them too, once you change the base URL.
Definition
Example code
python
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY
response = client.responses.create(
model="gpt-6-astra",
input="Hello there",
)
print(response.output_text)Common mistake
Key takeaways
- 1Python and JavaScript. Plus .NET, Java and Go.
- 2Key from the environment. OPENAI_API_KEY by default.
- 3Base URL can change. Reach other servers that copy the format.