@openrouter/sdk 0.1.0 → 0.1.1

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 (43) hide show
  1. package/esm/funcs/embeddingsGenerate.d.ts +18 -0
  2. package/esm/funcs/embeddingsGenerate.js +97 -0
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/models/chaterror.d.ts +4 -4
  6. package/esm/models/chaterror.js +4 -4
  7. package/esm/models/chatgenerationparams.d.ts +4 -2
  8. package/esm/models/chatgenerationparams.js +4 -2
  9. package/esm/models/chatmessagecontentitemaudio.d.ts +15 -15
  10. package/esm/models/chatmessagecontentitemaudio.js +15 -16
  11. package/esm/models/completioncreateparams.d.ts +4 -2
  12. package/esm/models/completioncreateparams.js +4 -2
  13. package/esm/models/index.d.ts +1 -0
  14. package/esm/models/index.js +1 -0
  15. package/esm/models/openairesponsesinputunion.d.ts +21 -0
  16. package/esm/models/openairesponsesinputunion.js +31 -0
  17. package/esm/models/openairesponsesprompt.d.ts +4 -28
  18. package/esm/models/openairesponsesprompt.js +16 -36
  19. package/esm/models/openresponseseasyinputmessage.d.ts +13 -0
  20. package/esm/models/openresponseseasyinputmessage.js +19 -0
  21. package/esm/models/openresponsesinputmessageitem.d.ts +9 -0
  22. package/esm/models/openresponsesinputmessageitem.js +13 -0
  23. package/esm/models/operations/createembeddings.d.ts +582 -0
  24. package/esm/models/operations/createembeddings.js +608 -0
  25. package/esm/models/operations/getgeneration.d.ts +5 -0
  26. package/esm/models/operations/getgeneration.js +4 -0
  27. package/esm/models/operations/getparameters.d.ts +10 -10
  28. package/esm/models/operations/getparameters.js +14 -14
  29. package/esm/models/operations/index.d.ts +1 -0
  30. package/esm/models/operations/index.js +1 -0
  31. package/esm/models/responseinputaudio.d.ts +103 -0
  32. package/esm/models/responseinputaudio.js +114 -0
  33. package/esm/react-query/embeddingsGenerate.d.ts +23 -0
  34. package/esm/react-query/embeddingsGenerate.js +42 -0
  35. package/esm/react-query/index.d.ts +1 -0
  36. package/esm/react-query/index.js +1 -0
  37. package/esm/react-query/parametersGetParameters.d.ts +3 -3
  38. package/esm/sdk/embeddings.d.ts +12 -0
  39. package/esm/sdk/embeddings.js +18 -0
  40. package/esm/sdk/sdk.d.ts +3 -0
  41. package/esm/sdk/sdk.js +4 -0
  42. package/jsr.json +1 -1
  43. package/package.json +1 -1
