--- id: openai version: "3.0.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openai — The official Python library for the openai API License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install openai uv add openai poetry add openai ## Description # OpenAI Python API library [![PyPI version](https://img.shields.io/pypi/v/openai.svg?label=pypi%20(stable))](https://pypi.org/project/openai/) 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](https://httpx2.pydantic.dev/). It is generated from our [OpenAPI specification](https://github.com/openai/openai-openapi) with [Stainless](https://stainlessapi.com/). ## Documentation The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs/api-reference). The full API of this library can be found in [api.md](https://github.com/openai/openai-python/tree/main/api.md). ## Installation ```sh # install from PyPI pip install openai ``` ## Usage The full API of this library can be found in [api.md](https://github.com/openai/openai-python/tree/main/api.md). The primary API for interacting with OpenAI models is the [Responses API](https://platform.openai.com/docs/api-reference/responses). You can generate... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/openai) · [View on PyPI](https://pypi.org/project/openai/)