# openai/openai-python

The official Python library for the OpenAI API

Repository: https://github.com/openai/openai-python
Canonical: https://ross.abutalabs.com/products/openai-python
Homepage: https://pypi.org/project/openai/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: openai, python
Last push: 2026-08-27T00:28:48+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 2138, "days_push": 7, "days_rel": 7, "gap_med": 1.5, "n_releases_24m": 225}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 31467, forks 5145 (observed 2026-08-28T04:11:56.907325+00:00)

## What it is
The official Python client library for the OpenAI REST API, generated from OpenAI's OpenAPI specification. It provides typed, synchronous and asynchronous access to OpenAI models and services from Python 3.10+ applications.

## Use cases
- call GPT models from Python to generate text
- build a chatbot using the Chat Completions API
- use the Responses API for model interactions
- make async OpenAI API requests with httpx
- authenticate to OpenAI with API keys or workload identity
- embed OpenAI API calls in a backend service

## When to choose
- you are building a Python application or service that uses OpenAI models
- you want official, typed, auto-generated API coverage with sync and async clients
- you need up-to-date support for the latest OpenAI API features

## When to avoid
- you need a provider-agnostic LLM client that works across many vendors
- you are not using Python
- you want to run models locally without calling OpenAI's hosted API

## Facets
- artifact type: library
- maturity: stable
- function: http-client, sdk, llm-inference, auth
- domain: artificial-intelligence, large-language-models, apis, developer-tools
- platform: python, cross-platform
- tags: openai, api-client, gpt, chat-completions, responses-api, async, generated-client

## Member repositories
- openai/openai-python (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:56.907325+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:52:16.600222+00:00, confidence not recorded.
  - readme: https://github.com/openai/openai-python (fetched 2026-08-28T04:11:56.907325+00:00, sha 91d1a4ecb8aa)
  - homepage: https://pypi.org/project/openai/ (fetched 2026-08-29T07:49:14.619361+00:00, sha 6ba4e62daf76)
- Data as of 2026-08-30T08:39:29.467469+00:00.
