skillfed

openai

The official Python library for the openai API

openai Permissive license Apache-2.0 Active 31,361 v3.0.0 released

Install

openai on PyPI

pip

pip install openai

uv

uv add openai

poetry

poetry add openai

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 8 — anyio, distro, httpx2, jiter, pydantic, sniffio, tqdm, typing-extensions
Maintenance actively maintained — 1 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: openai-3.0.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

About openai

from the package's own PyPI description — quoted content, verbatim

OpenAI Python API library

<!-- prettier-ignore --> PyPI version (image)

The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.10+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by HTTPX2.

It is generated from our OpenAPI specification with Stainless.

Documentation

The REST API documentation can be found on platform.openai.com. The full API of this library can be found in api.md.

Installation

# install from PyPI
pip install openai

Usage

The full API of this library can be found in api.md.

The primary API for interacting with OpenAI models is the Responses API. You can generate...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Official Python client library for the OpenAI REST API, providing synchronous and asynchronous access to OpenAI models with full type definitions and support for chat completions, responses, vision, and workload identity authentication.

Low install friction with a pure-wheel distribution and eight well-maintained runtime dependencies. Actively maintained with recent activity.

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects that comply with attribution and modification disclosure requirements.

Usage

pip install openai

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
response = client.chat.completions.create(
    model="gpt-5.5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Requires Python 3.10 or later and a valid OpenAI API key set in the OPENAI_API_KEY environment variable.

Verdict: A production-ready, actively maintained official library with no known vulnerabilities, low install friction, and permissive licensing. Suitable for any Python 3.10+ project needing OpenAI API access.

Needs verification

  • Repository engagement level and frequency of maintenance commits beyond the most recent activity.
  • Performance characteristics and resource overhead when handling high-volume concurrent requests with AsyncOpenAI.
  • Whether httpx2 as the default HTTP client introduces any compatibility constraints with specific network environments or proxies.
openai api python clientgpt chat completions libraryopenai python sdkasync openai clientopenai rest api wrapperpython openai integrationllm api client python

Similar packages