@openrouter/sdk 1.3.28 → 1.3.30

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 (216) hide show
  1. package/README.md +1 -1
  2. package/esm/funcs/batchCreateBatches.d.ts +19 -0
  3. package/esm/funcs/batchCreateBatches.js +98 -0
  4. package/esm/funcs/batchDelete.d.ts +19 -0
  5. package/esm/funcs/batchDelete.js +103 -0
  6. package/esm/funcs/batchGetBatches.d.ts +19 -0
  7. package/esm/funcs/batchGetBatches.js +103 -0
  8. package/esm/funcs/batchList.d.ts +21 -0
  9. package/esm/funcs/batchList.js +134 -0
  10. package/esm/lib/config.d.ts +2 -2
  11. package/esm/lib/config.js +2 -2
  12. package/esm/models/anthropicadvisortoolresult.d.ts +14 -0
  13. package/esm/models/anthropicadvisortoolresult.js +21 -0
  14. package/esm/models/anthropicbase64pdfsource.d.ts +17 -2
  15. package/esm/models/anthropicbase64pdfsource.js +25 -2
  16. package/esm/models/anthropicbashcodeexecutioncontent.d.ts +11 -0
  17. package/esm/models/anthropicbashcodeexecutioncontent.js +17 -0
  18. package/esm/models/anthropicbashcodeexecutionoutput.d.ts +18 -0
  19. package/esm/models/anthropicbashcodeexecutionoutput.js +25 -0
  20. package/esm/models/anthropicbashcodeexecutionresult.d.ts +15 -0
  21. package/esm/models/anthropicbashcodeexecutionresult.js +24 -0
  22. package/esm/models/anthropicbashcodeexecutiontoolresult.d.ts +13 -0
  23. package/esm/models/anthropicbashcodeexecutiontoolresult.js +22 -0
  24. package/esm/models/anthropicbashcodeexecutiontoolresulterror.d.ts +22 -0
  25. package/esm/models/anthropicbashcodeexecutiontoolresulterror.js +30 -0
  26. package/esm/models/anthropiccaller.d.ts +12 -0
  27. package/esm/models/anthropiccaller.js +19 -0
  28. package/esm/models/anthropiccitationcharlocation.d.ts +16 -0
  29. package/esm/models/anthropiccitationcharlocation.js +30 -0
  30. package/esm/models/anthropiccitationcontentblocklocation.d.ts +16 -0
  31. package/esm/models/anthropiccitationcontentblocklocation.js +30 -0
  32. package/esm/models/anthropiccitationpagelocation.d.ts +16 -0
  33. package/esm/models/anthropiccitationpagelocation.js +30 -0
  34. package/esm/models/anthropiccitationsconfig.d.ts +10 -0
  35. package/esm/models/anthropiccitationsconfig.js +14 -0
  36. package/esm/models/anthropiccitationsearchresultlocation.d.ts +16 -0
  37. package/esm/models/anthropiccitationsearchresultlocation.js +28 -0
  38. package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +14 -0
  39. package/esm/models/anthropiccitationwebsearchresultlocation.js +24 -0
  40. package/esm/models/anthropiccodeexecution20250825caller.d.ts +11 -0
  41. package/esm/models/anthropiccodeexecution20250825caller.js +20 -0
  42. package/esm/models/anthropiccodeexecution20260120caller.d.ts +11 -0
  43. package/esm/models/anthropiccodeexecution20260120caller.js +20 -0
  44. package/esm/models/anthropiccodeexecutioncontent.d.ts +12 -0
  45. package/esm/models/anthropiccodeexecutioncontent.js +19 -0
  46. package/esm/models/anthropiccodeexecutionoutput.d.ts +18 -0
  47. package/esm/models/anthropiccodeexecutionoutput.js +25 -0
  48. package/esm/models/anthropiccodeexecutionresult.d.ts +15 -0
  49. package/esm/models/anthropiccodeexecutionresult.js +24 -0
  50. package/esm/models/anthropiccodeexecutiontoolresult.d.ts +13 -0
  51. package/esm/models/anthropiccodeexecutiontoolresult.js +22 -0
  52. package/esm/models/anthropiccodeexecutiontoolresulterror.d.ts +12 -0
  53. package/esm/models/anthropiccodeexecutiontoolresulterror.js +21 -0
  54. package/esm/models/anthropiccompactionblock.d.ts +12 -0
  55. package/esm/models/anthropiccompactionblock.js +21 -0
  56. package/esm/models/anthropiccontainer.d.ts +13 -0
  57. package/esm/models/anthropiccontainer.js +22 -0
  58. package/esm/models/anthropiccontainerskill.d.ts +20 -0
  59. package/esm/models/anthropiccontainerskill.js +28 -0
  60. package/esm/models/anthropiccontainerupload.d.ts +11 -0
  61. package/esm/models/anthropiccontainerupload.js +20 -0
  62. package/esm/models/anthropicdirectcaller.d.ts +10 -0
  63. package/esm/models/anthropicdirectcaller.js +14 -0
  64. package/esm/models/anthropicdocumentblock.d.ts +36 -0
  65. package/esm/models/anthropicdocumentblock.js +45 -0
  66. package/esm/models/anthropicdocumentblockparam.d.ts +20 -4
  67. package/esm/models/anthropicdocumentblockparam.js +4 -4
  68. package/esm/models/anthropicencryptedcodeexecutionresult.d.ts +15 -0
  69. package/esm/models/anthropicencryptedcodeexecutionresult.js +25 -0
  70. package/esm/models/anthropicinputtransformation.d.ts +18 -0
  71. package/esm/models/anthropicinputtransformation.js +16 -0
  72. package/esm/models/anthropicoutputtokensdetails.d.ts +10 -0
  73. package/esm/models/anthropicoutputtokensdetails.js +19 -0
  74. package/esm/models/anthropicplaintextsource.d.ts +17 -2
  75. package/esm/models/anthropicplaintextsource.js +25 -2
  76. package/esm/models/anthropicredactedthinkingblock.d.ts +11 -0
  77. package/esm/models/anthropicredactedthinkingblock.js +15 -0
  78. package/esm/models/anthropicrefusalstopdetails.d.ts +32 -0
  79. package/esm/models/anthropicrefusalstopdetails.js +31 -0
  80. package/esm/models/anthropicservertoolerrorcode.d.ts +12 -0
  81. package/esm/models/anthropicservertoolerrorcode.js +14 -0
  82. package/esm/models/anthropicservertoolusage.d.ts +11 -0
  83. package/esm/models/anthropicservertoolusage.js +21 -0
  84. package/esm/models/anthropicservicetier.d.ts +11 -0
  85. package/esm/models/anthropicservicetier.js +13 -0
  86. package/esm/models/anthropictextblock.d.ts +13 -0
  87. package/esm/models/anthropictextblock.js +17 -0
  88. package/esm/models/anthropictextcitation.d.ts +14 -0
  89. package/esm/models/anthropictextcitation.js +23 -0
  90. package/esm/models/anthropictexteditorcodeexecutioncontent.d.ts +13 -0
  91. package/esm/models/anthropictexteditorcodeexecutioncontent.js +21 -0
  92. package/esm/models/anthropictexteditorcodeexecutioncreateresult.d.ts +11 -0
  93. package/esm/models/anthropictexteditorcodeexecutioncreateresult.js +20 -0
  94. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.d.ts +15 -0
  95. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.js +28 -0
  96. package/esm/models/anthropictexteditorcodeexecutiontoolresult.d.ts +13 -0
  97. package/esm/models/anthropictexteditorcodeexecutiontoolresult.js +22 -0
  98. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.d.ts +23 -0
  99. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.js +33 -0
  100. package/esm/models/anthropictexteditorcodeexecutionviewresult.d.ts +24 -0
  101. package/esm/models/anthropictexteditorcodeexecutionviewresult.js +36 -0
  102. package/esm/models/anthropicthinkingblock.d.ts +12 -0
  103. package/esm/models/anthropicthinkingblock.js +16 -0
  104. package/esm/models/anthropictoolreference.d.ts +18 -0
  105. package/esm/models/anthropictoolreference.js +25 -0
  106. package/esm/models/anthropictoolsearchcontent.d.ts +11 -0
  107. package/esm/models/anthropictoolsearchcontent.js +17 -0
  108. package/esm/models/anthropictoolsearchresult.d.ts +12 -0
  109. package/esm/models/anthropictoolsearchresult.js +21 -0
  110. package/esm/models/anthropictoolsearchresulterror.d.ts +13 -0
  111. package/esm/models/anthropictoolsearchresulterror.js +23 -0
  112. package/esm/models/anthropictoolsearchtoolresult.d.ts +13 -0
  113. package/esm/models/anthropictoolsearchtoolresult.js +22 -0
  114. package/esm/models/anthropictooluseblock.d.ts +15 -0
  115. package/esm/models/anthropictooluseblock.js +19 -0
  116. package/esm/models/anthropicwebfetchblock.d.ts +14 -0
  117. package/esm/models/anthropicwebfetchblock.js +23 -0
  118. package/esm/models/anthropicwebfetchcontent.d.ts +11 -0
  119. package/esm/models/anthropicwebfetchcontent.js +17 -0
  120. package/esm/models/anthropicwebfetchtoolresult.d.ts +15 -0
  121. package/esm/models/anthropicwebfetchtoolresult.js +24 -0
  122. package/esm/models/anthropicwebfetchtoolresulterror.d.ts +25 -0
  123. package/esm/models/anthropicwebfetchtoolresulterror.js +33 -0
  124. package/esm/models/anthropicwebsearchresult.d.ts +21 -0
  125. package/esm/models/anthropicwebsearchresult.js +29 -0
  126. package/esm/models/anthropicwebsearchtoolresult.d.ts +20 -0
  127. package/esm/models/anthropicwebsearchtoolresult.js +36 -0
  128. package/esm/models/anthropicwebsearchtoolresulterror.d.ts +29 -0
  129. package/esm/models/anthropicwebsearchtoolresulterror.js +37 -0
  130. package/esm/models/batchdeletedobject.d.ts +26 -0
  131. package/esm/models/batchdeletedobject.js +22 -0
  132. package/esm/models/batchdeletionoutcome.d.ts +17 -0
  133. package/esm/models/batchdeletionoutcome.js +16 -0
  134. package/esm/models/batchdeletiontargets.d.ts +50 -0
  135. package/esm/models/batchdeletiontargets.js +32 -0
  136. package/esm/models/batcherrorresponse.d.ts +11 -0
  137. package/esm/models/batcherrorresponse.js +15 -0
  138. package/esm/models/batchlistitem.d.ts +181 -0
  139. package/esm/models/batchlistitem.js +159 -0
  140. package/esm/models/batchlistresponse.d.ts +25 -0
  141. package/esm/models/batchlistresponse.js +31 -0
  142. package/esm/models/batchliststatus.d.ts +20 -0
  143. package/esm/models/batchliststatus.js +19 -0
  144. package/esm/models/batchlisttimestamp.d.ts +12 -0
  145. package/esm/models/batchlisttimestamp.js +15 -0
  146. package/esm/models/batchobject.d.ts +750 -0
  147. package/esm/models/batchobject.js +810 -0
  148. package/esm/models/batchpaymentrequiredresponseerror.d.ts +159 -0
  149. package/esm/models/batchpaymentrequiredresponseerror.js +136 -0
  150. package/esm/models/batchproviderpreferences.d.ts +25 -0
  151. package/esm/models/batchproviderpreferences.js +20 -0
  152. package/esm/models/batchsubmitbody.d.ts +62 -0
  153. package/esm/models/batchsubmitbody.js +51 -0
  154. package/esm/models/debugevent.d.ts +12 -12
  155. package/esm/models/debugevent.js +11 -12
  156. package/esm/models/errors/batcherrorresponse.d.ts +19 -0
  157. package/esm/models/errors/batcherrorresponse.js +32 -0
  158. package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +53 -0
  159. package/esm/models/errors/batchpaymentrequiredresponseerror.js +64 -0
  160. package/esm/models/errors/index.d.ts +2 -0
  161. package/esm/models/errors/index.js +2 -0
  162. package/esm/models/finishreason.d.ts +13 -0
  163. package/esm/models/finishreason.js +15 -0
  164. package/esm/models/imagegenerationusage.d.ts +4 -4
  165. package/esm/models/imagegenerationusage.js +4 -6
  166. package/esm/models/index.d.ts +77 -0
  167. package/esm/models/index.js +77 -0
  168. package/esm/models/internchatchoice.d.ts +4 -4
  169. package/esm/models/internchatchoice.js +3 -3
  170. package/esm/models/messagesmessageparam.d.ts +8 -8
  171. package/esm/models/messagesmessageparam.js +6 -7
  172. package/esm/models/operations/createbatches.d.ts +59 -0
  173. package/esm/models/operations/createbatches.js +23 -0
  174. package/esm/models/operations/deletebatch.d.ts +58 -0
  175. package/esm/models/operations/deletebatch.js +21 -0
  176. package/esm/models/operations/getbatches.d.ts +58 -0
  177. package/esm/models/operations/getbatches.js +21 -0
  178. package/esm/models/operations/index.d.ts +4 -0
  179. package/esm/models/operations/index.js +4 -0
  180. package/esm/models/operations/listbatches.d.ts +87 -0
  181. package/esm/models/operations/listbatches.js +40 -0
  182. package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
  183. package/esm/models/oranthropicbashtoolresult.js +49 -0
  184. package/esm/models/oranthropiccontentblock.d.ts +25 -0
  185. package/esm/models/oranthropiccontentblock.js +45 -0
  186. package/esm/models/oranthropicnullablecaller.d.ts +12 -0
  187. package/esm/models/oranthropicnullablecaller.js +19 -0
  188. package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
  189. package/esm/models/oranthropicservertooluseblock.js +19 -0
  190. package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
  191. package/esm/models/oranthropicshelltoolresult.js +50 -0
  192. package/esm/models/oranthropicstopreason.d.ts +16 -0
  193. package/esm/models/oranthropicstopreason.js +18 -0
  194. package/esm/models/outputfusionservertoolitem.d.ts +8 -8
  195. package/esm/models/outputfusionservertoolitem.js +8 -8
  196. package/esm/models/publicendpoint.d.ts +8 -0
  197. package/esm/models/publicendpoint.js +4 -0
  198. package/esm/models/speechinputreference.d.ts +4 -3
  199. package/esm/models/speechinputreference.js +2 -0
  200. package/esm/models/speechinputreferenceaudio.d.ts +1 -1
  201. package/esm/models/speechinputreferenceaudioinput.d.ts +8 -3
  202. package/esm/models/speechinputreferenceaudioinput.js +2 -1
  203. package/esm/models/speechinputreferenceimage.d.ts +21 -0
  204. package/esm/models/speechinputreferenceimage.js +20 -0
  205. package/esm/models/speechinputreferenceimageinput.d.ts +18 -0
  206. package/esm/models/speechinputreferenceimageinput.js +13 -0
  207. package/esm/models/speechinputreferencetext.d.ts +2 -2
  208. package/esm/models/speechrequest.d.ts +1 -1
  209. package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
  210. package/esm/models/submitgenerationfeedbackrequest.js +3 -4
  211. package/esm/sdk/batch.d.ts +37 -0
  212. package/esm/sdk/batch.js +50 -0
  213. package/esm/sdk/sdk.d.ts +3 -0
  214. package/esm/sdk/sdk.js +4 -0
  215. package/jsr.json +1 -1
  216. package/package.json +7 -7
