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
157 changes: 105 additions & 52 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 0.11.6
version: 0.11.7
additionalDependencies:
dev: {}
main: {}
Expand Down
249 changes: 248 additions & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20687,11 +20687,28 @@ components:
options:
$ref: '#/components/schemas/ProviderOptions'
type: object
response_format:
description: >-
Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers.
enum:
- json
- verbose_json
example: json
type: string
x-speakeasy-unknown-values: allow
temperature:
description: Sampling temperature for transcription
example: 0
format: double
type: number
timestamp_granularities:
description: >-
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".
example:
- segment
items:
$ref: '#/components/schemas/STTTimestampGranularity'
type: array
required:
- model
- input_audio
Expand All @@ -20707,16 +20724,113 @@ components:
seconds: 9.2
total_tokens: 113
properties:
duration:
description: Duration of the input audio in seconds, present when response_format is verbose_json
example: 9.2
format: double
type: number
language:
description: Detected or forced language, present when response_format is verbose_json
example: english
type: string
segments:
description: Timestamped transcript segments, present when response_format is verbose_json
items:
$ref: '#/components/schemas/STTSegment'
type: array
task:
description: The task performed, present when response_format is verbose_json
example: transcribe
type: string
text:
description: The transcribed text
example: >-
Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees.
type: string
usage:
$ref: '#/components/schemas/STTUsage'
words:
description: Timestamped words, present when the provider returns word-level timestamps
items:
$ref: '#/components/schemas/STTWord'
type: array
required:
- text
type: object
STTSegment:
description: A timestamped transcript segment, returned when response_format is verbose_json
example:
avg_logprob: -0.28
compression_ratio: 1.13
end: 3.2
id: 0
no_speech_prob: 0.01
seek: 0
start: 0
temperature: 0
text: Hello there.
tokens:
- 50364
- 2425
- 456
properties:
avg_logprob:
description: Average log probability of the segment
format: double
type: number
compression_ratio:
description: Compression ratio of the segment
format: double
type: number
end:
description: Segment end time in seconds
example: 3.2
format: double
type: number
id:
description: Segment index within the transcript
example: 0
type: integer
no_speech_prob:
description: Probability the segment contains no speech
format: double
type: number
seek:
description: Seek offset of the segment
example: 0
type: integer
start:
description: Segment start time in seconds
example: 0
format: double
type: number
temperature:
description: Temperature used for the segment
format: double
type: number
text:
description: Transcribed text of the segment
example: Hello there.
type: string
tokens:
description: Token IDs of the segment
items:
type: integer
type: array
required:
- id
- start
- end
- text
type: object
STTTimestampGranularity:
description: A timestamp detail level for verbose_json transcription responses.
enum:
- word
- segment
example: word
type: string
x-speakeasy-unknown-values: allow
STTUsage:
description: Aggregated usage statistics for the request
example:
Expand Down Expand Up @@ -20749,6 +20863,32 @@ components:
example: 113
type: integer
type: object
STTWord:
description: A timestamped word, returned when the provider includes word-level timestamps
example:
end: 0.4
start: 0
word: Hello
properties:
end:
description: Word end time in seconds
example: 0.4
format: double
type: number
start:
description: Word start time in seconds
example: 0
format: double
type: number
word:
description: The transcribed word
example: Hello
type: string
required:
- word
- start
- end
type: object
SubagentNestedTool:
additionalProperties:
nullable: true
Expand Down Expand Up @@ -23747,13 +23887,26 @@ paths:
description: The model to use for transcription.
type: string
response_format:
description: The response format. Only "json" is supported.
description: >-
The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
enum:
- json
- verbose_json
type: string
x-speakeasy-unknown-values: allow
temperature:
description: The sampling temperature.
type: number
timestamp_granularities[]:
description: >-
Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array.
items:
enum:
- word
- segment
type: string
x-speakeasy-unknown-values: allow
type: array
required:
- file
- model
Expand Down Expand Up @@ -25507,6 +25660,13 @@ paths:
reserved permaslug `other` and is always returned last within its date, so callers
can compute `top-50 traffic / total daily traffic` without a second request.

Optional filters slice the dataset. `period` (`day`/`week`/`month`) sets the time
grain. `modality` and `context_bucket` narrow the exact dataset by output/input
modality (or tool-calling activity) and request context length. `category` and
`language_type` instead read a sampled, upsampled dataset whose `total_tokens` are
weekly-grain estimates β€” they cannot be combined with each other or with the exact
filters, and reject `period=day` with a 400.

