Skip to content
Merged
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
22 changes: 19 additions & 3 deletions .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36752,7 +36752,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 @@ -36840,8 +36840,15 @@ 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'
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 @@ -36903,6 +36910,11 @@ components:
max: 4
min: 0.25
type: 'range'
stream_format:
type: 'enum'
values:
- 'audio'
- 'sse'
timestamp_granularities:
type: 'enum'
values:
Expand All @@ -36920,6 +36932,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 @@ -43839,7 +43855,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
Loading