@openrouter/sdk 0.0.0-beta.32 → 0.0.0-beta.33

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 (168) hide show
  1. package/FUNCTIONS.md +2 -0
  2. package/REACT_QUERY.md +2 -0
  3. package/README.md +12 -0
  4. package/dist/commonjs/funcs/endpointsList.d.ts +1 -1
  5. package/dist/commonjs/funcs/endpointsList.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/endpointsList.js +1 -1
  7. package/dist/commonjs/funcs/endpointsList.js.map +1 -1
  8. package/dist/commonjs/funcs/modelsList.d.ts +1 -1
  9. package/dist/commonjs/funcs/modelsList.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/modelsList.js +1 -1
  11. package/dist/commonjs/funcs/modelsList.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/models/endpointslist.d.ts +768 -0
  15. package/dist/commonjs/models/endpointslist.d.ts.map +1 -0
  16. package/dist/commonjs/models/endpointslist.js +625 -0
  17. package/dist/commonjs/models/endpointslist.js.map +1 -0
  18. package/dist/commonjs/models/index.d.ts +3 -0
  19. package/dist/commonjs/models/index.d.ts.map +1 -1
  20. package/dist/commonjs/models/index.js +3 -0
  21. package/dist/commonjs/models/index.js.map +1 -1
  22. package/dist/commonjs/models/keyinfo.d.ts +155 -0
  23. package/dist/commonjs/models/keyinfo.d.ts.map +1 -0
  24. package/dist/commonjs/models/keyinfo.js +163 -0
  25. package/dist/commonjs/models/keyinfo.js.map +1 -0
  26. package/dist/commonjs/models/modelslist.d.ts +854 -0
  27. package/dist/commonjs/models/modelslist.d.ts.map +1 -0
  28. package/dist/commonjs/models/modelslist.js +768 -0
  29. package/dist/commonjs/models/modelslist.js.map +1 -0
  30. package/dist/commonjs/models/openairesponsesrequest.d.ts +52 -52
  31. package/dist/commonjs/models/openairesponsesrequest.d.ts.map +1 -1
  32. package/dist/commonjs/models/openairesponsesrequest.js +74 -76
  33. package/dist/commonjs/models/openairesponsesrequest.js.map +1 -1
  34. package/dist/commonjs/models/operations/getcurrentkey.d.ts +3 -108
  35. package/dist/commonjs/models/operations/getcurrentkey.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/getcurrentkey.js +4 -88
  37. package/dist/commonjs/models/operations/getcurrentkey.js.map +1 -1
  38. package/dist/commonjs/models/operations/list.d.ts +63 -825
  39. package/dist/commonjs/models/operations/list.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/list.js +86 -667
  41. package/dist/commonjs/models/operations/list.js.map +1 -1
  42. package/dist/commonjs/models/operations/listmodels.d.ts +16 -865
  43. package/dist/commonjs/models/operations/listmodels.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/listmodels.js +19 -742
  45. package/dist/commonjs/models/operations/listmodels.js.map +1 -1
  46. package/dist/commonjs/models/operations/listusermodels.d.ts +3 -852
  47. package/dist/commonjs/models/operations/listusermodels.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/listusermodels.js +4 -730
  49. package/dist/commonjs/models/operations/listusermodels.js.map +1 -1
  50. package/dist/commonjs/models/operations/previewzdr.d.ts +97 -97
  51. package/dist/commonjs/models/operations/previewzdr.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/previewzdr.js +134 -133
  53. package/dist/commonjs/models/operations/previewzdr.js.map +1 -1
  54. package/dist/commonjs/models/responsereasoningconfig.d.ts +4 -0
  55. package/dist/commonjs/models/responsereasoningconfig.d.ts.map +1 -1
  56. package/dist/commonjs/models/responsereasoningconfig.js +13 -0
  57. package/dist/commonjs/models/responsereasoningconfig.js.map +1 -1
  58. package/dist/commonjs/models/responsesusage.d.ts +41 -0
  59. package/dist/commonjs/models/responsesusage.d.ts.map +1 -1
  60. package/dist/commonjs/models/responsesusage.js +54 -1
  61. package/dist/commonjs/models/responsesusage.js.map +1 -1
  62. package/dist/commonjs/react-query/endpointsList.d.ts +4 -4
  63. package/dist/commonjs/react-query/endpointsList.d.ts.map +1 -1
  64. package/dist/commonjs/react-query/endpointsList.js.map +1 -1
  65. package/dist/commonjs/react-query/modelsList.d.ts +4 -4
  66. package/dist/commonjs/react-query/modelsList.d.ts.map +1 -1
  67. package/dist/commonjs/react-query/modelsList.js.map +1 -1
  68. package/dist/commonjs/sdk/endpoints.d.ts +1 -1
  69. package/dist/commonjs/sdk/endpoints.d.ts.map +1 -1
  70. package/dist/commonjs/sdk/endpoints.js.map +1 -1
  71. package/dist/commonjs/sdk/models.d.ts +1 -1
  72. package/dist/commonjs/sdk/models.d.ts.map +1 -1
  73. package/dist/commonjs/sdk/models.js.map +1 -1
  74. package/dist/esm/funcs/endpointsList.d.ts +1 -1
  75. package/dist/esm/funcs/endpointsList.d.ts.map +1 -1
  76. package/dist/esm/funcs/endpointsList.js +1 -1
  77. package/dist/esm/funcs/endpointsList.js.map +1 -1
  78. package/dist/esm/funcs/modelsList.d.ts +1 -1
  79. package/dist/esm/funcs/modelsList.d.ts.map +1 -1
  80. package/dist/esm/funcs/modelsList.js +1 -1
  81. package/dist/esm/funcs/modelsList.js.map +1 -1
  82. package/dist/esm/lib/config.d.ts +2 -2
  83. package/dist/esm/lib/config.js +2 -2
  84. package/dist/esm/models/endpointslist.d.ts +768 -0
  85. package/dist/esm/models/endpointslist.d.ts.map +1 -0
  86. package/dist/esm/models/endpointslist.js +562 -0
  87. package/dist/esm/models/endpointslist.js.map +1 -0
  88. package/dist/esm/models/index.d.ts +3 -0
  89. package/dist/esm/models/index.d.ts.map +1 -1
  90. package/dist/esm/models/index.js +3 -0
  91. package/dist/esm/models/index.js.map +1 -1
  92. package/dist/esm/models/keyinfo.d.ts +155 -0
  93. package/dist/esm/models/keyinfo.d.ts.map +1 -0
  94. package/dist/esm/models/keyinfo.js +123 -0
  95. package/dist/esm/models/keyinfo.js.map +1 -0
  96. package/dist/esm/models/modelslist.d.ts +854 -0
  97. package/dist/esm/models/modelslist.d.ts.map +1 -0
  98. package/dist/esm/models/modelslist.js +697 -0
  99. package/dist/esm/models/modelslist.js.map +1 -0
  100. package/dist/esm/models/openairesponsesrequest.d.ts +52 -52
  101. package/dist/esm/models/openairesponsesrequest.d.ts.map +1 -1
  102. package/dist/esm/models/openairesponsesrequest.js +64 -66
  103. package/dist/esm/models/openairesponsesrequest.js.map +1 -1
  104. package/dist/esm/models/operations/getcurrentkey.d.ts +3 -108
  105. package/dist/esm/models/operations/getcurrentkey.d.ts.map +1 -1
  106. package/dist/esm/models/operations/getcurrentkey.js +3 -83
  107. package/dist/esm/models/operations/getcurrentkey.js.map +1 -1
  108. package/dist/esm/models/operations/list.d.ts +63 -825
  109. package/dist/esm/models/operations/list.d.ts.map +1 -1
  110. package/dist/esm/models/operations/list.js +81 -635
  111. package/dist/esm/models/operations/list.js.map +1 -1
  112. package/dist/esm/models/operations/listmodels.d.ts +16 -865
  113. package/dist/esm/models/operations/listmodels.d.ts.map +1 -1
  114. package/dist/esm/models/operations/listmodels.js +16 -704
  115. package/dist/esm/models/operations/listmodels.js.map +1 -1
  116. package/dist/esm/models/operations/listusermodels.d.ts +3 -852
  117. package/dist/esm/models/operations/listusermodels.d.ts.map +1 -1
  118. package/dist/esm/models/operations/listusermodels.js +3 -694
  119. package/dist/esm/models/operations/listusermodels.js.map +1 -1
  120. package/dist/esm/models/operations/previewzdr.d.ts +97 -97
  121. package/dist/esm/models/operations/previewzdr.d.ts.map +1 -1
  122. package/dist/esm/models/operations/previewzdr.js +118 -117
  123. package/dist/esm/models/operations/previewzdr.js.map +1 -1
  124. package/dist/esm/models/responsereasoningconfig.d.ts +4 -0
  125. package/dist/esm/models/responsereasoningconfig.d.ts.map +1 -1
  126. package/dist/esm/models/responsereasoningconfig.js +13 -0
  127. package/dist/esm/models/responsereasoningconfig.js.map +1 -1
  128. package/dist/esm/models/responsesusage.d.ts +41 -0
  129. package/dist/esm/models/responsesusage.d.ts.map +1 -1
  130. package/dist/esm/models/responsesusage.js +51 -0
  131. package/dist/esm/models/responsesusage.js.map +1 -1
  132. package/dist/esm/react-query/endpointsList.d.ts +4 -4
  133. package/dist/esm/react-query/endpointsList.d.ts.map +1 -1
  134. package/dist/esm/react-query/endpointsList.js.map +1 -1
  135. package/dist/esm/react-query/modelsList.d.ts +4 -4
  136. package/dist/esm/react-query/modelsList.d.ts.map +1 -1
  137. package/dist/esm/react-query/modelsList.js.map +1 -1
  138. package/dist/esm/sdk/endpoints.d.ts +1 -1
  139. package/dist/esm/sdk/endpoints.d.ts.map +1 -1
  140. package/dist/esm/sdk/endpoints.js.map +1 -1
  141. package/dist/esm/sdk/models.d.ts +1 -1
  142. package/dist/esm/sdk/models.d.ts.map +1 -1
  143. package/dist/esm/sdk/models.js.map +1 -1
  144. package/docs/sdks/endpoints/README.md +1 -1
  145. package/docs/sdks/models/README.md +1 -1
  146. package/docs/sdks/responses/README.md +4 -0
  147. package/examples/betaResponsesSendRequest.example.ts +2 -0
  148. package/jsr.json +1 -1
  149. package/package.json +1 -1
  150. package/src/funcs/endpointsList.ts +3 -3
  151. package/src/funcs/modelsList.ts +3 -5
  152. package/src/lib/config.ts +2 -2
  153. package/src/models/endpointslist.ts +1034 -0
  154. package/src/models/index.ts +3 -0
  155. package/src/models/keyinfo.ts +281 -0
  156. package/src/models/modelslist.ts +1394 -0
  157. package/src/models/openairesponsesrequest.ts +133 -94
  158. package/src/models/operations/getcurrentkey.ts +5 -203
  159. package/src/models/operations/list.ts +109 -1106
  160. package/src/models/operations/listmodels.ts +26 -1436
  161. package/src/models/operations/listusermodels.ts +5 -1440
  162. package/src/models/operations/previewzdr.ts +196 -225
  163. package/src/models/responsereasoningconfig.ts +17 -0
  164. package/src/models/responsesusage.ts +96 -0
  165. package/src/react-query/endpointsList.ts +4 -4
  166. package/src/react-query/modelsList.ts +4 -4
  167. package/src/sdk/endpoints.ts +1 -1
  168. package/src/sdk/models.ts +1 -1
