Skip to content

Commit 2c673c0

Browse files
openrouter-docs-sync[bot]OpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#401)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent d18d840 commit 2c673c0

1 file changed

Lines changed: 266 additions & 1 deletion

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 266 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20815,11 +20815,30 @@ components:
2081520815
options:
2081620816
$ref: '#/components/schemas/ProviderOptions'
2081720817
type: object
20818+
response_format:
20819+
description: >-
20820+
Output format. "json" (default) returns { text, usage }. "verbose_json" additionally returns task, language,
20821+
duration, and segment-level timestamps; only supported by OpenAI-compatible providers.
20822+
enum:
20823+
- json
20824+
- verbose_json
20825+
example: json
20826+
type: string
2081820827
temperature:
2081920828
description: Sampling temperature for transcription
2082020829
example: 0
2082120830
format: double
2082220831
type: number
20832+
timestamp_granularities:
20833+
description: >-
20834+
Timestamp detail levels to include when response_format is "verbose_json". "segment" returns segment-level
20835+
timestamps; "word" additionally returns word-level timestamps in the words array. Ignored unless
20836+
response_format is "verbose_json".
20837+
example:
20838+
- segment
20839+
items:
20840+
$ref: '#/components/schemas/STTTimestampGranularity'
20841+
type: array
2082320842
required:
2082420843
- model
2082520844
- input_audio
@@ -20835,6 +20854,24 @@ components:
2083520854
seconds: 9.2
2083620855
total_tokens: 113
2083720856
properties:
20857+
duration:
20858+
description: Duration of the input audio in seconds, present when response_format is verbose_json
20859+
example: 9.2
20860+
format: double
20861+
type: number
20862+
language:
20863+
description: Detected or forced language, present when response_format is verbose_json
20864+
example: english
20865+
type: string
20866+
segments:
20867+
description: Timestamped transcript segments, present when response_format is verbose_json
20868+
items:
20869+
$ref: '#/components/schemas/STTSegment'
20870+
type: array
20871+
task:
20872+
description: The task performed, present when response_format is verbose_json
20873+
example: transcribe
20874+
type: string
2083820875
text:
2083920876
description: The transcribed text
2084020877
example: >-
@@ -20843,9 +20880,87 @@ components:
2084320880
type: string
2084420881
usage:
2084520882
$ref: '#/components/schemas/STTUsage'
20883+
words:
20884+
description: Timestamped words, present when the provider returns word-level timestamps
20885+
items:
20886+
$ref: '#/components/schemas/STTWord'
20887+
type: array
2084620888
required:
2084720889
- text
2084820890
type: object
20891+
STTSegment:
20892+
description: A timestamped transcript segment, returned when response_format is verbose_json
20893+
example:
20894+
avg_logprob: -0.28
20895+
compression_ratio: 1.13
20896+
end: 3.2
20897+
id: 0
20898+
no_speech_prob: 0.01
20899+
seek: 0
20900+
start: 0
20901+
temperature: 0
20902+
text: Hello there.
20903+
tokens:
20904+
- 50364
20905+
- 2425
20906+
- 456
20907+
properties:
20908+
avg_logprob:
20909+
description: Average log probability of the segment
20910+
format: double
20911+
type: number
20912+
compression_ratio:
20913+
description: Compression ratio of the segment
20914+
format: double
20915+
type: number
20916+
end:
20917+
description: Segment end time in seconds
20918+
example: 3.2
20919+
format: double
20920+
type: number
20921+
id:
20922+
description: Segment index within the transcript
20923+
example: 0
20924+
type: integer
20925+
no_speech_prob:
20926+
description: Probability the segment contains no speech
20927+
format: double
20928+
type: number
20929+
seek:
20930+
description: Seek offset of the segment
20931+
example: 0
20932+
type: integer
20933+
start:
20934+
description: Segment start time in seconds
20935+
example: 0
20936+
format: double
20937+
type: number
20938+
temperature:
20939+
description: Temperature used for the segment
20940+
format: double
20941+
type: number
20942+
text:
20943+
description: Transcribed text of the segment
20944+
example: Hello there.
20945+
type: string
20946+
tokens:
20947+
description: Token IDs of the segment
20948+
items:
20949+
type: integer
20950+
type: array
20951+
required:
20952+
- id
20953+
- start
20954+
- end
20955+
- text
20956+
type: object
20957+
STTTimestampGranularity:
20958+
description: A timestamp detail level for verbose_json transcription responses.
20959+
enum:
20960+
- word
20961+
- segment
20962+
example: word
20963+
type: string
2084920964
STTUsage:
2085020965
description: Aggregated usage statistics for the request
2085120966
example:
@@ -20878,6 +20993,32 @@ components:
2087820993
example: 113
2087920994
type: integer
2088020995
type: object
20996+
STTWord:
20997+
description: A timestamped word, returned when the provider includes word-level timestamps
20998+
example:
20999+
end: 0.4
21000+
start: 0
21001+
word: Hello
21002+
properties:
21003+
end:
21004+
description: Word end time in seconds
21005+
example: 0.4
21006+
format: double
21007+
type: number
21008+
start:
21009+
description: Word start time in seconds
21010+
example: 0
21011+
format: double
21012+
type: number
21013+
word:
21014+
description: The transcribed word
21015+
example: Hello
21016+
type: string
21017+
required:
21018+
- word
21019+
- start
21020+
- end
21021+
type: object
2088121022
SubagentNestedTool:
2088221023
additionalProperties:
2088321024
nullable: true
@@ -23932,13 +24073,26 @@ paths:
2393224073
description: The model to use for transcription.
2393324074
type: string
2393424075
response_format:
23935-
description: The response format. Only "json" is supported.
24076+
description: >-
24077+
The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns
24078+
task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
2393624079
enum:
2393724080
- json
24081+
- verbose_json
2393824082
type: string
2393924083
temperature:
2394024084
description: The sampling temperature.
2394124085
type: number
24086+
timestamp_granularities[]:
24087+
description: >-
24088+
Timestamp detail levels to include when response_format is "verbose_json". "word" additionally
24089+
returns word-level timestamps in the words array.
24090+
items:
24091+
enum:
24092+
- word
24093+
- segment
24094+
type: string
24095+
type: array
2394224096
required:
2394324097
- file
2394424098
- model
@@ -25685,6 +25839,13 @@ paths:
2568525839
reserved permaslug `other` and is always returned last within its date, so callers
2568625840
can compute `top-50 traffic / total daily traffic` without a second request.
2568725841

