@openrouter/sdk 0.12.22 → 0.12.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import * as openEnums from "../types/enums.js";
8
+ import { ProviderOptions$outboundSchema, } from "./provideroptions.js";
8
9
  /**
9
10
  * Audio output format
10
11
  */
@@ -13,147 +14,8 @@ export const ResponseFormatEnum = {
13
14
  Pcm: "pcm",
14
15
  };
15
16
  /** @internal */
16
- export const SpeechRequestOptions$outboundSchema = z.object({
17
- oneai: z.record(z.string(), z.nullable(z.any())).optional(),
18
- ai21: z.record(z.string(), z.nullable(z.any())).optional(),
19
- aionLabs: z.record(z.string(), z.nullable(z.any())).optional(),
20
- akashml: z.record(z.string(), z.nullable(z.any())).optional(),
21
- alibaba: z.record(z.string(), z.nullable(z.any())).optional(),
22
- amazonBedrock: z.record(z.string(), z.nullable(z.any())).optional(),
23
- amazonNova: z.record(z.string(), z.nullable(z.any())).optional(),
24
- ambient: z.record(z.string(), z.nullable(z.any())).optional(),
25
- anthropic: z.record(z.string(), z.nullable(z.any())).optional(),
26
- anyscale: z.record(z.string(), z.nullable(z.any())).optional(),
27
- arceeAi: z.record(z.string(), z.nullable(z.any())).optional(),
28
- atlasCloud: z.record(z.string(), z.nullable(z.any())).optional(),
29
- atoma: z.record(z.string(), z.nullable(z.any())).optional(),
30
- avian: z.record(z.string(), z.nullable(z.any())).optional(),
31
- azure: z.record(z.string(), z.nullable(z.any())).optional(),
32
- baidu: z.record(z.string(), z.nullable(z.any())).optional(),
33
- baseten: z.record(z.string(), z.nullable(z.any())).optional(),
34
- blackForestLabs: z.record(z.string(), z.nullable(z.any())).optional(),
35
- byteplus: z.record(z.string(), z.nullable(z.any())).optional(),
36
- centml: z.record(z.string(), z.nullable(z.any())).optional(),
37
- cerebras: z.record(z.string(), z.nullable(z.any())).optional(),
38
- chutes: z.record(z.string(), z.nullable(z.any())).optional(),
39
- cirrascale: z.record(z.string(), z.nullable(z.any())).optional(),
40
- clarifai: z.record(z.string(), z.nullable(z.any())).optional(),
41
- cloudflare: z.record(z.string(), z.nullable(z.any())).optional(),
42
- cohere: z.record(z.string(), z.nullable(z.any())).optional(),
43
- crofai: z.record(z.string(), z.nullable(z.any())).optional(),
44
- crusoe: z.record(z.string(), z.nullable(z.any())).optional(),
45
- deepinfra: z.record(z.string(), z.nullable(z.any())).optional(),
46
- deepseek: z.record(z.string(), z.nullable(z.any())).optional(),
47
- dekallm: z.record(z.string(), z.nullable(z.any())).optional(),
48
- enfer: z.record(z.string(), z.nullable(z.any())).optional(),
49
- fakeProvider: z.record(z.string(), z.nullable(z.any())).optional(),
50
- featherless: z.record(z.string(), z.nullable(z.any())).optional(),
51
- fireworks: z.record(z.string(), z.nullable(z.any())).optional(),
52
- friendli: z.record(z.string(), z.nullable(z.any())).optional(),
53
- gmicloud: z.record(z.string(), z.nullable(z.any())).optional(),
54
- googleAiStudio: z.record(z.string(), z.nullable(z.any())).optional(),
55
- googleVertex: z.record(z.string(), z.nullable(z.any())).optional(),
56
- gopomelo: z.record(z.string(), z.nullable(z.any())).optional(),
57
- groq: z.record(z.string(), z.nullable(z.any())).optional(),
58
- huggingface: z.record(z.string(), z.nullable(z.any())).optional(),
59
- hyperbolic: z.record(z.string(), z.nullable(z.any())).optional(),
60
- hyperbolicQuantized: z.record(z.string(), z.nullable(z.any())).optional(),
61
- inception: z.record(z.string(), z.nullable(z.any())).optional(),
62
- inceptron: z.record(z.string(), z.nullable(z.any())).optional(),
63
- inferenceNet: z.record(z.string(), z.nullable(z.any())).optional(),
64
- infermatic: z.record(z.string(), z.nullable(z.any())).optional(),
65
- inflection: z.record(z.string(), z.nullable(z.any())).optional(),
66
- inocloud: z.record(z.string(), z.nullable(z.any())).optional(),
67
- ioNet: z.record(z.string(), z.nullable(z.any())).optional(),
68
- ionstream: z.record(z.string(), z.nullable(z.any())).optional(),
69
- klusterai: z.record(z.string(), z.nullable(z.any())).optional(),
70
- lambda: z.record(z.string(), z.nullable(z.any())).optional(),
71
- lepton: z.record(z.string(), z.nullable(z.any())).optional(),
72
- liquid: z.record(z.string(), z.nullable(z.any())).optional(),
73
- lynn: z.record(z.string(), z.nullable(z.any())).optional(),
74
- lynnPrivate: z.record(z.string(), z.nullable(z.any())).optional(),
75
- mancer: z.record(z.string(), z.nullable(z.any())).optional(),
76
- mancerOld: z.record(z.string(), z.nullable(z.any())).optional(),
77
- mara: z.record(z.string(), z.nullable(z.any())).optional(),
78
- meta: z.record(z.string(), z.nullable(z.any())).optional(),
79
- minimax: z.record(z.string(), z.nullable(z.any())).optional(),
80
- mistral: z.record(z.string(), z.nullable(z.any())).optional(),
81
- modal: z.record(z.string(), z.nullable(z.any())).optional(),
82
- modelrun: z.record(z.string(), z.nullable(z.any())).optional(),
83
- modular: z.record(z.string(), z.nullable(z.any())).optional(),
84
- moonshotai: z.record(z.string(), z.nullable(z.any())).optional(),
85
- morph: z.record(z.string(), z.nullable(z.any())).optional(),
86
- ncompass: z.record(z.string(), z.nullable(z.any())).optional(),
87
- nebius: z.record(z.string(), z.nullable(z.any())).optional(),
88
- nexAgi: z.record(z.string(), z.nullable(z.any())).optional(),
89
- nextbit: z.record(z.string(), z.nullable(z.any())).optional(),
90
- nineteen: z.record(z.string(), z.nullable(z.any())).optional(),
91
- novita: z.record(z.string(), z.nullable(z.any())).optional(),
92
- nvidia: z.record(z.string(), z.nullable(z.any())).optional(),
93
- octoai: z.record(z.string(), z.nullable(z.any())).optional(),
94
- openInference: z.record(z.string(), z.nullable(z.any())).optional(),
95
- openai: z.record(z.string(), z.nullable(z.any())).optional(),
96
- parasail: z.record(z.string(), z.nullable(z.any())).optional(),
97
- perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
98
- phala: z.record(z.string(), z.nullable(z.any())).optional(),
99
- poolside: z.record(z.string(), z.nullable(z.any())).optional(),
100
- recraft: z.record(z.string(), z.nullable(z.any())).optional(),
101
- recursal: z.record(z.string(), z.nullable(z.any())).optional(),
102
- reflection: z.record(z.string(), z.nullable(z.any())).optional(),
103
- reka: z.record(z.string(), z.nullable(z.any())).optional(),
104
- relace: z.record(z.string(), z.nullable(z.any())).optional(),
105
- replicate: z.record(z.string(), z.nullable(z.any())).optional(),
106
- sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
107
- sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
108
- seed: z.record(z.string(), z.nullable(z.any())).optional(),
109
- sfCompute: z.record(z.string(), z.nullable(z.any())).optional(),
110
- siliconflow: z.record(z.string(), z.nullable(z.any())).optional(),
111
- sourceful: z.record(z.string(), z.nullable(z.any())).optional(),
112
- stealth: z.record(z.string(), z.nullable(z.any())).optional(),
113
- stepfun: z.record(z.string(), z.nullable(z.any())).optional(),
114
- streamlake: z.record(z.string(), z.nullable(z.any())).optional(),
115
- switchpoint: z.record(z.string(), z.nullable(z.any())).optional(),
116
- targon: z.record(z.string(), z.nullable(z.any())).optional(),
117
- together: z.record(z.string(), z.nullable(z.any())).optional(),
118
- togetherLite: z.record(z.string(), z.nullable(z.any())).optional(),
119
- ubicloud: z.record(z.string(), z.nullable(z.any())).optional(),
120
- upstage: z.record(z.string(), z.nullable(z.any())).optional(),
121
- venice: z.record(z.string(), z.nullable(z.any())).optional(),
122
- wandb: z.record(z.string(), z.nullable(z.any())).optional(),
123
- xai: z.record(z.string(), z.nullable(z.any())).optional(),
124
- xiaomi: z.record(z.string(), z.nullable(z.any())).optional(),
125
- zAi: z.record(z.string(), z.nullable(z.any())).optional(),
126
- }).transform((v) => {
127
- return remap$(v, {
128
- oneai: "01ai",
129
- aionLabs: "aion-labs",
130
- amazonBedrock: "amazon-bedrock",
131
- amazonNova: "amazon-nova",
132
- arceeAi: "arcee-ai",
133
- atlasCloud: "atlas-cloud",
134
- blackForestLabs: "black-forest-labs",
135
- fakeProvider: "fake-provider",
136
- googleAiStudio: "google-ai-studio",
137
- googleVertex: "google-vertex",
138
- hyperbolicQuantized: "hyperbolic-quantized",
139
- inferenceNet: "inference-net",
140
- ioNet: "io-net",
141
- lynnPrivate: "lynn-private",
142
- mancerOld: "mancer-old",
143
- nexAgi: "nex-agi",
144
- openInference: "open-inference",
145
- sambanovaCloaked: "sambanova-cloaked",
146
- sfCompute: "sf-compute",
147
- togetherLite: "together-lite",
148
- zAi: "z-ai",
149
- });
150
- });
151
- export function speechRequestOptionsToJSON(speechRequestOptions) {
152
- return JSON.stringify(SpeechRequestOptions$outboundSchema.parse(speechRequestOptions));
153
- }
154
- /** @internal */
155
17
  export const SpeechRequestProvider$outboundSchema = z.object({
156
- options: z.lazy(() => SpeechRequestOptions$outboundSchema).optional(),
18
+ options: ProviderOptions$outboundSchema.optional(),
157
19
  });
