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
17 changes: 7 additions & 10 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
docChecksum: e082caf3723ab1e222f73325c2ef3e49
docChecksum: 2c831a797619337ab7c5a3c81a0a5f84
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
releaseVersion: 1.5.170
configChecksum: 42293044358dde5d13b2f633f5b58c5d
releaseVersion: 1.5.171
configChecksum: 208880cb93f8e9dc086876a1045e3dbb
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down Expand Up @@ -13061,6 +13061,7 @@ trackedFiles:
docs/models/thinkingenabled.mdx:
id: 03cfcb6908ac
pristine_git_object: 42ab67d0f0d7fcdfe02685b1b706fd0517adc513
docs/models/timestampgranularity.mdx: {}
docs/models/timings.md:
id: eb749976982c
last_write_checksum: sha1:43ecebedd106bbffffaaa1d7d7656a4ec6a58b95
Expand Down Expand Up @@ -19792,6 +19793,8 @@ examples:
application/json: {"error": {"code": 413, "message": "Request payload too large"}}
"403":
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
"504":
application/json: {"error": {"code": 504, "message": "The operation was aborted due to timeout"}}
createAudioTranscriptions:
speakeasy-default-create-audio-transcriptions:
requestBody:
Expand Down Expand Up @@ -24208,10 +24211,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: |
## Typescript SDK Changes:
* `openrouter.embeddings.listModels()`: `response.data[].isOpenWeight` **Added**
* `openrouter.models.get()`: `response.data.isOpenWeight` **Added**
* `openrouter.models.list()`: `response.data[].isOpenWeight` **Added**
* `openrouter.models.listForUser()`: `response.data[].isOpenWeight` **Added**
* `openrouter.rerank.listModels()`: `response.data[].isOpenWeight` **Added**
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.timestampGranularities` **Added**\n * `error.status[504]` **Added**\n* `openrouter.tts.listModels()`: `response.data[].endpoints[].outputModalities[].supportedParameters.timestampGranularities` **Added**\n* `openrouter.tts.getModel()`: `response.endpoints[].outputModalities[].supportedParameters.timestampGranularities` **Added**\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.170
version: 1.5.171
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
152 changes: 148 additions & 4 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ components:
type: string
description: |
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
responses:
SpeechTimedAudio:
content:
application/json:
schema:
$ref: '#/components/schemas/SpeechTimedAudioResponse'
description: 'Speech request with `timestamp_granularities`: base64 audio plus the requested timings.'
SpeechTimedUrl:
content:
application/json:
schema:
$ref: '#/components/schemas/SpeechTimedUrlResponse'
description: 'Speech request with `timestamp_granularities` and `output_delivery: url`: the signed download URL plus the requested timings.'
schemas:
AABenchmarkEntry:
description: 'Benchmark index scores published by Artificial Analysis (artificialanalysis.ai), one field per index. Each score is the model''s best on that index across the configurations Artificial Analysis evaluated (for example reasoning levels), so two indexes of one model can come from different configurations. The deprecated Coding Index and Agentic Index fields are null for every model: Artificial Analysis has retired those indexes. Attribute Artificial Analysis when you republish them. Omitted when Artificial Analysis has scored the model on none of them.'
Expand Down Expand Up @@ -19350,7 +19363,7 @@ components:
- 'string'
- 'null'
guardrail_id:
description: 'ID of the budget that applies at this layer: a guardrail policy ID (look it up with `GET /api/v1/guardrails/policies`) or, for accounts still on v1 guardrails, a guardrail ID. Null for the `workspace` and `key_limit` scopes.'
description: 'ID of the guardrail policy whose budget applies at this layer. A budget still managed through v1 guardrails reports its synced policy ID, not its guardrail ID. Null for the `workspace` and `key_limit` scopes. Look up a policy ID with a management key that has guardrail read access (for a Custom key, select the `guardrails:read` grant): `GET /api/v1/guardrails/policies/budget/{id}` (an organization-wide key must add `?workspace_id=`, for example the `workspace_id` this endpoint returns), or find an account-level policy in `GET /api/v1/guardrails/policies/account` (organization-wide key only). A workspace-scoped key can read only policies its workspace owns, so it gets 404 for an account-level policy, such as an inherited account default or a policy synced from a v1 guardrail assigned only to members or API keys; look those up with an organization-wide key and `?workspace_id=`. Policies synced from v1 guardrails assigned only to members or API keys can be missing from the account-level list.'
example: '0df9e665-d932-5740-b2c7-b52af166bc11'
type:
- 'string'
Expand Down Expand Up @@ -35420,7 +35433,7 @@ components:
- 'policy_type'
type: 'object'
ScimGroupPolicyAssignment:
description: 'Guardrail policy attached to a SCIM group mapping for each policy type, or `null` when none. Members receive the group policy unless they have a manual assignment or opted out; when a member is in several mapped groups, the least restrictive policy of each type applies. `rate_limit` is `null` unless capacity policies are enabled for the account (Enterprise-only feature with a custom plan).'
description: 'Guardrail policy attached to a SCIM group mapping for each policy type, or `null` when none. Members receive the group policy unless they have a manual assignment or opted out; when a member is in several mapped groups, the most restrictive policy of each type applies, and when policies cannot be ranked against each other (for example, a daily and a monthly budget), the policy from the newest mapping applies. `rate_limit` is `null` unless capacity policies are enabled for the account (Enterprise-only feature with a custom plan).'
example:
budget: '6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f'
model_availability: null
Expand Down Expand Up @@ -36835,7 +36848,7 @@ components:
example: 'mistralai/voxtral-mini-tts-2603'
type: 'string'
output_delivery:
description: '`stream` (default) streams the audio bytes directly in the response body. `url` stores the generated audio in OpenRouter storage and returns a JSON response with a signed download `url`, `expires_at`, and `media_type`. 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. Falls back to streaming raw audio bytes when a URL cannot be issued because zero-data-retention applies (account settings, guardrails, `provider.zdr`, or a ZDR endpoint) or the request has no workspace.'
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`.'
enum:
- 'stream'
- 'url'
Expand Down Expand Up @@ -36927,6 +36940,17 @@ components:
example: 1
format: 'double'
type: 'number'
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`. 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.'
example:
- 'word'
items:
enum:
- 'word'
- 'character'
type: 'string'
x-speakeasy-unknown-values: allow
type: 'array'
trace:
$ref: '#/components/schemas/TraceConfig'
user:
Expand All @@ -36943,6 +36967,30 @@ components:
- 'model'
- 'input'
type: 'object'
SpeechSignedUrlResponse:
description: 'JSON response containing a signed download URL for generated speech audio.'
example:
expires_at: 1748458800
media_type: 'audio/mpeg'
url: 'https://openrouter.ai/api/v1/audio/speech/media/abcdefghijklmnopqrstuvwxyz0123456789abcdefg'
properties:
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'
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:
- 'url'
- 'expires_at'
- 'media_type'
type: 'object'
SpeechSupportedParameters:
example:
instructions:
Expand All @@ -36956,6 +37004,11 @@ components:
max: 4
min: 0.25
type: 'range'
timestamp_granularities:
type: 'enum'
values:
- 'word'
- 'character'
voice:
type: 'enum'
values:
Expand All @@ -36968,9 +37021,90 @@ components:
$ref: '#/components/schemas/SpeechEnumParameter'
speed:
$ref: '#/components/schemas/SpeechRangeParameter'
timestamp_granularities:
allOf:
- $ref: '#/components/schemas/SpeechEnumParameter'
- description: 'The `timestamp_granularities` values the endpoint can return (`word`, `character`). Absent: timings are not supported.'
voice:
$ref: '#/components/schemas/SpeechVoiceParameter'
type: 'object'
SpeechTimedAudioResponse:
description: 'JSON response for a request with `timestamp_granularities`: the audio as base64 plus the requested timings.'
example:
audio: 'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYw'
media_type: 'audio/mpeg'
words:
- end: 0.42
start: 0
text: 'Hello'
properties:
audio:
description: 'Base64-encoded audio in the format named by `media_type`.'
example: 'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYw'
type: 'string'
characters:
description: 'Character timings, present when `timestamp_granularities` includes `character`.'
items:
$ref: '#/components/schemas/SpeechTimestamp'
type: 'array'
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'
words:
description: 'Word timings, present when `timestamp_granularities` includes `word`. Grouped from character timings by splitting on whitespace, so unspaced scripts (such as Japanese or Chinese) may return one span per unspaced run.'
items:
$ref: '#/components/schemas/SpeechTimestamp'
type: 'array'
required:
- 'audio'
- 'media_type'
type: 'object'
SpeechTimedUrlResponse:
allOf:
- $ref: '#/components/schemas/SpeechSignedUrlResponse'
- properties:
characters:
description: 'Character timings, present when `timestamp_granularities` includes `character`.'
items:
$ref: '#/components/schemas/SpeechTimestamp'
type: 'array'
words:
description: 'Word timings, present when `timestamp_granularities` includes `word`. Grouped from character timings by splitting on whitespace, so unspaced scripts (such as Japanese or Chinese) may return one span per unspaced run.'
items:
$ref: '#/components/schemas/SpeechTimestamp'
type: 'array'
type: 'object'
description: 'Signed download URL response for a request with `timestamp_granularities`, plus the requested timings.'
example:
characters:
- end: 0.064
start: 0
text: 'H'
expires_at: 1748458800
media_type: 'audio/mpeg'
url: 'https://openrouter.ai/api/v1/audio/speech/media/abcdefghijklmnopqrstuvwxyz0123456789abcdefg'
SpeechTimestamp:
properties:
end:
description: 'End time in seconds from the beginning of the audio'
example: 0.42
format: 'double'
type: 'number'
start:
description: 'Start time in seconds from the beginning of the audio'
example: 0
format: 'double'
type: 'number'
text:
description: 'The aligned input word or character (follows the input text, not normalized spoken text)'
example: 'Hello'
type: 'string'
required:
- 'text'
- 'start'
- 'end'
type: 'object'
SpeechTurn:
properties:
instructions:
Expand Down Expand Up @@ -43888,7 +44022,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.'
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`.'
'400':
content:
application/json:
Expand Down Expand Up @@ -43989,6 +44123,16 @@ paths:
schema:
$ref: '#/components/schemas/ServiceUnavailableResponse'
description: 'Service Unavailable - Service temporarily unavailable'
'504':
content:
application/json:
example:
error:
code: 504
message: 'The operation was aborted due to timeout'
schema:
$ref: '#/components/schemas/GatewayTimeoutResponse'
description: 'Gateway Timeout - Provider did not respond before the upstream deadline'
'524':
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:8d8dc2c91d068c4499b71b16c8c1260eb9282641f1af9613d09162d5b128f7d1
sourceBlobDigest: sha256:29576fe252c6bbfd1d5ca446e664bfcca4f8169c9ad32fee59b25e45cb1775de
sourceRevisionDigest: sha256:f451fed3ca9ab29c36729d99441e2a0a9c3b0df59377a2f90c1bdeac8ddb9682
sourceBlobDigest: sha256:ec51fa6a1b780f14bfa1d8b9224ef6eb2553dc373aa19b42496d4359d84d408a
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8d8dc2c91d068c4499b71b16c8c1260eb9282641f1af9613d09162d5b128f7d1
sourceBlobDigest: sha256:29576fe252c6bbfd1d5ca446e664bfcca4f8169c9ad32fee59b25e45cb1775de
sourceRevisionDigest: sha256:f451fed3ca9ab29c36729d99441e2a0a9c3b0df59377a2f90c1bdeac8ddb9682
sourceBlobDigest: sha256:ec51fa6a1b780f14bfa1d8b9224ef6eb2553dc373aa19b42496d4359d84d408a
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:1660272311a578fc58453e85a3470650274df8133559783956c1eee298bac5fb
codeSamplesRevisionDigest: sha256:e948c8939afb92e767837f3bf198919096d78b3039ecde8dc5970c371fd3c21a
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 @@ -6076,4 +6076,14 @@ Based on:
### Generated
- [typescript v1.5.170] .
### Releases
- [NPM v1.5.170] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.170 - .
- [NPM v1.5.170] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.170 - .

## 2026-12-03 20:29:44
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.171] .
### Releases
- [NPM v1.5.171] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.171 - .
Loading