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
149 changes: 101 additions & 48 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 @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 0.13.27
version: 0.13.28
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
249 changes: 248 additions & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20696,11 +20696,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 @@ -20716,16 +20733,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 @@ -20758,6 +20872,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 @@ -23756,13 +23896,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 @@ -25516,6 +25669,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 @@ -25550,6 +25710,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.763.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8fa6fcbf5e63ee5f39c79269965678734263cd9a852faf0e010ef50bc6ac0f4e
sourceBlobDigest: sha256:95e0cddee7109d51fb81fb6cd47ba258a1a9e94c8c42819470b052097f482503
sourceRevisionDigest: sha256:4ffc9fdd0407af4d86e8e3a5bbbc96102772248af9f12b6fe6ac66c4455b46f3
sourceBlobDigest: sha256:052977af275318cfdcbbc6cb8c36cef93812c28d93ada67f06074ea8c54dd1b9
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8fa6fcbf5e63ee5f39c79269965678734263cd9a852faf0e010ef50bc6ac0f4e
sourceBlobDigest: sha256:95e0cddee7109d51fb81fb6cd47ba258a1a9e94c8c42819470b052097f482503
sourceRevisionDigest: sha256:4ffc9fdd0407af4d86e8e3a5bbbc96102772248af9f12b6fe6ac66c4455b46f3
sourceBlobDigest: sha256:052977af275318cfdcbbc6cb8c36cef93812c28d93ada67f06074ea8c54dd1b9
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:f702621147305f76823110efddda25da5e8f858abaa114a565b6d9c7d29c5fd6
codeSamplesRevisionDigest: sha256:f1d13a7ce3aaac022623ed8e85172e23c394a581805aec99e7dffd0211f59145
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.763.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1506,4 +1506,14 @@ Based on:
### Generated
- [typescript v0.13.27] .
### Releases
- [NPM v0.13.27] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.27 - .
- [NPM v0.13.27] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.27 - .

## 2026-07-07 21:46:25
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.763.2 (2.884.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.13.28] .
### Releases
- [NPM v0.13.28] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.28 - .
21 changes: 21 additions & 0 deletions docs/models/operations/contextbucket.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "ContextBucket"
---

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`.

## Example Usage

```typescript
import { ContextBucket } from "@openrouter/sdk/models/operations";

let value: ContextBucket = "100K";

// Open enum: unrecognized values are captured as Unrecognized<string>
```

## Values

```typescript
"1K" | "10K" | "100K" | "1M" | "10M" | Unrecognized<string>
```
Loading
Loading