158
20
  export function speechRequestProviderToJSON(speechRequestProvider) {
159
21
  return JSON.stringify(SpeechRequestProvider$outboundSchema.parse(speechRequestProvider));
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v4";
2
+ /**
3
+ * Base64-encoded audio to transcribe
4
+ */
5
+ export type STTInputAudio = {
6
+ /**
7
+ * Base64-encoded audio data (raw bytes, not a data URI)
8
+ */
9
+ data: string;
10
+ /**
11
+ * Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.
12
+ */
13
+ format: string;
14
+ };
15
+ /** @internal */
16
+ export type STTInputAudio$Outbound = {
17
+ data: string;
18
+ format: string;
19
+ };
20
+ /** @internal */
21
+ export declare const STTInputAudio$outboundSchema: z.ZodType<STTInputAudio$Outbound, STTInputAudio>;
22
+ export declare function sttInputAudioToJSON(sttInputAudio: STTInputAudio): string;
23
+ //# sourceMappingURL=sttinputaudio.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 2251488e7c0b
4
+ */
5
+ import * as z from "zod/v4";
6
+ /** @internal */
7
+ export const STTInputAudio$outboundSchema = z.object({
8
+ data: z.string(),
9
+ format: z.string(),
10
+ });
11
+ export function sttInputAudioToJSON(sttInputAudio) {
12
+ return JSON.stringify(STTInputAudio$outboundSchema.parse(sttInputAudio));
13
+ }
14
+ //# sourceMappingURL=sttinputaudio.js.map
@@ -0,0 +1,56 @@
1
+ import * as z from "zod/v4";
2
+ import { ProviderOptions, ProviderOptions$Outbound } from "./provideroptions.js";
3
+ import { STTInputAudio, STTInputAudio$Outbound } from "./sttinputaudio.js";
4
+ /**
5
+ * Provider-specific passthrough configuration
6
+ */
7
+ export type STTRequestProvider = {
8
+ /**
9
+ * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
10
+ */
11
+ options?: ProviderOptions | undefined;
12
+ };
13
+ /**
14
+ * Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.
15
+ */
16
+ export type STTRequest = {
17
+ /**
18
+ * Base64-encoded audio to transcribe
19
+ */
20
+ inputAudio: STTInputAudio;
21
+ /**
22
+ * ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted.
23
+ */
24
+ language?: string | undefined;
25
+ /**
26
+ * STT model identifier
27
+ */
28
+ model: string;
29
+ /**
30
+ * Provider-specific passthrough configuration
31
+ */
32
+ provider?: STTRequestProvider | undefined;
33
+ /**
34
+ * Sampling temperature for transcription
35
+ */
36
+ temperature?: number | undefined;
37
+ };
38
+ /** @internal */
39
+ export type STTRequestProvider$Outbound = {
40
+ options?: ProviderOptions$Outbound | undefined;
41
+ };
42
+ /** @internal */
43
+ export declare const STTRequestProvider$outboundSchema: z.ZodType<STTRequestProvider$Outbound, STTRequestProvider>;
44
+ export declare function sttRequestProviderToJSON(sttRequestProvider: STTRequestProvider): string;
45
+ /** @internal */
46
+ export type STTRequest$Outbound = {
47
+ input_audio: STTInputAudio$Outbound;
48
+ language?: string | undefined;
49
+ model: string;
50
+ provider?: STTRequestProvider$Outbound | undefined;
51
+ temperature?: number | undefined;
52
+ };
53
+ /** @internal */
54
+ export declare const STTRequest$outboundSchema: z.ZodType<STTRequest$Outbound, STTRequest>;
55
+ export declare function sttRequestToJSON(sttRequest: STTRequest): string;
56
+ //# sourceMappingURL=sttrequest.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3be8453c0517
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { ProviderOptions$outboundSchema, } from "./provideroptions.js";
8
+ import { STTInputAudio$outboundSchema, } from "./sttinputaudio.js";
9
+ /** @internal */
10
+ export const STTRequestProvider$outboundSchema = z.object({
11
+ options: ProviderOptions$outboundSchema.optional(),
12
+ });
13
+ export function sttRequestProviderToJSON(sttRequestProvider) {
14
+ return JSON.stringify(STTRequestProvider$outboundSchema.parse(sttRequestProvider));
15
+ }
16
+ /** @internal */
17
+ export const STTRequest$outboundSchema = z.object({
18
+ inputAudio: STTInputAudio$outboundSchema,
19
+ language: z.string().optional(),
20
+ model: z.string(),
21
+ provider: z.lazy(() => STTRequestProvider$outboundSchema).optional(),
22
+ temperature: z.number().optional(),
23
+ }).transform((v) => {
24
+ return remap$(v, {
25
+ inputAudio: "input_audio",
26
+ });
27
+ });
28
+ export function sttRequestToJSON(sttRequest) {
29
+ return JSON.stringify(STTRequest$outboundSchema.parse(sttRequest));
30
+ }
31
+ //# sourceMappingURL=sttrequest.js.map
@@ -0,0 +1,21 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { STTUsage } from "./sttusage.js";
5
+ /**
6
+ * STT response containing transcribed text and optional usage statistics
7
+ */
8
+ export type STTResponse = {
9
+ /**
10
+ * The transcribed text
11
+ */
12
+ text: string;
13
+ /**
14
+ * Aggregated usage statistics for the request
15
+ */
16
+ usage?: STTUsage | undefined;
17
+ };
18
+ /** @internal */
19
+ export declare const STTResponse$inboundSchema: z.ZodType<STTResponse, unknown>;
20
+ export declare function sttResponseFromJSON(jsonString: string): SafeParseResult<STTResponse, SDKValidationError>;
21
+ //# sourceMappingURL=sttresponse.d.ts.map
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 383a6e21047b
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { STTUsage$inboundSchema } from "./sttusage.js";
8
+ /** @internal */
9
+ export const STTResponse$inboundSchema = z
10
+ .object({
11
+ text: z.string(),
12
+ usage: STTUsage$inboundSchema.optional(),
13
+ });
14
+ export function sttResponseFromJSON(jsonString) {
15
+ return safeParse(jsonString, (x) => STTResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'STTResponse' from JSON`);
16
+ }
17
+ //# sourceMappingURL=sttresponse.js.map
@@ -0,0 +1,32 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Aggregated usage statistics for the request
6
+ */
7
+ export type STTUsage = {
8
+ /**
9
+ * Total cost of the request in USD
10
+ */
11
+ cost?: number | undefined;
12
+ /**
13
+ * Number of input tokens billed for this request
14
+ */
15
+ inputTokens?: number | undefined;
16
+ /**
17
+ * Number of output tokens generated
18
+ */
19
+ outputTokens?: number | undefined;
20
+ /**
21
+ * Duration of the input audio in seconds
22
+ */
23
+ seconds?: number | undefined;
24
+ /**
25
+ * Total number of tokens used (input + output)
26
+ */
27
+ totalTokens?: number | undefined;
28
+ };
29
+ /** @internal */
30
+ export declare const STTUsage$inboundSchema: z.ZodType<STTUsage, unknown>;
31
+ export declare function sttUsageFromJSON(jsonString: string): SafeParseResult<STTUsage, SDKValidationError>;
32
+ //# sourceMappingURL=sttusage.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6d43566c0d40
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const STTUsage$inboundSchema = z.object({
10
+ cost: z.number().optional(),
11
+ input_tokens: z.int().optional(),
12
+ output_tokens: z.int().optional(),
13
+ seconds: z.number().optional(),
14
+ total_tokens: z.int().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "input_tokens": "inputTokens",
18
+ "output_tokens": "outputTokens",
19
+ "total_tokens": "totalTokens",
20
+ });
21
+ });
22
+ export function sttUsageFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => STTUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'STTUsage' from JSON`);
24
+ }
25
+ //# sourceMappingURL=sttusage.js.map
@@ -21,7 +21,7 @@ export type AspectRatio = OpenEnum<typeof AspectRatio>;
21
21
  /**
22
22
  * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
23
23
  */
24
- export type VideoGenerationRequestOptions = {
24
+ export type Options = {
25
25
  oneai?: {
26
26
  [k: string]: any | null;
27
27
  } | undefined;
@@ -354,10 +354,7 @@ export type VideoGenerationRequestOptions = {
354
354
  * Provider-specific passthrough configuration
355
355
  */
356
356
  export type VideoGenerationRequestProvider = {
357
- /**
358
- * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
359
- */
360
- options?: VideoGenerationRequestOptions | undefined;
357
+ options?: Options | undefined;
361
358
  };
362
359
  /**
363
360
  * Resolution of the generated video
@@ -421,7 +418,7 @@ export type VideoGenerationRequest = {
421
418
  /** @internal */
422
419
  export declare const AspectRatio$outboundSchema: z.ZodType<string, AspectRatio>;
423
420
  /** @internal */
424
- export type VideoGenerationRequestOptions$Outbound = {
421
+ export type Options$Outbound = {
425
422
  "01ai"?: {
426
423
  [k: string]: any | null;
427
424
  } | undefined;
@@ -751,11 +748,11 @@ export type VideoGenerationRequestOptions$Outbound = {
751
748
  } | undefined;
752
749
  };
753
750
  /** @internal */
754
- export declare const VideoGenerationRequestOptions$outboundSchema: z.ZodType<VideoGenerationRequestOptions$Outbound, VideoGenerationRequestOptions>;
755
- export declare function videoGenerationRequestOptionsToJSON(videoGenerationRequestOptions: VideoGenerationRequestOptions): string;
751
+ export declare const Options$outboundSchema: z.ZodType<Options$Outbound, Options>;
752
+ export declare function optionsToJSON(options: Options): string;
756
753
  /** @internal */
757
754
  export type VideoGenerationRequestProvider$Outbound = {
758
- options?: VideoGenerationRequestOptions$Outbound | undefined;
755
+ options?: Options$Outbound | undefined;
759
756
  };
760
757
  /** @internal */
761
758
  export declare const VideoGenerationRequestProvider$outboundSchema: z.ZodType<VideoGenerationRequestProvider$Outbound, VideoGenerationRequestProvider>;
@@ -33,7 +33,8 @@ export const Resolution = {
33
33
  /** @internal */
34
34
  export const AspectRatio$outboundSchema = openEnums.outboundSchema(AspectRatio);
35
35
  /** @internal */
36
- export const VideoGenerationRequestOptions$outboundSchema = z.object({
36
+ export const Options$outboundSchema = z
37
+ .object({
37
38
  oneai: z.record(z.string(), z.nullable(z.any())).optional(),
38
39
  ai21: z.record(z.string(), z.nullable(z.any())).optional(),
39
40
  aionLabs: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -168,13 +169,12 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
168
169
  zAi: "z-ai",
169
170
  });
170
171
  });
171
- export function videoGenerationRequestOptionsToJSON(videoGenerationRequestOptions) {
172
- return JSON.stringify(VideoGenerationRequestOptions$outboundSchema.parse(videoGenerationRequestOptions));
172
+ export function optionsToJSON(options) {
173
+ return JSON.stringify(Options$outboundSchema.parse(options));
173
174
  }
174
175
  /** @internal */
175
176
  export const VideoGenerationRequestProvider$outboundSchema = z.object({
176
- options: z.lazy(() => VideoGenerationRequestOptions$outboundSchema)
177
- .optional(),
177
+ options: z.lazy(() => Options$outboundSchema).optional(),
178
178
  });
179
179
  export function videoGenerationRequestProviderToJSON(videoGenerationRequestProvider) {
180
180
  return JSON.stringify(VideoGenerationRequestProvider$outboundSchema.parse(videoGenerationRequestProvider));
package/esm/sdk/sdk.d.ts CHANGED
@@ -13,6 +13,7 @@ import { OAuth } from "./oauth.js";
13
13
  import { Organization } from "./organization.js";
14
14
  import { Providers } from "./providers.js";
15
15
  import { Rerank } from "./rerank.js";
16
+ import { Stt } from "./stt.js";
16
17
  import { Tts } from "./tts.js";
17
18
  import { VideoGeneration } from "./videogeneration.js";
18
19
  import { Workspaces } from "./workspaces.js";
@@ -27,6 +28,8 @@ export declare class OpenRouter extends ClientSDK {
27
28
  get analytics(): Analytics;
28
29
  private _tts?;
29
30
  get tts(): Tts;
31
+ private _stt?;
32
+ get stt(): Stt;
30
33
  private _oAuth?;
31
34
  get oAuth(): OAuth;
32
35
  private _chat?;
package/esm/sdk/sdk.js CHANGED
@@ -17,6 +17,7 @@ import { OAuth } from "./oauth.js";
17
17
  import { Organization } from "./organization.js";
18
18
  import { Providers } from "./providers.js";
19
19
  import { Rerank } from "./rerank.js";
20
+ import { Stt } from "./stt.js";
20
21
  import { Tts } from "./tts.js";
21
22
  import { VideoGeneration } from "./videogeneration.js";
22
23
  import { Workspaces } from "./workspaces.js";
@@ -31,6 +32,9 @@ export class OpenRouter extends ClientSDK {
31
32
  get tts() {
32
33
  return (this._tts ?? (this._tts = new Tts(this._options)));
33
34
  }
35
+ get stt() {
36
+ return (this._stt ?? (this._stt = new Stt(this._options)));
37
+ }
34
38
  get oAuth() {
35
39
  return (this._oAuth ?? (this._oAuth = new OAuth(this._options)));
36
40
  }
@@ -0,0 +1,13 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as models from "../models/index.js";
3
+ import * as operations from "../models/operations/index.js";
4
+ export declare class Stt extends ClientSDK {
5
+ /**
6
+ * Create transcription
7
+ *
8
+ * @remarks
9
+ * Transcribes audio into text
10
+ */
11
+ createTranscription(request: operations.CreateAudioTranscriptionsRequest, options?: RequestOptions): Promise<models.STTResponse>;
12
+ }
13
+ //# sourceMappingURL=stt.d.ts.map
package/esm/sdk/stt.js ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fd9e88c22d1f
4
+ */
5
+ import { sttCreateTranscription } from "../funcs/sttCreateTranscription.js";
6
+ import { ClientSDK } from "../lib/sdks.js";
7
+ import { unwrapAsync } from "../types/fp.js";
8
+ export class Stt extends ClientSDK {
9
+ /**
10
+ * Create transcription
11
+ *
12
+ * @remarks
13
+ * Transcribes audio into text
14
+ */
15
+ async createTranscription(request, options) {
16
+ return unwrapAsync(sttCreateTranscription(this, request, options));
17
+ }
18
+ }
19
+ //# sourceMappingURL=stt.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.12.22",
5
+ "version": "0.12.24",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.12.22",
3
+ "version": "0.12.24",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
6
6
  "keywords": [
@@ -69,15 +69,15 @@
69
69
  "lint": "eslint --cache --max-warnings=0 src",
70
70
  "build": "tsc",
71
71
  "prepublishOnly": "npm run build",
72
- "typecheck": "tsc --noEmit",
73
- "postinstall": "node scripts/check-types.js || true",
74
72
  "prepare": "npm run build",
75
- "test:transit": "exit 0",
76
73
  "test:watch": "vitest --watch --project unit",
77
- "typecheck:transit": "exit 0",
78
74
  "compile": "tsc",
75
+ "postinstall": "node scripts/check-types.js || true",
79
76
  "test": "vitest --run --project unit",
80
- "test:e2e": "vitest --run --project e2e"
77
+ "test:e2e": "vitest --run --project e2e",
78
+ "test:transit": "exit 0",
79
+ "typecheck": "tsc --noEmit",
80
+ "typecheck:transit": "exit 0"
81
81
  },
82
82
  "peerDependencies": {},
83
83
  "devDependencies": {