@openrouter/sdk 0.12.14 → 0.12.16

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.
Files changed (40) hide show
  1. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  2. package/esm/funcs/apiKeysCreate.js +2 -2
  3. package/esm/funcs/apiKeysList.js +1 -0
  4. package/esm/funcs/guardrailsCreate.d.ts +1 -1
  5. package/esm/funcs/guardrailsCreate.js +2 -2
  6. package/esm/funcs/guardrailsList.js +1 -0
  7. package/esm/funcs/ttsCreateSpeech.d.ts +18 -0
  8. package/esm/funcs/ttsCreateSpeech.js +110 -0
  9. package/esm/lib/config.d.ts +2 -2
  10. package/esm/lib/config.js +2 -2
  11. package/esm/models/createguardrailrequest.d.ts +5 -0
  12. package/esm/models/createguardrailrequest.js +2 -0
  13. package/esm/models/guardrail.d.ts +4 -0
  14. package/esm/models/guardrail.js +2 -0
  15. package/esm/models/operations/createembeddings.d.ts +28 -0
  16. package/esm/models/operations/createembeddings.js +20 -0
  17. package/esm/models/operations/createkeys.d.ts +9 -0
  18. package/esm/models/operations/createkeys.js +4 -0
  19. package/esm/models/operations/createtts.d.ts +779 -0
  20. package/esm/models/operations/createtts.js +193 -0
  21. package/esm/models/operations/getgeneration.d.ts +1 -0
  22. package/esm/models/operations/getgeneration.js +1 -0
  23. package/esm/models/operations/getkey.d.ts +4 -0
  24. package/esm/models/operations/getkey.js +2 -0
  25. package/esm/models/operations/index.d.ts +1 -0
  26. package/esm/models/operations/index.js +1 -0
  27. package/esm/models/operations/list.d.ts +9 -0
  28. package/esm/models/operations/list.js +4 -0
  29. package/esm/models/operations/listguardrails.d.ts +5 -0
  30. package/esm/models/operations/listguardrails.js +2 -0
  31. package/esm/models/operations/updatekeys.d.ts +4 -0
  32. package/esm/models/operations/updatekeys.js +2 -0
  33. package/esm/models/outputmodality.d.ts +1 -0
  34. package/esm/models/outputmodality.js +1 -0
  35. package/esm/sdk/sdk.d.ts +3 -0
  36. package/esm/sdk/sdk.js +4 -0
  37. package/esm/sdk/tts.d.ts +12 -0
  38. package/esm/sdk/tts.js +19 -0
  39. package/jsr.json +1 -1
  40. package/package.json +6 -6
