@openrouter/sdk 1.5.135 → 1.5.137

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.
@@ -1,31 +1,13 @@
1
1
  import * as z from "zod/v4";
2
- import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
2
  import { ClosedEnum, OpenEnum } from "../types/enums.js";
4
3
  import { Result as SafeParseResult } from "../types/fp.js";
5
- import { Alignment } from "./alignment.js";
6
4
  import { AnthropicCacheCreation } from "./anthropiccachecreation.js";
7
- import { AnthropicContainer } from "./anthropiccontainer.js";
8
- import { AnthropicInputTransformation } from "./anthropicinputtransformation.js";
9
- import { AnthropicOutputTokensDetails } from "./anthropicoutputtokensdetails.js";
10
- import { AnthropicRefusalStopDetails } from "./anthropicrefusalstopdetails.js";
11
- import { AnthropicServerToolUsage } from "./anthropicservertoolusage.js";
12
- import { AnthropicServiceTier } from "./anthropicservicetier.js";
13
5
  import { AnthropicSpeed } from "./anthropicspeed.js";
14
6
  import { AnthropicUsageIteration } from "./anthropicusageiteration.js";
15
- import { ApiErrorType } from "./apierrortype.js";
16
- import { ArmorSafeguardResult } from "./armorsafeguardresult.js";
17
7
  import { BatchOutputReference } from "./batchoutputreference.js";
8
+ import { BatchResult } from "./batchresult.js";
18
9
  import { CostDetails } from "./costdetails.js";
19
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
20
- import { FinishReason } from "./finishreason.js";
21
- import { OpenResponsesResult } from "./openresponsesresult.js";
22
- import { OpenRouterMetadata } from "./openroutermetadata.js";
23
- import { ORAnthropicContentBlock } from "./oranthropiccontentblock.js";
24
- import { ORAnthropicStopReason } from "./oranthropicstopreason.js";
25
- import { ReasoningDetailEncrypted } from "./reasoningdetailencrypted.js";
26
- import { ReasoningDetailServerToolCall } from "./reasoningdetailservertoolcall.js";
27
- import { ReasoningDetailSummary } from "./reasoningdetailsummary.js";
28
- import { ReasoningDetailText } from "./reasoningdetailtext.js";
29
11
  export declare const BatchObjectCompletionWindow: {
30
12
  readonly TwentyFourh: "24h";
31
13
  };
@@ -33,484 +15,15 @@ export type BatchObjectCompletionWindow = ClosedEnum<typeof BatchObjectCompletio
33
15
  export type BatchObjectError = {
34
16
  message: string;
35
17
  };