@@ -0,0 +1,1034 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ClosedEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
+
12
+ export type EndpointsListPrompt = number | string | any;
13
+
14
+ export type EndpointsListCompletion = number | string | any;
15
+
16
+ export type EndpointsListRequest = number | string | any;
17
+
18
+ export type EndpointsListImage = number | string | any;
19
+
20
+ export type EndpointsListImageOutput = number | string | any;
21
+
22
+ export type EndpointsListAudio = number | string | any;
23
+
24
+ export type EndpointsListInputAudioCache = number | string | any;
25
+
26
+ export type EndpointsListWebSearch = number | string | any;
27
+
28
+ export type EndpointsListInternalReasoning = number | string | any;
29
+
30
+ export type EndpointsListInputCacheRead = number | string | any;
31
+
32
+ export type EndpointsListInputCacheWrite = number | string | any;
33
+
34
+ export type EndpointsListPricing = {
35
+ prompt?: number | string | any | undefined;
36
+ completion?: number | string | any | undefined;
37
+ request?: number | string | any | undefined;
38
+ image?: number | string | any | undefined;
39
+ imageOutput?: number | string | any | undefined;
40
+ audio?: number | string | any | undefined;
41
+ inputAudioCache?: number | string | any | undefined;
42
+ webSearch?: number | string | any | undefined;
43
+ internalReasoning?: number | string | any | undefined;
44
+ inputCacheRead?: number | string | any | undefined;
45
+ inputCacheWrite?: number | string | any | undefined;
46
+ discount?: number | undefined;
47
+ };
48
+
49
+ export const ProviderName = {
50
+ AnyScale: "AnyScale",
51
+ CentML: "Cent-ML",
52
+ HuggingFace: "HuggingFace",
53
+ Hyperbolic2: "Hyperbolic 2",
54
+ Lepton: "Lepton",
55
+ Lynn2: "Lynn 2",
56
+ Lynn: "Lynn",
57
+ Mancer: "Mancer",
58
+ Modal: "Modal",
59
+ OctoAI: "OctoAI",
60
+ Recursal: "Recursal",
61
+ Reflection: "Reflection",
62
+ Replicate: "Replicate",
63
+ SambaNova2: "SambaNova 2",
64
+ SFCompute: "SF Compute",
65
+ Together2: "Together 2",
66
+ OneDotAI: "01.AI",
67
+ Ai21: "AI21",
68
+ AionLabs: "AionLabs",
69
+ Alibaba: "Alibaba",
70
+ AmazonBedrock: "Amazon Bedrock",
71
+ Anthropic: "Anthropic",
72
+ AtlasCloud: "AtlasCloud",
73
+ Atoma: "Atoma",
74
+ Avian: "Avian",
75
+ Azure: "Azure",
76
+ BaseTen: "BaseTen",
77
+ Cerebras: "Cerebras",
78
+ Chutes: "Chutes",
79
+ Cloudflare: "Cloudflare",
80
+ Cohere: "Cohere",
81
+ CrofAI: "CrofAI",
82
+ Crusoe: "Crusoe",
83
+ DeepInfra: "DeepInfra",
84
+ DeepSeek: "DeepSeek",
85
+ Enfer: "Enfer",
86
+ Featherless: "Featherless",
87
+ Fireworks: "Fireworks",
88
+ Friendli: "Friendli",
89
+ GMICloud: "GMICloud",
90
+ Google: "Google",
91
+ GoogleAIStudio: "Google AI Studio",
92
+ Groq: "Groq",
93
+ Hyperbolic: "Hyperbolic",
94
+ Inception: "Inception",
95
+ InferenceNet: "InferenceNet",
96
+ Infermatic: "Infermatic",
97
+ Inflection: "Inflection",
98
+ InoCloud: "InoCloud",
99
+ Kluster: "Kluster",
100
+ Lambda: "Lambda",
101
+ Liquid: "Liquid",
102
+ Mancer2: "Mancer 2",
103
+ Meta: "Meta",
104
+ Minimax: "Minimax",
105
+ Mistral: "Mistral",
106
+ MoonshotAI: "Moonshot AI",
107
+ Morph: "Morph",
108
+ NCompass: "NCompass",
109
+ Nebius: "Nebius",
110
+ NextBit: "NextBit",
111
+ Nineteen: "Nineteen",
112
+ Novita: "Novita",
113
+ Nvidia: "Nvidia",
114
+ OpenAI: "OpenAI",
115
+ OpenInference: "OpenInference",
116
+ Parasail: "Parasail",
117
+ Perplexity: "Perplexity",
118
+ Phala: "Phala",
119
+ Relace: "Relace",
120
+ SambaNova: "SambaNova",
121
+ SiliconFlow: "SiliconFlow",
122
+ Stealth: "Stealth",
123
+ Switchpoint: "Switchpoint",
124
+ Targon: "Targon",
125
+ Together: "Together",
126
+ Ubicloud: "Ubicloud",
127
+ Venice: "Venice",
128
+ WandB: "WandB",
129
+ XAI: "xAI",
130
+ ZAi: "Z.AI",
131
+ FakeProvider: "FakeProvider",
132
+ } as const;
133
+ export type ProviderName = ClosedEnum<typeof ProviderName>;
134
+
135
+ export const EndpointsListQuantization = {
136
+ Int4: "int4",
137
+ Int8: "int8",
138
+ Fp4: "fp4",
139
+ Fp6: "fp6",
140
+ Fp8: "fp8",
141
+ Fp16: "fp16",
142
+ Bf16: "bf16",
143
+ Fp32: "fp32",
144
+ Unknown: "unknown",
145
+ } as const;
146
+ export type EndpointsListQuantization = ClosedEnum<
147
+ typeof EndpointsListQuantization
148
+ >;
149
+
150
+ export const EndpointsListSupportedParameter = {
151
+ Temperature: "temperature",
152
+ TopP: "top_p",
153
+ TopK: "top_k",
154
+ MinP: "min_p",
155
+ TopA: "top_a",
156
+ FrequencyPenalty: "frequency_penalty",
157
+ PresencePenalty: "presence_penalty",
158
+ RepetitionPenalty: "repetition_penalty",
159
+ MaxTokens: "max_tokens",
160
+ LogitBias: "logit_bias",
161
+ Logprobs: "logprobs",
162
+ TopLogprobs: "top_logprobs",
163
+ Seed: "seed",
164
+ ResponseFormat: "response_format",
165
+ StructuredOutputs: "structured_outputs",
166
+ Stop: "stop",
167
+ Tools: "tools",
168
+ ToolChoice: "tool_choice",
169
+ ParallelToolCalls: "parallel_tool_calls",
170
+ IncludeReasoning: "include_reasoning",
171
+ Reasoning: "reasoning",
172
+ WebSearchOptions: "web_search_options",
173
+ Verbosity: "verbosity",
174
+ } as const;
175
+ export type EndpointsListSupportedParameter = ClosedEnum<
176
+ typeof EndpointsListSupportedParameter
177
+ >;
178
+
179
+ export const EndpointsListStatus = {
180
+ Zero: 0,
181
+ Minus1: -1,
182
+ Minus2: -2,
183
+ Minus3: -3,
184
+ Minus5: -5,
185
+ Minus10: -10,
186
+ } as const;
187
+ export type EndpointsListStatus = ClosedEnum<typeof EndpointsListStatus>;
188
+
189
+ export type EndpointsList = {
190
+ name: string;
191
+ modelName: string;
192
+ contextLength: number;
193
+ pricing: EndpointsListPricing;
194
+ providerName: ProviderName;
195
+ tag: string;
196
+ quantization: EndpointsListQuantization | null;
197
+ maxCompletionTokens: number | null;
198
+ maxPromptTokens: number | null;
199
+ supportedParameters: Array<EndpointsListSupportedParameter>;
200
+ status?: EndpointsListStatus | undefined;
201
+ uptimeLast30m: number | null;
202
+ supportsImplicitCaching: boolean;
203
+ };
204
+
205
+ /** @internal */
206
+ export const EndpointsListPrompt$inboundSchema: z.ZodType<
207
+ EndpointsListPrompt,
208
+ z.ZodTypeDef,
209
+ unknown
210
+ > = z.union([z.number(), z.string(), z.any()]);
211
+
212
+ /** @internal */
213
+ export type EndpointsListPrompt$Outbound = number | string | any;
214
+
215
+ /** @internal */
216
+ export const EndpointsListPrompt$outboundSchema: z.ZodType<
217
+ EndpointsListPrompt$Outbound,
218
+ z.ZodTypeDef,
219
+ EndpointsListPrompt
220
+ > = z.union([z.number(), z.string(), z.any()]);
221
+
222
+ /**
223
+ * @internal
224
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
225
+ */
226
+ export namespace EndpointsListPrompt$ {
227
+ /** @deprecated use `EndpointsListPrompt$inboundSchema` instead. */
228
+ export const inboundSchema = EndpointsListPrompt$inboundSchema;
229
+ /** @deprecated use `EndpointsListPrompt$outboundSchema` instead. */
230
+ export const outboundSchema = EndpointsListPrompt$outboundSchema;
231
+ /** @deprecated use `EndpointsListPrompt$Outbound` instead. */
232
+ export type Outbound = EndpointsListPrompt$Outbound;
233
+ }
234
+
235
+ export function endpointsListPromptToJSON(
236
+ endpointsListPrompt: EndpointsListPrompt,
237
+ ): string {
238
+ return JSON.stringify(
239
+ EndpointsListPrompt$outboundSchema.parse(endpointsListPrompt),
240
+ );
241
+ }
242
+
243
+ export function endpointsListPromptFromJSON(
244
+ jsonString: string,
245
+ ): SafeParseResult<EndpointsListPrompt, SDKValidationError> {
246
+ return safeParse(
247
+ jsonString,
248
+ (x) => EndpointsListPrompt$inboundSchema.parse(JSON.parse(x)),
249
+ `Failed to parse 'EndpointsListPrompt' from JSON`,
250
+ );
251
+ }
252
+
253
+ /** @internal */
254
+ export const EndpointsListCompletion$inboundSchema: z.ZodType<
255
+ EndpointsListCompletion,
256
+ z.ZodTypeDef,
257
+ unknown
258
+ > = z.union([z.number(), z.string(), z.any()]);
259
+
260
+ /** @internal */
261
+ export type EndpointsListCompletion$Outbound = number | string | any;
262
+
263
+ /** @internal */
264
+ export const EndpointsListCompletion$outboundSchema: z.ZodType<
265
+ EndpointsListCompletion$Outbound,
266
+ z.ZodTypeDef,
267
+ EndpointsListCompletion
268
+ > = z.union([z.number(), z.string(), z.any()]);
269
+
270
+ /**
271
+ * @internal
272
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
273
+ */
274
+ export namespace EndpointsListCompletion$ {
275
+ /** @deprecated use `EndpointsListCompletion$inboundSchema` instead. */
276
+ export const inboundSchema = EndpointsListCompletion$inboundSchema;
277
+ /** @deprecated use `EndpointsListCompletion$outboundSchema` instead. */
278
+ export const outboundSchema = EndpointsListCompletion$outboundSchema;
279
+ /** @deprecated use `EndpointsListCompletion$Outbound` instead. */
280
+ export type Outbound = EndpointsListCompletion$Outbound;
281
+ }
282
+
283
+ export function endpointsListCompletionToJSON(
284
+ endpointsListCompletion: EndpointsListCompletion,
285
+ ): string {
286
+ return JSON.stringify(
287
+ EndpointsListCompletion$outboundSchema.parse(endpointsListCompletion),
288
+ );
289
+ }
290
+
291
+ export function endpointsListCompletionFromJSON(
292
+ jsonString: string,
293
+ ): SafeParseResult<EndpointsListCompletion, SDKValidationError> {
294
+ return safeParse(
295
+ jsonString,
296
+ (x) => EndpointsListCompletion$inboundSchema.parse(JSON.parse(x)),
297
+ `Failed to parse 'EndpointsListCompletion' from JSON`,
298
+ );
299
+ }
300
+
301
+ /** @internal */
302
+ export const EndpointsListRequest$inboundSchema: z.ZodType<
303
+ EndpointsListRequest,
304
+ z.ZodTypeDef,
305
+ unknown
306
+ > = z.union([z.number(), z.string(), z.any()]);
307
+
308
+ /** @internal */
309
+ export type EndpointsListRequest$Outbound = number | string | any;
310
+
311
+ /** @internal */
312
+ export const EndpointsListRequest$outboundSchema: z.ZodType<
313
+ EndpointsListRequest$Outbound,
314
+ z.ZodTypeDef,
315
+ EndpointsListRequest
316
+ > = z.union([z.number(), z.string(), z.any()]);
317
+
318
+ /**
319
+ * @internal
320
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
321
+ */
322
+ export namespace EndpointsListRequest$ {
323
+ /** @deprecated use `EndpointsListRequest$inboundSchema` instead. */
324
+ export const inboundSchema = EndpointsListRequest$inboundSchema;
325
+ /** @deprecated use `EndpointsListRequest$outboundSchema` instead. */
326
+ export const outboundSchema = EndpointsListRequest$outboundSchema;
327
+ /** @deprecated use `EndpointsListRequest$Outbound` instead. */
328
+ export type Outbound = EndpointsListRequest$Outbound;
329
+ }
330
+
331
+ export function endpointsListRequestToJSON(
332
+ endpointsListRequest: EndpointsListRequest,
333
+ ): string {
334
+ return JSON.stringify(
335
+ EndpointsListRequest$outboundSchema.parse(endpointsListRequest),
336
+ );
337
+ }
338
+
339
+ export function endpointsListRequestFromJSON(
340
+ jsonString: string,
341
+ ): SafeParseResult<EndpointsListRequest, SDKValidationError> {
342
+ return safeParse(
343
+ jsonString,
344
+ (x) => EndpointsListRequest$inboundSchema.parse(JSON.parse(x)),
345
+ `Failed to parse 'EndpointsListRequest' from JSON`,
346
+ );
347
+ }
348
+
349
+ /** @internal */
350
+ export const EndpointsListImage$inboundSchema: z.ZodType<
351
+ EndpointsListImage,
352
+ z.ZodTypeDef,
353
+ unknown
354
+ > = z.union([z.number(), z.string(), z.any()]);
355
+
356
+ /** @internal */
357
+ export type EndpointsListImage$Outbound = number | string | any;
358
+
359
+ /** @internal */
360
+ export const EndpointsListImage$outboundSchema: z.ZodType<
361
+ EndpointsListImage$Outbound,
362
+ z.ZodTypeDef,
363
+ EndpointsListImage
364
+ > = z.union([z.number(), z.string(), z.any()]);
365
+
366
+ /**
367
+ * @internal
368
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
369
+ */
370
+ export namespace EndpointsListImage$ {
371
+ /** @deprecated use `EndpointsListImage$inboundSchema` instead. */
372
+ export const inboundSchema = EndpointsListImage$inboundSchema;
373
+ /** @deprecated use `EndpointsListImage$outboundSchema` instead. */
374
+ export const outboundSchema = EndpointsListImage$outboundSchema;
375
+ /** @deprecated use `EndpointsListImage$Outbound` instead. */
376
+ export type Outbound = EndpointsListImage$Outbound;
377
+ }
378
+
379
+ export function endpointsListImageToJSON(
380
+ endpointsListImage: EndpointsListImage,
381
+ ): string {
382
+ return JSON.stringify(
383
+ EndpointsListImage$outboundSchema.parse(endpointsListImage),
384
+ );
385
+ }
386
+
387
+ export function endpointsListImageFromJSON(
388
+ jsonString: string,
389
+ ): SafeParseResult<EndpointsListImage, SDKValidationError> {
390
+ return safeParse(
391
+ jsonString,
392
+ (x) => EndpointsListImage$inboundSchema.parse(JSON.parse(x)),
393
+ `Failed to parse 'EndpointsListImage' from JSON`,
394
+ );
395
+ }
396
+
397
+ /** @internal */
398
+ export const EndpointsListImageOutput$inboundSchema: z.ZodType<
399
+ EndpointsListImageOutput,
400
+ z.ZodTypeDef,
401
+ unknown
402
+ > = z.union([z.number(), z.string(), z.any()]);
403
+
404
+ /** @internal */
405
+ export type EndpointsListImageOutput$Outbound = number | string | any;
406
+
407
+ /** @internal */
408
+ export const EndpointsListImageOutput$outboundSchema: z.ZodType<
409
+ EndpointsListImageOutput$Outbound,
410
+ z.ZodTypeDef,
411
+ EndpointsListImageOutput
412
+ > = z.union([z.number(), z.string(), z.any()]);
413
+
414
+ /**
415
+ * @internal
416
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
417
+ */
418
+ export namespace EndpointsListImageOutput$ {
419
+ /** @deprecated use `EndpointsListImageOutput$inboundSchema` instead. */
420
+ export const inboundSchema = EndpointsListImageOutput$inboundSchema;
421
+ /** @deprecated use `EndpointsListImageOutput$outboundSchema` instead. */
422
+ export const outboundSchema = EndpointsListImageOutput$outboundSchema;
423
+ /** @deprecated use `EndpointsListImageOutput$Outbound` instead. */
424
+ export type Outbound = EndpointsListImageOutput$Outbound;
425
+ }
426
+
427
+ export function endpointsListImageOutputToJSON(
428
+ endpointsListImageOutput: EndpointsListImageOutput,
429
+ ): string {
430
+ return JSON.stringify(
431
+ EndpointsListImageOutput$outboundSchema.parse(endpointsListImageOutput),
432
+ );
433
+ }
434
+
435
+ export function endpointsListImageOutputFromJSON(
436
+ jsonString: string,
437
+ ): SafeParseResult<EndpointsListImageOutput, SDKValidationError> {
438
+ return safeParse(
439
+ jsonString,
440
+ (x) => EndpointsListImageOutput$inboundSchema.parse(JSON.parse(x)),
441
+ `Failed to parse 'EndpointsListImageOutput' from JSON`,
442
+ );
443
+ }
444
+
445
+ /** @internal */
446
+ export const EndpointsListAudio$inboundSchema: z.ZodType<
447
+ EndpointsListAudio,
448
+ z.ZodTypeDef,
449
+ unknown
450
+ > = z.union([z.number(), z.string(), z.any()]);
451
+
452
+ /** @internal */
453
+ export type EndpointsListAudio$Outbound = number | string | any;
454
+
455
+ /** @internal */
456
+ export const EndpointsListAudio$outboundSchema: z.ZodType<
457
+ EndpointsListAudio$Outbound,
458
+ z.ZodTypeDef,
459
+ EndpointsListAudio
460
+ > = z.union([z.number(), z.string(), z.any()]);
461
+
462
+ /**
463
+ * @internal
464
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
465
+ */
466
+ export namespace EndpointsListAudio$ {
467
+ /** @deprecated use `EndpointsListAudio$inboundSchema` instead. */
468
+ export const inboundSchema = EndpointsListAudio$inboundSchema;
469
+ /** @deprecated use `EndpointsListAudio$outboundSchema` instead. */
470
+ export const outboundSchema = EndpointsListAudio$outboundSchema;
471
+ /** @deprecated use `EndpointsListAudio$Outbound` instead. */
472
+ export type Outbound = EndpointsListAudio$Outbound;
473
+ }
474
+
475
+ export function endpointsListAudioToJSON(
476
+ endpointsListAudio: EndpointsListAudio,
477
+ ): string {
478
+ return JSON.stringify(
479
+ EndpointsListAudio$outboundSchema.parse(endpointsListAudio),
480
+ );
481
+ }
482
+
483
+ export function endpointsListAudioFromJSON(
484
+ jsonString: string,
485
+ ): SafeParseResult<EndpointsListAudio, SDKValidationError> {
486
+ return safeParse(
487
+ jsonString,
488
+ (x) => EndpointsListAudio$inboundSchema.parse(JSON.parse(x)),
489
+ `Failed to parse 'EndpointsListAudio' from JSON`,
490
+ );
491
+ }
492
+
493
+ /** @internal */
494
+ export const EndpointsListInputAudioCache$inboundSchema: z.ZodType<
495
+ EndpointsListInputAudioCache,
496
+ z.ZodTypeDef,
497
+ unknown
498
+ > = z.union([z.number(), z.string(), z.any()]);
499
+
500
+ /** @internal */
501
+ export type EndpointsListInputAudioCache$Outbound = number | string | any;
502
+
503
+ /** @internal */
504
+ export const EndpointsListInputAudioCache$outboundSchema: z.ZodType<
505
+ EndpointsListInputAudioCache$Outbound,
506
+ z.ZodTypeDef,
507
+ EndpointsListInputAudioCache
508
+ > = z.union([z.number(), z.string(), z.any()]);
509
+
510
+ /**
511
+ * @internal
512
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
513
+ */
514
+ export namespace EndpointsListInputAudioCache$ {
515
+ /** @deprecated use `EndpointsListInputAudioCache$inboundSchema` instead. */
516
+ export const inboundSchema = EndpointsListInputAudioCache$inboundSchema;
517
+ /** @deprecated use `EndpointsListInputAudioCache$outboundSchema` instead. */
518
+ export const outboundSchema = EndpointsListInputAudioCache$outboundSchema;
519
+ /** @deprecated use `EndpointsListInputAudioCache$Outbound` instead. */
520
+ export type Outbound = EndpointsListInputAudioCache$Outbound;
521
+ }
522
+
523
+ export function endpointsListInputAudioCacheToJSON(
524
+ endpointsListInputAudioCache: EndpointsListInputAudioCache,
525
+ ): string {
526
+ return JSON.stringify(
527
+ EndpointsListInputAudioCache$outboundSchema.parse(
528
+ endpointsListInputAudioCache,
529
+ ),
530
+ );
531
+ }
532
+
533
+ export function endpointsListInputAudioCacheFromJSON(
534
+ jsonString: string,
535
+ ): SafeParseResult<EndpointsListInputAudioCache, SDKValidationError> {
536
+ return safeParse(
537
+ jsonString,
538
+ (x) => EndpointsListInputAudioCache$inboundSchema.parse(JSON.parse(x)),
539
+ `Failed to parse 'EndpointsListInputAudioCache' from JSON`,
540
+ );
541
+ }
542
+
543
+ /** @internal */
544
+ export const EndpointsListWebSearch$inboundSchema: z.ZodType<
545
+ EndpointsListWebSearch,
546
+ z.ZodTypeDef,
547
+ unknown
548
+ > = z.union([z.number(), z.string(), z.any()]);
549
+
550
+ /** @internal */
551
+ export type EndpointsListWebSearch$Outbound = number | string | any;
552
+
553
+ /** @internal */
554
+ export const EndpointsListWebSearch$outboundSchema: z.ZodType<
555
+ EndpointsListWebSearch$Outbound,
556
+ z.ZodTypeDef,
557
+ EndpointsListWebSearch
558
+ > = z.union([z.number(), z.string(), z.any()]);
559
+
560
+ /**
561
+ * @internal
562
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
563
+ */
564
+ export namespace EndpointsListWebSearch$ {
565
+ /** @deprecated use `EndpointsListWebSearch$inboundSchema` instead. */
566
+ export const inboundSchema = EndpointsListWebSearch$inboundSchema;
567
+ /** @deprecated use `EndpointsListWebSearch$outboundSchema` instead. */
568
+ export const outboundSchema = EndpointsListWebSearch$outboundSchema;
569
+ /** @deprecated use `EndpointsListWebSearch$Outbound` instead. */
570
+ export type Outbound = EndpointsListWebSearch$Outbound;
571
+ }
572
+
573
+ export function endpointsListWebSearchToJSON(
574
+ endpointsListWebSearch: EndpointsListWebSearch,
575
+ ): string {
576
+ return JSON.stringify(
577
+ EndpointsListWebSearch$outboundSchema.parse(endpointsListWebSearch),
578
+ );
579
+ }
580
+
581
+ export function endpointsListWebSearchFromJSON(
582
+ jsonString: string,
583
+ ): SafeParseResult<EndpointsListWebSearch, SDKValidationError> {
584
+ return safeParse(
585
+ jsonString,
586
+ (x) => EndpointsListWebSearch$inboundSchema.parse(JSON.parse(x)),
587
+ `Failed to parse 'EndpointsListWebSearch' from JSON`,
588
+ );
589
+ }
590
+
591
+ /** @internal */
592
+ export const EndpointsListInternalReasoning$inboundSchema: z.ZodType<
593
+ EndpointsListInternalReasoning,
594
+ z.ZodTypeDef,
595
+ unknown
596
+ > = z.union([z.number(), z.string(), z.any()]);
597
+
598
+ /** @internal */
599
+ export type EndpointsListInternalReasoning$Outbound = number | string | any;
600
+
601
+ /** @internal */
602
+ export const EndpointsListInternalReasoning$outboundSchema: z.ZodType<
603
+ EndpointsListInternalReasoning$Outbound,
604
+ z.ZodTypeDef,
605
+ EndpointsListInternalReasoning
606
+ > = z.union([z.number(), z.string(), z.any()]);
607
+
608
+ /**
609
+ * @internal
610
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
611
+ */
612
+ export namespace EndpointsListInternalReasoning$ {
613
+ /** @deprecated use `EndpointsListInternalReasoning$inboundSchema` instead. */
614
+ export const inboundSchema = EndpointsListInternalReasoning$inboundSchema;
615
+ /** @deprecated use `EndpointsListInternalReasoning$outboundSchema` instead. */
616
+ export const outboundSchema = EndpointsListInternalReasoning$outboundSchema;
617
+ /** @deprecated use `EndpointsListInternalReasoning$Outbound` instead. */
618
+ export type Outbound = EndpointsListInternalReasoning$Outbound;
619
+ }
620
+
621
+ export function endpointsListInternalReasoningToJSON(
622
+ endpointsListInternalReasoning: EndpointsListInternalReasoning,
623
+ ): string {
624
+ return JSON.stringify(
625
+ EndpointsListInternalReasoning$outboundSchema.parse(
626
+ endpointsListInternalReasoning,
627
+ ),
628
+ );
629
+ }
630
+
631
+ export function endpointsListInternalReasoningFromJSON(
632
+ jsonString: string,
633
+ ): SafeParseResult<EndpointsListInternalReasoning, SDKValidationError> {
634
+ return safeParse(
635
+ jsonString,
636
+ (x) => EndpointsListInternalReasoning$inboundSchema.parse(JSON.parse(x)),
637
+ `Failed to parse 'EndpointsListInternalReasoning' from JSON`,
638
+ );
639
+ }
640
+
641
+ /** @internal */
642
+ export const EndpointsListInputCacheRead$inboundSchema: z.ZodType<
643
+ EndpointsListInputCacheRead,
644
+ z.ZodTypeDef,
645
+ unknown
646
+ > = z.union([z.number(), z.string(), z.any()]);
647
+
648
+ /** @internal */
649
+ export type EndpointsListInputCacheRead$Outbound = number | string | any;
650
+
651
+ /** @internal */
652
+ export const EndpointsListInputCacheRead$outboundSchema: z.ZodType<
653
+ EndpointsListInputCacheRead$Outbound,
654
+ z.ZodTypeDef,
655
+ EndpointsListInputCacheRead
656
+ > = z.union([z.number(), z.string(), z.any()]);
657
+
658
+ /**
659
+ * @internal
660
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
661
+ */
662
+ export namespace EndpointsListInputCacheRead$ {
663
+ /** @deprecated use `EndpointsListInputCacheRead$inboundSchema` instead. */
664
+ export const inboundSchema = EndpointsListInputCacheRead$inboundSchema;
665
+ /** @deprecated use `EndpointsListInputCacheRead$outboundSchema` instead. */
666
+ export const outboundSchema = EndpointsListInputCacheRead$outboundSchema;
667
+ /** @deprecated use `EndpointsListInputCacheRead$Outbound` instead. */
668
+ export type Outbound = EndpointsListInputCacheRead$Outbound;
669
+ }
670
+
671
+ export function endpointsListInputCacheReadToJSON(
672
+ endpointsListInputCacheRead: EndpointsListInputCacheRead,
673
+ ): string {
674
+ return JSON.stringify(
675
+ EndpointsListInputCacheRead$outboundSchema.parse(
676
+ endpointsListInputCacheRead,
677
+ ),
678
+ );
679
+ }
680
+
681
+ export function endpointsListInputCacheReadFromJSON(
682
+ jsonString: string,
683
+ ): SafeParseResult<EndpointsListInputCacheRead, SDKValidationError> {
684
+ return safeParse(
685
+ jsonString,
686
+ (x) => EndpointsListInputCacheRead$inboundSchema.parse(JSON.parse(x)),
687
+ `Failed to parse 'EndpointsListInputCacheRead' from JSON`,
688
+ );
689
+ }
690
+
691
+ /** @internal */
692
+ export const EndpointsListInputCacheWrite$inboundSchema: z.ZodType<
693
+ EndpointsListInputCacheWrite,
694
+ z.ZodTypeDef,
695
+ unknown
696
+ > = z.union([z.number(), z.string(), z.any()]);
697
+
698
+ /** @internal */
699
+ export type EndpointsListInputCacheWrite$Outbound = number | string | any;
700
+
701
+ /** @internal */
702
+ export const EndpointsListInputCacheWrite$outboundSchema: z.ZodType<
703
+ EndpointsListInputCacheWrite$Outbound,
704
+ z.ZodTypeDef,
705
+ EndpointsListInputCacheWrite
706
+ > = z.union([z.number(), z.string(), z.any()]);
707
+
708
+ /**
709
+ * @internal
710
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
711
+ */
712
+ export namespace EndpointsListInputCacheWrite$ {
713
+ /** @deprecated use `EndpointsListInputCacheWrite$inboundSchema` instead. */
714
+ export const inboundSchema = EndpointsListInputCacheWrite$inboundSchema;
715
+ /** @deprecated use `EndpointsListInputCacheWrite$outboundSchema` instead. */
716
+ export const outboundSchema = EndpointsListInputCacheWrite$outboundSchema;
717
+ /** @deprecated use `EndpointsListInputCacheWrite$Outbound` instead. */
718
+ export type Outbound = EndpointsListInputCacheWrite$Outbound;
719
+ }
720
+
721
+ export function endpointsListInputCacheWriteToJSON(
722
+ endpointsListInputCacheWrite: EndpointsListInputCacheWrite,
723
+ ): string {
724
+ return JSON.stringify(
725
+ EndpointsListInputCacheWrite$outboundSchema.parse(
726
+ endpointsListInputCacheWrite,
727
+ ),
728
+ );
729
+ }
730
+
731
+ export function endpointsListInputCacheWriteFromJSON(
732
+ jsonString: string,
733
+ ): SafeParseResult<EndpointsListInputCacheWrite, SDKValidationError> {
734
+ return safeParse(
735
+ jsonString,
736
+ (x) => EndpointsListInputCacheWrite$inboundSchema.parse(JSON.parse(x)),
737
+ `Failed to parse 'EndpointsListInputCacheWrite' from JSON`,
738
+ );
739
+ }
740
+
741
+ /** @internal */
742
+ export const EndpointsListPricing$inboundSchema: z.ZodType<
743
+ EndpointsListPricing,
744
+ z.ZodTypeDef,
745
+ unknown
746
+ > = z.object({
747
+ prompt: z.union([z.number(), z.string(), z.any()]).optional(),
748
+ completion: z.union([z.number(), z.string(), z.any()]).optional(),
749
+ request: z.union([z.number(), z.string(), z.any()]).optional(),
750
+ image: z.union([z.number(), z.string(), z.any()]).optional(),
751
+ image_output: z.union([z.number(), z.string(), z.any()]).optional(),
752
+ audio: z.union([z.number(), z.string(), z.any()]).optional(),
753
+ input_audio_cache: z.union([z.number(), z.string(), z.any()]).optional(),
754
+ web_search: z.union([z.number(), z.string(), z.any()]).optional(),
755
+ internal_reasoning: z.union([z.number(), z.string(), z.any()]).optional(),
756
+ input_cache_read: z.union([z.number(), z.string(), z.any()]).optional(),
757
+ input_cache_write: z.union([z.number(), z.string(), z.any()]).optional(),
758
+ discount: z.number().optional(),
759
+ }).transform((v) => {
760
+ return remap$(v, {
761
+ "image_output": "imageOutput",
762
+ "input_audio_cache": "inputAudioCache",
763
+ "web_search": "webSearch",
764
+ "internal_reasoning": "internalReasoning",
765
+ "input_cache_read": "inputCacheRead",
766
+ "input_cache_write": "inputCacheWrite",
767
+ });
768
+ });
769
+
770
+ /** @internal */
771
+ export type EndpointsListPricing$Outbound = {
772
+ prompt?: number | string | any | undefined;
773
+ completion?: number | string | any | undefined;
774
+ request?: number | string | any | undefined;
775
+ image?: number | string | any | undefined;
776
+ image_output?: number | string | any | undefined;
777
+ audio?: number | string | any | undefined;
778
+ input_audio_cache?: number | string | any | undefined;
779
+ web_search?: number | string | any | undefined;
780
+ internal_reasoning?: number | string | any | undefined;
781
+ input_cache_read?: number | string | any | undefined;
782
+ input_cache_write?: number | string | any | undefined;
783
+ discount?: number | undefined;
784
+ };
785
+
786
+ /** @internal */
787
+ export const EndpointsListPricing$outboundSchema: z.ZodType<
788
+ EndpointsListPricing$Outbound,
789
+ z.ZodTypeDef,
790
+ EndpointsListPricing
791
+ > = z.object({
792
+ prompt: z.union([z.number(), z.string(), z.any()]).optional(),
793
+ completion: z.union([z.number(), z.string(), z.any()]).optional(),
794
+ request: z.union([z.number(), z.string(), z.any()]).optional(),
795
+ image: z.union([z.number(), z.string(), z.any()]).optional(),
796
+ imageOutput: z.union([z.number(), z.string(), z.any()]).optional(),
797
+ audio: z.union([z.number(), z.string(), z.any()]).optional(),
798
+ inputAudioCache: z.union([z.number(), z.string(), z.any()]).optional(),
799
+ webSearch: z.union([z.number(), z.string(), z.any()]).optional(),
800
+ internalReasoning: z.union([z.number(), z.string(), z.any()]).optional(),
801
+ inputCacheRead: z.union([z.number(), z.string(), z.any()]).optional(),
802
+ inputCacheWrite: z.union([z.number(), z.string(), z.any()]).optional(),
803
+ discount: z.number().optional(),
804
+ }).transform((v) => {
805
+ return remap$(v, {
806
+ imageOutput: "image_output",
807
+ inputAudioCache: "input_audio_cache",
808
+ webSearch: "web_search",
809
+ internalReasoning: "internal_reasoning",
810
+ inputCacheRead: "input_cache_read",
811
+ inputCacheWrite: "input_cache_write",
812
+ });
813
+ });
814
+
815
+ /**
816
+ * @internal
817
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
818
+ */
819
+ export namespace EndpointsListPricing$ {
820
+ /** @deprecated use `EndpointsListPricing$inboundSchema` instead. */
821
+ export const inboundSchema = EndpointsListPricing$inboundSchema;
822
+ /** @deprecated use `EndpointsListPricing$outboundSchema` instead. */
823
+ export const outboundSchema = EndpointsListPricing$outboundSchema;
824
+ /** @deprecated use `EndpointsListPricing$Outbound` instead. */
825
+ export type Outbound = EndpointsListPricing$Outbound;
826
+ }
827
+
828
+ export function endpointsListPricingToJSON(
829
+ endpointsListPricing: EndpointsListPricing,
830
+ ): string {
831
+ return JSON.stringify(
832
+ EndpointsListPricing$outboundSchema.parse(endpointsListPricing),
833
+ );
834
+ }
835
+
836
+ export function endpointsListPricingFromJSON(
837
+ jsonString: string,
838
+ ): SafeParseResult<EndpointsListPricing, SDKValidationError> {
839
+ return safeParse(
840
+ jsonString,
841
+ (x) => EndpointsListPricing$inboundSchema.parse(JSON.parse(x)),
842
+ `Failed to parse 'EndpointsListPricing' from JSON`,
843
+ );
844
+ }
845
+
846
+ /** @internal */
847
+ export const ProviderName$inboundSchema: z.ZodNativeEnum<typeof ProviderName> =
848
+ z.nativeEnum(ProviderName);
849
+
850
+ /** @internal */
851
+ export const ProviderName$outboundSchema: z.ZodNativeEnum<typeof ProviderName> =
852
+ ProviderName$inboundSchema;
853
+
854
+ /**
855
+ * @internal
856
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
857
+ */
858
+ export namespace ProviderName$ {
859
+ /** @deprecated use `ProviderName$inboundSchema` instead. */
860
+ export const inboundSchema = ProviderName$inboundSchema;
861
+ /** @deprecated use `ProviderName$outboundSchema` instead. */
862
+ export const outboundSchema = ProviderName$outboundSchema;
863
+ }
864
+
865
+ /** @internal */
866
+ export const EndpointsListQuantization$inboundSchema: z.ZodNativeEnum<
867
+ typeof EndpointsListQuantization
868
+ > = z.nativeEnum(EndpointsListQuantization);
869
+
870
+ /** @internal */
871
+ export const EndpointsListQuantization$outboundSchema: z.ZodNativeEnum<
872
+ typeof EndpointsListQuantization
873
+ > = EndpointsListQuantization$inboundSchema;
874
+
875
+ /**
876
+ * @internal
877
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
878
+ */
879
+ export namespace EndpointsListQuantization$ {
880
+ /** @deprecated use `EndpointsListQuantization$inboundSchema` instead. */
881
+ export const inboundSchema = EndpointsListQuantization$inboundSchema;
882
+ /** @deprecated use `EndpointsListQuantization$outboundSchema` instead. */
883
+ export const outboundSchema = EndpointsListQuantization$outboundSchema;
884
+ }
885
+
886
+ /** @internal */
887
+ export const EndpointsListSupportedParameter$inboundSchema: z.ZodNativeEnum<
888
+ typeof EndpointsListSupportedParameter
889
+ > = z.nativeEnum(EndpointsListSupportedParameter);
890
+
891
+ /** @internal */
892
+ export const EndpointsListSupportedParameter$outboundSchema: z.ZodNativeEnum<
893
+ typeof EndpointsListSupportedParameter
894
+ > = EndpointsListSupportedParameter$inboundSchema;
895
+
896
+ /**
897
+ * @internal
898
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
899
+ */
900
+ export namespace EndpointsListSupportedParameter$ {
901
+ /** @deprecated use `EndpointsListSupportedParameter$inboundSchema` instead. */
902
+ export const inboundSchema = EndpointsListSupportedParameter$inboundSchema;
903
+ /** @deprecated use `EndpointsListSupportedParameter$outboundSchema` instead. */
904
+ export const outboundSchema = EndpointsListSupportedParameter$outboundSchema;
905
+ }
906
+
907
+ /** @internal */
908
+ export const EndpointsListStatus$inboundSchema: z.ZodNativeEnum<
909
+ typeof EndpointsListStatus
910
+ > = z.nativeEnum(EndpointsListStatus);
911
+
912
+ /** @internal */
913
+ export const EndpointsListStatus$outboundSchema: z.ZodNativeEnum<
914
+ typeof EndpointsListStatus
915
+ > = EndpointsListStatus$inboundSchema;
916
+
917
+ /**
918
+ * @internal
919
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
920
+ */
921
+ export namespace EndpointsListStatus$ {
922
+ /** @deprecated use `EndpointsListStatus$inboundSchema` instead. */
923
+ export const inboundSchema = EndpointsListStatus$inboundSchema;
924
+ /** @deprecated use `EndpointsListStatus$outboundSchema` instead. */
925
+ export const outboundSchema = EndpointsListStatus$outboundSchema;
926
+ }
927
+
928
+ /** @internal */
929
+ export const EndpointsList$inboundSchema: z.ZodType<
930
+ EndpointsList,
931
+ z.ZodTypeDef,
932
+ unknown
933
+ > = z.object({
934
+ name: z.string(),
935
+ model_name: z.string(),
936
+ context_length: z.number(),
937
+ pricing: z.lazy(() => EndpointsListPricing$inboundSchema),
938
+ provider_name: ProviderName$inboundSchema,
939
+ tag: z.string(),
940
+ quantization: z.nullable(EndpointsListQuantization$inboundSchema),
941
+ max_completion_tokens: z.nullable(z.number()),
942
+ max_prompt_tokens: z.nullable(z.number()),
943
+ supported_parameters: z.array(EndpointsListSupportedParameter$inboundSchema),
944
+ status: EndpointsListStatus$inboundSchema.optional(),
945
+ uptime_last_30m: z.nullable(z.number()),
946
+ supports_implicit_caching: z.boolean(),
947
+ }).transform((v) => {
948
+ return remap$(v, {
949
+ "model_name": "modelName",
950
+ "context_length": "contextLength",
951
+ "provider_name": "providerName",
952
+ "max_completion_tokens": "maxCompletionTokens",
953
+ "max_prompt_tokens": "maxPromptTokens",
954
+ "supported_parameters": "supportedParameters",
955
+ "uptime_last_30m": "uptimeLast30m",
956
+ "supports_implicit_caching": "supportsImplicitCaching",
957
+ });
958
+ });
959
+
960
+ /** @internal */
961
+ export type EndpointsList$Outbound = {
962
+ name: string;
963
+ model_name: string;
964
+ context_length: number;
965
+ pricing: EndpointsListPricing$Outbound;
966
+ provider_name: string;
967
+ tag: string;
968
+ quantization: string | null;
969
+ max_completion_tokens: number | null;
970
+ max_prompt_tokens: number | null;
971
+ supported_parameters: Array<string>;
972
+ status?: number | undefined;
973
+ uptime_last_30m: number | null;
974
+ supports_implicit_caching: boolean;
975
+ };
976
+
977
+ /** @internal */
978
+ export const EndpointsList$outboundSchema: z.ZodType<
979
+ EndpointsList$Outbound,
980
+ z.ZodTypeDef,
981
+ EndpointsList
982
+ > = z.object({
983
+ name: z.string(),
984
+ modelName: z.string(),
985
+ contextLength: z.number(),
986
+ pricing: z.lazy(() => EndpointsListPricing$outboundSchema),
987
+ providerName: ProviderName$outboundSchema,
988
+ tag: z.string(),
989
+ quantization: z.nullable(EndpointsListQuantization$outboundSchema),
990
+ maxCompletionTokens: z.nullable(z.number()),
991
+ maxPromptTokens: z.nullable(z.number()),
992
+ supportedParameters: z.array(EndpointsListSupportedParameter$outboundSchema),
993
+ status: EndpointsListStatus$outboundSchema.optional(),
994
+ uptimeLast30m: z.nullable(z.number()),
995
+ supportsImplicitCaching: z.boolean(),
996
+ }).transform((v) => {
997
+ return remap$(v, {
998
+ modelName: "model_name",
999
+ contextLength: "context_length",
1000
+ providerName: "provider_name",
1001
+ maxCompletionTokens: "max_completion_tokens",
1002
+ maxPromptTokens: "max_prompt_tokens",
1003
+ supportedParameters: "supported_parameters",
1004
+ uptimeLast30m: "uptime_last_30m",
1005
+ supportsImplicitCaching: "supports_implicit_caching",
1006
+ });
1007
+ });
1008
+
1009
+ /**
1010
+ * @internal
1011
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1012
+ */
1013
+ export namespace EndpointsList$ {
1014
+ /** @deprecated use `EndpointsList$inboundSchema` instead. */
1015
+ export const inboundSchema = EndpointsList$inboundSchema;
1016
+ /** @deprecated use `EndpointsList$outboundSchema` instead. */
1017
+ export const outboundSchema = EndpointsList$outboundSchema;
1018
+ /** @deprecated use `EndpointsList$Outbound` instead. */
1019
+ export type Outbound = EndpointsList$Outbound;
1020
+ }
1021
+
1022
+ export function endpointsListToJSON(endpointsList: EndpointsList): string {
1023
+ return JSON.stringify(EndpointsList$outboundSchema.parse(endpointsList));
1024
+ }
1025
+
1026
+ export function endpointsListFromJSON(
1027
+ jsonString: string,
1028
+ ): SafeParseResult<EndpointsList, SDKValidationError> {
1029
+ return safeParse(
1030
+ jsonString,
1031
+ (x) => EndpointsList$inboundSchema.parse(JSON.parse(x)),
1032
+ `Failed to parse 'EndpointsList' from JSON`,
1033
+ );
1034
+ }