@@ -0,0 +1,193 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fd4cb8ec3732
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ /**
9
+ * Audio output format
10
+ */
11
+ export const ResponseFormat = {
12
+ Mp3: "mp3",
13
+ Pcm: "pcm",
14
+ };
15
+ /** @internal */
16
+ export const Options$outboundSchema = z
17
+ .object({
18
+ oneai: z.record(z.string(), z.nullable(z.any())).optional(),
19
+ ai21: z.record(z.string(), z.nullable(z.any())).optional(),
20
+ aionLabs: z.record(z.string(), z.nullable(z.any())).optional(),
21
+ akashml: z.record(z.string(), z.nullable(z.any())).optional(),
22
+ alibaba: z.record(z.string(), z.nullable(z.any())).optional(),
23
+ amazonBedrock: z.record(z.string(), z.nullable(z.any())).optional(),
24
+ amazonNova: z.record(z.string(), z.nullable(z.any())).optional(),
25
+ ambient: z.record(z.string(), z.nullable(z.any())).optional(),
26
+ anthropic: z.record(z.string(), z.nullable(z.any())).optional(),
27
+ anyscale: z.record(z.string(), z.nullable(z.any())).optional(),
28
+ arceeAi: z.record(z.string(), z.nullable(z.any())).optional(),
29
+ atlasCloud: z.record(z.string(), z.nullable(z.any())).optional(),
30
+ atoma: z.record(z.string(), z.nullable(z.any())).optional(),
31
+ avian: z.record(z.string(), z.nullable(z.any())).optional(),
32
+ azure: z.record(z.string(), z.nullable(z.any())).optional(),
33
+ baidu: z.record(z.string(), z.nullable(z.any())).optional(),
34
+ baseten: z.record(z.string(), z.nullable(z.any())).optional(),
35
+ blackForestLabs: z.record(z.string(), z.nullable(z.any())).optional(),
36
+ byteplus: z.record(z.string(), z.nullable(z.any())).optional(),
37
+ centml: z.record(z.string(), z.nullable(z.any())).optional(),
38
+ cerebras: z.record(z.string(), z.nullable(z.any())).optional(),
39
+ chutes: z.record(z.string(), z.nullable(z.any())).optional(),
40
+ cirrascale: z.record(z.string(), z.nullable(z.any())).optional(),
41
+ clarifai: z.record(z.string(), z.nullable(z.any())).optional(),
42
+ cloudflare: z.record(z.string(), z.nullable(z.any())).optional(),
43
+ cohere: z.record(z.string(), z.nullable(z.any())).optional(),
44
+ crofai: z.record(z.string(), z.nullable(z.any())).optional(),
45
+ crusoe: z.record(z.string(), z.nullable(z.any())).optional(),
46
+ deepinfra: z.record(z.string(), z.nullable(z.any())).optional(),
47
+ deepseek: z.record(z.string(), z.nullable(z.any())).optional(),
48
+ dekallm: z.record(z.string(), z.nullable(z.any())).optional(),
49
+ enfer: z.record(z.string(), z.nullable(z.any())).optional(),
50
+ fakeProvider: z.record(z.string(), z.nullable(z.any())).optional(),
51
+ featherless: z.record(z.string(), z.nullable(z.any())).optional(),
52
+ fireworks: z.record(z.string(), z.nullable(z.any())).optional(),
53
+ friendli: z.record(z.string(), z.nullable(z.any())).optional(),
54
+ gmicloud: z.record(z.string(), z.nullable(z.any())).optional(),
55
+ googleAiStudio: z.record(z.string(), z.nullable(z.any())).optional(),
56
+ googleVertex: z.record(z.string(), z.nullable(z.any())).optional(),
57
+ gopomelo: z.record(z.string(), z.nullable(z.any())).optional(),
58
+ groq: z.record(z.string(), z.nullable(z.any())).optional(),
59
+ huggingface: z.record(z.string(), z.nullable(z.any())).optional(),
60
+ hyperbolic: z.record(z.string(), z.nullable(z.any())).optional(),
61
+ hyperbolicQuantized: z.record(z.string(), z.nullable(z.any())).optional(),
62
+ inception: z.record(z.string(), z.nullable(z.any())).optional(),
63
+ inceptron: z.record(z.string(), z.nullable(z.any())).optional(),
64
+ inferenceNet: z.record(z.string(), z.nullable(z.any())).optional(),
65
+ infermatic: z.record(z.string(), z.nullable(z.any())).optional(),
66
+ inflection: z.record(z.string(), z.nullable(z.any())).optional(),
67
+ inocloud: z.record(z.string(), z.nullable(z.any())).optional(),
68
+ ioNet: z.record(z.string(), z.nullable(z.any())).optional(),
69
+ ionstream: z.record(z.string(), z.nullable(z.any())).optional(),
70
+ klusterai: z.record(z.string(), z.nullable(z.any())).optional(),
71
+ lambda: z.record(z.string(), z.nullable(z.any())).optional(),
72
+ lepton: z.record(z.string(), z.nullable(z.any())).optional(),
73
+ liquid: z.record(z.string(), z.nullable(z.any())).optional(),
74
+ lynn: z.record(z.string(), z.nullable(z.any())).optional(),
75
+ lynnPrivate: z.record(z.string(), z.nullable(z.any())).optional(),
76
+ mancer: z.record(z.string(), z.nullable(z.any())).optional(),
77
+ mancerOld: z.record(z.string(), z.nullable(z.any())).optional(),
78
+ mara: z.record(z.string(), z.nullable(z.any())).optional(),
79
+ meta: z.record(z.string(), z.nullable(z.any())).optional(),
80
+ minimax: z.record(z.string(), z.nullable(z.any())).optional(),
81
+ mistral: z.record(z.string(), z.nullable(z.any())).optional(),
82
+ modal: z.record(z.string(), z.nullable(z.any())).optional(),
83
+ modelrun: z.record(z.string(), z.nullable(z.any())).optional(),
84
+ modular: z.record(z.string(), z.nullable(z.any())).optional(),
85
+ moonshotai: z.record(z.string(), z.nullable(z.any())).optional(),
86
+ morph: z.record(z.string(), z.nullable(z.any())).optional(),
87
+ ncompass: z.record(z.string(), z.nullable(z.any())).optional(),
88
+ nebius: 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
+ recraft: z.record(z.string(), z.nullable(z.any())).optional(),
100
+ recursal: z.record(z.string(), z.nullable(z.any())).optional(),
101
+ reflection: z.record(z.string(), z.nullable(z.any())).optional(),
102
+ reka: z.record(z.string(), z.nullable(z.any())).optional(),
103
+ relace: z.record(z.string(), z.nullable(z.any())).optional(),
104
+ replicate: z.record(z.string(), z.nullable(z.any())).optional(),
105
+ sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
106
+ sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
107
+ seed: z.record(z.string(), z.nullable(z.any())).optional(),
108
+ sfCompute: z.record(z.string(), z.nullable(z.any())).optional(),
109
+ siliconflow: z.record(z.string(), z.nullable(z.any())).optional(),
110
+ sourceful: z.record(z.string(), z.nullable(z.any())).optional(),
111
+ stealth: z.record(z.string(), z.nullable(z.any())).optional(),
112
+ stepfun: z.record(z.string(), z.nullable(z.any())).optional(),
113
+ streamlake: z.record(z.string(), z.nullable(z.any())).optional(),
114
+ switchpoint: z.record(z.string(), z.nullable(z.any())).optional(),
115
+ targon: z.record(z.string(), z.nullable(z.any())).optional(),
116
+ together: z.record(z.string(), z.nullable(z.any())).optional(),
117
+ togetherLite: z.record(z.string(), z.nullable(z.any())).optional(),
118
+ ubicloud: z.record(z.string(), z.nullable(z.any())).optional(),
119
+ upstage: z.record(z.string(), z.nullable(z.any())).optional(),
120
+ venice: z.record(z.string(), z.nullable(z.any())).optional(),
121
+ wandb: z.record(z.string(), z.nullable(z.any())).optional(),
122
+ xai: z.record(z.string(), z.nullable(z.any())).optional(),
123
+ xiaomi: z.record(z.string(), z.nullable(z.any())).optional(),
124
+ zAi: z.record(z.string(), z.nullable(z.any())).optional(),
125
+ }).transform((v) => {
126
+ return remap$(v, {
127
+ oneai: "01ai",
128
+ aionLabs: "aion-labs",
129
+ amazonBedrock: "amazon-bedrock",
130
+ amazonNova: "amazon-nova",
131
+ arceeAi: "arcee-ai",
132
+ atlasCloud: "atlas-cloud",
133
+ blackForestLabs: "black-forest-labs",
134
+ fakeProvider: "fake-provider",
135
+ googleAiStudio: "google-ai-studio",
136
+ googleVertex: "google-vertex",
137
+ hyperbolicQuantized: "hyperbolic-quantized",
138
+ inferenceNet: "inference-net",
139
+ ioNet: "io-net",
140
+ lynnPrivate: "lynn-private",
141
+ mancerOld: "mancer-old",
142
+ openInference: "open-inference",
143
+ sambanovaCloaked: "sambanova-cloaked",
144
+ sfCompute: "sf-compute",
145
+ togetherLite: "together-lite",
146
+ zAi: "z-ai",
147
+ });
148
+ });
149
+ export function optionsToJSON(options) {
150
+ return JSON.stringify(Options$outboundSchema.parse(options));
151
+ }
152
+ /** @internal */
153
+ export const Provider$outboundSchema = z
154
+ .object({
155
+ options: z.lazy(() => Options$outboundSchema).optional(),
156
+ });
157
+ export function providerToJSON(provider) {
158
+ return JSON.stringify(Provider$outboundSchema.parse(provider));
159
+ }
160
+ /** @internal */
161
+ export const ResponseFormat$outboundSchema = openEnums.outboundSchema(ResponseFormat);
162
+ /** @internal */
163
+ export const CreateTtsRequestBody$outboundSchema = z.object({
164
+ input: z.string(),
165
+ model: z.string(),
166
+ provider: z.lazy(() => Provider$outboundSchema).optional(),
167
+ responseFormat: ResponseFormat$outboundSchema.default("pcm"),
168
+ speed: z.number().optional(),
169
+ voice: z.string(),
170
+ }).transform((v) => {
171
+ return remap$(v, {
172
+ responseFormat: "response_format",
173
+ });
174
+ });
175
+ export function createTtsRequestBodyToJSON(createTtsRequestBody) {
176
+ return JSON.stringify(CreateTtsRequestBody$outboundSchema.parse(createTtsRequestBody));
177
+ }
178
+ /** @internal */
179
+ export const CreateTtsRequest$outboundSchema = z.object({
180
+ httpReferer: z.string().optional(),
181
+ appTitle: z.string().optional(),
182
+ appCategories: z.string().optional(),
183
+ requestBody: z.lazy(() => CreateTtsRequestBody$outboundSchema),
184
+ }).transform((v) => {
185
+ return remap$(v, {
186
+ httpReferer: "HTTP-Referer",
187
+ requestBody: "RequestBody",
188
+ });
189
+ });
190
+ export function createTtsRequestToJSON(createTtsRequest) {
191
+ return JSON.stringify(CreateTtsRequest$outboundSchema.parse(createTtsRequest));
192
+ }
193
+ //# sourceMappingURL=createtts.js.map
@@ -56,6 +56,7 @@ export declare const ApiType: {
56
56
  readonly Completions: "completions";
57
57
  readonly Embeddings: "embeddings";
58
58
  readonly Rerank: "rerank";
59
+ readonly Tts: "tts";
59
60
  readonly Video: "video";
60
61
  };