Authenticate with any valid OpenRouter API key (same key used for inference).
Rate-limited to 30 requests/minute per key and 500 requests/day per account.

Expand Down Expand Up @@ -25541,6 +25701,93 @@ paths:
example: '2026-05-11'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
- description: >-
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.
in: query
name: period
required: false
schema:
description: >-
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.
enum:
- day
- week
- month
example: day
type: string
x-speakeasy-unknown-values: allow
- description: >-
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`.
in: query
name: modality
required: false
schema:
description: >-
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`.
enum:
- text
- image
- image_output
- audio
- tool_calling
example: text
type: string
x-speakeasy-unknown-values: allow
- description: >-
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`.
in: query
name: context_bucket
required: false
schema:
description: >-
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`.
enum:
- 1K
- 10K
- 100K
- 1M
- 10M
example: 100K
type: string
x-speakeasy-unknown-values: allow
- description: >-
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`.
in: query
name: category
required: false
schema:
description: >-
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`.
enum:
- programming
- roleplay
- marketing
- marketing/seo
- technology
- science
- translation
- legal
- finance
- health
- trivia
- academia
example: programming
type: string
x-speakeasy-unknown-values: allow
- description: >-
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`.
in: query
name: language_type
required: false
schema:
description: >-
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`.
enum:
- natural
- programming
example: natural
type: string
x-speakeasy-unknown-values: allow
responses:
'200':
content:
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.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:ae3b03ac140c2789ef39eddcb297b78e78540441ed22c9f4854e3fa75a6f391b
sourceBlobDigest: sha256:b6b2fd9a8e068d5e601bb5cae1e24b882a449f5f5147e5970e9dcbb0e47527cf
sourceRevisionDigest: sha256:c76873ed773f59ce59af18cd48af7b5e704346cfea03fa8d2fa7fef96fdfb465
sourceBlobDigest: sha256:e21ec1784f2b7eb1fe3fab59deb0148cc48ecd0f4835ef56502b7e808aab231c
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:ae3b03ac140c2789ef39eddcb297b78e78540441ed22c9f4854e3fa75a6f391b
sourceBlobDigest: sha256:b6b2fd9a8e068d5e601bb5cae1e24b882a449f5f5147e5970e9dcbb0e47527cf
sourceRevisionDigest: sha256:c76873ed773f59ce59af18cd48af7b5e704346cfea03fa8d2fa7fef96fdfb465
sourceBlobDigest: sha256:e21ec1784f2b7eb1fe3fab59deb0148cc48ecd0f4835ef56502b7e808aab231c
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:f296de4382641a2b6396f017c634185759e79bf0de91ab45e1b843bd5c609353
codeSamplesRevisionDigest: sha256:ca16452a0a4478ea5a47dc4f2c60de4b9be28eab5156d58c8bf691ceabb6d742
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,14 @@ Based on:
### Generated
- [python v0.11.6] .
### Releases
- [PyPI v0.11.6] https://pypi.org/project/openrouter/0.11.6 - .
- [PyPI v0.11.6] https://pypi.org/project/openrouter/0.11.6 - .

## 2026-07-07 21:46:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.7] .
### Releases
- [PyPI v0.11.7] https://pypi.org/project/openrouter/0.11.7 - .
2 changes: 1 addition & 1 deletion docs/components/speechrequest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Text-to-speech request input
| `input` | *str* | :heavy_check_mark: | Text to synthesize | Hello world |
| `model` | *str* | :heavy_check_mark: | TTS model identifier | elevenlabs/eleven-turbo-v2 |
| `provider` | [Optional[components.SpeechRequestProvider]](../components/speechrequestprovider.mdx) | :heavy_minus_sign: | Provider-specific passthrough configuration | |
| `response_format` | [Optional[components.ResponseFormatEnum]](../components/responseformatenum.mdx) | :heavy_minus_sign: | Audio output format | pcm |
| `response_format` | [Optional[components.SpeechRequestResponseFormat]](../components/speechrequestresponseformat.mdx) | :heavy_minus_sign: | Audio output format | pcm |
| `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 |
| `voice` | *str* | :heavy_check_mark: | Voice identifier (provider-specific). | alloy |
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: "ResponseFormatEnum"
title: "SpeechRequestResponseFormat"
---

Audio output format

## Example Usage

```python
from openrouter.components import ResponseFormatEnum
from openrouter.components import SpeechRequestResponseFormat

# Open enum: unrecognized values are captured as UnrecognizedStr
value: ResponseFormatEnum = "mp3"
value: SpeechRequestResponseFormat = "mp3"
```


Expand Down
Loading
Loading