openai/openai-python
★ 31,486 stars
PythonThe official Python library for the OpenAI API
Transcript
Guessing request shapes and response fields by hand slows every integration. openai-python fixes that, generated from OpenAI's own OpenAPI specification with complete type definitions. It serves the Responses API and Chat Completions with synchronous and asynchronous clients, plus workload identity authentication for Kubernetes, Azure, and Google Cloud. It requires Python 3.10 or newer, and then you're generating text from OpenAI models.