@@ -0,0 +1,750 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
4
+ import { Result as SafeParseResult } from "../types/fp.js";
5
+ import { AnthropicCacheCreation } from "./anthropiccachecreation.js";
6
+ import { AnthropicContainer } from "./anthropiccontainer.js";
7
+ import { AnthropicInputTransformation } from "./anthropicinputtransformation.js";
8
+ import { AnthropicOutputTokensDetails } from "./anthropicoutputtokensdetails.js";
9
+ import { AnthropicRefusalStopDetails } from "./anthropicrefusalstopdetails.js";
10
+ import { AnthropicServerToolUsage } from "./anthropicservertoolusage.js";
11
+ import { AnthropicServiceTier } from "./anthropicservicetier.js";
12
+ import { AnthropicSpeed } from "./anthropicspeed.js";
13
+ import { AnthropicUsageIteration } from "./anthropicusageiteration.js";
14
+ import { ApiErrorType } from "./apierrortype.js";
15
+ import { CostDetails } from "./costdetails.js";
16
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
17
+ import { FinishReason } from "./finishreason.js";
18
+ import { OpenResponsesResult } from "./openresponsesresult.js";
19
+ import { OpenRouterMetadata } from "./openroutermetadata.js";
20
+ import { ORAnthropicContentBlock } from "./oranthropiccontentblock.js";
21
+ import { ORAnthropicStopReason } from "./oranthropicstopreason.js";
22
+ import { ReasoningDetailEncrypted } from "./reasoningdetailencrypted.js";
23
+ import { ReasoningDetailServerToolCall } from "./reasoningdetailservertoolcall.js";
24
+ import { ReasoningDetailSummary } from "./reasoningdetailsummary.js";
25
+ import { ReasoningDetailText } from "./reasoningdetailtext.js";
26
+ export declare const BatchObjectCompletionWindow: {
27
+ readonly TwentyFourh: "24h";
28
+ };
29
+ export type BatchObjectCompletionWindow = ClosedEnum<typeof BatchObjectCompletionWindow>;
30
+ export type BatchObjectError = {
31
+ message: string;
32
+ };
33
+ export declare const BatchObjectObjectBatch: {
34
+ readonly Batch: "batch";
35
+ };
36
+ export type BatchObjectObjectBatch = ClosedEnum<typeof BatchObjectObjectBatch>;
37
+ export type BatchObjectRequestCounts = {
38
+ completed: number;
39
+ failed: number;
40
+ total: number;
41
+ };
42
+ export type ResultError = {
43
+ /**
44
+ * Canonical OpenRouter error type, stable across all API formats
45
+ */
46
+ errorType?: ApiErrorType | undefined;
47
+ message: string;
48
+ param: string | null;
49
+ type: string;
50
+ };
51
+ /**
52
+ * Embedding vector as an array of floats or a base64 string
53
+ */
54
+ export type Embedding = Array<number> | string;
55
+ export declare const ObjectEmbedding: {
56
+ readonly Embedding: "embedding";
57
+ };
58
+ export type ObjectEmbedding = ClosedEnum<typeof ObjectEmbedding>;
59
+ /**
60
+ * A single embedding object
61
+ */
62
+ export type BatchObjectData = {
63
+ /**
64
+ * Embedding vector as an array of floats or a base64 string
65
+ */
66
+ embedding: Array<number> | string;
67
+ /**
68
+ * Index of the embedding in the input list
69
+ */
70
+ index?: number | undefined;
71
+ object: ObjectEmbedding;
72
+ };
73
+ export declare const BodyObjectList: {
74
+ readonly List: "list";
75
+ };
76
+ export type BodyObjectList = ClosedEnum<typeof BodyObjectList>;
77
+ /**
78
+ * 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.
79
+ */
80
+ export type BodyPromptTokensDetails2 = {
81
+ /**
82
+ * Number of audio tokens in the input
83
+ */
84
+ audioTokens?: number | undefined;
85
+ /**
86
+ * Number of file/document tokens in the input
87
+ */
88
+ fileTokens?: number | undefined;
89
+ /**
90
+ * Number of image tokens in the input
91
+ */
92
+ imageTokens?: number | undefined;
93
+ /**
94
+ * Number of text tokens in the input
95
+ */
96
+ textTokens?: number | undefined;
97
+ /**
98
+ * Number of video tokens in the input
99
+ */
100
+ videoTokens?: number | undefined;
101
+ };
102
+ /**
103
+ * Token usage statistics
104
+ */
105
+ export type BodyUsage3 = {
106
+ /**
107
+ * Cost of the request in credits
108
+ */
109
+ cost?: number | undefined;
110
+ /**
111
+ * Breakdown of upstream inference costs
112
+ */
113
+ costDetails?: CostDetails | null | undefined;
114
+ /**
115
+ * Whether a request was made using a Bring Your Own Key configuration
116
+ */
117
+ isByok?: boolean | undefined;
118
+ /**
119
+ * Number of tokens in the input
120
+ */
121
+ promptTokens: number;
122
+ /**
123
+ * 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.
124
+ */
125
+ promptTokensDetails?: BodyPromptTokensDetails2 | undefined;
126
+ /**
127
+ * Total number of tokens used
128
+ */
129
+ totalTokens: number;
130
+ };
131
+ /**
132
+ * Embeddings response containing embedding vectors
133
+ */
134
+ export type BodyList = {
135
+ /**
136
+ * List of embedding objects
137
+ */
138
+ data: Array<BatchObjectData>;
139
+ /**
140
+ * Unique identifier for the embeddings response
141
+ */
142
+ id?: string | undefined;
143
+ /**
144
+ * The model used for embeddings
145
+ */
146
+ model: string;
147
+ object: BodyObjectList;
148
+ /**
149
+ * Token usage statistics
150
+ */
151
+ usage?: BodyUsage3 | undefined;
152
+ };
153
+ export declare const BatchObjectRole: {
154
+ readonly Assistant: "assistant";
155
+ };
156
+ export type BatchObjectRole = ClosedEnum<typeof BatchObjectRole>;
157
+ export declare const BatchObjectTypeMessage: {
158
+ readonly Message: "message";
159
+ };
160
+ export type BatchObjectTypeMessage = ClosedEnum<typeof BatchObjectTypeMessage>;
161
+ export type BodyUsage2 = {
162
+ cacheCreation: AnthropicCacheCreation | null;
163
+ cacheCreationInputTokens: number | null;
164
+ cacheReadInputTokens: number | null;
165
+ inferenceGeo: string | null;
166
+ inputTokens: number;
167
+ outputTokens: number;
168
+ outputTokensDetails: AnthropicOutputTokensDetails | null;
169
+ serverToolUse: AnthropicServerToolUsage | null;
170
+ serviceTier: AnthropicServiceTier | null;
171
+ iterations?: Array<AnthropicUsageIteration> | undefined;
172
+ speed?: AnthropicSpeed | null | undefined;
173
+ };
174
+ export type BodyMessage = {
175
+ container: AnthropicContainer | null;
176
+ content: Array<ORAnthropicContentBlock>;
177
+ id: string;
178
+ inputTransformations?: Array<AnthropicInputTransformation> | null | undefined;
179
+ model: string;
180
+ role: BatchObjectRole;
181
+ /**
182
+ * Structured information about a refusal
183
+ */
184
+ stopDetails: AnthropicRefusalStopDetails | null;
185
+ stopReason: ORAnthropicStopReason | null;
186
+ stopSequence: string | null;
187
+ type: BatchObjectTypeMessage;
188
+ usage: BodyUsage2;
189
+ };
190
+ export type ContentTopLogprob = {
191
+ bytes: Array<number> | null;
192
+ logprob: number;
193
+ token: string;
194
+ };
195
+ export type LogprobsContent = {
196
+ bytes: Array<number> | null;
197
+ logprob: number;
198
+ token: string;
199
+ topLogprobs: Array<ContentTopLogprob>;
200
+ };
201
+ export type RefusalTopLogprob = {
202
+ bytes: Array<number> | null;
203
+ logprob: number;
204
+ token: string;
205
+ };
206
+ export type Refusal = {
207
+ bytes: Array<number> | null;
208
+ logprob: number;
209
+ token: string;
210
+ topLogprobs: Array<RefusalTopLogprob>;
211
+ };
212
+ export type Logprobs = {
213
+ content: Array<LogprobsContent> | null;
214
+ refusal?: Array<Refusal> | null | undefined;
215
+ };
216
+ export type WebSearchCitation = {
217
+ citedText?: string | undefined;
218
+ encryptedIndex?: string | undefined;
219
+ title: string | null;
220
+ url: string;
221
+ };
222
+ export type AnnotationWebSearchCitation = {
223
+ type: "web_search_citation";
224
+ webSearchCitation: WebSearchCitation;
225
+ };
226
+ export type BatchObjectUrlCitation = {
227
+ content?: string | undefined;
228
+ endIndex: number;
229
+ startIndex: number;
230
+ title: string;
231
+ url: string;
232
+ };
233
+ export type AnnotationURLCitation = {
234
+ type: "url_citation";
235
+ urlCitation: BatchObjectUrlCitation;
236
+ };
237
+ export type ContentImageUrlImageUrl = {
238
+ url: string;
239
+ };
240
+ export type ContentImageURL = {
241
+ imageUrl: ContentImageUrlImageUrl;
242
+ type: "image_url";
243
+ };
244
+ export type ContentText = {
245
+ text: string;
246
+ type: "text";
247
+ };
248
+ export type AnnotationContentUnion = ContentText | ContentImageURL | discriminatedUnionTypes.Unknown<"type">;
249
+ export type BatchObjectFile = {
250
+ content: Array<ContentText | ContentImageURL | discriminatedUnionTypes.Unknown<"type">>;
251
+ hash: string;
252
+ name?: string | undefined;
253
+ };
254
+ export type AnnotationFile = {
255
+ file: BatchObjectFile;
256
+ type: "file";
257
+ };
258
+ export type Annotation = AnnotationFile | AnnotationURLCitation | AnnotationWebSearchCitation | discriminatedUnionTypes.Unknown<"type">;
259
+ export type BatchObjectImageUrl = {
260
+ url: string;
261
+ };
262
+ export declare const ChoiceTypeImageURLEnum: {
263
+ readonly ImageUrl: "image_url";
264
+ };
265
+ export type ChoiceTypeImageURLEnum = ClosedEnum<typeof ChoiceTypeImageURLEnum>;
266
+ export type Image = {
267
+ imageUrl: BatchObjectImageUrl;
268
+ type: ChoiceTypeImageURLEnum;
269
+ };
270
+ export type ReasoningDetail = ReasoningDetailSummary | ReasoningDetailEncrypted | ReasoningDetailText | ReasoningDetailServerToolCall | discriminatedUnionTypes.Unknown<"type">;
271
+ export declare const ChoiceRole: {
272
+ readonly Assistant: "assistant";
273
+ };
274
+ export type ChoiceRole = ClosedEnum<typeof ChoiceRole>;
275
+ export type BatchObjectFunction = {
276
+ arguments: string;
277
+ name: string;
278
+ };
279
+ export declare const ChoiceTypeFunction: {
280
+ readonly Function: "function";
281
+ };
282
+ export type ChoiceTypeFunction = ClosedEnum<typeof ChoiceTypeFunction>;
283
+ export type ToolCall = {
284
+ function: BatchObjectFunction;
285
+ id: string;
286
+ index: number;
287
+ type: ChoiceTypeFunction;
288
+ };
289
+ export type Message = {
290
+ annotations?: Array<AnnotationFile | AnnotationURLCitation | AnnotationWebSearchCitation | discriminatedUnionTypes.Unknown<"type">> | undefined;
291
+ content: string | null;
292
+ images?: Array<Image> | null | undefined;
293
+ reasoning?: string | null | undefined;
294
+ reasoningDetails?: Array<ReasoningDetailSummary | ReasoningDetailEncrypted | ReasoningDetailText | ReasoningDetailServerToolCall | discriminatedUnionTypes.Unknown<"type"> | null> | null | undefined;
295
+ refusal: string | null;
296
+ role: ChoiceRole;
297
+ toolCalls?: Array<ToolCall> | undefined;
298
+ };
299
+ export type Choice = {
300
+ finishReason: FinishReason;
301
+ index: number;
302
+ logprobs: Logprobs | null;
303
+ message: Message;
304
+ nativeFinishReason: string | null;
305
+ };
306
+ export declare const BatchObjectEvent: {
307
+ readonly AdapterRequest: "adapter_request";
308
+ readonly UpstreamHeadersReceived: "upstream_headers_received";
309
+ readonly FirstTokenReceived: "first_token_received";
310
+ readonly UpstreamBodyEnded: "upstream_body_ended";
311
+ };
312
+ export type BatchObjectEvent = OpenEnum<typeof BatchObjectEvent>;
313
+ export type BatchObjectTimings = {
314
+ epochMs: number;
315
+ event: BatchObjectEvent;
316
+ startMs: number;
317
+ };
318
+ export type BatchObjectDebug = {
319
+ echoUpstreamBody?: {
320
+ [k: string]: any;
321
+ } | undefined;
322
+ timings?: BatchObjectTimings | undefined;
323
+ additionalProperties?: {
324
+ [k: string]: any;
325
+ } | undefined;
326
+ };
327
+ export declare const BodyObjectChatCompletion: {
328
+ readonly ChatCompletion: "chat.completion";
329
+ };
330
+ export type BodyObjectChatCompletion = ClosedEnum<typeof BodyObjectChatCompletion>;
331
+ export type BodyCompletionTokensDetails = {
332
+ /**
333
+ * Tokens generated by the model for audio output.
334
+ */
335
+ audioTokens?: number | null | undefined;
336
+ /**
337
+ * Tokens generated by the model for image output.
338
+ */
339
+ imageTokens?: number | null | undefined;
340
+ /**
341
+ * Tokens generated by the model for reasoning.
342
+ */
343
+ reasoningTokens?: number | null | undefined;
344
+ };
345
+ /**
346
+ * Breakdown of tokens used in the prompt.
347
+ */
348
+ export type BodyPromptTokensDetails1 = {
349
+ /**
350
+ * Tokens used for input audio.
351
+ */
352
+ audioTokens?: number | null | undefined;
353
+ /**
354
+ * Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
355
+ */
356
+ cacheWriteTokens?: number | null | undefined;
357
+ /**
358
+ * Tokens cached by the endpoint.
359
+ */
360
+ cachedTokens?: number | null | undefined;
361
+ /**
362
+ * Tokens used for input files/documents.
363
+ */
364
+ fileTokens?: number | null | undefined;
365
+ /**
366
+ * Tokens used for input video.
367
+ */
368
+ videoTokens?: number | null | undefined;
369
+ };
370
+ /**
371
+ * Usage for server-side tool execution (e.g., web search)
372
+ */
373
+ export type BodyServerToolUse = {
374
+ /**
375
+ * Number of OpenRouter server tool calls that executed and produced a result.
376
+ */
377
+ toolCallsExecuted?: number | null | undefined;
378
+ /**
379
+ * 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.
380
+ */
381
+ toolCallsRequested?: number | null | undefined;
382
+ /**
383
+ * 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.
384
+ */
385
+ webSearchRequests?: number | null | undefined;
386
+ };
387
+ /**
388
+ * Usage for server-side tool execution (e.g., web search)
389
+ */
390
+ export type BatchObjectServerToolUseDetails = {
391
+ /**
392
+ * Number of OpenRouter server tool calls that executed and produced a result.
393
+ */
394
+ toolCallsExecuted?: number | null | undefined;
395
+ /**
396
+ * 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.
397
+ */
398
+ toolCallsRequested?: number | null | undefined;
399
+ /**
400
+ * 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.
401
+ */
402
+ webSearchRequests?: number | null | undefined;
403
+ };
404
+ export type BodyUsage1 = {
405
+ /**
406
+ * The tokens generated
407
+ */
408
+ completionTokens: number;
409
+ completionTokensDetails?: BodyCompletionTokensDetails | null | undefined;
410
+ /**
411
+ * Including images, input audio, and tools if any
412
+ */
413
+ promptTokens: number;
414
+ /**
415
+ * Breakdown of tokens used in the prompt.
416
+ */
417
+ promptTokensDetails?: BodyPromptTokensDetails1 | null | undefined;
418
+ /**
419
+ * Usage for server-side tool execution (e.g., web search)
420
+ */
421
+ serverToolUse?: BodyServerToolUse | null | undefined;
422
+ /**
423
+ * Usage for server-side tool execution (e.g., web search)
424
+ */
425
+ serverToolUseDetails?: BatchObjectServerToolUseDetails | null | undefined;
426
+ /**
427
+ * Sum of the above two fields
428
+ */
429
+ totalTokens: number;
430
+ };
431
+ export type BodyChatCompletion = {
432
+ choices: Array<Choice>;
433
+ created: number;
434
+ debug?: BatchObjectDebug | undefined;
435
+ id: string;
436
+ model: string;
437
+ object: BodyObjectChatCompletion;
438
+ openrouterMetadata?: OpenRouterMetadata | undefined;
439
+ provider?: string | null | undefined;
440
+ serviceTier?: string | null | undefined;
441
+ systemFingerprint?: string | null | undefined;
442
+ usage?: BodyUsage1 | undefined;
443
+ };
444
+ export type Body = OpenResponsesResult | BodyMessage | BodyChatCompletion | BodyList;
445
+ export type BatchObjectResponse = {
446
+ body: OpenResponsesResult | BodyMessage | BodyChatCompletion | BodyList;
447
+ requestId: string | null;
448
+ statusCode: number;
449
+ };
450
+ export type Result = {
451
+ customId: string;
452
+ error: ResultError | null;
453
+ id: string;
454
+ response: BatchObjectResponse | null;
455
+ };
456
+ export declare const BatchObjectStatus: {
457
+ readonly Validating: "validating";
458
+ readonly InProgress: "in_progress";
459
+ readonly Finalizing: "finalizing";
460
+ readonly Completed: "completed";
461
+ readonly Failed: "failed";
462
+ readonly Expired: "expired";
463
+ readonly Cancelling: "cancelling";
464
+ readonly Cancelled: "cancelled";
465
+ };
466
+ export type BatchObjectStatus = OpenEnum<typeof BatchObjectStatus>;
467
+ export type BatchObjectCompletionTokensDetails = {
468
+ /**
469
+ * Tokens generated by the model for audio output.
470
+ */
471
+ audioTokens?: number | null | undefined;
472
+ /**
473
+ * Tokens generated by the model for image output.
474
+ */
475
+ imageTokens?: number | null | undefined;
476
+ /**
477
+ * Tokens generated by the model for reasoning.
478
+ */
479
+ reasoningTokens?: number | null | undefined;
480
+ };
481
+ /**
482
+ * Breakdown of tokens used in the prompt.
483
+ */
484
+ export type BatchObjectPromptTokensDetails = {
485
+ /**
486
+ * Tokens used for input audio.
487
+ */
488
+ audioTokens?: number | null | undefined;
489
+ /**
490
+ * Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
491
+ */
492
+ cacheWriteTokens?: number | null | undefined;
493
+ /**
494
+ * Tokens cached by the endpoint.
495
+ */
496
+ cachedTokens?: number | null | undefined;
497
+ /**
498
+ * Tokens used for input files/documents.
499
+ */
500
+ fileTokens?: number | null | undefined;
501
+ /**
502
+ * Tokens used for input video.
503
+ */
504
+ videoTokens?: number | null | undefined;
505
+ };
506
+ /**
507
+ * Usage for server-side tool execution (e.g., web search)
508
+ */
509
+ export type BatchObjectServerToolUse = {
510
+ /**
511
+ * Number of OpenRouter server tool calls that executed and produced a result.
512
+ */
513
+ toolCallsExecuted?: number | null | undefined;
514
+ /**
515
+ * 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.
516
+ */
517
+ toolCallsRequested?: number | null | undefined;
518
+ /**
519
+ * 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.
520
+ */
521
+ webSearchRequests?: number | null | undefined;
522
+ };
523
+ export type BatchObjectUsage = {
524
+ cacheCreation?: AnthropicCacheCreation | null | undefined;
525
+ /**
526
+ * The tokens generated
527
+ */
528
+ completionTokens: number;
529
+ completionTokensDetails?: BatchObjectCompletionTokensDetails | null | undefined;
530
+ /**
531
+ * Cost of the completion
532
+ */
533
+ cost?: number | null | undefined;
534
+ /**
535
+ * Breakdown of upstream inference costs
536
+ */
537
+ costDetails?: CostDetails | null | undefined;
538
+ /**
539
+ * Whether a request was made using a Bring Your Own Key configuration
540
+ */
541
+ isByok?: boolean | undefined;
542
+ iterations?: Array<AnthropicUsageIteration> | null | undefined;
543
+ /**
544
+ * Including images, input audio, and tools if any
545
+ */
546
+ promptTokens: number;
547
+ /**
548
+ * Breakdown of tokens used in the prompt.
549
+ */
550
+ promptTokensDetails?: BatchObjectPromptTokensDetails | null | undefined;
551
+ /**
552
+ * Usage for server-side tool execution (e.g., web search)
553
+ */
554
+ serverToolUse?: BatchObjectServerToolUse | null | undefined;
555
+ /**
556
+ * The service tier used by the upstream provider for this request
557
+ */
558
+ serviceTier?: string | null | undefined;
559
+ speed?: AnthropicSpeed | null | undefined;
560
+ /**
561
+ * Sum of the above two fields
562
+ */
563
+ totalTokens: number;
564
+ };
565
+ export type BatchObject = {
566
+ completionWindow: BatchObjectCompletionWindow;
567
+ createdAt: number;
568
+ endpoint: string;
569
+ error: BatchObjectError | null;
570
+ finalizedAt: number | null;
571
+ id: string;
572
+ model: string;
573
+ object: BatchObjectObjectBatch;
574
+ requestCounts: BatchObjectRequestCounts;
575
+ results: Array<Result> | null;
576
+ status: BatchObjectStatus;
577
+ usage: BatchObjectUsage | null;
578
+ };
579
+ /** @internal */
580
+ export declare const BatchObjectCompletionWindow$inboundSchema: z.ZodEnum<typeof BatchObjectCompletionWindow>;
581
+ /** @internal */
582
+ export declare const BatchObjectError$inboundSchema: z.ZodType<BatchObjectError, unknown>;
583
+ export declare function batchObjectErrorFromJSON(jsonString: string): SafeParseResult<BatchObjectError, SDKValidationError>;
584
+ /** @internal */
585
+ export declare const BatchObjectObjectBatch$inboundSchema: z.ZodEnum<typeof BatchObjectObjectBatch>;
586
+ /** @internal */
587
+ export declare const BatchObjectRequestCounts$inboundSchema: z.ZodType<BatchObjectRequestCounts, unknown>;
588
+ export declare function batchObjectRequestCountsFromJSON(jsonString: string): SafeParseResult<BatchObjectRequestCounts, SDKValidationError>;
589
+ /** @internal */
590
+ export declare const ResultError$inboundSchema: z.ZodType<ResultError, unknown>;
591
+ export declare function resultErrorFromJSON(jsonString: string): SafeParseResult<ResultError, SDKValidationError>;
592
+ /** @internal */
593
+ export declare const Embedding$inboundSchema: z.ZodType<Embedding, unknown>;
594
+ export declare function embeddingFromJSON(jsonString: string): SafeParseResult<Embedding, SDKValidationError>;
595
+ /** @internal */
596
+ export declare const ObjectEmbedding$inboundSchema: z.ZodEnum<typeof ObjectEmbedding>;
597
+ /** @internal */
598
+ export declare const BatchObjectData$inboundSchema: z.ZodType<BatchObjectData, unknown>;
599
+ export declare function batchObjectDataFromJSON(jsonString: string): SafeParseResult<BatchObjectData, SDKValidationError>;
600
+ /** @internal */
601
+ export declare const BodyObjectList$inboundSchema: z.ZodEnum<typeof BodyObjectList>;
602
+ /** @internal */
603
+ export declare const BodyPromptTokensDetails2$inboundSchema: z.ZodType<BodyPromptTokensDetails2, unknown>;
604
+ export declare function bodyPromptTokensDetails2FromJSON(jsonString: string): SafeParseResult<BodyPromptTokensDetails2, SDKValidationError>;
605
+ /** @internal */
606
+ export declare const BodyUsage3$inboundSchema: z.ZodType<BodyUsage3, unknown>;
607
+ export declare function bodyUsage3FromJSON(jsonString: string): SafeParseResult<BodyUsage3, SDKValidationError>;
608
+ /** @internal */
609
+ export declare const BodyList$inboundSchema: z.ZodType<BodyList, unknown>;
610
+ export declare function bodyListFromJSON(jsonString: string): SafeParseResult<BodyList, SDKValidationError>;
611
+ /** @internal */
612
+ export declare const BatchObjectRole$inboundSchema: z.ZodEnum<typeof BatchObjectRole>;
613
+ /** @internal */
614
+ export declare const BatchObjectTypeMessage$inboundSchema: z.ZodEnum<typeof BatchObjectTypeMessage>;
615
+ /** @internal */
616
+ export declare const BodyUsage2$inboundSchema: z.ZodType<BodyUsage2, unknown>;
617
+ export declare function bodyUsage2FromJSON(jsonString: string): SafeParseResult<BodyUsage2, SDKValidationError>;
618
+ /** @internal */
619
+ export declare const BodyMessage$inboundSchema: z.ZodType<BodyMessage, unknown>;
620
+ export declare function bodyMessageFromJSON(jsonString: string): SafeParseResult<BodyMessage, SDKValidationError>;
621
+ /** @internal */
622
+ export declare const ContentTopLogprob$inboundSchema: z.ZodType<ContentTopLogprob, unknown>;
623
+ export declare function contentTopLogprobFromJSON(jsonString: string): SafeParseResult<ContentTopLogprob, SDKValidationError>;
624
+ /** @internal */
625
+ export declare const LogprobsContent$inboundSchema: z.ZodType<LogprobsContent, unknown>;
626
+ export declare function logprobsContentFromJSON(jsonString: string): SafeParseResult<LogprobsContent, SDKValidationError>;
627
+ /** @internal */
628
+ export declare const RefusalTopLogprob$inboundSchema: z.ZodType<RefusalTopLogprob, unknown>;
629
+ export declare function refusalTopLogprobFromJSON(jsonString: string): SafeParseResult<RefusalTopLogprob, SDKValidationError>;
630
+ /** @internal */
631
+ export declare const Refusal$inboundSchema: z.ZodType<Refusal, unknown>;
632
+ export declare function refusalFromJSON(jsonString: string): SafeParseResult<Refusal, SDKValidationError>;
633
+ /** @internal */
634
+ export declare const Logprobs$inboundSchema: z.ZodType<Logprobs, unknown>;
635
+ export declare function logprobsFromJSON(jsonString: string): SafeParseResult<Logprobs, SDKValidationError>;
636
+ /** @internal */
637
+ export declare const WebSearchCitation$inboundSchema: z.ZodType<WebSearchCitation, unknown>;
638
+ export declare function webSearchCitationFromJSON(jsonString: string): SafeParseResult<WebSearchCitation, SDKValidationError>;
639
+ /** @internal */
640
+ export declare const AnnotationWebSearchCitation$inboundSchema: z.ZodType<AnnotationWebSearchCitation, unknown>;
641
+ export declare function annotationWebSearchCitationFromJSON(jsonString: string): SafeParseResult<AnnotationWebSearchCitation, SDKValidationError>;
642
+ /** @internal */
643
+ export declare const BatchObjectUrlCitation$inboundSchema: z.ZodType<BatchObjectUrlCitation, unknown>;
644
+ export declare function batchObjectUrlCitationFromJSON(jsonString: string): SafeParseResult<BatchObjectUrlCitation, SDKValidationError>;
645
+ /** @internal */
646
+ export declare const AnnotationURLCitation$inboundSchema: z.ZodType<AnnotationURLCitation, unknown>;
647
+ export declare function annotationURLCitationFromJSON(jsonString: string): SafeParseResult<AnnotationURLCitation, SDKValidationError>;
648
+ /** @internal */
649
+ export declare const ContentImageUrlImageUrl$inboundSchema: z.ZodType<ContentImageUrlImageUrl, unknown>;
650
+ export declare function contentImageUrlImageUrlFromJSON(jsonString: string): SafeParseResult<ContentImageUrlImageUrl, SDKValidationError>;
651
+ /** @internal */
652
+ export declare const ContentImageURL$inboundSchema: z.ZodType<ContentImageURL, unknown>;
653
+ export declare function contentImageURLFromJSON(jsonString: string): SafeParseResult<ContentImageURL, SDKValidationError>;
654
+ /** @internal */
655
+ export declare const ContentText$inboundSchema: z.ZodType<ContentText, unknown>;
656
+ export declare function contentTextFromJSON(jsonString: string): SafeParseResult<ContentText, SDKValidationError>;
657
+ /** @internal */
658
+ export declare const AnnotationContentUnion$inboundSchema: z.ZodType<AnnotationContentUnion, unknown>;
659
+ export declare function annotationContentUnionFromJSON(jsonString: string): SafeParseResult<AnnotationContentUnion, SDKValidationError>;
660
+ /** @internal */
661
+ export declare const BatchObjectFile$inboundSchema: z.ZodType<BatchObjectFile, unknown>;
662
+ export declare function batchObjectFileFromJSON(jsonString: string): SafeParseResult<BatchObjectFile, SDKValidationError>;
663
+ /** @internal */
664
+ export declare const AnnotationFile$inboundSchema: z.ZodType<AnnotationFile, unknown>;
665
+ export declare function annotationFileFromJSON(jsonString: string): SafeParseResult<AnnotationFile, SDKValidationError>;
666
+ /** @internal */
667
+ export declare const Annotation$inboundSchema: z.ZodType<Annotation, unknown>;
668
+ export declare function annotationFromJSON(jsonString: string): SafeParseResult<Annotation, SDKValidationError>;
669
+ /** @internal */
670
+ export declare const BatchObjectImageUrl$inboundSchema: z.ZodType<BatchObjectImageUrl, unknown>;
671
+ export declare function batchObjectImageUrlFromJSON(jsonString: string): SafeParseResult<BatchObjectImageUrl, SDKValidationError>;
672
+ /** @internal */
673
+ export declare const ChoiceTypeImageURLEnum$inboundSchema: z.ZodEnum<typeof ChoiceTypeImageURLEnum>;
674
+ /** @internal */
675
+ export declare const Image$inboundSchema: z.ZodType<Image, unknown>;
676
+ export declare function imageFromJSON(jsonString: string): SafeParseResult<Image, SDKValidationError>;
677
+ /** @internal */
678
+ export declare const ReasoningDetail$inboundSchema: z.ZodType<ReasoningDetail, unknown>;
679
+ export declare function reasoningDetailFromJSON(jsonString: string): SafeParseResult<ReasoningDetail, SDKValidationError>;
680
+ /** @internal */
681
+ export declare const ChoiceRole$inboundSchema: z.ZodEnum<typeof ChoiceRole>;
682
+ /** @internal */
683
+ export declare const BatchObjectFunction$inboundSchema: z.ZodType<BatchObjectFunction, unknown>;
684
+ export declare function batchObjectFunctionFromJSON(jsonString: string): SafeParseResult<BatchObjectFunction, SDKValidationError>;
685
+ /** @internal */
686
+ export declare const ChoiceTypeFunction$inboundSchema: z.ZodEnum<typeof ChoiceTypeFunction>;
687
+ /** @internal */
688
+ export declare const ToolCall$inboundSchema: z.ZodType<ToolCall, unknown>;
689
+ export declare function toolCallFromJSON(jsonString: string): SafeParseResult<ToolCall, SDKValidationError>;
690
+ /** @internal */
691
+ export declare const Message$inboundSchema: z.ZodType<Message, unknown>;
692
+ export declare function messageFromJSON(jsonString: string): SafeParseResult<Message, SDKValidationError>;
693
+ /** @internal */
694
+ export declare const Choice$inboundSchema: z.ZodType<Choice, unknown>;
695
+ export declare function choiceFromJSON(jsonString: string): SafeParseResult<Choice, SDKValidationError>;
696
+ /** @internal */
697
+ export declare const BatchObjectEvent$inboundSchema: z.ZodType<BatchObjectEvent, unknown>;
698
+ /** @internal */
699
+ export declare const BatchObjectTimings$inboundSchema: z.ZodType<BatchObjectTimings, unknown>;
700
+ export declare function batchObjectTimingsFromJSON(jsonString: string): SafeParseResult<BatchObjectTimings, SDKValidationError>;
701
+ /** @internal */
702
+ export declare const BatchObjectDebug$inboundSchema: z.ZodType<BatchObjectDebug, unknown>;
703
+ export declare function batchObjectDebugFromJSON(jsonString: string): SafeParseResult<BatchObjectDebug, SDKValidationError>;
704
+ /** @internal */
705
+ export declare const BodyObjectChatCompletion$inboundSchema: z.ZodEnum<typeof BodyObjectChatCompletion>;
706
+ /** @internal */
707
+ export declare const BodyCompletionTokensDetails$inboundSchema: z.ZodType<BodyCompletionTokensDetails, unknown>;
708
+ export declare function bodyCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<BodyCompletionTokensDetails, SDKValidationError>;
709
+ /** @internal */
710
+ export declare const BodyPromptTokensDetails1$inboundSchema: z.ZodType<BodyPromptTokensDetails1, unknown>;
711
+ export declare function bodyPromptTokensDetails1FromJSON(jsonString: string): SafeParseResult<BodyPromptTokensDetails1, SDKValidationError>;
712
+ /** @internal */
713
+ export declare const BodyServerToolUse$inboundSchema: z.ZodType<BodyServerToolUse, unknown>;
714
+ export declare function bodyServerToolUseFromJSON(jsonString: string): SafeParseResult<BodyServerToolUse, SDKValidationError>;
715
+ /** @internal */
716
+ export declare const BatchObjectServerToolUseDetails$inboundSchema: z.ZodType<BatchObjectServerToolUseDetails, unknown>;
717
+ export declare function batchObjectServerToolUseDetailsFromJSON(jsonString: string): SafeParseResult<BatchObjectServerToolUseDetails, SDKValidationError>;
718
+ /** @internal */
719
+ export declare const BodyUsage1$inboundSchema: z.ZodType<BodyUsage1, unknown>;
720
+ export declare function bodyUsage1FromJSON(jsonString: string): SafeParseResult<BodyUsage1, SDKValidationError>;
721
+ /** @internal */
722
+ export declare const BodyChatCompletion$inboundSchema: z.ZodType<BodyChatCompletion, unknown>;
723
+ export declare function bodyChatCompletionFromJSON(jsonString: string): SafeParseResult<BodyChatCompletion, SDKValidationError>;
724
+ /** @internal */
725
+ export declare const Body$inboundSchema: z.ZodType<Body, unknown>;
726
+ export declare function bodyFromJSON(jsonString: string): SafeParseResult<Body, SDKValidationError>;
727
+ /** @internal */
728
+ export declare const BatchObjectResponse$inboundSchema: z.ZodType<BatchObjectResponse, unknown>;
729
+ export declare function batchObjectResponseFromJSON(jsonString: string): SafeParseResult<BatchObjectResponse, SDKValidationError>;
730
+ /** @internal */
731
+ export declare const Result$inboundSchema: z.ZodType<Result, unknown>;
732
+ export declare function resultFromJSON(jsonString: string): SafeParseResult<Result, SDKValidationError>;
733
+ /** @internal */
734
+ export declare const BatchObjectStatus$inboundSchema: z.ZodType<BatchObjectStatus, unknown>;
735
+ /** @internal */
736
+ export declare const BatchObjectCompletionTokensDetails$inboundSchema: z.ZodType<BatchObjectCompletionTokensDetails, unknown>;
737
+ export declare function batchObjectCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<BatchObjectCompletionTokensDetails, SDKValidationError>;
738
+ /** @internal */
739
+ export declare const BatchObjectPromptTokensDetails$inboundSchema: z.ZodType<BatchObjectPromptTokensDetails, unknown>;
740
+ export declare function batchObjectPromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<BatchObjectPromptTokensDetails, SDKValidationError>;
741
+ /** @internal */
742
+ export declare const BatchObjectServerToolUse$inboundSchema: z.ZodType<BatchObjectServerToolUse, unknown>;
743
+ export declare function batchObjectServerToolUseFromJSON(jsonString: string): SafeParseResult<BatchObjectServerToolUse, SDKValidationError>;
744
+ /** @internal */
745
+ export declare const BatchObjectUsage$inboundSchema: z.ZodType<BatchObjectUsage, unknown>;
746
+ export declare function batchObjectUsageFromJSON(jsonString: string): SafeParseResult<BatchObjectUsage, SDKValidationError>;
747
+ /** @internal */
748
+ export declare const BatchObject$inboundSchema: z.ZodType<BatchObject, unknown>;
749
+ export declare function batchObjectFromJSON(jsonString: string): SafeParseResult<BatchObject, SDKValidationError>;
750
+ //# sourceMappingURL=batchobject.d.ts.map