@@ -0,0 +1,582 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../../types/enums.js";
3
+ import { Result as SafeParseResult } from "../../types/fp.js";
4
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
+ import * as models from "../index.js";
6
+ export type Input = string | Array<string> | Array<number> | Array<Array<number>>;
7
+ /**
8
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
9
+ *
10
+ * @remarks
11
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
12
+ * - deny: use only providers which do not collect user data.
13
+ */
14
+ export declare const DataCollection: {
15
+ readonly Deny: "deny";
16
+ readonly Allow: "allow";
17
+ };
18
+ /**
19
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
20
+ *
21
+ * @remarks
22
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
23
+ * - deny: use only providers which do not collect user data.
24
+ */
25
+ export type DataCollection = OpenEnum<typeof DataCollection>;
26
+ export type Order = models.ProviderName | string;
27
+ export type Only = models.ProviderName | string;
28
+ export type Ignore = models.ProviderName | string;
29
+ /**
30
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
31
+ */
32
+ export declare const Sort: {
33
+ readonly Price: "price";
34
+ readonly Throughput: "throughput";
35
+ readonly Latency: "latency";
36
+ };
37
+ /**
38
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
39
+ */
40
+ export type Sort = OpenEnum<typeof Sort>;
41
+ /**
42
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
43
+ */
44
+ export type MaxPrice = {
45
+ /**
46
+ * A value in string or number format that is a large number
47
+ */
48
+ prompt?: any | undefined;
49
+ /**
50
+ * A value in string or number format that is a large number
51
+ */
52
+ completion?: any | undefined;
53
+ /**
54
+ * A value in string or number format that is a large number
55
+ */
56
+ image?: any | undefined;
57
+ /**
58
+ * A value in string or number format that is a large number
59
+ */
60
+ audio?: any | undefined;
61
+ /**
62
+ * A value in string or number format that is a large number
63
+ */
64
+ request?: any | undefined;
65
+ };
66
+ export type Experimental = {};
67
+ export type CreateEmbeddingsProvider = {
68
+ /**
69
+ * Whether to allow backup providers to serve requests
70
+ *
71
+ * @remarks
72
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
73
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
74
+ */
75
+ allowFallbacks?: boolean | null | undefined;
76
+ /**
77
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
78
+ */
79
+ requireParameters?: boolean | null | undefined;
80
+ /**
81
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
82
+ *
83
+ * @remarks
84
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
85
+ * - deny: use only providers which do not collect user data.
86
+ */
87
+ dataCollection?: DataCollection | null | undefined;
88
+ /**
89
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
90
+ */
91
+ zdr?: boolean | null | undefined;
92
+ /**
93
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
94
+ */
95
+ order?: Array<models.ProviderName | string> | null | undefined;
96
+ /**
97
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
98
+ */
99
+ only?: Array<models.ProviderName | string> | null | undefined;
100
+ /**
101
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
102
+ */
103
+ ignore?: Array<models.ProviderName | string> | null | undefined;
104
+ /**
105
+ * A list of quantization levels to filter the provider by.
106
+ */
107
+ quantizations?: Array<models.Quantization> | null | undefined;
108
+ /**
109
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
110
+ */
111
+ sort?: Sort | null | undefined;
112
+ /**
113
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
114
+ */
115
+ maxPrice?: MaxPrice | undefined;
116
+ experimental?: Experimental | null | undefined;
117
+ };
118
+ export declare const EncodingFormatBase64: {
119
+ readonly Base64: "base64";
120
+ };
121
+ export type EncodingFormatBase64 = ClosedEnum<typeof EncodingFormatBase64>;
122
+ export declare const EncodingFormatFloat: {
123
+ readonly Float: "float";
124
+ };
125
+ export type EncodingFormatFloat = ClosedEnum<typeof EncodingFormatFloat>;
126
+ export type EncodingFormat = EncodingFormatFloat | EncodingFormatBase64;
127
+ export type CreateEmbeddingsRequest = {
128
+ input: string | Array<string> | Array<number> | Array<Array<number>>;
129
+ model: string;
130
+ provider?: CreateEmbeddingsProvider | undefined;
131
+ encodingFormat?: EncodingFormatFloat | EncodingFormatBase64 | undefined;
132
+ user?: string | undefined;
133
+ };
134
+ export declare const ObjectT: {
135
+ readonly List: "list";
136
+ };
137
+ export type ObjectT = ClosedEnum<typeof ObjectT>;
138
+ export declare const ObjectEmbedding: {
139
+ readonly Embedding: "embedding";
140
+ };
141
+ export type ObjectEmbedding = ClosedEnum<typeof ObjectEmbedding>;
142
+ export type Embedding = Array<number> | string;
143
+ export type CreateEmbeddingsData = {
144
+ object: ObjectEmbedding;
145
+ embedding: Array<number> | string;
146
+ index?: number | undefined;
147
+ };
148
+ export type Usage = {
149
+ promptTokens: number;
150
+ totalTokens: number;
151
+ cost?: number | undefined;
152
+ };
153
+ /**
154
+ * Embedding response
155
+ */
156
+ export type CreateEmbeddingsResponseBody = {
157
+ id?: string | undefined;
158
+ object: ObjectT;
159
+ data: Array<CreateEmbeddingsData>;
160
+ model: string;
161
+ usage?: Usage | undefined;
162
+ };
163
+ export type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string;
164
+ /** @internal */
165
+ export declare const Input$inboundSchema: z.ZodType<Input, unknown>;
166
+ /** @internal */
167
+ export type Input$Outbound = string | Array<string> | Array<number> | Array<Array<number>>;
168
+ /** @internal */
169
+ export declare const Input$outboundSchema: z.ZodType<Input$Outbound, Input>;
170
+ /**
171
+ * @internal
172
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
173
+ */
174
+ export declare namespace Input$ {
175
+ /** @deprecated use `Input$inboundSchema` instead. */
176
+ const inboundSchema: z.ZodType<Input, unknown, z.core.$ZodTypeInternals<Input, unknown>>;
177
+ /** @deprecated use `Input$outboundSchema` instead. */
178
+ const outboundSchema: z.ZodType<Input$Outbound, Input, z.core.$ZodTypeInternals<Input$Outbound, Input>>;
179
+ /** @deprecated use `Input$Outbound` instead. */
180
+ type Outbound = Input$Outbound;
181
+ }
182
+ export declare function inputToJSON(input: Input): string;
183
+ export declare function inputFromJSON(jsonString: string): SafeParseResult<Input, SDKValidationError>;
184
+ /** @internal */
185
+ export declare const DataCollection$inboundSchema: z.ZodType<DataCollection, unknown>;
186
+ /** @internal */
187
+ export declare const DataCollection$outboundSchema: z.ZodType<DataCollection, DataCollection>;
188
+ /**
189
+ * @internal
190
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
191
+ */
192
+ export declare namespace DataCollection$ {
193
+ /** @deprecated use `DataCollection$inboundSchema` instead. */
194
+ const inboundSchema: z.ZodType<DataCollection, unknown, z.core.$ZodTypeInternals<DataCollection, unknown>>;
195
+ /** @deprecated use `DataCollection$outboundSchema` instead. */
196
+ const outboundSchema: z.ZodType<DataCollection, DataCollection, z.core.$ZodTypeInternals<DataCollection, DataCollection>>;
197
+ }
198
+ /** @internal */
199
+ export declare const Order$inboundSchema: z.ZodType<Order, unknown>;
200
+ /** @internal */
201
+ export type Order$Outbound = string | string;
202
+ /** @internal */
203
+ export declare const Order$outboundSchema: z.ZodType<Order$Outbound, Order>;
204
+ /**
205
+ * @internal
206
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
207
+ */
208
+ export declare namespace Order$ {
209
+ /** @deprecated use `Order$inboundSchema` instead. */
210
+ const inboundSchema: z.ZodType<Order, unknown, z.core.$ZodTypeInternals<Order, unknown>>;
211
+ /** @deprecated use `Order$outboundSchema` instead. */
212
+ const outboundSchema: z.ZodType<string, Order, z.core.$ZodTypeInternals<string, Order>>;
213
+ /** @deprecated use `Order$Outbound` instead. */
214
+ type Outbound = Order$Outbound;
215
+ }
216
+ export declare function orderToJSON(order: Order): string;
217
+ export declare function orderFromJSON(jsonString: string): SafeParseResult<Order, SDKValidationError>;
218
+ /** @internal */
219
+ export declare const Only$inboundSchema: z.ZodType<Only, unknown>;
220
+ /** @internal */
221
+ export type Only$Outbound = string | string;
222
+ /** @internal */
223
+ export declare const Only$outboundSchema: z.ZodType<Only$Outbound, Only>;
224
+ /**
225
+ * @internal
226
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
227
+ */
228
+ export declare namespace Only$ {
229
+ /** @deprecated use `Only$inboundSchema` instead. */
230
+ const inboundSchema: z.ZodType<Only, unknown, z.core.$ZodTypeInternals<Only, unknown>>;
231
+ /** @deprecated use `Only$outboundSchema` instead. */
232
+ const outboundSchema: z.ZodType<string, Only, z.core.$ZodTypeInternals<string, Only>>;
233
+ /** @deprecated use `Only$Outbound` instead. */
234
+ type Outbound = Only$Outbound;
235
+ }
236
+ export declare function onlyToJSON(only: Only): string;
237
+ export declare function onlyFromJSON(jsonString: string): SafeParseResult<Only, SDKValidationError>;
238
+ /** @internal */
239
+ export declare const Ignore$inboundSchema: z.ZodType<Ignore, unknown>;
240
+ /** @internal */
241
+ export type Ignore$Outbound = string | string;
242
+ /** @internal */
243
+ export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
244
+ /**
245
+ * @internal
246
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
247
+ */
248
+ export declare namespace Ignore$ {
249
+ /** @deprecated use `Ignore$inboundSchema` instead. */
250
+ const inboundSchema: z.ZodType<Ignore, unknown, z.core.$ZodTypeInternals<Ignore, unknown>>;
251
+ /** @deprecated use `Ignore$outboundSchema` instead. */
252
+ const outboundSchema: z.ZodType<string, Ignore, z.core.$ZodTypeInternals<string, Ignore>>;
253
+ /** @deprecated use `Ignore$Outbound` instead. */
254
+ type Outbound = Ignore$Outbound;
255
+ }
256
+ export declare function ignoreToJSON(ignore: Ignore): string;
257
+ export declare function ignoreFromJSON(jsonString: string): SafeParseResult<Ignore, SDKValidationError>;
258
+ /** @internal */
259
+ export declare const Sort$inboundSchema: z.ZodType<Sort, unknown>;
260
+ /** @internal */
261
+ export declare const Sort$outboundSchema: z.ZodType<Sort, Sort>;
262
+ /**
263
+ * @internal
264
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
265
+ */
266
+ export declare namespace Sort$ {
267
+ /** @deprecated use `Sort$inboundSchema` instead. */
268
+ const inboundSchema: z.ZodType<Sort, unknown, z.core.$ZodTypeInternals<Sort, unknown>>;
269
+ /** @deprecated use `Sort$outboundSchema` instead. */
270
+ const outboundSchema: z.ZodType<Sort, Sort, z.core.$ZodTypeInternals<Sort, Sort>>;
271
+ }
272
+ /** @internal */
273
+ export declare const MaxPrice$inboundSchema: z.ZodType<MaxPrice, unknown>;
274
+ /** @internal */
275
+ export type MaxPrice$Outbound = {
276
+ prompt?: any | undefined;
277
+ completion?: any | undefined;
278
+ image?: any | undefined;
279
+ audio?: any | undefined;
280
+ request?: any | undefined;
281
+ };
282
+ /** @internal */
283
+ export declare const MaxPrice$outboundSchema: z.ZodType<MaxPrice$Outbound, MaxPrice>;
284
+ /**
285
+ * @internal
286
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
287
+ */
288
+ export declare namespace MaxPrice$ {
289
+ /** @deprecated use `MaxPrice$inboundSchema` instead. */
290
+ const inboundSchema: z.ZodType<MaxPrice, unknown, z.core.$ZodTypeInternals<MaxPrice, unknown>>;
291
+ /** @deprecated use `MaxPrice$outboundSchema` instead. */
292
+ const outboundSchema: z.ZodType<MaxPrice$Outbound, MaxPrice, z.core.$ZodTypeInternals<MaxPrice$Outbound, MaxPrice>>;
293
+ /** @deprecated use `MaxPrice$Outbound` instead. */
294
+ type Outbound = MaxPrice$Outbound;
295
+ }
296
+ export declare function maxPriceToJSON(maxPrice: MaxPrice): string;
297
+ export declare function maxPriceFromJSON(jsonString: string): SafeParseResult<MaxPrice, SDKValidationError>;
298
+ /** @internal */
299
+ export declare const Experimental$inboundSchema: z.ZodType<Experimental, unknown>;
300
+ /** @internal */
301
+ export type Experimental$Outbound = {};
302
+ /** @internal */
303
+ export declare const Experimental$outboundSchema: z.ZodType<Experimental$Outbound, Experimental>;
304
+ /**
305
+ * @internal
306
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
307
+ */
308
+ export declare namespace Experimental$ {
309
+ /** @deprecated use `Experimental$inboundSchema` instead. */
310
+ const inboundSchema: z.ZodType<Experimental, unknown, z.core.$ZodTypeInternals<Experimental, unknown>>;
311
+ /** @deprecated use `Experimental$outboundSchema` instead. */
312
+ const outboundSchema: z.ZodType<Experimental$Outbound, Experimental, z.core.$ZodTypeInternals<Experimental$Outbound, Experimental>>;
313
+ /** @deprecated use `Experimental$Outbound` instead. */
314
+ type Outbound = Experimental$Outbound;
315
+ }
316
+ export declare function experimentalToJSON(experimental: Experimental): string;
317
+ export declare function experimentalFromJSON(jsonString: string): SafeParseResult<Experimental, SDKValidationError>;
318
+ /** @internal */
319
+ export declare const CreateEmbeddingsProvider$inboundSchema: z.ZodType<CreateEmbeddingsProvider, unknown>;
320
+ /** @internal */
321
+ export type CreateEmbeddingsProvider$Outbound = {
322
+ allow_fallbacks?: boolean | null | undefined;
323
+ require_parameters?: boolean | null | undefined;
324
+ data_collection?: string | null | undefined;
325
+ zdr?: boolean | null | undefined;
326
+ order?: Array<string | string> | null | undefined;
327
+ only?: Array<string | string> | null | undefined;
328
+ ignore?: Array<string | string> | null | undefined;
329
+ quantizations?: Array<string> | null | undefined;
330
+ sort?: string | null | undefined;
331
+ max_price?: MaxPrice$Outbound | undefined;
332
+ experimental?: Experimental$Outbound | null | undefined;
333
+ };
334
+ /** @internal */
335
+ export declare const CreateEmbeddingsProvider$outboundSchema: z.ZodType<CreateEmbeddingsProvider$Outbound, CreateEmbeddingsProvider>;
336
+ /**
337
+ * @internal
338
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
339
+ */
340
+ export declare namespace CreateEmbeddingsProvider$ {
341
+ /** @deprecated use `CreateEmbeddingsProvider$inboundSchema` instead. */
342
+ const inboundSchema: z.ZodType<CreateEmbeddingsProvider, unknown, z.core.$ZodTypeInternals<CreateEmbeddingsProvider, unknown>>;
343
+ /** @deprecated use `CreateEmbeddingsProvider$outboundSchema` instead. */
344
+ const outboundSchema: z.ZodType<CreateEmbeddingsProvider$Outbound, CreateEmbeddingsProvider, z.core.$ZodTypeInternals<CreateEmbeddingsProvider$Outbound, CreateEmbeddingsProvider>>;
345
+ /** @deprecated use `CreateEmbeddingsProvider$Outbound` instead. */
346
+ type Outbound = CreateEmbeddingsProvider$Outbound;
347
+ }
348
+ export declare function createEmbeddingsProviderToJSON(createEmbeddingsProvider: CreateEmbeddingsProvider): string;
349
+ export declare function createEmbeddingsProviderFromJSON(jsonString: string): SafeParseResult<CreateEmbeddingsProvider, SDKValidationError>;
350
+ /** @internal */
351
+ export declare const EncodingFormatBase64$inboundSchema: z.ZodEnum<typeof EncodingFormatBase64>;
352
+ /** @internal */
353
+ export declare const EncodingFormatBase64$outboundSchema: z.ZodEnum<typeof EncodingFormatBase64>;
354
+ /**
355
+ * @internal
356
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
357
+ */
358
+ export declare namespace EncodingFormatBase64$ {
359
+ /** @deprecated use `EncodingFormatBase64$inboundSchema` instead. */
360
+ const inboundSchema: z.ZodEnum<{
361
+ readonly Base64: "base64";
362
+ }>;
363
+ /** @deprecated use `EncodingFormatBase64$outboundSchema` instead. */
364
+ const outboundSchema: z.ZodEnum<{
365
+ readonly Base64: "base64";
366
+ }>;
367
+ }
368
+ /** @internal */
369
+ export declare const EncodingFormatFloat$inboundSchema: z.ZodEnum<typeof EncodingFormatFloat>;
370
+ /** @internal */
371
+ export declare const EncodingFormatFloat$outboundSchema: z.ZodEnum<typeof EncodingFormatFloat>;
372
+ /**
373
+ * @internal
374
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
375
+ */
376
+ export declare namespace EncodingFormatFloat$ {
377
+ /** @deprecated use `EncodingFormatFloat$inboundSchema` instead. */
378
+ const inboundSchema: z.ZodEnum<{
379
+ readonly Float: "float";
380
+ }>;
381
+ /** @deprecated use `EncodingFormatFloat$outboundSchema` instead. */
382
+ const outboundSchema: z.ZodEnum<{
383
+ readonly Float: "float";
384
+ }>;
385
+ }
386
+ /** @internal */
387
+ export declare const EncodingFormat$inboundSchema: z.ZodType<EncodingFormat, unknown>;
388
+ /** @internal */
389
+ export type EncodingFormat$Outbound = string | string;
390
+ /** @internal */
391
+ export declare const EncodingFormat$outboundSchema: z.ZodType<EncodingFormat$Outbound, EncodingFormat>;
392
+ /**
393
+ * @internal
394
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
395
+ */
396
+ export declare namespace EncodingFormat$ {
397
+ /** @deprecated use `EncodingFormat$inboundSchema` instead. */
398
+ const inboundSchema: z.ZodType<EncodingFormat, unknown, z.core.$ZodTypeInternals<EncodingFormat, unknown>>;
399
+ /** @deprecated use `EncodingFormat$outboundSchema` instead. */
400
+ const outboundSchema: z.ZodType<string, EncodingFormat, z.core.$ZodTypeInternals<string, EncodingFormat>>;
401
+ /** @deprecated use `EncodingFormat$Outbound` instead. */
402
+ type Outbound = EncodingFormat$Outbound;
403
+ }
404
+ export declare function encodingFormatToJSON(encodingFormat: EncodingFormat): string;
405
+ export declare function encodingFormatFromJSON(jsonString: string): SafeParseResult<EncodingFormat, SDKValidationError>;
406
+ /** @internal */
407
+ export declare const CreateEmbeddingsRequest$inboundSchema: z.ZodType<CreateEmbeddingsRequest, unknown>;
408
+ /** @internal */
409
+ export type CreateEmbeddingsRequest$Outbound = {
410
+ input: string | Array<string> | Array<number> | Array<Array<number>>;
411
+ model: string;
412
+ provider?: CreateEmbeddingsProvider$Outbound | undefined;
413
+ encoding_format?: string | string | undefined;
414
+ user?: string | undefined;
415
+ };
416
+ /** @internal */
417
+ export declare const CreateEmbeddingsRequest$outboundSchema: z.ZodType<CreateEmbeddingsRequest$Outbound, CreateEmbeddingsRequest>;
418
+ /**
419
+ * @internal
420
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
421
+ */
422
+ export declare namespace CreateEmbeddingsRequest$ {
423
+ /** @deprecated use `CreateEmbeddingsRequest$inboundSchema` instead. */
424
+ const inboundSchema: z.ZodType<CreateEmbeddingsRequest, unknown, z.core.$ZodTypeInternals<CreateEmbeddingsRequest, unknown>>;
425
+ /** @deprecated use `CreateEmbeddingsRequest$outboundSchema` instead. */
426
+ const outboundSchema: z.ZodType<CreateEmbeddingsRequest$Outbound, CreateEmbeddingsRequest, z.core.$ZodTypeInternals<CreateEmbeddingsRequest$Outbound, CreateEmbeddingsRequest>>;
427
+ /** @deprecated use `CreateEmbeddingsRequest$Outbound` instead. */
428
+ type Outbound = CreateEmbeddingsRequest$Outbound;
429
+ }
430
+ export declare function createEmbeddingsRequestToJSON(createEmbeddingsRequest: CreateEmbeddingsRequest): string;
431
+ export declare function createEmbeddingsRequestFromJSON(jsonString: string): SafeParseResult<CreateEmbeddingsRequest, SDKValidationError>;
432
+ /** @internal */
433
+ export declare const ObjectT$inboundSchema: z.ZodEnum<typeof ObjectT>;
434
+ /** @internal */
435
+ export declare const ObjectT$outboundSchema: z.ZodEnum<typeof ObjectT>;
436
+ /**
437
+ * @internal
438
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
439
+ */
440
+ export declare namespace ObjectT$ {
441
+ /** @deprecated use `ObjectT$inboundSchema` instead. */
442
+ const inboundSchema: z.ZodEnum<{
443
+ readonly List: "list";
444
+ }>;
445
+ /** @deprecated use `ObjectT$outboundSchema` instead. */
446
+ const outboundSchema: z.ZodEnum<{
447
+ readonly List: "list";
448
+ }>;
449
+ }
450
+ /** @internal */
451
+ export declare const ObjectEmbedding$inboundSchema: z.ZodEnum<typeof ObjectEmbedding>;
452
+ /** @internal */
453
+ export declare const ObjectEmbedding$outboundSchema: z.ZodEnum<typeof ObjectEmbedding>;
454
+ /**
455
+ * @internal
456
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
457
+ */
458
+ export declare namespace ObjectEmbedding$ {
459
+ /** @deprecated use `ObjectEmbedding$inboundSchema` instead. */
460
+ const inboundSchema: z.ZodEnum<{
461
+ readonly Embedding: "embedding";
462
+ }>;
463
+ /** @deprecated use `ObjectEmbedding$outboundSchema` instead. */
464
+ const outboundSchema: z.ZodEnum<{
465
+ readonly Embedding: "embedding";
466
+ }>;
467
+ }
468
+ /** @internal */
469
+ export declare const Embedding$inboundSchema: z.ZodType<Embedding, unknown>;
470
+ /** @internal */
471
+ export type Embedding$Outbound = Array<number> | string;
472
+ /** @internal */
473
+ export declare const Embedding$outboundSchema: z.ZodType<Embedding$Outbound, Embedding>;
474
+ /**
475
+ * @internal
476
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
477
+ */
478
+ export declare namespace Embedding$ {
479
+ /** @deprecated use `Embedding$inboundSchema` instead. */
480
+ const inboundSchema: z.ZodType<Embedding, unknown, z.core.$ZodTypeInternals<Embedding, unknown>>;
481
+ /** @deprecated use `Embedding$outboundSchema` instead. */
482
+ const outboundSchema: z.ZodType<Embedding$Outbound, Embedding, z.core.$ZodTypeInternals<Embedding$Outbound, Embedding>>;
483
+ /** @deprecated use `Embedding$Outbound` instead. */
484
+ type Outbound = Embedding$Outbound;
485
+ }
486
+ export declare function embeddingToJSON(embedding: Embedding): string;
487
+ export declare function embeddingFromJSON(jsonString: string): SafeParseResult<Embedding, SDKValidationError>;
488
+ /** @internal */
489
+ export declare const CreateEmbeddingsData$inboundSchema: z.ZodType<CreateEmbeddingsData, unknown>;
490
+ /** @internal */
491
+ export type CreateEmbeddingsData$Outbound = {
492
+ object: string;
493
+ embedding: Array<number> | string;
494
+ index?: number | undefined;
495
+ };
496
+ /** @internal */
497
+ export declare const CreateEmbeddingsData$outboundSchema: z.ZodType<CreateEmbeddingsData$Outbound, CreateEmbeddingsData>;
498
+ /**
499
+ * @internal
500
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
501
+ */
502
+ export declare namespace CreateEmbeddingsData$ {
503
+ /** @deprecated use `CreateEmbeddingsData$inboundSchema` instead. */
504
+ const inboundSchema: z.ZodType<CreateEmbeddingsData, unknown, z.core.$ZodTypeInternals<CreateEmbeddingsData, unknown>>;
505
+ /** @deprecated use `CreateEmbeddingsData$outboundSchema` instead. */
506
+ const outboundSchema: z.ZodType<CreateEmbeddingsData$Outbound, CreateEmbeddingsData, z.core.$ZodTypeInternals<CreateEmbeddingsData$Outbound, CreateEmbeddingsData>>;
507
+ /** @deprecated use `CreateEmbeddingsData$Outbound` instead. */
508
+ type Outbound = CreateEmbeddingsData$Outbound;
509
+ }
510
+ export declare function createEmbeddingsDataToJSON(createEmbeddingsData: CreateEmbeddingsData): string;
511
+ export declare function createEmbeddingsDataFromJSON(jsonString: string): SafeParseResult<CreateEmbeddingsData, SDKValidationError>;
512
+ /** @internal */
513
+ export declare const Usage$inboundSchema: z.ZodType<Usage, unknown>;
514
+ /** @internal */
515
+ export type Usage$Outbound = {
516
+ prompt_tokens: number;
517
+ total_tokens: number;
518
+ cost?: number | undefined;
519
+ };
520
+ /** @internal */
521
+ export declare const Usage$outboundSchema: z.ZodType<Usage$Outbound, Usage>;
522
+ /**
523
+ * @internal
524
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
525
+ */
526
+ export declare namespace Usage$ {
527
+ /** @deprecated use `Usage$inboundSchema` instead. */
528
+ const inboundSchema: z.ZodType<Usage, unknown, z.core.$ZodTypeInternals<Usage, unknown>>;
529
+ /** @deprecated use `Usage$outboundSchema` instead. */
530
+ const outboundSchema: z.ZodType<Usage$Outbound, Usage, z.core.$ZodTypeInternals<Usage$Outbound, Usage>>;
531
+ /** @deprecated use `Usage$Outbound` instead. */
532
+ type Outbound = Usage$Outbound;
533
+ }
534
+ export declare function usageToJSON(usage: Usage): string;
535
+ export declare function usageFromJSON(jsonString: string): SafeParseResult<Usage, SDKValidationError>;
536
+ /** @internal */
537
+ export declare const CreateEmbeddingsResponseBody$inboundSchema: z.ZodType<CreateEmbeddingsResponseBody, unknown>;
538
+ /** @internal */
539
+ export type CreateEmbeddingsResponseBody$Outbound = {
540
+ id?: string | undefined;
541
+ object: string;
542
+ data: Array<CreateEmbeddingsData$Outbound>;
543
+ model: string;
544
+ usage?: Usage$Outbound | undefined;
545
+ };
546
+ /** @internal */
547
+ export declare const CreateEmbeddingsResponseBody$outboundSchema: z.ZodType<CreateEmbeddingsResponseBody$Outbound, CreateEmbeddingsResponseBody>;
548
+ /**
549
+ * @internal
550
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
551
+ */
552
+ export declare namespace CreateEmbeddingsResponseBody$ {
553
+ /** @deprecated use `CreateEmbeddingsResponseBody$inboundSchema` instead. */
554
+ const inboundSchema: z.ZodType<CreateEmbeddingsResponseBody, unknown, z.core.$ZodTypeInternals<CreateEmbeddingsResponseBody, unknown>>;
555
+ /** @deprecated use `CreateEmbeddingsResponseBody$outboundSchema` instead. */
556
+ const outboundSchema: z.ZodType<CreateEmbeddingsResponseBody$Outbound, CreateEmbeddingsResponseBody, z.core.$ZodTypeInternals<CreateEmbeddingsResponseBody$Outbound, CreateEmbeddingsResponseBody>>;
557
+ /** @deprecated use `CreateEmbeddingsResponseBody$Outbound` instead. */
558
+ type Outbound = CreateEmbeddingsResponseBody$Outbound;
559
+ }
560
+ export declare function createEmbeddingsResponseBodyToJSON(createEmbeddingsResponseBody: CreateEmbeddingsResponseBody): string;
561
+ export declare function createEmbeddingsResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateEmbeddingsResponseBody, SDKValidationError>;
562
+ /** @internal */
563
+ export declare const CreateEmbeddingsResponse$inboundSchema: z.ZodType<CreateEmbeddingsResponse, unknown>;
564
+ /** @internal */
565
+ export type CreateEmbeddingsResponse$Outbound = CreateEmbeddingsResponseBody$Outbound | string;
566
+ /** @internal */
567
+ export declare const CreateEmbeddingsResponse$outboundSchema: z.ZodType<CreateEmbeddingsResponse$Outbound, CreateEmbeddingsResponse>;
568
+ /**
569
+ * @internal
570
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
571
+ */
572
+ export declare namespace CreateEmbeddingsResponse$ {
573
+ /** @deprecated use `CreateEmbeddingsResponse$inboundSchema` instead. */
574
+ const inboundSchema: z.ZodType<CreateEmbeddingsResponse, unknown, z.core.$ZodTypeInternals<CreateEmbeddingsResponse, unknown>>;
575
+ /** @deprecated use `CreateEmbeddingsResponse$outboundSchema` instead. */
576
+ const outboundSchema: z.ZodType<CreateEmbeddingsResponse$Outbound, CreateEmbeddingsResponse, z.core.$ZodTypeInternals<CreateEmbeddingsResponse$Outbound, CreateEmbeddingsResponse>>;
577
+ /** @deprecated use `CreateEmbeddingsResponse$Outbound` instead. */
578
+ type Outbound = CreateEmbeddingsResponse$Outbound;
579
+ }
580
+ export declare function createEmbeddingsResponseToJSON(createEmbeddingsResponse: CreateEmbeddingsResponse): string;
581
+ export declare function createEmbeddingsResponseFromJSON(jsonString: string): SafeParseResult<CreateEmbeddingsResponse, SDKValidationError>;
582
+ //# sourceMappingURL=createembeddings.d.ts.map