25842+
Optional filters slice the dataset. `period` (`day`/`week`/`month`) sets the time
25843+
grain. `modality` and `context_bucket` narrow the exact dataset by output/input
25844+
modality (or tool-calling activity) and request context length. `category` and
25845+
`language_type` instead read a sampled, upsampled dataset whose `total_tokens` are
25846+
weekly-grain estimates — they cannot be combined with each other or with the exact
25847+
filters, and reject `period=day` with a 400.
25848+
2568825849
Authenticate with any valid OpenRouter API key (same key used for inference).
2568925850
Rate-limited to 30 requests/minute per key and 500 requests/day per account.
2569025851

@@ -25725,6 +25886,110 @@ paths:
2572525886
example: '2026-05-11'
2572625887
pattern: ^\d{4}-\d{2}-\d{2}$
2572725888
type: string
25889+
- description: >-
25890+
Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start;
25891+
`month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are
25892+
available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled
25893+
datasets `period=month` buckets each week by its week-start month, so totals are approximate at month
25894+
boundaries.
25895+
in: query
25896+
name: period
25897+
required: false
25898+
schema:
25899+
description: >-
25900+
Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start;
25901+
`month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are
25902+
available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled
25903+
datasets `period=month` buckets each week by its week-start month, so totals are approximate at month
25904+
boundaries.
25905+
enum:
25906+
- day
25907+
- week
25908+
- month
25909+
example: day
25910+
type: string
25911+
- description: >-
25912+
Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio`
25913+
match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset
25914+
— cannot be combined with `category` or `language_type`.
25915+
in: query
25916+
name: modality
25917+
required: false
25918+
schema:
25919+
description: >-
25920+
Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` /
25921+
`audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call.
25922+
Exact dataset — cannot be combined with `category` or `language_type`.
25923+
enum:
25924+
- text
25925+
- image
25926+
- image_output
25927+
- audio
25928+
- tool_calling
25929+
example: text
25930+
type: string
25931+
- description: >-
25932+
Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact
25933+
dataset — cannot be combined with `category` or `language_type`.
25934+
in: query
25935+
name: context_bucket
25936+
required: false
25937+
schema:
25938+
description: >-
25939+
Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`).
25940+
Exact dataset — cannot be combined with `category` or `language_type`.
25941+
enum:
25942+
- 1K
25943+
- 10K
25944+
- 100K
25945+
- 1M
25946+
- 10M
25947+
example: 100K
25948+
type: string
25949+
- description: >-
25950+
Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset,
25951+
so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic
25952+
past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
25953+
in: query
25954+
name: category
25955+
required: false
25956+
schema:
25957+
description: >-
25958+
Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled
25959+
dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include
25960+
traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
25961+
enum:
25962+
- programming
25963+
- roleplay
25964+
- marketing
25965+
- marketing/seo
25966+
- technology
25967+
- science
25968+
- translation
25969+
- legal
25970+
- finance
25971+
- health
25972+
- trivia
25973+
- academia
25974+
example: programming
25975+
type: string
25976+
- description: >-
25977+
Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled
25978+
dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include
25979+
traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
25980+
in: query
25981+
name: language_type
25982+
required: false
25983+
schema:
25984+
description: >-
25985+
Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled
25986+
dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include
25987+
traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
25988+
enum:
25989+
- natural
25990+
- programming
25991+
example: natural
25992+
type: string
2572825993
responses:
2572925994
'200':
2573025995
content:

0 commit comments

Comments
 (0)