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
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
docChecksum: ee22093311cc0f37ed22037cfb77fcf3
docChecksum: 0398b8e6329ef1de43f607a43c3279a7
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
releaseVersion: 1.5.179
configChecksum: 1b7d457d4b504d3af05b2ade3c4b4e4b
releaseVersion: 1.5.180
configChecksum: 155fe12ade558f31fea82c0c6b0bcf90
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down Expand Up @@ -24220,4 +24220,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.streamFormat` **Added**\n* `openrouter.tts.listModels()`: `response.data[].endpoints[].outputModalities[].supportedParameters.streamFormat` **Added**\n* `openrouter.tts.getModel()`: `response.endpoints[].outputModalities[].supportedParameters.streamFormat` **Added**\n"
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.separateTracks` **Added**\n* `openrouter.tts.listModels()`: `response.data[].endpoints[].outputModalities[].supportedParameters.separateTracks` **Added**\n* `openrouter.tts.getModel()`: `response.endpoints[].outputModalities[].supportedParameters.separateTracks` **Added**\n* `openrouter.images.listModels()`: `response.data[].supportedParameters.Map<CapabilityDescriptor>.union(range)` **Changed**\n* `openrouter.images.listModelEndpoints()`: `response.endpoints[].supportedParameters.Map<CapabilityDescriptor>.union(range)` **Changed**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 1.5.179
version: 1.5.180
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
121 changes: 118 additions & 3 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ components:
description: |
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
responses:
SpeechSeparatedTracks:
content:
application/json:
schema:
$ref: '#/components/schemas/SpeechSeparatedTracksResponse'
description: 'Speech request with `separate_tracks`: one entry per separated track, each with base64 audio or a signed download URL.'
SpeechTimedAudio:
content:
application/json:
Expand Down Expand Up @@ -34211,9 +34217,15 @@ components:
max:
format: 'double'
type: 'number'
max_pixels:
description: '`input_references` only: largest accepted pixel count (width x height) of each reference image. Absent when none is declared.'
type: 'integer'
min:
format: 'double'
type: 'number'
min_edge:
description: '`input_references` only: smallest accepted shorter side of each reference image, in pixels. Absent when none is declared.'
type: 'integer'
type:
enum:
- 'range'
Expand Down Expand Up @@ -36525,6 +36537,82 @@ components:
oneOf:
- $ref: '#/components/schemas/ContainerAutoEnvironment'
- $ref: '#/components/schemas/ContainerReferenceEnvironment'
SpeechAudioTrack:
description: 'One separated track with its audio as base64.'
example:
audio: 'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYw'
description: 'all speech'
media_type: 'audio/mpeg'
type: 'speaker'
properties:
audio:
description: 'Base64-encoded audio in the format named by `media_type`.'
example: 'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYw'
type: 'string'
description:
description: 'The provider''s short description of the track.'
example: 'all speech'
type: 'string'
media_type:
description: 'MIME type of the generated audio (for example `audio/mpeg` for mp3 or `audio/pcm;rate=24000;channels=1` for pcm).'
example: 'audio/mpeg'
type: 'string'
type:
description: 'What the track holds: `speaker` (speech), `sfx` (sound effects), `bgm` (background music), or `composite` (several categories merged because the prompt asked for it).'
enum:
- 'speaker'
- 'sfx'
- 'bgm'
- 'composite'
example: 'speaker'
type: 'string'
x-speakeasy-unknown-values: allow
required:
- 'type'
- 'media_type'
- 'audio'
type: 'object'
SpeechAudioTrackUrl:
description: 'One separated track as a signed download URL.'
example:
description: 'background music'
expires_at: 1748458800
media_type: 'audio/mpeg'
type: 'bgm'
url: 'https://openrouter.ai/api/v1/audio/speech/media/abcdefghijklmnopqrstuvwxyz0123456789abcdefg'
properties:
description:
description: 'The provider''s short description of the track.'
example: 'all speech'
type: 'string'
expires_at:
description: 'Unix timestamp (seconds) when the signed download URL expires.'
example: 1748458800
type: 'integer'
media_type:
description: 'MIME type of the generated audio (for example `audio/mpeg` for mp3 or `audio/pcm;rate=24000;channels=1` for pcm).'
example: 'audio/mpeg'
type: 'string'
type:
description: 'What the track holds: `speaker` (speech), `sfx` (sound effects), `bgm` (background music), or `composite` (several categories merged because the prompt asked for it).'
enum:
- 'speaker'
- 'sfx'
- 'bgm'
- 'composite'
example: 'speaker'
type: 'string'
x-speakeasy-unknown-values: allow
url:
description: 'Signed download URL for the generated audio, valid until `expires_at` (up to 24 hours).'
example: 'https://openrouter.ai/api/v1/audio/speech/media/abcdefghijklmnopqrstuvwxyz0123456789abcdefg'
type: 'string'
required:
- 'type'
- 'media_type'
- 'url'
- 'expires_at'
type: 'object'
SpeechEnumParameter:
example:
type: 'enum'
Expand Down Expand Up @@ -36554,7 +36642,7 @@ components:
description: 'Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models, by Fish Audio models other than S1, and by Speechify dialogue models.'
example: 'Hello world'
SpeechInputModality:
description: 'An input the model accepts. `audio` and `image` are `input_references` for voice cloning and voice design; `video` is a reference video the generated audio is made for.'
description: 'An input the model accepts. `audio` and `image` are `input_references` for voice cloning and voice design, and `audio` is also the clip `separate_tracks` splits; `video` is a reference video the generated audio is made for.'
example:
type: 'text'
oneOf:
Expand All @@ -36576,7 +36664,7 @@ components:
type: 'object'
- properties:
supported_inputs:
description: '`references` is how many audio clips a request may send. With more than one, some providers require the text to address every clip with an `@AudioN` placeholder.'
description: '`references` is how many audio clips a request may send. With more than one, some providers require the text to address every clip with an `@AudioN` placeholder. An endpoint may accept a clip only for voice cloning, only for `separate_tracks`, or both: check `supported_parameters` for `separate_tracks` and `voice` before cloning a voice.'
properties:
references:
$ref: '#/components/schemas/SpeechReferenceCount'
Expand Down Expand Up @@ -37147,6 +37235,10 @@ components:
example: 'pcm'
type: 'string'
x-speakeasy-unknown-values: allow
separate_tracks:
description: 'Split one existing audio clip into separate tracks (speech, sound effects, background music) instead of generating speech. Requires exactly one `input_audio` part in `input_references` and no other parts, `voice` or `timestamp_granularities`, and `speed` omitted or `1`; `input` describes how to split the clip (for example "all speech in one track, background music in one track, all sound effects in one track"). The response is always JSON (`SpeechSeparatedTracksResponse`): `{tracks: [{type, description, audio, media_type}]}` with base64 audio, or `url` and `expires_at` per track when `output_delivery` is `url`. The audio defaults to `mp3` unless `response_format` is set. The whole output is buffered and capped at 10 MiB of decoded audio across all tracks inline, or 32 MiB with `url` delivery. With `output_delivery: "url"`, tracks fall back to inline base64 `audio` (no `url`) under the 10 MiB inline cap when a signed URL cannot be issued (zero-data-retention, missing workspace, or storage failure), so the 32 MiB cap only applies when storage is available. Only routed to endpoints that price track separation (`supported_parameters.separate_tracks` on the speech models list). Generated SDKs type the 200 response as binary audio; call the HTTP endpoint directly and parse the JSON.'
example: true
type: 'boolean'
session_id:
description: 'A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.'
example: 'session-1234'
Expand Down Expand Up @@ -37192,6 +37284,25 @@ components:
- 'model'
- 'input'
type: 'object'
SpeechSeparatedTracksResponse:
description: 'JSON response for a request with `separate_tracks`: one entry per separated track.'
example:
tracks:
- audio: 'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYw'
description: 'all speech'
media_type: 'audio/mpeg'
type: 'speaker'
properties:
tracks:
description: 'The separated tracks in provider order (up to six). Each carries base64 `audio`, or `url` and `expires_at` when `output_delivery` is `url` and a signed URL could be issued.'
items:
anyOf:
- $ref: '#/components/schemas/SpeechAudioTrack'
- $ref: '#/components/schemas/SpeechAudioTrackUrl'
type: 'array'
required:
- 'tracks'
type: 'object'
SpeechSignedUrlResponse:
description: 'JSON response containing a signed download URL for generated speech audio.'
example:
Expand Down Expand Up @@ -37249,6 +37360,10 @@ components:
$ref: '#/components/schemas/SpeechUnknownParameter'
response_format:
$ref: '#/components/schemas/SpeechEnumParameter'
separate_tracks:
allOf:
- $ref: '#/components/schemas/SpeechUnknownParameter'
- description: 'Present when the endpoint accepts `separate_tracks` (split one audio clip into speech, sound effect and music tracks). Absent: track separation is not supported.'
speed:
$ref: '#/components/schemas/SpeechRangeParameter'
stream_format:
Expand Down Expand Up @@ -44256,7 +44371,7 @@ paths:
example: '<binary audio data>'
format: 'binary'
type: 'string'
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`.'
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`. When `separate_tracks` is true, always returns `application/json` `{ tracks }` (`SpeechSeparatedTracksResponse`), one entry per separated track with base64 `audio`, or `url` and `expires_at` with URL delivery. A separated-tracks `url` request that cannot get signed URLs (zero-data-retention, missing workspace, or storage failure) returns inline base64 `audio` per track under the inline size cap.'
'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.808.1
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6305b1e258dadea08c306870d09be1979085a71760e3530a97d4f1bfa55a101d
sourceBlobDigest: sha256:4d2b5ecedb5c99dd9a244f73a9eeaf9c66a570b6567f30f1847a772f28bafff5
sourceRevisionDigest: sha256:b34aa7b3ed4727e486f2f069451426a3d52bd90eab1ed8a5b2f1fc832e64921c
sourceBlobDigest: sha256:90e0429cda1e8ba99e8887f147cc6ca7b48e9e9e2243482c9eb8e265cad95136
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6305b1e258dadea08c306870d09be1979085a71760e3530a97d4f1bfa55a101d
sourceBlobDigest: sha256:4d2b5ecedb5c99dd9a244f73a9eeaf9c66a570b6567f30f1847a772f28bafff5
sourceRevisionDigest: sha256:b34aa7b3ed4727e486f2f069451426a3d52bd90eab1ed8a5b2f1fc832e64921c
sourceBlobDigest: sha256:90e0429cda1e8ba99e8887f147cc6ca7b48e9e9e2243482c9eb8e265cad95136
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:e2af5a57a798f82aa0a975d32be7653157771d6f7729d4dc58fc2a9fd0b2c0c0
codeSamplesRevisionDigest: sha256:4a2eda86744137ce867f6f7b53a38c89b180c64f479031675bf85e86be01c8b7
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.808.1
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6166,4 +6166,14 @@ Based on:
### Generated
- [typescript v1.5.179] .
### Releases
- [NPM v1.5.179] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.179 - .
- [NPM v1.5.179] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.179 - .

## 2026-12-04 21:03:25
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.180] .
### Releases
- [NPM v1.5.180] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.180 - .
Loading