61
62
  /**
@@ -14,6 +14,7 @@ export const ApiType = {
14
14
  Completions: "completions",
15
15
  Embeddings: "embeddings",
16
16
  Rerank: "rerank",
17
+ Tts: "tts",
17
18
  Video: "video",
18
19
  };
19
20
  /** @internal */
@@ -131,6 +131,10 @@ export type GetKeyData = {
131
131
  * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
132
132
  */
133
133
  usageWeekly: number;
134
+ /**
135
+ * The workspace ID this API key belongs to.
136
+ */
137
+ workspaceId: string;
134
138
  };
135
139
  /**
136
140
  * API key details
@@ -42,6 +42,7 @@ export const GetKeyData$inboundSchema = z
42
42
  usage_daily: z.number(),
43
43
  usage_monthly: z.number(),
44
44
  usage_weekly: z.number(),
45
+ workspace_id: z.string(),
45
46
  }).transform((v) => {
46
47
  return remap$(v, {
47
48
  "byok_usage": "byokUsage",
@@ -58,6 +59,7 @@ export const GetKeyData$inboundSchema = z
58
59
  "usage_daily": "usageDaily",
59
60
  "usage_monthly": "usageMonthly",
60
61
  "usage_weekly": "usageWeekly",
62
+ "workspace_id": "workspaceId",
61
63
  });
62
64
  });
63
65
  export function getKeyDataFromJSON(jsonString) {
@@ -8,6 +8,7 @@ export * from "./createguardrail.js";
8
8
  export * from "./createkeys.js";
9
9
  export * from "./creatererank.js";
10
10
  export * from "./createresponses.js";
11
+ export * from "./createtts.js";
11
12
  export * from "./createvideos.js";
12
13
  export * from "./deleteguardrail.js";
13
14
  export * from "./deletekeys.js";
@@ -12,6 +12,7 @@ export * from "./createguardrail.js";
12
12
  export * from "./createkeys.js";
13
13
  export * from "./creatererank.js";
14
14
  export * from "./createresponses.js";
15
+ export * from "./createtts.js";
15
16
  export * from "./createvideos.js";
16
17
  export * from "./deleteguardrail.js";
17
18
  export * from "./deletekeys.js";
@@ -50,6 +50,10 @@ export type ListRequest = {
50
50
  * Number of API keys to skip for pagination
51
51
  */
