OpenAI SDK review
OpenAI SDK is the official Python library for the OpenAI API, with typed sync and async clients generated from OpenAI's OpenAPI specification.
TL;DR
OpenAI SDK is the official Python library for calling the OpenAI REST API from Python 3.10+ applications. It is for Python developers building on OpenAI models. It ships typed requests and responses, sync and async clients, streaming, Realtime WebSocket support, and workload identity authentication for cloud environments.
- 32kGitHub stars
- +75new stars, week of Oct 25
- ~141.3Mdownloads a week, +9% vs 4-week avg
- #7in Model SDKs and gateways this week
OpenAI SDK at a glance
- Category
- Model SDKs and gateways
- Maintained by
- OpenAI (organization, @openai on GitHub)
- License
- Apache 2.0
- Language
- Python, JavaScript, Shell
- Repository
- github.com/openai/openai-python
- Website
- pypi.org/project/openai
- npm package
- openai 7.41.0
- PyPI package
- openai 3.36.0
- Latest release
- v3.36.0 on GitHub, Oct 21, 2026
- First published
- Oct 25, 2020
What OpenAI SDK does
- OpenAI SDK calls the Responses API and the Chat Completions API to generate text from OpenAI models.
- OpenAI SDK offers synchronous and asynchronous clients built on HTTPX2, with optional aiohttp transport for async concurrency.
- OpenAI SDK streams responses using Server-Sent Events in both sync and async clients.
- OpenAI SDK connects to the Realtime API over WebSockets for text and audio input and output, plus function calling.
- OpenAI SDK provides TypedDict request parameters and Pydantic response models with to_json() and to_dict() helpers.
- OpenAI SDK auto-paginates list methods, fetching successive pages as you iterate.
- OpenAI SDK supports workload identity authentication with short-lived tokens on Kubernetes, Azure, Google Cloud, X.509 mTLS, or custom providers.
How it works
You install the openai package and create an OpenAI or AsyncOpenAI client in Python code. The client reads OPENAI_API_KEY from the environment by default and sends requests to the OpenAI REST API over HTTPX2. Realtime sessions use the websockets library. The library is generated from OpenAI's OpenAPI specification.
How to install and start using OpenAI SDK
With pip
pip install openaiWith aiohttp transport
pip install openai[aiohttp]Requirements
- Python 3.10 or later.
- An OpenAI API key, or workload identity configuration in supported cloud environments.
First steps
- Install the package with pip install openai.
- Get an API key from the OpenAI platform and add OPENAI_API_KEY to a .env file, for example with python-dotenv.
- Create a client with OpenAI() and call client.responses.create with a model and input.
- Print response.output_text to see the generated text.
Who OpenAI SDK is for
- Python developers building applications on OpenAI models through the Responses or Chat Completions API.
- Teams running on Kubernetes, Azure, or Google Cloud that want short-lived tokens instead of long-lived API keys.
- Developers building low-latency text and audio conversational apps with the Realtime API.
Limitations to know
- OpenAI SDK targets the OpenAI API and requires Python 3.10 or later.
- OpenAI SDK X.509 workload identity supports HTTP APIs only. Realtime and WebSockets are not included, and Azure clients do not support it.
- OpenAI SDK raises no errors directly for Realtime error events, so your code must handle them.
Is OpenAI SDK growing? Usage data
In the week of Oct 25–31, 2026, OpenAI SDK ranked #180 on the Devtoolwatch Board and #7 in Model SDKs and gateways, with a momentum score of 47 out of 100. Its main package had about 141.3M downloads that week, +9% against its own 4-week average.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 62 |
| Aug 16, 2026 | 66 |
| Aug 23, 2026 | 76 |
| Aug 30, 2026 | 65 |
| Sep 6, 2026 | 75 |
| Sep 13, 2026 | 54 |
| Sep 20, 2026 | 62 |
| Sep 27, 2026 | 57 |
| Oct 4, 2026 | 76 |
| Oct 11, 2026 | 78 |
| Oct 18, 2026 | 94 |
| Oct 25, 2026 | 75 |
On Hacker News
- PyPI Was Subpoenaed, 1153 points and 597 comments (May 24, 2023)
- Black, the uncompromising Python code formatter, is stable, 500 points and 288 comments (Jan 29, 2022)
- ChatML: ChatGPT API expects a structured format, called Chat Markup Language, 336 points and 78 comments (Mar 1, 2023)
- Pypi.org is running a survey on the state of Python packaging, 234 points and 188 comments (Sep 7, 2022)
- Tariff: A Python package that imposes tariffs on Python imports, 221 points and 29 comments (Apr 14, 2025)
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
OpenAI SDK alternatives
Other LLM SDKs and gateways on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | thinking-orbsthinking-orbs is a React library of dotted, animated thought-orb loading indicators for AI and agent user interfaces. | 3.9k | 1.4M |
| #2 | HeadroomHeadroom compresses tool outputs, logs, files, and RAG chunks locally before they reach the LLM, as a library, proxy, or MCP server. | 78.5k | 125.8k |
| #3 | LiteLLMLiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface. | 62.5k | 23.1M |
| #4 | Honcho Memory library for building stateful agents | 7.9k | – |
| #5 | Anthropic SDKAnthropic SDK is the official Python library for calling the Claude API from Python applications. | 4k | 111M |
| #6 | Hugging Face HubHugging Face Hub is the official CLI and Python client for downloading, uploading and managing models, datasets and Spaces on the… | 4k | 68.3M |
Recent OpenAI SDK releases
OpenAI SDK FAQ
Is OpenAI SDK free and open source?
Yes. OpenAI SDK's source code is on GitHub (openai/openai-python) under the Apache 2.0 license, so you can use it for free.
How do I install OpenAI SDK?
Run pip install openai. It needs Node.js >=22.0.0. The install section above has the other options from the project's README.
Is OpenAI SDK still maintained?
Yes. The openai/openai-python repository was last updated on Oct 22, 2026, and the latest release, v3.36.0 on GitHub, came out on Oct 21, 2026.
How popular is OpenAI SDK?
OpenAI SDK has 32k GitHub stars as of Nov 1, 2026. It gained 75 new stars in the week of Oct 25–31, 2026, against a 12-week average of 70 a week. Its main package had about 141.3M downloads that week, +9% against its own 4-week average. That made it #7 among LLM SDKs and gateways on the Devtoolwatch Board.
OpenAI SDK vs OpenAI Agents SDK: how do they compare?
OpenAI SDK and OpenAI Agents SDK are both tracked by Devtoolwatch. OpenAI SDK has 32k GitHub stars and OpenAI Agents SDK has 30.4k. In the week of Oct 25–31, 2026, OpenAI SDK's main package had 141.3M downloads and OpenAI Agents SDK's had 6.9M. OpenAI Agents SDK is a Python framework from OpenAI for building multi-agent workflows with tools, handoffs, guardrails, sessions and tracing. OpenAI Agents SDK review.
OpenAI SDK vs LangChain: how do they compare?
OpenAI SDK and LangChain are both tracked by Devtoolwatch. OpenAI SDK has 32k GitHub stars and LangChain has 148.8k. In the week of Oct 25–31, 2026, OpenAI SDK's main package had 141.3M downloads and LangChain's had 41.1M. LangChain review.
What are the best alternatives to OpenAI SDK?
Other LLM SDKs and gateways on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: thinking-orbs (#1), Headroom (#2), LiteLLM (#3), Honcho (#4), Anthropic SDK (#5). The alternatives table above has their numbers.
What is the difference between the OpenAI SDK and the OpenAI API?
The OpenAI SDK is a Python library that wraps the OpenAI REST API. It adds typed requests and responses, sync and async clients, streaming, auto-pagination, and authentication helpers. The REST API documentation lives on platform.openai.com.
Should I use the Responses API or Chat Completions in the OpenAI SDK?
The README names the Responses API as the primary API for interacting with OpenAI models. Chat Completions is the previous standard and is supported indefinitely. The OpenAI SDK supports both.
Does the OpenAI SDK support async code?
Yes. The OpenAI SDK has an AsyncOpenAI client you use with await. Its functionality is otherwise identical to the sync client. You can optionally use aiohttp as the transport for better concurrency.
Is there a TypeScript version of the OpenAI SDK?
Yes. OpenAI publishes an official TypeScript library on npm under the name openai. It requires Node.js 22.0.0 or later.
Can the OpenAI SDK authenticate without an API key?
Yes. The OpenAI SDK supports workload identity authentication with short-lived tokens. Supported options are Kubernetes service accounts, Azure managed identity, Google Cloud metadata, custom JWT providers, and X.509 mutual TLS.
Sources
- openai/openai-python on GitHub
- OpenAI SDK README
- openai on npm
- openai on PyPI
- OpenAI SDK website
- Release v3.36.0 (Oct 21, 2026)
- Release v3.35.1 (Oct 18, 2026)
- Release v3.35.0 (Oct 17, 2026)
- Hacker News: PyPI Was Subpoenaed
- Hacker News: Black, the uncompromising Python code formatter, is stable
- Hacker News: ChatML: ChatGPT API expects a structured format, called Chat Markup Language
- Devtoolwatch Board, the week of Oct 25–31, 2026
OpenAI SDK README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/openai-sdk/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].