OpenAI Python SDK
AI & LLMsThe official Python library for the OpenAI API
Release History
v2.15.0v2.14.01 fix2 featuresThis release introduces support for new audio model slugs and standardizes model parameters to accept strings, alongside a fix for asynchronous file handling in patch requests.
v2.13.01 featureThis release introduces support for the gpt-image-1.5 model and includes internal client updates and CI improvements for the Agents SDK.
v2.12.03 featuresRelease 2.12.0 introduces general API updates, including support for sora-2 dated slugs and modifications to the grader input list.
v2.11.01 featureThis release introduces support for the gpt 5.2 API model.
v2.10.0Breaking1 fix1 featureRelease 2.10.0 introduces a breaking change making the 'model' parameter mandatory for the responses/compact endpoint and improves type inference for pyright users.
v2.9.03 fixes2 featuresRelease 2.9.0 introduces support for the gpt-5.1-codex-max model and includes critical bug fixes for stream management and client configuration handling.
v2.8.11 fixA patch release focused on aligning input and output item types for TypeScript compatibility.
v2.8.01 fix1 featureRelease 2.8.0 introduces support for the gpt 5.1 model and provides bug fixes for Pydantic v1 method signatures.
v2.7.2Breaking1 fixThis release drops support for Python 3.8 and introduces compatibility fixes for Python 3.14.
v2.7.11 fixThis patch release fixes a bug regarding the nullability of logprobs in the API response.
v2.7.0Breaking3 fixes3 featuresRelease 2.7.0 introduces Realtime API token limits and hybrid search ranking options, while fixing resource leaks in uploads and stream handling.
v2.6.11 fixThis is a patch release focused on documentation updates and internal code cleanup for custom translations.
v2.6.01 fix1 featureThis release introduces a new input token count field to API responses and includes internal updates to the OpenAPI specification.
v2.5.01 featureMinor release featuring an API update and a version bump for the httpx-aiohttp dependency.
v2.4.01 featureThis release introduces support for the gpt-4o-transcribe-diarize model on the audio transcriptions endpoint.
v2.3.01 featureRelease 2.3.0 introduces new comparison filters for the API and updates the jiter dependency to support Python 3.14.
v2.2.01 fix1 featureThis release introduces new API features for Dev Day 2025 and includes a bug fix to include chatkit in the beta resource.
v2.1.01 featureThis release introduces support for Realtime API calls to the OpenAI Python SDK.
v2.0.11 fixThis patch release includes a bug fix for MCP tool calls, adding missing status and approval request ID fields.
v2.0.0Breaking2 featuresThis major release introduces support for multi-modal function call outputs (images and files) and BatchUsage, while changing the output type of tool call response items from string to a union type.
v1.109.11 fixThis patch release addresses a compatibility bug with older versions of Pydantic when handling additional fields.
v1.109.01 featureThis release introduces support for the gpt-5-codex model to the OpenAI Python SDK.
v1.108.21 fix1 featureThis patch release focuses on fixing MCP tool naming and updating OpenAPI definitions for conversations, alongside minor internal script improvements.
v1.108.1Breaking1 featureThis release introduces the reasoning_text field to the API and updates internal type handling for optional parameters from NotGiven to Omit.
v1.108.01 featureThis release introduces type updates for conversations and reasoning effort in evaluations, alongside internal Pydantic dependency maintenance.
v1.107.3This is a maintenance release focused on internal API documentation refactoring, specification updates, and test simplification.
v1.107.2This patch release includes minor documentation and type updates for the realtime API, along with internal test simplifications.
v1.107.11 fixThis patch release focuses on correcting type definitions for the Realtime API following its General Availability.
v1.107.01 featureThis release introduces the API shape for RealtimeGA and includes internal codegen updates.
v1.106.1This patch release focuses on internal maintenance by moving mypy configurations to the pyproject.toml file.
v1.106.02 featuresThis release introduces support for dynamic API keys via callables and enhances forward compatibility with Pydantic v3.
v1.105.01 featureThis release introduces support for the new gpt-realtime models in the OpenAI API.
v1.104.21 fixVersion 1.104.2 is a maintenance patch that restores type aliases for web search tools to fix potential type-checking regressions.
v1.104.11 featureThis patch release includes manual updates to the ResponseInputAudio API components.
v1.104.01 fix1 featureThis release focuses on internal type safety improvements by replacing List[str] with SequenceNotStr in various parameter definitions.
v1.103.01 fix1 featureThis release introduces updates to the Realtime API and fixes a bug where parameters were missing from the stream() method.
v1.102.01 fix1 featureThis release introduces web search filters to the API and fixes a bug related to modern type syntax usage.
v1.101.02 featuresThis release introduces support for the /v1/conversations endpoint and adds connector support for MCP tools.
v1.100.3This is a maintenance release focused on internal CI improvements, specifically setting up breaking change detection.
v1.100.21 fixThis patch release updates the internal API representation for the verbosity parameter in Chat Completions to ensure accurate data shaping.
v1.100.11 fixThis patch release reverts an accidental deletion of response text configuration types to ensure type consistency.
v1.100.01 featureThis release introduces new text parameters and expiration options to the API.
v1.99.91 fixThis patch release specifically addresses a typing issue within the ChatCompletionMessageToolCall class.
v1.99.82 fixesRelease 1.99.8 focuses on internal test improvements and reverts a breaking change to the ChatCompletionMessageToolCallUnion type.
v1.99.7Breaking2 fixesRelease 1.99.7 focuses on fixing type definitions by reverting ChatCompletionMessageToolCallParam to a TypedDict.
v1.99.61 fixThis release focuses on improving type exports for tool calls and internal maintenance updates.
v1.99.51 fixThis patch release fixes a bug regarding the location of the verbosity parameter within the Responses class.
v1.99.4Breaking2 fixesThis patch release focuses on type definition fixes, specifically reverting ChatCompletionToolParam to a TypedDict and renaming internal chat completion tool types.
v1.99.31 fixThis patch release restores the missing 'output_text' field to response objects.
v1.99.21 fix1 featureThis release introduces support for GPT-5 and associated API features, alongside a fix for tool-related type definitions.
v1.99.11 fixThis patch release addresses a bug regarding internal event imports.
v1.99.01 fix2 featuresThis release introduces support for file upload requests and adds missing prompt cache parameters to the client.
v1.98.01 featureThis release includes manual updates to the API.
v1.97.2This patch release includes internal refactoring of the streaming client for future-proofing and adds VS Code project settings.
v1.97.12 fixesThis patch release focuses on improving parsing logic for metadata and extra field types, alongside internal API event shape refinements.
v1.97.01 featureThis release includes manual updates to the API definitions.
v1.96.11 featureThis patch release updates the internal Realtime API specifications.
v1.96.02 featuresThis release focuses on internal maintenance, including environment call-out cleanup and updates to the Realtime API specifications.
v1.95.11 fixThis patch release fixes a bug in the client where Content-Type headers were incorrectly being sent during GET requests.
v1.95.01 fix2 featuresThis release introduces file_url support to the API and includes minor fixes for event IDs and README rendering on PyPI.
v1.94.01 featureRelease 1.94.0 improves API error messaging specifically for missing embeddings.
v1.93.31 fixThis patch release addresses a bug in the parsing logic to correctly handle nested discriminated unions.
v1.93.21 featureThis maintenance release adds official support for Python 3.13 and updates the internal h11 dependency constraint.
v1.93.14 fixesThis patch release focuses on fixing missing arguments in vector store file polling methods and response parsing, alongside CI improvements.
v1.93.01 featureThis release introduces CLI support for managing fine-tuning jobs.
v1.92.31 fixThis patch release fixes an encoding error triggered by empty API keys and updates documentation regarding macOS requirements for realtime examples.
v1.92.2BreakingThis maintenance release removes an unsupported 'api' property from the library.
v1.92.11 featureThis patch release focuses on internal client synchronization for streaming and parsing methods, alongside documentation updates for Webhooks.
v1.92.01 fix2 featuresThis release introduces support for webhooks and deep research, while promoting the 'stream' and 'parse' client methods from beta to stable.
v1.91.01 featureThis release updates the API shapes for usage tracking and the code interpreter tool.
v1.90.01 featureVersion 1.90.0 updates the API to make the 'model' and 'inputs' parameters optional during response creation.
v1.89.01 fix1 featureThis release introduces support for the aiohttp library within the client and includes minor bug fixes for the test suite.
v1.88.01 featureThis release includes manual API updates and internal CI improvements.
v1.87.01 fix1 featureThis release introduces support for reusable prompt IDs and fixes an issue with service_tier updates in the beta chat completions client.
v1.86.01 featureThis release adds support for the o3-pro model IDs to the OpenAI API.
v1.85.01 fix1 featureThis release introduces support for tools and structured outputs in evaluations and fixes an issue to allow raw responses within the parse() method.
v1.84.02 featuresThis release introduces support for new Realtime and Audio models along with expanded session options and internal type name updates.
v1.83.02 fixes2 featuresThis release introduces a new follow_redirects option and binary content support for container files, while deprecating the Assistants API and fixing code interpreter interfaces.
v1.82.11 fixThis patch release fixes a bug in response re-serialization and updates internal release workflows.
v1.82.01 fix1 featureThis release introduces new streaming helpers for background API responses and fixes an issue where Azure image edit endpoints were not correctly identified as deployment endpoints.
v1.81.01 featureThis release introduces support for a new container endpoint in the OpenAI API.
v1.80.01 featureVersion 1.80.0 introduces new API tools and includes minor documentation grammar improvements.
v1.79.01 fix4 featuresThis release focuses on expanding the Evals and Assistants API schemas and includes a fix for the audio transcription endpoint.
v1.78.12 fixes1 featureThis patch release focuses on internal maintenance, fixing linting errors and enabling support for direct resource imports.
v1.78.01 fix1 featureThis release introduces support for the reinforcement fine-tuning API and optimizes performance through lazy imports for resources and module-level clients.
v1.77.02 fixes2 featuresVersion 1.77.0 introduces support for reasoning encryption and new image sizes, alongside bug fixes for whitespace parsing.
v1.76.2This patch release includes internal API specification cleanup and maintenance chores.
v1.76.11 featureThis patch release improves the handling of JSON-related content-type headers and includes internal CI updates for the repository.
v1.76.03 fixes1 featureThis release introduces support for new image models and improves compatibility with Pydantic v1 by making ModelField annotation checks more robust.
v1.75.01 featureThis release adds support for the new o3 and o4-mini model identifiers to the API.
v1.74.1This patch release focuses on internal maintenance, including updates to the base client and a bump to the pyright version.
v1.74.01 fix1 featureThis release introduces support for the gpt-4.1 model family and includes a bug fix for Azure asynchronous filter events.
v1.73.02 fixes1 featureThis release introduces manual API updates and performance optimizations, specifically improving the handling of NotGiven values and hot paths.
v1.72.01 featureThis release introduces the evalapi to the SDK and includes internal improvements to examples, performance, and tests.
v1.71.0Breaking1 featureThis release includes manual API updates, adds support for websockets v15, and removes the deprecated remote spec feature.
v1.70.01 featureThis release introduces a new API endpoint to retrieve input items for a specific response ID.
v1.69.01 fix1 featureThis release introduces a GET method for chat completions and fixes a parsing issue with audio transcription stream events.
v1.68.2BreakingThis release performs a refactor to rename the 'audio' package extra to 'voice_helpers'.
v1.68.1Breaking3 fixesRelease 1.68.1 focuses on codebase cleanup by removing duplicate types and modules, and optimizes the package size by making sounddevice and numpy optional dependencies.