Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.19.0"
".": "2.20.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 148
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7debfce2217c66ea87bfddaa244b57de4062dd7fd766fa9a28e869614205c040.yml
openapi_spec_hash: e910fc478b8449134e2af1dc15fd33f7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-47ef7e0aaa2f2052404041650c9b4d7d8c9c51c45ef2cb081548f329c3f81a6a.yml
openapi_spec_hash: 0207b30cf74121a12c1647e25463cee9
config_hash: 8dca0f2dc2706c07cf2f8d0ed4dc062e
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.20.0 (2026-02-10)

Full Changelog: [v2.19.0...v2.20.0](https://github.com/openai/openai-python/compare/v2.19.0...v2.20.0)

### Features

* **api:** support for images in batch api ([28edb6e](https://github.com/openai/openai-python/commit/28edb6e1b7eb30dbb7be49979cee7882e8889264))

## 2.19.0 (2026-02-10)

Full Changelog: [v2.18.0...v2.19.0](https://github.com/openai/openai-python/compare/v2.18.0...v2.19.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "2.19.0"
version = "2.20.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "2.19.0" # x-release-please-version
__version__ = "2.20.0" # x-release-please-version
28 changes: 20 additions & 8 deletions src/openai/resources/batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ def create(
*,
completion_window: Literal["24h"],
endpoint: Literal[
"/v1/responses", "/v1/chat/completions", "/v1/embeddings", "/v1/completions", "/v1/moderations"
"/v1/responses",
"/v1/chat/completions",
"/v1/embeddings",
"/v1/completions",
"/v1/moderations",
"/v1/images/generations",
"/v1/images/edits",
],
input_file_id: str,
metadata: Optional[Metadata] | Omit = omit,
Expand All @@ -68,9 +74,9 @@ def create(

endpoint: The endpoint to be used for all requests in the batch. Currently
`/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`,
and `/v1/moderations` are supported. Note that `/v1/embeddings` batches are also
restricted to a maximum of 50,000 embedding inputs across all requests in the
batch.
`/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are
supported. Note that `/v1/embeddings` batches are also restricted to a maximum
of 50,000 embedding inputs across all requests in the batch.

input_file_id: The ID of an uploaded file that contains requests for the new batch.

Expand Down Expand Up @@ -265,7 +271,13 @@ async def create(
*,
completion_window: Literal["24h"],
endpoint: Literal[
"/v1/responses", "/v1/chat/completions", "/v1/embeddings", "/v1/completions", "/v1/moderations"
"/v1/responses",
"/v1/chat/completions",
"/v1/embeddings",
"/v1/completions",
"/v1/moderations",
"/v1/images/generations",
"/v1/images/edits",
],
input_file_id: str,
metadata: Optional[Metadata] | Omit = omit,
Expand All @@ -286,9 +298,9 @@ async def create(

endpoint: The endpoint to be used for all requests in the batch. Currently
`/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`,
and `/v1/moderations` are supported. Note that `/v1/embeddings` batches are also
restricted to a maximum of 50,000 embedding inputs across all requests in the
batch.
`/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are
supported. Note that `/v1/embeddings` batches are also restricted to a maximum
of 50,000 embedding inputs across all requests in the batch.

input_file_id: The ID of an uploaded file that contains requests for the new batch.

Expand Down
17 changes: 13 additions & 4 deletions src/openai/types/batch_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ class BatchCreateParams(TypedDict, total=False):
"""

endpoint: Required[
Literal["/v1/responses", "/v1/chat/completions", "/v1/embeddings", "/v1/completions", "/v1/moderations"]
Literal[
"/v1/responses",
"/v1/chat/completions",
"/v1/embeddings",
"/v1/completions",
"/v1/moderations",
"/v1/images/generations",
"/v1/images/edits",
]
]
"""The endpoint to be used for all requests in the batch.

Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`,
`/v1/completions`, and `/v1/moderations` are supported. Note that
`/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding
inputs across all requests in the batch.
`/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and
`/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also
restricted to a maximum of 50,000 embedding inputs across all requests in the
batch.
"""

input_file_id: Required[str]
Expand Down