Skip to content

Commit 6fb3970

Browse files
committed
## Python SDK Changes:
* `open_router.stt.create_transcription()`: * `request` **Changed** * `response` **Changed** * `open_router.stt.create_transcription_multipart()`: * `request` **Changed** * `response` **Changed** * `open_router.datasets.get_rankings_daily()`: `request` **Changed**
1 parent 2c673c0 commit 6fb3970

41 files changed

Lines changed: 1163 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.speakeasy/gen.lock‎

Lines changed: 105 additions & 52 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ generation:
3636
documentation: mintlify
3737
preApplyUnionDiscriminators: true
3838
python:
39-
version: 0.11.6
39+
version: 0.11.7
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 248 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20687,11 +20687,28 @@ components:
2068720687
options:
2068820688
$ref: '#/components/schemas/ProviderOptions'
2068920689
type: object
20690+
response_format:
20691+
description: >-
20692+
Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers.
20693+
enum:
20694+
- json
20695+
- verbose_json
20696+
example: json
20697+
type: string
20698+
x-speakeasy-unknown-values: allow
2069020699
temperature:
2069120700
description: Sampling temperature for transcription
2069220701
example: 0
2069320702
format: double
2069420703
type: number
20704+
timestamp_granularities:
20705+
description: >-
20706+
Timestamp detail levels to include when response_format is "verbose_json". "segment" returns segment-level timestamps; "word" additionally returns word-level timestamps in the words array. Ignored unless response_format is "verbose_json".
20707+
example:
20708+
- segment
20709+
items:
20710+
$ref: '#/components/schemas/STTTimestampGranularity'
20711+
type: array
2069520712
required:
2069620713
- model
2069720714
- input_audio
@@ -20707,16 +20724,113 @@ components:
2070720724
seconds: 9.2
2070820725
total_tokens: 113
2070920726
properties:
20727+
duration:
20728+
description: Duration of the input audio in seconds, present when response_format is verbose_json
20729+
example: 9.2
20730+
format: double
20731+
type: number
20732+
language:
20733+
description: Detected or forced language, present when response_format is verbose_json
20734+
example: english
20735+
type: string
20736+
segments:
20737+
description: Timestamped transcript segments, present when response_format is verbose_json
20738+
items:
20739+
$ref: '#/components/schemas/STTSegment'
20740+
type: array
20741+
task:
20742+
description: The task performed, present when response_format is verbose_json
20743+
example: transcribe
20744+
type: string
2071020745
text:
2071120746
description: The transcribed text
2071220747
example: >-
2071320748
Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees.
2071420749
type: string
2071520750
usage:
2071620751
$ref: '#/components/schemas/STTUsage'
20752+
words:
20753+
description: Timestamped words, present when the provider returns word-level timestamps
20754+
items:
20755+
$ref: '#/components/schemas/STTWord'
20756+
type: array
2071720757
required:
2071820758
- text
2071920759
type: object
20760+
STTSegment:
20761+
description: A timestamped transcript segment, returned when response_format is verbose_json
20762+
example:
20763+
avg_logprob: -0.28
20764+
compression_ratio: 1.13
20765+
end: 3.2
20766+
id: 0
20767+
no_speech_prob: 0.01
20768+
seek: 0
20769+
start: 0
20770+
temperature: 0
20771+
text: Hello there.
20772+
tokens:
20773+
- 50364
20774+
- 2425
20775+
- 456
20776+
properties:
20777+
avg_logprob:
20778+
description: Average log probability of the segment
20779+
format: double
20780+
type: number
20781+
compression_ratio:
20782+
description: Compression ratio of the segment
20783+
format: double
20784+
type: number
20785+
end:
20786+
description: Segment end time in seconds
20787+
example: 3.2
20788+
format: double
20789+
type: number
20790+
id:
20791+
description: Segment index within the transcript
20792+
example: 0
20793+
type: integer
20794+
no_speech_prob:
20795+
description: Probability the segment contains no speech
20796+
format: double
20797+
type: number
20798+
seek:
20799+
description: Seek offset of the segment
20800+
example: 0
20801+
type: integer
20802+
start:
20803+
description: Segment start time in seconds
20804+
example: 0
20805+
format: double
20806+
type: number
20807+
temperature:
20808+
description: Temperature used for the segment
20809+
format: double
20810+
type: number
20811+
text:
20812+
description: Transcribed text of the segment
20813+
example: Hello there.
20814+
type: string
20815+
tokens:
20816+
description: Token IDs of the segment
20817+
items:
20818+
type: integer
20819+
type: array
20820+
required:
20821+
- id
20822+
- start
20823+
- end
20824+
- text
20825+
type: object
20826+
STTTimestampGranularity:
20827+
description: A timestamp detail level for verbose_json transcription responses.
20828+
enum:
20829+
- word
20830+
- segment
20831+
example: word
20832+
type: string
20833+
x-speakeasy-unknown-values: allow
2072020834
STTUsage:
2072120835
description: Aggregated usage statistics for the request
2072220836
example:
@@ -20749,6 +20863,32 @@ components:
2074920863
example: 113
2075020864
type: integer
2075120865
type: object
20866+
STTWord:
20867+
description: A timestamped word, returned when the provider includes word-level timestamps
20868+
example:
20869+
end: 0.4
20870+
start: 0
20871+
word: Hello
20872+
properties:
20873+
end:
20874+
description: Word end time in seconds
20875+
example: 0.4
20876+
format: double
20877+
type: number
20878+
start:
20879+
description: Word start time in seconds
20880+
example: 0
20881+
format: double
20882+
type: number
20883+
word:
20884+
description: The transcribed word
20885+
example: Hello
20886+
type: string
20887+
required:
20888+
- word
20889+
- start
20890+
- end
20891+
type: object
2075220892
SubagentNestedTool:
2075320893
additionalProperties:
2075420894
nullable: true
@@ -23747,13 +23887,26 @@ paths:
2374723887
description: The model to use for transcription.
2374823888
type: string
2374923889
response_format:
23750-
description: The response format. Only "json" is supported.
23890+
description: >-
23891+
The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
2375123892
enum:
2375223893
- json
23894+
- verbose_json
2375323895
type: string
23896+
x-speakeasy-unknown-values: allow
2375423897
temperature:
2375523898
description: The sampling temperature.
2375623899
type: number
23900+
timestamp_granularities[]:
23901+
description: >-
23902+
Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array.
23903+
items:
23904+
enum:
23905+
- word
23906+
- segment
23907+
type: string
23908+
x-speakeasy-unknown-values: allow
23909+
type: array
2375723910
required:
2375823911
- file
2375923912
- model
@@ -25507,6 +25660,13 @@ paths:
2550725660
reserved permaslug `other` and is always returned last within its date, so callers
2550825661
can compute `top-50 traffic / total daily traffic` without a second request.
2550925662