52
52
  offset?: number | null | undefined;
53
+ /**
54
+ * Filter API keys by workspace ID. By default, keys in the default workspace are returned.
55
+ */
56
+ workspaceId?: string | undefined;
53
57
  };
54
58
  export type ListData = {
55
59
  /**
@@ -132,6 +136,10 @@ export type ListData = {
132
136
  * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
133
137
  */
134
138
  usageWeekly: number;
139
+ /**
140
+ * The workspace ID this API key belongs to.
141
+ */
142
+ workspaceId: string;
135
143
  };
136
144
  /**
137
145
  * List of API keys
@@ -149,6 +157,7 @@ export type ListRequest$Outbound = {
149
157
  appCategories?: string | undefined;
150
158
  include_disabled?: boolean | undefined;
151
159
  offset?: number | null | undefined;
160
+ workspace_id?: string | undefined;
152
161
  };
153
162
  /** @internal */
154
163
  export declare const ListRequest$outboundSchema: z.ZodType<ListRequest$Outbound, ListRequest>;
@@ -12,10 +12,12 @@ export const ListRequest$outboundSchema = z.object({
12
12
  appCategories: z.string().optional(),
13
13
  includeDisabled: z.boolean().optional(),
14
14
  offset: z.nullable(z.int()).optional(),
15
+ workspaceId: z.string().optional(),
15
16
  }).transform((v) => {
16
17
  return remap$(v, {
17
18
  httpReferer: "HTTP-Referer",
18
19
  includeDisabled: "include_disabled",
20
+ workspaceId: "workspace_id",
19
21
  });
20
22
  });
