OpenAI Python SDK
Official Python client for the OpenAI API, covering the Responses API, chat completions, embeddings, streaming and tool calling, with sync and async clients
Visit OpenAI Python SDK →The official Python client for OpenAI’s API — the Responses API (OpenAI’s recommended API for new projects), chat completions, embeddings, streaming responses and tool calling, all typed and with both sync and async clients built in. The Assistants API it used to wrap was shut down on 26 August 2026. The library is at version 3 (3.59.0 on 24 November 2026). Most Python projects calling OpenAI’s models directly use this rather than hand-rolling HTTP requests against the REST API.
Since the SDK only wraps the API itself, it doesn’t handle prompt orchestration, agent logic, or chaining multiple calls — that’s the layer frameworks like LangChain or DSPy sit on top of, often using this SDK underneath for the actual model calls. See What Is the OpenAI Python Library? for the full picture, including how it fits alongside Instructor and Pydantic AI.