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
64 changes: 35 additions & 29 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: 1fb36d8fe6994efc875680f153470832
docChecksum: 825bfff76c73da0325731e2ba8da4202
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
releaseVersion: 1.3.245
configChecksum: 6338d4a43a124214f78f5298a6854178
releaseVersion: 1.3.246
configChecksum: 733089b0d7ea60f53efbf118c34405af
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: f9afa0a4-3416-49a0-96b8-02d74b9f599a
pristine_commit_hash: 62ccc3fb84ee4d1f3c42fad184589190a3a50a34
pristine_tree_hash: ea647dc6e16e01d457e89add465d6e5e0d857f45
generation_id: 0ccec9dc-cb52-400c-834d-2dbaff752f32
pristine_commit_hash: 33ca665870b0d7595b2c3d5bc7cddfe9a36b1d25
pristine_tree_hash: 3d9d8d6d663094042cf4dbae0617d1bba8b25599
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -7000,8 +7000,8 @@ trackedFiles:
pristine_git_object: 62bc0076806110e866d63bf477349fe9753bdf3e
docs/components/outputdelivery.mdx:
id: 0cb4c1fb2927
last_write_checksum: sha1:02ea6a68e8275fbdc527358512bba85e9fedd347
pristine_git_object: 5604179c01583b203a9da51ce5229af8313ce25a
last_write_checksum: sha1:287cea36f48f7d2d6655d63c4e9f19affd64ccca
pristine_git_object: cfe9e59cce91f454ae3fb90790238537442aa6ce
docs/components/outputfilesearchcallitem.mdx:
id: 16f4409e4148
last_write_checksum: sha1:2ca9cc034ab3d2acb7456475d90ed65b7c65c8fd
Expand Down Expand Up @@ -8776,8 +8776,8 @@ trackedFiles:
pristine_git_object: f1efb6365d56d846e102d1b665590f58a6899211
docs/components/speechoutputmodality.mdx:
id: a3a222faacda
last_write_checksum: sha1:ea913bbcc3d82aec213fa2c9e0af21222a3dd8b2
pristine_git_object: 729223131c899c3ef139480ddffe22e1ccffa305
last_write_checksum: sha1:8db8112c874d4a736fd297653ca6172ea66d1964
pristine_git_object: 4fa75031d3033a6b1b90f6cb08e3e26f681899f5
docs/components/speechoutputmodalitytype.mdx:
id: bc216dcb8091
last_write_checksum: sha1:201cce4f72878e6efd47edf139626c1e02eab816
Expand All @@ -8800,8 +8800,8 @@ trackedFiles:
pristine_git_object: 38be122fce694e660cd56d82182dd3d15098479d
docs/components/speechrequest.mdx:
id: 06e81b0433f6
last_write_checksum: sha1:34aa30a244b4bfd300bc2ce9088dc7959ae04678
pristine_git_object: 20df033ed8bf659a2788ace32915adf6c6a74c70
last_write_checksum: sha1:e268d103d91677943e9f60afb8a0ca24737b9abd
pristine_git_object: 78a1e3b014fde528de3fe4c9142656d772d756ce
docs/components/speechrequestdatacollection.mdx:
id: 6c5938568888
last_write_checksum: sha1:89a08b4c4de66c1ef7676792a38747e030ed6729
Expand All @@ -8828,8 +8828,8 @@ trackedFiles:
pristine_git_object: 28816d7a32f629289c2a932e9c16a17183c25e69
docs/components/speechsupportedparameters.mdx:
id: e40d7c8fb1e4
last_write_checksum: sha1:aa79177157900a8673a1e31311462e645d933e29
pristine_git_object: 39378df792773716c59e56ca2bc1ec7c9131c93c
last_write_checksum: sha1:85a86a6a38fc75f87623b39af760eb7797c0a7f8
pristine_git_object: 0a99447929147a9acfcaf9820c75174b1a9a37b9
docs/components/speechturn.mdx:
id: ca90a4443e6e
last_write_checksum: sha1:68b0e3750740ff2ff4a34a5dd0a0f5a191e514f1
Expand Down Expand Up @@ -8958,6 +8958,10 @@ trackedFiles:
id: 2fb7934965aa
last_write_checksum: sha1:a5fc58c7a48c29f682beaa9f30accf1a620dd670
pristine_git_object: 7671de0f55c2bd170b86ffb4682ad9e456a11522
docs/components/streamformat.mdx:
id: dc7c965ef755
last_write_checksum: sha1:372eabd870bc2342257402dd2f216e518e88eb46
pristine_git_object: 515298891f1da610e8de86e3888ae4594b4100ef
docs/components/streamlogprob.mdx:
id: 67598a2734a4
last_write_checksum: sha1:6db1530f644e35f8f17710f4f21c66506eea27c0
Expand Down Expand Up @@ -12640,8 +12644,8 @@ trackedFiles:
pristine_git_object: bcbe30fccceb97caa3a0e170038245dcc7f1e540
docs/sdks/tts/README.mdx:
id: cd1132543884
last_write_checksum: sha1:dd814abd82b8fa498b0c84cd0af540c607132bd9
pristine_git_object: d3d9218fe4c68a3d282f0ce8e39f2186a0b8a47a
last_write_checksum: sha1:36bb84fe391df95e0bf15450e67603f3db106aef
pristine_git_object: fd28773bdc6c7e80c1cfb30dbf92605b8f7f9d96
docs/sdks/vault/README.mdx:
id: 3738c6722acd
last_write_checksum: sha1:290b439ff730b9eabf4a6ef93737d1c61006b0fa
Expand All @@ -12660,8 +12664,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:a25a37f94607cea1f1a1e29a8fe07b7782a9ba5e
pristine_git_object: cf2c0ea4c4d168070dade5b8faacf0487f69cc15
last_write_checksum: sha1:d133963a921ce2f638c14f9f3438cb1e6f491544
pristine_git_object: 6014e72ed8695b2464a75b7dd709d76399234208
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -12688,8 +12692,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:80be0f28207ade97310f5873fbc1a8135cc8ea47
pristine_git_object: 149b72e6a644f4f5f1efddc7f967bb8f6182d84b
last_write_checksum: sha1:6744ebf097cf9083395a410975c292993d61123a
pristine_git_object: afee1974f38b07507e67e3b8627fb3e745dad8db
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
Expand Down Expand Up @@ -12736,8 +12740,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:981d6840b9827a149a88da7d6c23c9c664484e0e
pristine_git_object: 45c3d7f6ca27f7e13d3b7393c5ddf30c221555df
last_write_checksum: sha1:62fb1463197a8ee9c06daaaa7d1736b60b399051
pristine_git_object: 799d8780225e137ac3294359f4eb11c64cc3c698
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:08125e1d60df82793e11e8aed6e3c9fdb7512ebb
Expand Down Expand Up @@ -16280,12 +16284,12 @@ trackedFiles:
pristine_git_object: 69c0355e7d575e6b7c52183d3cd5696611e4e8bf
src/openrouter/components/speechrequest.py:
id: 2a9400167112
last_write_checksum: sha1:bb959c5995e0d83ef9932e178c46e297d133fc85
pristine_git_object: 36c32a68f1b0d37c3ce89aea6e2eb3e4297170a7
last_write_checksum: sha1:e85707cc35ca5d629cd61e5814482297a3c2665d
pristine_git_object: b88af6a262e303cf6fc995d29b9cae87d9e4b907
src/openrouter/components/speechsupportedparameters.py:
id: 618f33cc9229
last_write_checksum: sha1:6f3fe1b11d56407227306a93fb6d232066158913
pristine_git_object: bea7e35329cb9b1b4f4ac2e7bb03306abd277d07
last_write_checksum: sha1:e05046fb9df89bd1c7ac118dec1c51f00de91007
pristine_git_object: c99fcc565b29c9053bb50a18561a4b38449998c3
src/openrouter/components/speechturn.py:
id: 121e0a940f91
last_write_checksum: sha1:31bdba00e027b81de8a3872d48e694475cf02e7a
Expand Down Expand Up @@ -17848,8 +17852,8 @@ trackedFiles:
pristine_git_object: 701fa8597ff85f41a60736ade55fcb32f9ec7125
src/openrouter/tts.py:
id: 5055d4b95f1d
last_write_checksum: sha1:f9d243bf8c8e10939d0ca1e4cf5bad9806012e6d
pristine_git_object: d88e0167943fe165376884e9634c47a37a04c1f2
last_write_checksum: sha1:3a0b902e83a6987d94dffb1a752582704b471643
pristine_git_object: 3fc05547bb566ec91045c6576eca6397ff9c3a9b
src/openrouter/types/__init__.py:
id: 5eab536205b7
last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9
Expand Down Expand Up @@ -23401,4 +23405,6 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.tts.create_speech()`: `request.response_format` **Changed**
* `open_router.tts.create_speech()`: `request.stream_format` **Added**
* `open_router.tts.list_models()`: `response.data[].endpoints[].output_modalities[].supported_parameters.stream_format` **Added**
* `open_router.tts.get_model()`: `response.endpoints[].output_modalities[].supported_parameters.stream_format` **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.245
version: 1.3.246
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
23 changes: 20 additions & 3 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37050,7 +37050,7 @@ components:
example: 'mistralai/voxtral-mini-tts-2603'
type: 'string'
output_delivery:
description: '`stream` (default) streams the audio bytes directly in the response body (or returns inline base64 JSON when `timestamp_granularities` is nonempty). `url` stores the generated audio in OpenRouter storage and returns a JSON response with a signed download `url`, `expires_at`, and `media_type` (plus `words` and/or `characters` when `timestamp_granularities` is nonempty). The URL is a bearer link: anyone holding it can download the audio until it expires, up to 24 hours after the audio was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. When a URL cannot be issued (zero-data-retention via account settings, guardrails, `provider.zdr`, or a ZDR endpoint; no workspace; or storage failure), untimed requests fall back to streaming raw audio bytes (except on a storage failure for responses larger than 10 MiB, which returns an error), and timed requests fall back to inline base64 JSON (`{audio, media_type, words?, characters?}`) with no `url`.'
description: '`stream` (default) streams the audio bytes directly in the response body (returns inline base64 JSON when `timestamp_granularities` is nonempty and `stream_format` is `"audio"`, or `text/event-stream` events when `stream_format` is `"sse"`). `url` stores the generated audio in OpenRouter storage and returns a JSON response with a signed download `url`, `expires_at`, and `media_type` (plus `words` and/or `characters` when `timestamp_granularities` is nonempty). The URL is a bearer link: anyone holding it can download the audio until it expires, up to 24 hours after the audio was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. When a URL cannot be issued (zero-data-retention via account settings, guardrails, `provider.zdr`, or a ZDR endpoint; no workspace; or storage failure), untimed requests fall back to streaming raw audio bytes (except on a storage failure for responses larger than 10 MiB, which returns an error), and timed requests fall back to inline base64 JSON (`{audio, media_type, words?, characters?}`) with no `url`.'
enum:
- 'stream'
- 'url'
Expand Down Expand Up @@ -37141,8 +37141,16 @@ components:
example: 1
format: 'double'
type: 'number'
stream_format:
description: 'Wire framing for inline responses. `audio` (default) returns raw audio bytes (or a buffered JSON envelope when `timestamp_granularities` is nonempty). `sse` streams `text/event-stream` events (`speech.audio.delta`, `speech.timestamps.delta` when `timestamp_granularities` is nonempty, `speech.audio.done`, and `error` on mid-stream failure) with the effective audio media type in `X-Audio-Media-Type`. Cannot be combined with `output_delivery: "url"`. Only routed to endpoints that advertise `sse` in `supported_parameters.stream_format` (and every requested granularity when `timestamp_granularities` is nonempty). Generated SDKs still type the 200 response as binary audio for compatibility; when using `stream_format: "sse"`, call the HTTP endpoint directly and parse `text/event-stream`.'
enum:
- 'audio'
- 'sse'
example: 'audio'
type: 'string'
x-speakeasy-unknown-values: allow
timestamp_granularities:
description: 'Timings to return with the audio. When nonempty, the response is JSON instead of raw audio bytes: `{audio, media_type, words?, characters?}` with base64 audio, or `{url, expires_at, media_type, words?, characters?}` when `output_delivery` is `url`. If a signed URL cannot be issued (ZDR, no workspace, or storage failure), timed `url` requests fall back to the inline `{audio, media_type, ...}` envelope with no `url`. The audio defaults to `mp3` unless `response_format` is set. Each timing entry is `{text, start, end}` in seconds. Only routed to endpoints that support every requested granularity (`supported_parameters.timestamp_granularities` on the speech models list). A timed response is sent once the whole audio is generated, not streamed, and is capped at 10 MiB of decoded audio for both inline and `url` delivery (the provider timed response, including its alignment data, is capped too); longer outputs return an error, so use a shorter input or a smaller audio format. Generated SDKs still type the 200 response as binary audio for compatibility; call the HTTP endpoint directly and parse the JSON response when using `timestamp_granularities`. An empty array is treated as no timings.'
description: 'Timings to return with the audio. With the default `stream_format: "audio"`, the response is buffered JSON instead of raw audio bytes: `{audio, media_type, words?, characters?}` with base64 audio, or `{url, expires_at, media_type, words?, characters?}` when `output_delivery` is `url`. If a signed URL cannot be issued (ZDR, no workspace, or storage failure), timed `url` requests fall back to the inline `{audio, media_type, ...}` envelope with no `url`. Buffered timed responses are sent once the whole audio is generated and are capped at 10 MiB of decoded audio (the provider timed response, including its alignment data, is capped too); longer outputs return an error, so use a shorter input, a smaller audio format, or `stream_format: "sse"`. With `stream_format: "sse"`, the response is `text/event-stream` (`speech.audio.delta`, `speech.timestamps.delta`, `speech.audio.done`, and `error` on mid-stream failure) with the effective audio media type in `X-Audio-Media-Type` and no 10 MiB cap. The audio defaults to `mp3` unless `response_format` is set. Each timing entry is `{text, start, end}` in seconds. Only routed to endpoints that support every requested granularity for the requested `stream_format`. Generated SDKs still type the 200 response as binary audio for compatibility; call the HTTP endpoint directly and parse JSON (for `stream_format: "audio"`) or `text/event-stream` (for `stream_format: "sse"`). An empty array is treated as no timings.'
example:
- 'word'
items:
Expand Down Expand Up @@ -37205,6 +37213,11 @@ components:
max: 4
min: 0.25
type: 'range'
stream_format:
type: 'enum'
values:
- 'audio'
- 'sse'
timestamp_granularities:
type: 'enum'
values:
Expand All @@ -37222,6 +37235,10 @@ components:
$ref: '#/components/schemas/SpeechEnumParameter'
speed:
$ref: '#/components/schemas/SpeechRangeParameter'
stream_format:
allOf:
- $ref: '#/components/schemas/SpeechEnumParameter'
- description: 'The `stream_format` values the endpoint supports (`audio`, `sse`).'
timestamp_granularities:
allOf:
- $ref: '#/components/schemas/SpeechEnumParameter'
Expand Down Expand Up @@ -44221,7 +44238,7 @@ paths:
example: '<binary audio data>'
format: 'binary'
type: 'string'
description: 'Raw audio bytes stream (`audio/*`) by default. When `output_delivery` is `"url"`, returns `application/json` with `{ url, expires_at, media_type }` (a 24-hour signed download URL) unless zero-data-retention or missing workspace causes fallback to raw audio streaming. When `timestamp_granularities` is nonempty, always returns `application/json`: `{ audio, media_type }` with base64 audio (`SpeechTimedAudioResponse`), or `{ url, expires_at, media_type }` with URL delivery (`SpeechTimedUrlResponse`), each with the requested `words` and/or `characters` timings. A timed `url` request that cannot get a signed URL (zero-data-retention, missing workspace, or storage failure) returns the inline `{ audio, media_type }` envelope with no `url`.'
description: 'Raw audio bytes stream (`audio/*`) by default. When `stream_format` is `"sse"`, returns `text/event-stream` with `X-Audio-Media-Type` set to the effective audio media type (exposed via `Access-Control-Expose-Headers`) and default SSE `data:` frames (no named `event:` field) carrying one JSON object per event discriminated by `type`: `{"type":"speech.audio.delta","audio":"<base64>"}` (base64-encoded audio chunk; decode each delta separately before concatenating bytes), `{"type":"speech.timestamps.delta","words"?:[{"text","start","end"}],"characters"?:[{"text","start","end"}]}` (when `timestamp_granularities` is nonempty; times in float seconds from start of output), `{"type":"speech.audio.done","media_type":"<mime>","usage"?:{"input_characters"?:number}}`, and `{"type":"error","error":{"message":"<string>"}}` on mid-stream failure. When `output_delivery` is `"url"`, returns `application/json` with `{ url, expires_at, media_type }` (a 24-hour signed download URL) unless zero-data-retention or missing workspace causes fallback to raw audio streaming. When `timestamp_granularities` is nonempty and `stream_format` is `"audio"` (default), returns `application/json`: `{ audio, media_type }` with base64 audio (`SpeechTimedAudioResponse`), or `{ url, expires_at, media_type }` with URL delivery (`SpeechTimedUrlResponse`), each with the requested `words` and/or `characters` timings. A timed `url` request that cannot get a signed URL (zero-data-retention, missing workspace, or storage failure) returns the inline `{ audio, media_type }` envelope with no `url`.'
'400':
content:
application/json:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:abd848ab874b2178f5ef217b5ab1bca1dd3d8cc83576ff06724b7662046252e8
sourceBlobDigest: sha256:0810de5494b24165640c0d306ea7c21db614f0256076ed663b82c9787eca1627
sourceRevisionDigest: sha256:8c4964898b84905744a337e016fd8360c795a9912330a03eeb6e6e2fde165a6b
sourceBlobDigest: sha256:b22c4c6acec0aa7b3978027ab90e094597af08bff4f7c6ae8c68c7dfaf13ca27
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:abd848ab874b2178f5ef217b5ab1bca1dd3d8cc83576ff06724b7662046252e8
sourceBlobDigest: sha256:0810de5494b24165640c0d306ea7c21db614f0256076ed663b82c9787eca1627
sourceRevisionDigest: sha256:8c4964898b84905744a337e016fd8360c795a9912330a03eeb6e6e2fde165a6b
sourceBlobDigest: sha256:b22c4c6acec0aa7b3978027ab90e094597af08bff4f7c6ae8c68c7dfaf13ca27
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:5c76b483511f9673002b40469512060c4181e44ccab7b4b8c6c3561563168570
codeSamplesRevisionDigest: sha256:09f29cdebc9b5e7a06992913784bee13d0d4c8d33921d1e9a9a4d5c664d9e647
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5219,4 +5219,14 @@ Based on:
### Generated
- [python v1.3.245] .
### Releases
- [PyPI v1.3.245] https://pypi.org/project/openrouter/1.3.245 - .
- [PyPI v1.3.245] https://pypi.org/project/openrouter/1.3.245 - .

## 2026-12-04 19:20:47
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.246] .
### Releases
- [PyPI v1.3.246] https://pypi.org/project/openrouter/1.3.246 - .
Loading