21
23
  export function listRequestToJSON(listRequest) {
@@ -43,6 +45,7 @@ export const ListData$inboundSchema = z.object({
43
45
  usage_daily: z.number(),
44
46
  usage_monthly: z.number(),
45
47
  usage_weekly: z.number(),
48
+ workspace_id: z.string(),
46
49
  }).transform((v) => {
47
50
  return remap$(v, {
48
51
  "byok_usage": "byokUsage",
@@ -59,6 +62,7 @@ export const ListData$inboundSchema = z.object({
59
62
  "usage_daily": "usageDaily",
60
63
  "usage_monthly": "usageMonthly",
61
64
  "usage_weekly": "usageWeekly",
65
+ "workspace_id": "workspaceId",
62
66
  });
63
67
  });
64
68
  export function listDataFromJSON(jsonString) {
@@ -51,6 +51,10 @@ export type ListGuardrailsRequest = {
51
51
  * Maximum number of records to return (max 100)
52
52
  */
53
53
  limit?: number | undefined;
54
+ /**
55
+ * Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
56
+ */
57
+ workspaceId?: string | undefined;
54
58
  };
55
59
  export type ListGuardrailsResponse = {
56
60
  result: models.ListGuardrailsResponse;
@@ -62,6 +66,7 @@ export type ListGuardrailsRequest$Outbound = {
62
66
  appCategories?: string | undefined;
63
67
  offset?: number | null | undefined;
64
68
  limit?: number | undefined;
69
+ workspace_id?: string | undefined;
65
70
  };
66
71
  /** @internal */
67
72
  export declare const ListGuardrailsRequest$outboundSchema: z.ZodType<ListGuardrailsRequest$Outbound, ListGuardrailsRequest>;
@@ -13,9 +13,11 @@ export const ListGuardrailsRequest$outboundSchema = z.object({
13
13
  appCategories: z.string().optional(),
14
14
  offset: z.nullable(z.int()).optional(),
15
15
  limit: z.int().optional(),
16
+ workspaceId: z.string().optional(),
16
17
  }).transform((v) => {
17
18
  return remap$(v, {
18
19
  httpReferer: "HTTP-Referer",
20
+ workspaceId: "workspace_id",
19
21
  });
20
22
  });
21
23
  export function listGuardrailsRequestToJSON(listGuardrailsRequest) {
@@ -167,6 +167,10 @@ export type UpdateKeysData = {
167
167
  * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
168
168
  */
169
169
  usageWeekly: number;
170
+ /**
171
+ * The workspace ID this API key belongs to.
172
+ */
173
+ workspaceId: string;
170
174
  };
171
175
  /**
172
176
  * API key updated successfully
@@ -70,6 +70,7 @@ export const UpdateKeysData$inboundSchema = z.object({
70
70
  usage_daily: z.number(),
71
71
  usage_monthly: z.number(),
72
72
  usage_weekly: z.number(),
73
+ workspace_id: z.string(),
73
74
  }).transform((v) => {
74
75
  return remap$(v, {
75
76
  "byok_usage": "byokUsage",
@@ -86,6 +87,7 @@ export const UpdateKeysData$inboundSchema = z.object({
86
87
  "usage_daily": "usageDaily",
87
88
  "usage_monthly": "usageMonthly",
88
89
  "usage_weekly": "usageWeekly",
90
+ "workspace_id": "workspaceId",
89
91
  });
90
92
  });
91
93
  export function updateKeysDataFromJSON(jsonString) {
@@ -7,6 +7,7 @@ export declare const OutputModality: {
7
7
  readonly Audio: "audio";
8
8
  readonly Video: "video";
9
9
  readonly Rerank: "rerank";
10
+ readonly Tts: "tts";
10
11
  };
11
12
  export type OutputModality = OpenEnum<typeof OutputModality>;
12
13
  /** @internal */
@@ -10,6 +10,7 @@ export const OutputModality = {
10
10
  Audio: "audio",
11
11
  Video: "video",
12
12
  Rerank: "rerank",
13
+ Tts: "tts",
13
14
  };
14
15
  /** @internal */
15
16
  export const OutputModality$inboundSchema = openEnums.inboundSchema(OutputModality);
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 { Tts } from "./tts.js";
16
17
  import { VideoGeneration } from "./videogeneration.js";
17
18
  import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core";
18
19
  import { type CallModelInput } from "../funcs/call-model.js";
@@ -49,6 +50,8 @@ export declare class OpenRouter extends ClientSDK {
49
50
  get rerank(): Rerank;
50
51
  private _beta?;
51
52
  get beta(): Beta;
53
+ private _tts?;
54
+ get tts(): Tts;
52
55
  private _videoGeneration?;
53
56
  get videoGeneration(): VideoGeneration;
54
57
  callModel<TTools extends readonly Tool[], TSharedSchema extends $ZodObject<$ZodShape> | undefined = undefined, TShared extends Record<string, unknown> = TSharedSchema extends $ZodObject<$ZodShape> ? zodInfer<TSharedSchema> : Record<string, never>>(request: CallModelInput<TTools, TShared> & {
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 { Tts } from "./tts.js";
20
21
  import { VideoGeneration } from "./videogeneration.js";
21
22
  import { callModel as callModelFunc, } from "../funcs/call-model.js";
22
23
  import { ToolType } from "../lib/tool-types.js";
@@ -65,6 +66,9 @@ export class OpenRouter extends ClientSDK {
65
66
  get beta() {
66
67
  return (this._beta ?? (this._beta = new Beta(this._options)));
67
68
  }
69
+ get tts() {
70
+ return (this._tts ?? (this._tts = new Tts(this._options)));
71
+ }
68
72
  get videoGeneration() {
69
73
  return (this._videoGeneration ?? (this._videoGeneration = new VideoGeneration(this._options)));
70
74
  }
@@ -0,0 +1,12 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as operations from "../models/operations/index.js";
3
+ export declare class Tts extends ClientSDK {
4
+ /**
5
+ * Create speech
6
+ *
7
+ * @remarks
8
+ * Synthesizes audio from the input text
9
+ */
10
+ createSpeech(request: operations.CreateTtsRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
11
+ }
12
+ //# sourceMappingURL=tts.d.ts.map
package/esm/sdk/tts.js ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b3236e8fa217
4
+ */
5
+ import { ttsCreateSpeech } from "../funcs/ttsCreateSpeech.js";
6
+ import { ClientSDK } from "../lib/sdks.js";
7
+ import { unwrapAsync } from "../types/fp.js";
8
+ export class Tts extends ClientSDK {
9
+ /**
10
+ * Create speech
11
+ *
12
+ * @remarks
13
+ * Synthesizes audio from the input text
14
+ */
15
+ async createSpeech(request, options) {
16
+ return unwrapAsync(ttsCreateSpeech(this, request, options));
17
+ }
18
+ }
19
+ //# sourceMappingURL=tts.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.12.14",
5
+ "version": "0.12.16",
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.14",
3
+ "version": "0.12.16",
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
- "postinstall": "node scripts/check-types.js || true",
73
72
  "test": "vitest --run --project unit",
74
- "test:e2e": "vitest --run --project e2e",
75
- "prepare": "npm run build",
76
73
  "test:transit": "exit 0",
77
- "test:watch": "vitest --watch --project unit",
78
74
  "typecheck": "tsc --noEmit",
75
+ "postinstall": "node scripts/check-types.js || true",
76
+ "test:e2e": "vitest --run --project e2e",
77
+ "test:watch": "vitest --watch --project unit",
79
78
  "typecheck:transit": "exit 0",
80
- "compile": "tsc"
79
+ "compile": "tsc",
80
+ "prepare": "npm run build"
81
81
  },
82
82
  "peerDependencies": {},
83
83
  "devDependencies": {