25663+
Optional filters slice the dataset. `period` (`day`/`week`/`month`) sets the time
25664+
grain. `modality` and `context_bucket` narrow the exact dataset by output/input
25665+
modality (or tool-calling activity) and request context length. `category` and
25666+
`language_type` instead read a sampled, upsampled dataset whose `total_tokens` are
25667+
weekly-grain estimates — they cannot be combined with each other or with the exact
25668+
filters, and reject `period=day` with a 400.
25669+
2551025670
Authenticate with any valid OpenRouter API key (same key used for inference).
2551125671
Rate-limited to 30 requests/minute per key and 500 requests/day per account.
2551225672

@@ -25541,6 +25701,93 @@ paths:
2554125701
example: '2026-05-11'
2554225702
pattern: ^\d{4}-\d{2}-\d{2}$
2554325703
type: string
25704+
- description: >-
25705+
Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.
25706+
in: query
25707+
name: period
25708+
required: false
25709+
schema:
25710+
description: >-
25711+
Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.
25712+
enum:
25713+
- day
25714+
- week
25715+
- month
25716+
example: day
25717+
type: string
25718+
x-speakeasy-unknown-values: allow
25719+
- description: >-
25720+
Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.
25721+
in: query
25722+
name: modality
25723+
required: false
25724+
schema:
25725+
description: >-
25726+
Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.
25727+
enum:
25728+
- text
25729+
- image
25730+
- image_output
25731+
- audio
25732+
- tool_calling
25733+
example: text
25734+
type: string
25735+
x-speakeasy-unknown-values: allow
25736+
- description: >-
25737+
Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.
25738+
in: query
25739+
name: context_bucket
25740+
required: false
25741+
schema:
25742+
description: >-
25743+
Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.
25744+
enum:
25745+
- 1K
25746+
- 10K
25747+
- 100K
25748+
- 1M
25749+
- 10M
25750+
example: 100K
25751+
type: string
25752+
x-speakeasy-unknown-values: allow
25753+
- description: >-
25754+
Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
25755+
in: query
25756+
name: category
25757+
required: false
25758+
schema:
25759+
description: >-
25760+
Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
25761+
enum:
25762+
- programming
25763+
- roleplay
25764+
- marketing
25765+
- marketing/seo
25766+
- technology
25767+
- science
25768+
- translation
25769+
- legal
25770+
- finance
25771+
- health
25772+
- trivia
25773+
- academia
25774+
example: programming
25775+
type: string
25776+
x-speakeasy-unknown-values: allow
25777+
- description: >-
25778+
Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
25779+
in: query
25780+
name: language_type
25781+
required: false
25782+
schema:
25783+
description: >-
25784+
Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
25785+
enum:
25786+
- natural
25787+
- programming
25788+
example: natural
25789+
type: string
25790+
x-speakeasy-unknown-values: allow
2554425791
responses:
2554525792
'200':
2554625793
content:

‎.speakeasy/workflow.lock‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:ae3b03ac140c2789ef39eddcb297b78e78540441ed22c9f4854e3fa75a6f391b
6-
sourceBlobDigest: sha256:b6b2fd9a8e068d5e601bb5cae1e24b882a449f5f5147e5970e9dcbb0e47527cf
5+
sourceRevisionDigest: sha256:c76873ed773f59ce59af18cd48af7b5e704346cfea03fa8d2fa7fef96fdfb465
6+
sourceBlobDigest: sha256:e21ec1784f2b7eb1fe3fab59deb0148cc48ecd0f4835ef56502b7e808aab231c
77
tags:
88
- latest
99
- 1.0.0
1010
targets:
1111
open-router:
1212
source: OpenRouter API
1313
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:ae3b03ac140c2789ef39eddcb297b78e78540441ed22c9f4854e3fa75a6f391b
15-
sourceBlobDigest: sha256:b6b2fd9a8e068d5e601bb5cae1e24b882a449f5f5147e5970e9dcbb0e47527cf
14+
sourceRevisionDigest: sha256:c76873ed773f59ce59af18cd48af7b5e704346cfea03fa8d2fa7fef96fdfb465
15+
sourceBlobDigest: sha256:e21ec1784f2b7eb1fe3fab59deb0148cc48ecd0f4835ef56502b7e808aab231c
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:f296de4382641a2b6396f017c634185759e79bf0de91ab45e1b843bd5c609353
17+
codeSamplesRevisionDigest: sha256:ca16452a0a4478ea5a47dc4f2c60de4b9be28eab5156d58c8bf691ceabb6d742
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.787.0

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,14 @@ Based on:
168168
### Generated
169169
- [python v0.11.6] .
170170
### Releases
171-
- [PyPI v0.11.6] https://pypi.org/project/openrouter/0.11.6 - .
171+
- [PyPI v0.11.6] https://pypi.org/project/openrouter/0.11.6 - .
172+
173+
## 2026-07-07 21:46:35
174+
### Changes
175+
Based on:
176+
- OpenAPI Doc
177+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
178+
### Generated
179+
- [python v0.11.7] .
180+
### Releases
181+
- [PyPI v0.11.7] https://pypi.org/project/openrouter/0.11.7 - .

‎docs/components/speechrequest.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Text-to-speech request input
1212
| `input` | *str* | :heavy_check_mark: | Text to synthesize | Hello world |
1313
| `model` | *str* | :heavy_check_mark: | TTS model identifier | elevenlabs/eleven-turbo-v2 |
1414
| `provider` | [Optional[components.SpeechRequestProvider]](../components/speechrequestprovider.mdx) | :heavy_minus_sign: | Provider-specific passthrough configuration | |
15-
| `response_format` | [Optional[components.ResponseFormatEnum]](../components/responseformatenum.mdx) | :heavy_minus_sign: | Audio output format | pcm |
15+
| `response_format` | [Optional[components.SpeechRequestResponseFormat]](../components/speechrequestresponseformat.mdx) | :heavy_minus_sign: | Audio output format | pcm |
1616
| `speed` | *Optional[float]* | :heavy_minus_sign: | Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. | 1 |
1717
| `voice` | *str* | :heavy_check_mark: | Voice identifier (provider-specific). | alloy |

docs/components/responseformatenum.mdx renamed to docs/components/speechrequestresponseformat.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: "ResponseFormatEnum"
2+
title: "SpeechRequestResponseFormat"
33
---
44

55
Audio output format
66

77
## Example Usage
88

99
```python
10-
from openrouter.components import ResponseFormatEnum
10+
from openrouter.components import SpeechRequestResponseFormat
1111

1212
# Open enum: unrecognized values are captured as UnrecognizedStr
13-
value: ResponseFormatEnum = "mp3"
13+
value: SpeechRequestResponseFormat = "mp3"
1414
```
1515

1616

0 commit comments

Comments
 (0)