36
- export declare const BatchObjectObjectBatch: {
18
+ export declare const BatchObjectObject: {
37
19
  readonly Batch: "batch";
38
20
  };
39
- export type BatchObjectObjectBatch = ClosedEnum<typeof BatchObjectObjectBatch>;
21
+ export type BatchObjectObject = ClosedEnum<typeof BatchObjectObject>;
40
22
  export type BatchObjectRequestCounts = {
41
23
  completed: number;
42
24
  failed: number;
43
25
  total: number;
44
26
  };
45
- export type ResultError = {
46
- /**
47
- * Canonical OpenRouter error type, stable across all API formats
48
- */
49
- errorType?: ApiErrorType | undefined;
50
- message: string;
51
- param: string | null;
52
- type: string;
53
- };
54
- export declare const BatchObjectFormat2: {
55
- readonly Pcm: "pcm";
56
- };
57
- export type BatchObjectFormat2 = ClosedEnum<typeof BatchObjectFormat2>;
58
- export type AudioPcm2 = {
59
- bitsPerSample: number;
60
- byteLength: number;
61
- channels: number;
62
- format: BatchObjectFormat2;
63
- sampleRate: number;
64
- sha256: string;
65
- };
66
- export declare const BatchObjectFormat1: {
67
- readonly Pcm: "pcm";
68
- };
69
- export type BatchObjectFormat1 = ClosedEnum<typeof BatchObjectFormat1>;
70
- export type AudioPcm1 = {
71
- bitsPerSample: number;
72
- channels: number;
73
- /**
74
- * Base64-encoded PCM16 audio in the format the sibling fields give.
75
- */
76
- data: string;
77
- format: BatchObjectFormat1;
78
- sampleRate: number;
79
- };
80
- export type Audio = AudioPcm2 | AudioPcm1;
81
- export declare const ObjectAudioSpeech: {
82
- readonly AudioSpeech: "audio.speech";
83
- };
84
- export type ObjectAudioSpeech = ClosedEnum<typeof ObjectAudioSpeech>;
85
- export type BodyUsage4 = {
86
- completionTokens: number;
87
- promptTokens: number;
88
- totalTokens: number;
89
- };
90
- export type BodyAudioSpeech = {
91
- audio: AudioPcm2 | AudioPcm1;
92
- model: string;
93
- object: ObjectAudioSpeech;
94
- usage: BodyUsage4;
95
- };
96
- /**
97
- * Embedding vector as an array of floats or a base64 string
98
- */
99
- export type Embedding = Array<number> | string;
100
- export declare const ObjectEmbedding: {
101
- readonly Embedding: "embedding";
102
- };
103
- export type ObjectEmbedding = ClosedEnum<typeof ObjectEmbedding>;
104
- /**
105
- * A single embedding object
106
- */
107
- export type BatchObjectData = {
108
- /**
109
- * Index of the source document when `input` was a list of documents (contextual embeddings). Absent otherwise.
110
- */
111
- documentIndex?: number | undefined;
112
- /**
113
- * Embedding vector as an array of floats or a base64 string
114
- */
115
- embedding: Array<number> | string;
116
- /**
117
- * Index of the embedding in the input list
118
- */
119
- index?: number | undefined;
120
- object: ObjectEmbedding;
121
- };
122
- export declare const BodyObjectList: {
123
- readonly List: "list";
124
- };
125
- export type BodyObjectList = ClosedEnum<typeof BodyObjectList>;
126
- /**
127
- * Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
128
- */
129
- export type BodyPromptTokensDetails2 = {
130
- /**
131
- * Number of audio tokens in the input
132
- */
133
- audioTokens?: number | undefined;
134
- /**
135
- * Number of file/document tokens in the input
136
- */
137
- fileTokens?: number | undefined;
138
- /**
139
- * Number of image tokens in the input
140
- */
141
- imageTokens?: number | undefined;
142
- /**
143
- * Number of text tokens in the input
144
- */
145
- textTokens?: number | undefined;
146
- /**
147
- * Number of video tokens in the input
148
- */
149
- videoTokens?: number | undefined;
150
- };
151
- /**
152
- * Token usage statistics
153
- */
154
- export type BodyUsage3 = {
155
- /**
156
- * Cost of the request in credits
157
- */
158
- cost?: number | undefined;
159
- /**
160
- * Breakdown of upstream inference costs
161
- */
162
- costDetails?: CostDetails | null | undefined;
163
- /**
164
- * Whether a request was made using a Bring Your Own Key configuration
165
- */
166
- isByok?: boolean | undefined;
167
- /**
168
- * Number of tokens in the input
169
- */
170
- promptTokens: number;
171
- /**
172
- * Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
173
- */
174
- promptTokensDetails?: BodyPromptTokensDetails2 | undefined;
175
- /**
176
- * Total number of tokens used
177
- */
178
- totalTokens: number;
179
- };
180
- /**
181
- * Embeddings response containing embedding vectors
182
- */
183
- export type BodyList = {
184
- /**
185
- * List of embedding objects
186
- */
187
- data: Array<BatchObjectData>;
188
- /**
189
- * Unique identifier for the embeddings response
190
- */
191
- id?: string | undefined;
192
- /**
193
- * The model used for embeddings
194
- */
195
- model: string;
196
- object: BodyObjectList;
197
- /**
198
- * Token usage statistics
199
- */
200
- usage?: BodyUsage3 | undefined;
201
- };
202
- export declare const BatchObjectRole: {
203
- readonly Assistant: "assistant";
204
- };
205
- export type BatchObjectRole = ClosedEnum<typeof BatchObjectRole>;
206
- export declare const BatchObjectTypeMessage: {
207
- readonly Message: "message";
208
- };
209
- export type BatchObjectTypeMessage = ClosedEnum<typeof BatchObjectTypeMessage>;
210
- export type BodyUsage2 = {
211
- cacheCreation: AnthropicCacheCreation | null;
212
- cacheCreationInputTokens: number | null;
213
- cacheReadInputTokens: number | null;
214
- inferenceGeo: string | null;
215
- inputTokens: number;
216
- outputTokens: number;
217
- outputTokensDetails: AnthropicOutputTokensDetails | null;
218
- serverToolUse: AnthropicServerToolUsage | null;
219
- serviceTier: AnthropicServiceTier | null;
220
- iterations?: Array<AnthropicUsageIteration> | undefined;
221
- speed?: AnthropicSpeed | null | undefined;
222
- };
223
- export type BodyMessage = {
224
- container: AnthropicContainer | null;
225
- content: Array<ORAnthropicContentBlock>;
226
- id: string;
227
- inputTransformations?: Array<AnthropicInputTransformation> | null | undefined;
228
- model: string;
229
- role: BatchObjectRole;
230
- /**
231
- * Structured information about a refusal
232
- */
233
- stopDetails: AnthropicRefusalStopDetails | null;
234
- stopReason: ORAnthropicStopReason | null;
235
- stopSequence: string | null;
236
- type: BatchObjectTypeMessage;
237
- usage: BodyUsage2;
238
- };
239
- export type ContentTopLogprob = {
240
- bytes: Array<number> | null;
241
- logprob: number;
242
- token: string;
243
- };
244
- export type LogprobsContent = {
245
- bytes: Array<number> | null;
246
- logprob: number;
247
- token: string;
248
- topLogprobs: Array<ContentTopLogprob>;
249
- };
250
- export type RefusalTopLogprob = {
251
- bytes: Array<number> | null;
252
- logprob: number;
253
- token: string;
254
- };
255
- export type Refusal = {
256
- bytes: Array<number> | null;
257
- logprob: number;
258
- token: string;
259
- topLogprobs: Array<RefusalTopLogprob>;
260
- };
261
- export type Logprobs = {
262
- content: Array<LogprobsContent> | null;
263
- refusal?: Array<Refusal> | null | undefined;
264
- };
265
- export type WebSearchCitation = {
266
- citedText?: string | undefined;
267
- encryptedIndex?: string | undefined;
268
- title: string | null;
269
- url: string;
270
- };
271
- export type AnnotationWebSearchCitation = {
272
- type: "web_search_citation";
273
- webSearchCitation: WebSearchCitation;
274
- };
275
- export type BatchObjectUrlCitation = {
276
- content?: string | undefined;
277
- endIndex: number;
278
- startIndex: number;
279
- title: string;
280
- uncited?: true | undefined;
281
- url: string;
282
- };
283
- export type AnnotationURLCitation = {
284
- type: "url_citation";
285
- urlCitation: BatchObjectUrlCitation;
286
- };
287
- export type ContentImageUrlImageUrl = {
288
- url: string;
289
- };
290
- export type ContentImageURL = {
291
- imageUrl: ContentImageUrlImageUrl;
292
- type: "image_url";
293
- };
294
- export type ContentText = {
295
- text: string;
296
- type: "text";
297
- };
298
- export type AnnotationContentUnion = ContentText | ContentImageURL | discriminatedUnionTypes.Unknown<"type">;
299
- export type BatchObjectFile = {
300
- content: Array<ContentText | ContentImageURL | discriminatedUnionTypes.Unknown<"type">>;
301
- hash: string;
302
- name?: string | undefined;
303
- };
304
- export type AnnotationFile = {
305
- file: BatchObjectFile;
306
- type: "file";
307
- };
308
- export type Annotation = AnnotationFile | AnnotationURLCitation | AnnotationWebSearchCitation | discriminatedUnionTypes.Unknown<"type">;
309
- export type BatchObjectImageUrl = {
310
- url: string;
311
- };
312
- export declare const ChoiceTypeImageURLEnum: {
313
- readonly ImageUrl: "image_url";
314
- };
315
- export type ChoiceTypeImageURLEnum = ClosedEnum<typeof ChoiceTypeImageURLEnum>;
316
- export type Image = {
317
- imageUrl: BatchObjectImageUrl;
318
- type: ChoiceTypeImageURLEnum;
319
- };
320
- export type ReasoningDetail = ReasoningDetailSummary | ReasoningDetailEncrypted | ReasoningDetailText | ReasoningDetailServerToolCall | discriminatedUnionTypes.Unknown<"type">;
321
- export declare const ChoiceRole: {
322
- readonly Assistant: "assistant";
323
- };
324
- export type ChoiceRole = ClosedEnum<typeof ChoiceRole>;
325
- export type BatchObjectFunction = {
326
- arguments: string;
327
- name: string;
328
- };
329
- export declare const ChoiceTypeFunction: {
330
- readonly Function: "function";
331
- };
332
- export type ChoiceTypeFunction = ClosedEnum<typeof ChoiceTypeFunction>;
333
- export type ToolCall = {
334
- function: BatchObjectFunction;
335
- id: string;
336
- index: number;
337
- type: ChoiceTypeFunction;
338
- };
339
- export type Message = {
340
- annotations?: Array<AnnotationFile | AnnotationURLCitation | AnnotationWebSearchCitation | discriminatedUnionTypes.Unknown<"type">> | undefined;
341
- content: string | null;
342
- images?: Array<Image> | null | undefined;
343
- reasoning?: string | null | undefined;
344
- reasoningDetails?: Array<ReasoningDetailSummary | ReasoningDetailEncrypted | ReasoningDetailText | ReasoningDetailServerToolCall | discriminatedUnionTypes.Unknown<"type"> | null> | null | undefined;
345
- refusal: string | null;
346
- role: ChoiceRole;
347
- toolCalls?: Array<ToolCall> | undefined;
348
- };
349
- export type Choice = {
350
- finishReason: FinishReason;
351
- index: number;
352
- logprobs: Logprobs | null;
353
- message: Message;
354
- nativeFinishReason: string | null;
355
- };
356
- export declare const BatchObjectEvent: {
357
- readonly AdapterRequest: "adapter_request";
358
- readonly UpstreamHeadersReceived: "upstream_headers_received";
359
- readonly FirstTokenReceived: "first_token_received";
360
- readonly UpstreamBodyEnded: "upstream_body_ended";
361
- };
362
- export type BatchObjectEvent = OpenEnum<typeof BatchObjectEvent>;
363
- export type BatchObjectTimings = {
364
- epochMs: number;
365
- event: BatchObjectEvent;
366
- startMs: number;
367
- };
368
- export type BatchObjectDebug = {
369
- echoUpstreamBody?: {
370
- [k: string]: any;
371
- } | undefined;
372
- timings?: BatchObjectTimings | undefined;
373
- additionalProperties?: {
374
- [k: string]: any;
375
- } | undefined;
376
- };
377
- export declare const BodyObjectChatCompletion: {
378
- readonly ChatCompletion: "chat.completion";
379
- };
380
- export type BodyObjectChatCompletion = ClosedEnum<typeof BodyObjectChatCompletion>;
381
- export type BodyCompletionTokensDetails = {
382
- /**
383
- * Tokens generated by the model for audio output.
384
- */
385
- audioTokens?: number | null | undefined;
386
- /**
387
- * Tokens generated by the model for image output.
388
- */
389
- imageTokens?: number | null | undefined;
390
- /**
391
- * Tokens generated by the model for reasoning.
392
- */
393
- reasoningTokens?: number | null | undefined;
394
- };
395
- /**
396
- * Breakdown of tokens used in the prompt.
397
- */
398
- export type BodyPromptTokensDetails1 = {
399
- /**
400
- * Tokens used for input audio.
401
- */
402
- audioTokens?: number | null | undefined;
403
- /**
404
- * Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
405
- */
406
- cacheWriteTokens?: number | null | undefined;
407
- /**
408
- * Tokens cached by the endpoint.
409
- */
410
- cachedTokens?: number | null | undefined;
411
- /**
412
- * Tokens used for input files/documents.
413
- */
414
- fileTokens?: number | null | undefined;
415
- /**
416
- * Tokens used for input video.
417
- */
418
- videoTokens?: number | null | undefined;
419
- };
420
- /**
421
- * Usage for server-side tool execution (e.g., web search)
422
- */
423
- export type BodyServerToolUse = {
424
- /**
425
- * Number of OpenRouter server tool calls that executed and produced a result.
426
- */
427
- toolCallsExecuted?: number | null | undefined;
428
- /**
429
- * Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here.
430
- */
431
- toolCallsRequested?: number | null | undefined;
432
- /**
433
- * Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two.
434
- */
435
- webSearchRequests?: number | null | undefined;
436
- };
437
- /**
438
- * Usage for server-side tool execution (e.g., web search)
439
- */
440
- export type BatchObjectServerToolUseDetails = {
441
- /**
442
- * Number of OpenRouter server tool calls that executed and produced a result.
443
- */
444
- toolCallsExecuted?: number | null | undefined;
445
- /**
446
- * Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here.
447
- */
448
- toolCallsRequested?: number | null | undefined;
449
- /**
450
- * Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two.
451
- */
452
- webSearchRequests?: number | null | undefined;
453
- };
454
- export type BodyUsage1 = {
455
- /**
456
- * The tokens generated
457
- */
458
- completionTokens: number;
459
- completionTokensDetails?: BodyCompletionTokensDetails | null | undefined;
460
- /**
461
- * Including images, input audio, and tools if any
462
- */
463
- promptTokens: number;
464
- /**
465
- * Breakdown of tokens used in the prompt.
466
- */
467
- promptTokensDetails?: BodyPromptTokensDetails1 | null | undefined;
468
- /**
469
- * Usage for server-side tool execution (e.g., web search)
470
- */
471
- serverToolUse?: BodyServerToolUse | null | undefined;
472
- /**
473
- * Usage for server-side tool execution (e.g., web search)
474
- */
475
- serverToolUseDetails?: BatchObjectServerToolUseDetails | null | undefined;
476
- /**
477
- * Sum of the above two fields
478
- */
479
- totalTokens: number;
480
- };
481
- export type BodyChatCompletion = {
482
- /**
483
- * Beta. The result of the alignment plugin for this request; the shape may change.
484
- */
485
- alignment?: Alignment | undefined;
486
- choices: Array<Choice>;
487
- created: number;
488
- debug?: BatchObjectDebug | undefined;
489
- id: string;
490
- model: string;
491
- object: BodyObjectChatCompletion;
492
- openrouterMetadata?: OpenRouterMetadata | undefined;
493
- provider?: string | null | undefined;
494
- /**
495
- * OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in.
496
- */
497
- safeguardResults?: Array<ArmorSafeguardResult> | undefined;
498
- serviceTier?: string | null | undefined;
499
- systemFingerprint?: string | null | undefined;
500
- usage?: BodyUsage1 | undefined;
501
- };
502
- export type Body = OpenResponsesResult | BodyMessage | BodyChatCompletion | BodyAudioSpeech | BodyList;
503
- export type BatchObjectResponse = {
504
- body: OpenResponsesResult | BodyMessage | BodyChatCompletion | BodyAudioSpeech | BodyList;
505
- requestId: string | null;
506
- statusCode: number;
507
- };
508
- export type Result = {
509
- customId: string;
510
- error: ResultError | null;
511
- id: string;
512
- response: BatchObjectResponse | null;
513
- };
514
27
  export declare const BatchObjectStatus: {
515
28
  readonly Validating: "validating";
516
29
  readonly InProgress: "in_progress";
@@ -632,7 +145,7 @@ export type BatchObject = {
632
145
  finalizedAt: number | null;
633
146
  id: string;
634
147
  model: string;
635
- object: BatchObjectObjectBatch;
148
+ object: BatchObjectObject;
636
149
  /**
637
150
  * The output location of a batch submitted with `input`, whose `results` are `null`. Returned only by `GET /batches/{id}`, once the batch has ended and the provider reported an output folder or table. Batch lists and responses for a batch with an unpaid charge leave it out.
638
151
  */
@@ -642,7 +155,7 @@ export type BatchObject = {
642
155
  */
643
156
  provider: string | null;
644
157
  requestCounts: BatchObjectRequestCounts;
645
- results: Array<Result> | null;
158
+ results: Array<BatchResult> | null;
646
159
  status: BatchObjectStatus;
647
160
  usage: BatchObjectUsage | null;
648
161
  };
@@ -652,176 +165,11 @@ export declare const BatchObjectCompletionWindow$inboundSchema: z.ZodEnum<typeof
652
165
  export declare const BatchObjectError$inboundSchema: z.ZodType<BatchObjectError, unknown>;
653
166
  export declare function batchObjectErrorFromJSON(jsonString: string): SafeParseResult<BatchObjectError, SDKValidationError>;
654
167
  /** @internal */
655
- export declare const BatchObjectObjectBatch$inboundSchema: z.ZodEnum<typeof BatchObjectObjectBatch>;
168
+ export declare const BatchObjectObject$inboundSchema: z.ZodEnum<typeof BatchObjectObject>;
656
169
  /** @internal */
657
170
  export declare const BatchObjectRequestCounts$inboundSchema: z.ZodType<BatchObjectRequestCounts, unknown>;
658
171
  export declare function batchObjectRequestCountsFromJSON(jsonString: string): SafeParseResult<BatchObjectRequestCounts, SDKValidationError>;
659
172
  /** @internal */
660
- export declare const ResultError$inboundSchema: z.ZodType<ResultError, unknown>;
661
- export declare function resultErrorFromJSON(jsonString: string): SafeParseResult<ResultError, SDKValidationError>;
662
- /** @internal */
663
- export declare const BatchObjectFormat2$inboundSchema: z.ZodEnum<typeof BatchObjectFormat2>;
664
- /** @internal */
665
- export declare const AudioPcm2$inboundSchema: z.ZodType<AudioPcm2, unknown>;
666
- export declare function audioPcm2FromJSON(jsonString: string): SafeParseResult<AudioPcm2, SDKValidationError>;
667
- /** @internal */
668
- export declare const BatchObjectFormat1$inboundSchema: z.ZodEnum<typeof BatchObjectFormat1>;
669
- /** @internal */
670
- export declare const AudioPcm1$inboundSchema: z.ZodType<AudioPcm1, unknown>;
671
- export declare function audioPcm1FromJSON(jsonString: string): SafeParseResult<AudioPcm1, SDKValidationError>;
672
- /** @internal */
673
- export declare const Audio$inboundSchema: z.ZodType<Audio, unknown>;
674
- export declare function audioFromJSON(jsonString: string): SafeParseResult<Audio, SDKValidationError>;
675
- /** @internal */
676
- export declare const ObjectAudioSpeech$inboundSchema: z.ZodEnum<typeof ObjectAudioSpeech>;
677
- /** @internal */
678
- export declare const BodyUsage4$inboundSchema: z.ZodType<BodyUsage4, unknown>;
679
- export declare function bodyUsage4FromJSON(jsonString: string): SafeParseResult<BodyUsage4, SDKValidationError>;
680
- /** @internal */
681
- export declare const BodyAudioSpeech$inboundSchema: z.ZodType<BodyAudioSpeech, unknown>;
682
- export declare function bodyAudioSpeechFromJSON(jsonString: string): SafeParseResult<BodyAudioSpeech, SDKValidationError>;
683
- /** @internal */
684
- export declare const Embedding$inboundSchema: z.ZodType<Embedding, unknown>;
685
- export declare function embeddingFromJSON(jsonString: string): SafeParseResult<Embedding, SDKValidationError>;
686
- /** @internal */
687
- export declare const ObjectEmbedding$inboundSchema: z.ZodEnum<typeof ObjectEmbedding>;
688
- /** @internal */
689
- export declare const BatchObjectData$inboundSchema: z.ZodType<BatchObjectData, unknown>;
690
- export declare function batchObjectDataFromJSON(jsonString: string): SafeParseResult<BatchObjectData, SDKValidationError>;
691
- /** @internal */
692
- export declare const BodyObjectList$inboundSchema: z.ZodEnum<typeof BodyObjectList>;
693
- /** @internal */
694
- export declare const BodyPromptTokensDetails2$inboundSchema: z.ZodType<BodyPromptTokensDetails2, unknown>;
695
- export declare function bodyPromptTokensDetails2FromJSON(jsonString: string): SafeParseResult<BodyPromptTokensDetails2, SDKValidationError>;
696
- /** @internal */
697
- export declare const BodyUsage3$inboundSchema: z.ZodType<BodyUsage3, unknown>;
698
- export declare function bodyUsage3FromJSON(jsonString: string): SafeParseResult<BodyUsage3, SDKValidationError>;
699
- /** @internal */
700
- export declare const BodyList$inboundSchema: z.ZodType<BodyList, unknown>;
701
- export declare function bodyListFromJSON(jsonString: string): SafeParseResult<BodyList, SDKValidationError>;
702
- /** @internal */
703
- export declare const BatchObjectRole$inboundSchema: z.ZodEnum<typeof BatchObjectRole>;
704
- /** @internal */
705
- export declare const BatchObjectTypeMessage$inboundSchema: z.ZodEnum<typeof BatchObjectTypeMessage>;
706
- /** @internal */
707
- export declare const BodyUsage2$inboundSchema: z.ZodType<BodyUsage2, unknown>;
708
- export declare function bodyUsage2FromJSON(jsonString: string): SafeParseResult<BodyUsage2, SDKValidationError>;
709
- /** @internal */
710
- export declare const BodyMessage$inboundSchema: z.ZodType<BodyMessage, unknown>;
711
- export declare function bodyMessageFromJSON(jsonString: string): SafeParseResult<BodyMessage, SDKValidationError>;
712
- /** @internal */
713
- export declare const ContentTopLogprob$inboundSchema: z.ZodType<ContentTopLogprob, unknown>;
714
- export declare function contentTopLogprobFromJSON(jsonString: string): SafeParseResult<ContentTopLogprob, SDKValidationError>;
715
- /** @internal */
716
- export declare const LogprobsContent$inboundSchema: z.ZodType<LogprobsContent, unknown>;
717
- export declare function logprobsContentFromJSON(jsonString: string): SafeParseResult<LogprobsContent, SDKValidationError>;
718
- /** @internal */
719
- export declare const RefusalTopLogprob$inboundSchema: z.ZodType<RefusalTopLogprob, unknown>;
720
- export declare function refusalTopLogprobFromJSON(jsonString: string): SafeParseResult<RefusalTopLogprob, SDKValidationError>;
721
- /** @internal */
722
- export declare const Refusal$inboundSchema: z.ZodType<Refusal, unknown>;
723
- export declare function refusalFromJSON(jsonString: string): SafeParseResult<Refusal, SDKValidationError>;
724
- /** @internal */
725
- export declare const Logprobs$inboundSchema: z.ZodType<Logprobs, unknown>;
726
- export declare function logprobsFromJSON(jsonString: string): SafeParseResult<Logprobs, SDKValidationError>;
727
- /** @internal */
728
- export declare const WebSearchCitation$inboundSchema: z.ZodType<WebSearchCitation, unknown>;
729
- export declare function webSearchCitationFromJSON(jsonString: string): SafeParseResult<WebSearchCitation, SDKValidationError>;
730
- /** @internal */
731
- export declare const AnnotationWebSearchCitation$inboundSchema: z.ZodType<AnnotationWebSearchCitation, unknown>;
732
- export declare function annotationWebSearchCitationFromJSON(jsonString: string): SafeParseResult<AnnotationWebSearchCitation, SDKValidationError>;
733
- /** @internal */
734
- export declare const BatchObjectUrlCitation$inboundSchema: z.ZodType<BatchObjectUrlCitation, unknown>;
735
- export declare function batchObjectUrlCitationFromJSON(jsonString: string): SafeParseResult<BatchObjectUrlCitation, SDKValidationError>;
736
- /** @internal */
737
- export declare const AnnotationURLCitation$inboundSchema: z.ZodType<AnnotationURLCitation, unknown>;
738
- export declare function annotationURLCitationFromJSON(jsonString: string): SafeParseResult<AnnotationURLCitation, SDKValidationError>;
739
- /** @internal */
740
- export declare const ContentImageUrlImageUrl$inboundSchema: z.ZodType<ContentImageUrlImageUrl, unknown>;
741
- export declare function contentImageUrlImageUrlFromJSON(jsonString: string): SafeParseResult<ContentImageUrlImageUrl, SDKValidationError>;
742
- /** @internal */
743
- export declare const ContentImageURL$inboundSchema: z.ZodType<ContentImageURL, unknown>;
744
- export declare function contentImageURLFromJSON(jsonString: string): SafeParseResult<ContentImageURL, SDKValidationError>;
745
- /** @internal */
746
- export declare const ContentText$inboundSchema: z.ZodType<ContentText, unknown>;
747
- export declare function contentTextFromJSON(jsonString: string): SafeParseResult<ContentText, SDKValidationError>;
748
- /** @internal */
749
- export declare const AnnotationContentUnion$inboundSchema: z.ZodType<AnnotationContentUnion, unknown>;
750
- export declare function annotationContentUnionFromJSON(jsonString: string): SafeParseResult<AnnotationContentUnion, SDKValidationError>;
751
- /** @internal */
752
- export declare const BatchObjectFile$inboundSchema: z.ZodType<BatchObjectFile, unknown>;
753
- export declare function batchObjectFileFromJSON(jsonString: string): SafeParseResult<BatchObjectFile, SDKValidationError>;
754
- /** @internal */
755
- export declare const AnnotationFile$inboundSchema: z.ZodType<AnnotationFile, unknown>;
756
- export declare function annotationFileFromJSON(jsonString: string): SafeParseResult<AnnotationFile, SDKValidationError>;
757
- /** @internal */
758
- export declare const Annotation$inboundSchema: z.ZodType<Annotation, unknown>;
759
- export declare function annotationFromJSON(jsonString: string): SafeParseResult<Annotation, SDKValidationError>;
760
- /** @internal */
761
- export declare const BatchObjectImageUrl$inboundSchema: z.ZodType<BatchObjectImageUrl, unknown>;
762
- export declare function batchObjectImageUrlFromJSON(jsonString: string): SafeParseResult<BatchObjectImageUrl, SDKValidationError>;
763
- /** @internal */
764
- export declare const ChoiceTypeImageURLEnum$inboundSchema: z.ZodEnum<typeof ChoiceTypeImageURLEnum>;
765
- /** @internal */
766
- export declare const Image$inboundSchema: z.ZodType<Image, unknown>;
767
- export declare function imageFromJSON(jsonString: string): SafeParseResult<Image, SDKValidationError>;
768
- /** @internal */
769
- export declare const ReasoningDetail$inboundSchema: z.ZodType<ReasoningDetail, unknown>;
770
- export declare function reasoningDetailFromJSON(jsonString: string): SafeParseResult<ReasoningDetail, SDKValidationError>;
771
- /** @internal */
772
- export declare const ChoiceRole$inboundSchema: z.ZodEnum<typeof ChoiceRole>;
773
- /** @internal */
774
- export declare const BatchObjectFunction$inboundSchema: z.ZodType<BatchObjectFunction, unknown>;
775
- export declare function batchObjectFunctionFromJSON(jsonString: string): SafeParseResult<BatchObjectFunction, SDKValidationError>;
776
- /** @internal */
777
- export declare const ChoiceTypeFunction$inboundSchema: z.ZodEnum<typeof ChoiceTypeFunction>;
778
- /** @internal */
779
- export declare const ToolCall$inboundSchema: z.ZodType<ToolCall, unknown>;
780
- export declare function toolCallFromJSON(jsonString: string): SafeParseResult<ToolCall, SDKValidationError>;
781
- /** @internal */
782
- export declare const Message$inboundSchema: z.ZodType<Message, unknown>;
783
- export declare function messageFromJSON(jsonString: string): SafeParseResult<Message, SDKValidationError>;
784
- /** @internal */
785
- export declare const Choice$inboundSchema: z.ZodType<Choice, unknown>;
786
- export declare function choiceFromJSON(jsonString: string): SafeParseResult<Choice, SDKValidationError>;
787
- /** @internal */
788
- export declare const BatchObjectEvent$inboundSchema: z.ZodType<BatchObjectEvent, unknown>;
789
- /** @internal */
790
- export declare const BatchObjectTimings$inboundSchema: z.ZodType<BatchObjectTimings, unknown>;
791
- export declare function batchObjectTimingsFromJSON(jsonString: string): SafeParseResult<BatchObjectTimings, SDKValidationError>;
792
- /** @internal */
793
- export declare const BatchObjectDebug$inboundSchema: z.ZodType<BatchObjectDebug, unknown>;
794
- export declare function batchObjectDebugFromJSON(jsonString: string): SafeParseResult<BatchObjectDebug, SDKValidationError>;
795
- /** @internal */
796
- export declare const BodyObjectChatCompletion$inboundSchema: z.ZodEnum<typeof BodyObjectChatCompletion>;
797
- /** @internal */
798
- export declare const BodyCompletionTokensDetails$inboundSchema: z.ZodType<BodyCompletionTokensDetails, unknown>;
799
- export declare function bodyCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<BodyCompletionTokensDetails, SDKValidationError>;
800
- /** @internal */
801
- export declare const BodyPromptTokensDetails1$inboundSchema: z.ZodType<BodyPromptTokensDetails1, unknown>;
802
- export declare function bodyPromptTokensDetails1FromJSON(jsonString: string): SafeParseResult<BodyPromptTokensDetails1, SDKValidationError>;
803
- /** @internal */
804
- export declare const BodyServerToolUse$inboundSchema: z.ZodType<BodyServerToolUse, unknown>;
805
- export declare function bodyServerToolUseFromJSON(jsonString: string): SafeParseResult<BodyServerToolUse, SDKValidationError>;
806
- /** @internal */
807
- export declare const BatchObjectServerToolUseDetails$inboundSchema: z.ZodType<BatchObjectServerToolUseDetails, unknown>;
808
- export declare function batchObjectServerToolUseDetailsFromJSON(jsonString: string): SafeParseResult<BatchObjectServerToolUseDetails, SDKValidationError>;
809
- /** @internal */
810
- export declare const BodyUsage1$inboundSchema: z.ZodType<BodyUsage1, unknown>;
811
- export declare function bodyUsage1FromJSON(jsonString: string): SafeParseResult<BodyUsage1, SDKValidationError>;
812
- /** @internal */
813
- export declare const BodyChatCompletion$inboundSchema: z.ZodType<BodyChatCompletion, unknown>;
814
- export declare function bodyChatCompletionFromJSON(jsonString: string): SafeParseResult<BodyChatCompletion, SDKValidationError>;
815
- /** @internal */
816
- export declare const Body$inboundSchema: z.ZodType<Body, unknown>;
817
- export declare function bodyFromJSON(jsonString: string): SafeParseResult<Body, SDKValidationError>;
818
- /** @internal */
819
- export declare const BatchObjectResponse$inboundSchema: z.ZodType<BatchObjectResponse, unknown>;
820
- export declare function batchObjectResponseFromJSON(jsonString: string): SafeParseResult<BatchObjectResponse, SDKValidationError>;
821
- /** @internal */
822
- export declare const Result$inboundSchema: z.ZodType<Result, unknown>;
823
- export declare function resultFromJSON(jsonString: string): SafeParseResult<Result, SDKValidationError>;
824
- /** @internal */
825
173
  export declare const BatchObjectStatus$inboundSchema: z.ZodType<BatchObjectStatus, unknown>;
826
174
  /** @internal */
827
175
  export declare const BatchObjectCompletionTokensDetails$inboundSchema: z.ZodType<BatchObjectCompletionTokensDetails, unknown>;