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.6.0"
".": "2.6.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 136
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-812a10f8fb54c584efc914422b574cb3f43dc238b5733b13f6a0b2308b7d9910.yml
openapi_spec_hash: 0222041ba12a5ff6b94924a834fa91a2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a3c45d9bd3bb25bf4eaa49b7fb473a00038293dec659ffaa44f624ded884abf4.yml
openapi_spec_hash: 9c20aaf786a0700dabd13d9865481c9e
config_hash: 50ee3382a63c021a9f821a935950e926
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.6.1 (2025-10-24)

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

### Bug Fixes

* **api:** docs updates ([d01a0c9](https://github.com/openai/openai-python/commit/d01a0c96ecb94c78b7e16546790c573704b7515b))


### Chores

* **client:** clean up custom translations code ([cfb9e25](https://github.com/openai/openai-python/commit/cfb9e25855b8eb020abe02cdd99566adf474e821))

## 2.6.0 (2025-10-20)

Full Changelog: [v2.5.0...v2.6.0](https://github.com/openai/openai-python/compare/v2.5.0...v2.6.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.6.0"
version = "2.6.1"
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.6.0" # x-release-please-version
__version__ = "2.6.1" # x-release-please-version
66 changes: 64 additions & 2 deletions src/openai/resources/audio/transcriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def create(
model: Union[str, AudioModel],
chunking_strategy: Optional[transcription_create_params.ChunkingStrategy] | Omit = omit,
include: List[TranscriptionInclude] | Omit = omit,
response_format: Union[Literal["json"], Omit] = omit,
language: str | Omit = omit,
prompt: str | Omit = omit,
response_format: Union[Literal["json"], Omit] = omit,
stream: Optional[Literal[False]] | Omit = omit,
temperature: float | Omit = omit,
timestamp_granularities: List[Literal["word", "segment"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -80,7 +81,68 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Transcription: ...
) -> Transcription:
"""
Transcribes audio into the input language.

Args:
file:
The audio file object (not file name) to transcribe, in one of these formats:
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

model: ID of the model to use. The options are `gpt-4o-transcribe`,
`gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source
Whisper V2 model).

chunking_strategy: Controls how the audio is cut into chunks. When set to `"auto"`, the server
first normalizes loudness and then uses voice activity detection (VAD) to choose
boundaries. `server_vad` object can be provided to tweak VAD detection
parameters manually. If unset, the audio is transcribed as a single block.

include: Additional information to include in the transcription response. `logprobs` will
return the log probabilities of the tokens in the response to understand the
model's confidence in the transcription. `logprobs` only works with
response_format set to `json` and only with the models `gpt-4o-transcribe` and
`gpt-4o-mini-transcribe`.

language: The language of the input audio. Supplying the input language in
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
format will improve accuracy and latency.

prompt: An optional text to guide the model's style or continue a previous audio
segment. The
[prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
should match the audio language.

response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
`verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`,
the only supported format is `json`.

stream: If set to true, the model response data will be streamed to the client as it is
generated using
[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
See the
[Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
for more information.

Note: Streaming is not supported for the `whisper-1` model and will be ignored.

temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
output more random, while lower values like 0.2 will make it more focused and
deterministic. If set to 0, the model will use
[log probability](https://en.wikipedia.org/wiki/Log_probability) to
automatically increase the temperature until certain thresholds are hit.

timestamp_granularities: The timestamp granularities to populate for this transcription.
`response_format` must be set `verbose_json` to use timestamp granularities.
Either or both of these options are supported: `word`, or `segment`. Note: There
is no additional latency for segment timestamps, but generating word timestamps
incurs additional latency.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
"""

@overload
def create(
Expand Down
54 changes: 26 additions & 28 deletions src/openai/resources/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,19 @@ def create(
up to 512 MB, and the size of all files uploaded by one organization can be up
to 1 TB.

The Assistants API supports files up to 2 million tokens and of specific file
types. See the
[Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for
details.

The Fine-tuning API only supports `.jsonl` files. The input also has certain
required formats for fine-tuning
[chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or
[completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
models.

The Batch API only supports `.jsonl` files up to 200 MB in size. The input also
has a specific required
[format](https://platform.openai.com/docs/api-reference/batch/request-input).
- The Assistants API supports files up to 2 million tokens and of specific file
types. See the
[Assistants Tools guide](https://platform.openai.com/docs/assistants/tools)
for details.
- The Fine-tuning API only supports `.jsonl` files. The input also has certain
required formats for fine-tuning
[chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input)
or
[completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
models.
- The Batch API only supports `.jsonl` files up to 200 MB in size. The input
also has a specific required
[format](https://platform.openai.com/docs/api-reference/batch/request-input).

Please [contact us](https://help.openai.com/) if you need to increase these
storage limits.
Expand Down Expand Up @@ -388,20 +387,19 @@ async def create(
up to 512 MB, and the size of all files uploaded by one organization can be up
to 1 TB.

The Assistants API supports files up to 2 million tokens and of specific file
types. See the
[Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for
details.

The Fine-tuning API only supports `.jsonl` files. The input also has certain
required formats for fine-tuning
[chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or
[completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
models.

The Batch API only supports `.jsonl` files up to 200 MB in size. The input also
has a specific required
[format](https://platform.openai.com/docs/api-reference/batch/request-input).
- The Assistants API supports files up to 2 million tokens and of specific file
types. See the
[Assistants Tools guide](https://platform.openai.com/docs/assistants/tools)
for details.
- The Fine-tuning API only supports `.jsonl` files. The input also has certain
required formats for fine-tuning
[chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input)
or
[completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
models.
- The Batch API only supports `.jsonl` files up to 200 MB in size. The input
also has a specific required
[format](https://platform.openai.com/docs/api-reference/batch/request-input).

Please [contact us](https://help.openai.com/) if you need to increase these
storage limits.
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/shared/reasoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ class Reasoning(BaseModel):
This can be useful for debugging and understanding the model's reasoning
process. One of `auto`, `concise`, or `detailed`.
`concise` is only supported for `computer-use-preview` models.
"""
2 changes: 2 additions & 0 deletions src/openai/types/shared_params/reasoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ class Reasoning(TypedDict, total=False):

This can be useful for debugging and understanding the model's reasoning
process. One of `auto`, `concise`, or `detailed`.

`concise` is only supported for `computer-use-preview` models.
"""