OpenAI’s official Python library for building applications that use the OpenAI API. Useful for developers who want to authenticate and make API requests from Python.
Project status
- Actively maintained: The repo shows frequent activity (latest upstream push on 2026-05-27) and multiple recent version updates, indicating ongoing development rather than maintenance mode.
- Cadence: Recent updates are arriving roughly every 1 to 2 weeks (v2.38.0 on 2026-05-21, v2.37.0 on 2026-05-15, v2.36.0 on 2026-05-07, v2.35.1 on 2026-05-06, v2.35.0 on 2026-05-06).
AI summary generated 5 days ago
Recent updates
v2.40.0
Yesterdayv2.40.0 adds support for Amazon Bedrock's OpenAI-compatible “Responses” API by introducing BedrockOpenAI and AsyncBedrockOpenAI clients. It also improves configuration so Bedrock API keys can be set directly on the client/module client. The bulk of the change is new Bedrock-specific client logic plus wiring into the library’s module client selection.
Featuresv2.39.0
Yesterdayv2.39.0 adds new Admin Organization audit log event types for workload identity providers, and introduces support for an additional_tools item in Responses/Conversation parsing. It also updates ActionSearch.query handling to be optional as described in the release notes. The code diff additionally introduces a new request parameter (personality) and updates prompt cache retention documentation, neither of which are mentioned in the release notes.
Featuresv2.38.0
1 week agoRelease v2.38.0 contains a largely automated OpenAPI/Stainless update, reflected by a very large number of generated model/type additions (+9938 lines, -18 lines deleted). The release notes are high-level and do not explicitly list concrete API surface changes, fixes, or breaking behavior.
v2.37.0
2 weeks agov2.37.0 adds a new optional request parameter, `service_tier`, to the Responses `compact` method. It also improves request validation for Pydantic iterators by eagerly validating iterable inputs, and adjusts workload identity auth to stop sending an unnecessary `client_id`.
BreakingFeaturesv2.36.0
3 weeks agov2.36.0 is a Realtime-focused release that expands the SDK surface for a new reasoning-capable model family and a new whisper transcription path. The release notes only mention “manual updates” and “realtime 2”, but the code also introduces new configuration types, new model enum values, and a Realtime session response shape change that is not called out in the notes.
Featuresv2.35.1
3 weeks agoThis is a targeted patch release that fixes a regression in image generation size handling. The generated client types and image resource signatures were regenerated to explicitly enumerate supported size values, while the runtime behavior appears unchanged beyond the accepted request schema.
v2.35.0
3 weeks agov2.35.0 is mostly a cleanup and API-refresh release: it updates image-related API support, applies manual schema/API adjustments, and removes the legacy Python CLI entrypoint. The diff is dominated by deleting the old CLI implementation, so most of the user-visible impact is around command-line tooling rather than core SDK behavior.
BreakingFeaturesv2.34.0
4 weeks agoThis release expands the SDK's admin-API surface and refactors authentication so credentials can be selected per request, while also adding env-driven custom headers and several auth/type fixes. It also includes a multipart-copy performance optimization and a broad set of generated admin/manual endpoint updates.
Featuresv2.33.0
1 month agoThis release is a small OpenAPI-driven refresh of the generated OpenAI Python client. The only explicitly documented user-facing change is a prompt-cache enum correction from `in-memory` to `in_memory`, alongside a general API update and CI cleanup.
BreakingFeaturesv2.32.0
1 month agov2.32.0 adds richer input-file metadata and significantly expands the websocket stack with reconnect support, event-handler hooks, and buffered sends for realtime/streaming clients. It also includes a serialization bug fix for file data and refreshed examples.
Featuresv2.31.0
1 month agov2.31.0 adds support for short‑lived tokens, sending raw data over WebSockets, and a new conversations.message.phase field. It also fixes query‑param merging to preserve hardcoded params and adjusts type definitions (removal of web_search_call.results from ResponseIncludable), which may require minor changes for typed clients.
BreakingFeaturesv2.30.0
2 months agov2.30.0 adds a new keys field for several computer (mouse) actions and tightens SDK response typings/schema alignment. Important type/response-shape changes (including making ResponseInputMessageItem.type required) may require code/type updates before upgrading.
BreakingFeaturesv2.29.0
2 months agoThis release (v2.29.0) adds support for new model slugs (5.4 nano and mini), extends the Batches create API to accept a /v1/videos endpoint, introduces new fields/operators (ToolFunction.defer_loading and ComparisonFilter 'in'/'nin'), and includes a couple of compatibility bug fixes. Developers should pay attention to a dependency bump for typing-extensions and a change in pydantic serialization behavior that may affect output shape.
BreakingFeaturesv2.28.0
2 months agoThis release adds first-class support for custom voices in the client API, enabling use of custom voice models (likely for text-to-speech/audio) from the SDK. No other changes or breaking changes are documented in the release notes, so upgrade risk appears low—review the API docs for the new endpoints/methods before adopting.
Featuresv2.27.0
2 months agoThis release expands the Sora/video surface area with character creation plus video edit/extend workflows, and it also refreshes the Realtime/Responses WebSocket plumbing. The codegen update adds several new video types/endpoints and tweaks request handling around video uploads.
Featuresv2.26.0
2 months agoThis release makes the ComputerTool GA and switches its implementation to a new class (noted in the notes as "CompuerTool"). The previously named tool identifier 'computer_use_preview' has been moved/renamed to ComputerUsePreview — this is likely to require updating imports/references before upgrading.
BreakingFeaturesv2.25.0
2 months agoThis release adds the gpt-5.4 model plus two new tool types (a tool search tool and a computer tool). It also removes the responses.prompt_cache_key field (breaking) and contains schema fixes and a subsequent re-add of the message 'phase' field—verify message schemas after upgrading.
BreakingFeaturesv2.24.0
3 months agov2.24.0 introduces a new 'phase' API surface and corrects related enum and documentation issues. There are no other functional changes; internal tests and SSE parsing were refactored but should not affect public API behavior.
Featuresv2.23.0
3 months agov2.23.0 introduces two new model options for realtime calls: gpt-realtime-1.5 and gpt-audio-1.5. There are no breaking changes mentioned; the only other change is an internal test resilience update.
Featuresv2.22.0
3 months agoThis release adds WebSocket support to the Responses API and introduces ability to pass request options into SSE classes (internal). Documentation was updated — notably a batch size limit for file_batches was documented and safety_identifier usage in chat/responses was clarified. No breaking changes are listed.
Features