@openrouter/sdk 0.13.7 → 0.13.14

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 +3 -9
  2. package/esm/funcs/benchmarksGetBenchmarks.d.ts +19 -0
  3. package/esm/funcs/{datasetsGetBenchmarksDesignArena.js → benchmarksGetBenchmarks.js} +11 -10
  4. package/esm/funcs/classificationsGetTaskClassifications.d.ts +37 -0
  5. package/esm/funcs/classificationsGetTaskClassifications.js +119 -0
  6. package/esm/funcs/imagesGenerate.d.ts +30 -0
  7. package/esm/funcs/imagesGenerate.js +95 -0
  8. package/esm/funcs/imagesListModelEndpoints.d.ts +19 -0
  9. package/esm/funcs/imagesListModelEndpoints.js +107 -0
  10. package/esm/funcs/{datasetsGetBenchmarksDesignArena.d.ts → imagesListModels.d.ts} +4 -4
  11. package/esm/funcs/{datasetsGetBenchmarksArtificialAnalysis.js → imagesListModels.js} +10 -15
  12. package/esm/funcs/workspacesDeleteBudget.d.ts +19 -0
  13. package/esm/funcs/workspacesDeleteBudget.js +107 -0
  14. package/esm/funcs/workspacesListBudgets.d.ts +19 -0
  15. package/esm/funcs/workspacesListBudgets.js +103 -0
  16. package/esm/funcs/workspacesSetBudget.d.ts +19 -0
  17. package/esm/funcs/workspacesSetBudget.js +110 -0
  18. package/esm/lib/config.d.ts +2 -2
  19. package/esm/lib/config.js +2 -2
  20. package/esm/models/advisorreasoning.d.ts +1 -0
  21. package/esm/models/advisorreasoning.js +1 -0
  22. package/esm/models/anthropicadvisormessageusageiteration.d.ts +24 -0
  23. package/esm/models/anthropicadvisormessageusageiteration.js +36 -0
  24. package/esm/models/anthropiccompactionusageiteration.d.ts +23 -0
  25. package/esm/models/anthropiccompactionusageiteration.js +35 -0
  26. package/esm/models/anthropicdocumentblockparam.d.ts +5 -4
  27. package/esm/models/anthropicdocumentblockparam.js +3 -0
  28. package/esm/models/anthropicfiledocumentsource.d.ts +14 -0
  29. package/esm/models/anthropicfiledocumentsource.js +19 -0
  30. package/esm/models/anthropiciterationcachecreation.d.ts +11 -0
  31. package/esm/models/anthropiciterationcachecreation.js +21 -0
  32. package/esm/models/anthropicmessageusageiteration.d.ts +24 -0
  33. package/esm/models/anthropicmessageusageiteration.js +36 -0
  34. package/esm/models/anthropicspeed.d.ts +10 -0
  35. package/esm/models/anthropicspeed.js +12 -0
  36. package/esm/models/anthropicunknownusageiteration.d.ts +16 -0
  37. package/esm/models/anthropicunknownusageiteration.js +30 -0
  38. package/esm/models/anthropicusageiteration.d.ts +12 -0
  39. package/esm/models/anthropicusageiteration.js +21 -0
  40. package/esm/models/apierrortype.d.ts +41 -0
  41. package/esm/models/apierrortype.js +40 -0
  42. package/esm/models/booleancapability.d.ts +13 -0
  43. package/esm/models/booleancapability.js +14 -0
  44. package/esm/models/byokproviderslug.d.ts +4 -0
  45. package/esm/models/byokproviderslug.js +4 -0
  46. package/esm/models/capabilitydescriptor.d.ts +15 -0
  47. package/esm/models/capabilitydescriptor.js +19 -0
  48. package/esm/models/chatrequest.d.ts +2 -0
  49. package/esm/models/chatrequest.js +2 -0
  50. package/esm/models/chatstreamchunk.d.ts +25 -4
  51. package/esm/models/chatstreamchunk.js +19 -4
  52. package/esm/models/chatusage.d.ts +32 -8
  53. package/esm/models/chatusage.js +25 -8
  54. package/esm/models/chatwebsearchshorthand.d.ts +1 -1
  55. package/esm/models/contentpartimage.d.ts +9 -2
  56. package/esm/models/contentpartimage.js +6 -1
  57. package/esm/models/debugevent.d.ts +42 -0
  58. package/esm/models/debugevent.js +58 -0
  59. package/esm/models/deleteworkspacebudgetresponse.d.ts +13 -0
  60. package/esm/models/deleteworkspacebudgetresponse.js +14 -0
  61. package/esm/models/enumcapability.d.ts +14 -0
  62. package/esm/models/enumcapability.js +15 -0
  63. package/esm/models/fusionplugin.d.ts +1 -0
  64. package/esm/models/fusionplugin.js +1 -0
  65. package/esm/models/fusionservertoolconfig.d.ts +8 -1
  66. package/esm/models/fusionservertoolconfig.js +4 -0
  67. package/esm/models/imageendpoint.d.ts +41 -0
  68. package/esm/models/imageendpoint.js +33 -0
  69. package/esm/models/imagegencompletedevent.d.ts +29 -0
  70. package/esm/models/imagegencompletedevent.js +23 -0
  71. package/esm/models/imagegenerationrequest.d.ts +914 -0
  72. package/esm/models/imagegenerationrequest.js +267 -0
  73. package/esm/models/imagegenerationresponse.d.ts +34 -0
  74. package/esm/models/imagegenerationresponse.js +29 -0
  75. package/esm/models/imagegenerationservertool.d.ts +15 -15
  76. package/esm/models/imagegenerationservertool.js +15 -17
  77. package/esm/models/imagegenerationusage.d.ts +119 -0
  78. package/esm/models/imagegenerationusage.js +93 -0
  79. package/esm/models/imagegenpartialimageevent.d.ts +24 -0
  80. package/esm/models/imagegenpartialimageevent.js +22 -0
  81. package/esm/models/imagegenstreamerrorevent.d.ts +44 -0
  82. package/esm/models/imagegenstreamerrorevent.js +25 -0
  83. package/esm/models/imagemodelarchitecture.d.ts +19 -0
  84. package/esm/models/imagemodelarchitecture.js +23 -0
  85. package/esm/models/imagemodelendpointsresponse.d.ts +18 -0
  86. package/esm/models/imagemodelendpointsresponse.js +16 -0
  87. package/esm/models/imagemodellistitem.d.ts +42 -0
  88. package/esm/models/imagemodellistitem.js +29 -0
  89. package/esm/models/imagemodelslistresponse.d.ts +14 -0
  90. package/esm/models/imagemodelslistresponse.js +15 -0
  91. package/esm/models/imageoutputmodality.d.ts +16 -0
  92. package/esm/models/imageoutputmodality.js +18 -0
  93. package/esm/models/imagepricingentry.d.ts +35 -0
  94. package/esm/models/imagepricingentry.js +41 -0
  95. package/esm/models/imagestreamingresponse.d.ts +18 -0
  96. package/esm/models/imagestreamingresponse.js +43 -0
  97. package/esm/models/index.d.ts +44 -7
  98. package/esm/models/index.js +44 -7
  99. package/esm/models/inputreference.d.ts +6 -2
  100. package/esm/models/inputreference.js +1 -1
  101. package/esm/models/legacywebsearchservertool.d.ts +1 -1
  102. package/esm/models/listworkspacebudgetsresponse.d.ts +14 -0
  103. package/esm/models/listworkspacebudgetsresponse.js +15 -0
  104. package/esm/models/messagesrequest.d.ts +6 -6
  105. package/esm/models/messagesrequest.js +4 -5
  106. package/esm/models/model.d.ts +5 -0
  107. package/esm/models/model.js +2 -0
  108. package/esm/models/modelreasoning.d.ts +49 -0
  109. package/esm/models/modelreasoning.js +42 -0
  110. package/esm/models/observabilityarizedestination.d.ts +3 -0
  111. package/esm/models/openresponsesresult.d.ts +5 -0
  112. package/esm/models/openresponsesresult.js +3 -0
  113. package/esm/models/operations/createembeddings.d.ts +19 -0
  114. package/esm/models/operations/createembeddings.js +20 -0
  115. package/esm/models/operations/createimages.d.ts +63 -0
  116. package/esm/models/operations/createimages.js +44 -0
  117. package/esm/models/operations/{getbenchmarksartificialanalysis.d.ts → deleteworkspacebudget.d.ts} +15 -9
  118. package/esm/models/operations/deleteworkspacebudget.js +23 -0
  119. package/esm/models/operations/getbenchmarks.d.ts +120 -0
  120. package/esm/models/operations/getbenchmarks.js +60 -0
  121. package/esm/models/operations/getmodels.d.ts +5 -3
  122. package/esm/models/operations/getmodels.js +3 -1
  123. package/esm/models/operations/{getbenchmarksdesignarena.d.ts → gettaskclassifications.d.ts} +16 -28
  124. package/esm/models/operations/gettaskclassifications.js +29 -0
  125. package/esm/models/operations/index.d.ts +8 -2
  126. package/esm/models/operations/index.js +8 -2
  127. package/esm/models/operations/listbyokkeys.d.ts +4 -0
  128. package/esm/models/operations/listbyokkeys.js +4 -0
  129. package/esm/models/operations/listimagemodelendpoints.d.ts +63 -0
  130. package/esm/models/operations/listimagemodelendpoints.js +22 -0
  131. package/esm/models/operations/listimagemodels.d.ts +53 -0
  132. package/esm/models/operations/listimagemodels.js +20 -0
  133. package/esm/models/operations/listworkspacebudgets.d.ts +58 -0
  134. package/esm/models/operations/listworkspacebudgets.js +21 -0
  135. package/esm/models/operations/queryanalytics.d.ts +7 -3
  136. package/esm/models/operations/queryanalytics.js +1 -0
  137. package/esm/models/operations/upsertworkspacebudget.d.ts +66 -0
  138. package/esm/models/operations/upsertworkspacebudget.js +25 -0
  139. package/esm/models/preview20250311websearchservertool.d.ts +1 -1
  140. package/esm/models/previewwebsearchservertool.d.ts +1 -1
  141. package/esm/models/providername.d.ts +4 -0
  142. package/esm/models/providername.js +4 -0
  143. package/esm/models/provideroptions.d.ts +25 -1
  144. package/esm/models/provideroptions.js +6 -0
  145. package/esm/models/providerresponse.d.ts +4 -0
  146. package/esm/models/providerresponse.js +4 -0
  147. package/esm/models/rangecapability.d.ts +15 -0
  148. package/esm/models/rangecapability.js +16 -0
  149. package/esm/models/reasoningeffort.d.ts +1 -0
  150. package/esm/models/reasoningeffort.js +1 -0
  151. package/esm/models/responsesrequest.d.ts +6 -0
  152. package/esm/models/responsesrequest.js +2 -0
  153. package/esm/models/speechrequest.d.ts +1 -1
  154. package/esm/models/streamevents.d.ts +2 -1
  155. package/esm/models/streamevents.js +2 -0
  156. package/esm/models/sttrequest.d.ts +1 -1
  157. package/esm/models/subagentreasoning.d.ts +1 -0
  158. package/esm/models/subagentreasoning.js +1 -0
  159. package/esm/models/taskclassificationitem.d.ts +42 -0
  160. package/esm/models/taskclassificationitem.js +32 -0
  161. package/esm/models/taskclassificationmacrocategory.d.ts +25 -0
  162. package/esm/models/taskclassificationmacrocategory.js +23 -0
  163. package/esm/models/taskclassificationmodel.d.ts +21 -0
  164. package/esm/models/taskclassificationmodel.js +22 -0
  165. package/esm/models/taskclassificationresponse.d.ts +33 -0
  166. package/esm/models/taskclassificationresponse.js +33 -0
  167. package/esm/models/{benchmarkpricing.d.ts → unifiedbenchmarkpricing.d.ts} +4 -4
  168. package/esm/models/unifiedbenchmarkpricing.js +15 -0
  169. package/esm/models/{benchmarksaaitem.d.ts → unifiedbenchmarksaaitem.d.ts} +14 -10
  170. package/esm/models/unifiedbenchmarksaaitem.js +30 -0
  171. package/esm/models/{benchmarksdaitem.d.ts → unifiedbenchmarksdaitem.d.ts} +11 -7
  172. package/esm/models/{benchmarksdaitem.js → unifiedbenchmarksdaitem.js} +8 -7
  173. package/esm/models/unifiedbenchmarksmeta.d.ts +63 -0
  174. package/esm/models/unifiedbenchmarksmeta.js +46 -0
  175. package/esm/models/unifiedbenchmarksresponse.d.ts +19 -0
  176. package/esm/models/unifiedbenchmarksresponse.js +30 -0
  177. package/esm/models/upsertworkspacebudgetrequest.d.ts +15 -0
  178. package/esm/models/upsertworkspacebudgetrequest.js +18 -0
  179. package/esm/models/upsertworkspacebudgetresponse.d.ts +11 -0
  180. package/esm/models/upsertworkspacebudgetresponse.js +15 -0
  181. package/esm/models/videogenerationrequest.d.ts +39 -15
  182. package/esm/models/videogenerationrequest.js +17 -11
  183. package/esm/models/websearchconfig.d.ts +1 -1
  184. package/esm/models/websearchservertool.d.ts +1 -1
  185. package/esm/models/websearchservertoolconfig.d.ts +1 -1
  186. package/esm/models/workspacebudget.d.ts +48 -0
  187. package/esm/models/workspacebudget.js +39 -0
  188. package/esm/models/workspacebudgetinterval.d.ts +18 -0
  189. package/esm/models/workspacebudgetinterval.js +17 -0
  190. package/esm/sdk/benchmarks.d.ts +13 -0
  191. package/esm/sdk/benchmarks.js +19 -0
  192. package/esm/sdk/classifications.d.ts +31 -0
  193. package/esm/sdk/classifications.js +37 -0
  194. package/esm/sdk/datasets.d.ts +0 -14
  195. package/esm/sdk/datasets.js +0 -20
  196. package/esm/sdk/images.d.ts +38 -0
  197. package/esm/sdk/images.js +33 -0
  198. package/esm/sdk/sdk.d.ts +9 -0
  199. package/esm/sdk/sdk.js +12 -0
  200. package/esm/sdk/workspaces.d.ts +21 -0
  201. package/esm/sdk/workspaces.js +30 -0
  202. package/jsr.json +1 -1
  203. package/package.json +7 -7
  204. package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.d.ts +0 -19
  205. package/esm/models/benchmarkpricing.js +0 -15
  206. package/esm/models/benchmarksaaitem.js +0 -29
  207. package/esm/models/benchmarksaameta.d.ts +0 -70
  208. package/esm/models/benchmarksaameta.js +0 -50
  209. package/esm/models/benchmarksaaresponse.d.ts +0 -13
  210. package/esm/models/benchmarksaaresponse.js +0 -17
  211. package/esm/models/benchmarksdameta.d.ts +0 -98
  212. package/esm/models/benchmarksdameta.js +0 -62
  213. package/esm/models/benchmarksdaresponse.d.ts +0 -13
  214. package/esm/models/benchmarksdaresponse.js +0 -17
  215. package/esm/models/operations/getbenchmarksartificialanalysis.js +0 -22
  216. package/esm/models/operations/getbenchmarksdesignarena.js +0 -36
@@ -0,0 +1,267 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ea1ffc0d2470
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ContentPartImage$outboundSchema, } from "./contentpartimage.js";
9
+ /**
10
+ * Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
11
+ */
12
+ export const ImageGenerationRequestAspectRatio = {
13
+ Eleven: "1:1",
14
+ Twelve: "1:2",
15
+ Fourteen: "1:4",
16
+ Eighteen: "1:8",
17
+ TwentyOne: "2:1",
18
+ TwentyThree: "2:3",
19
+ ThirtyTwo: "3:2",
20
+ ThirtyFour: "3:4",
21
+ FortyOne: "4:1",
22
+ FortyThree: "4:3",
23
+ FortyFive: "4:5",
24
+ FiftyFour: "5:4",
25
+ EightyOne: "8:1",
26
+ NineHundredAndSixteen: "9:16",
27
+ OneHundredAndSixtyNine: "16:9",
28
+ NineHundredAndNineteenDot5: "9:19.5",
29
+ NineteenDot59: "19.5:9",
30
+ NineHundredAndTwenty: "9:20",
31
+ TwoHundredAndNine: "20:9",
32
+ NineHundredAndTwentyOne: "9:21",
33
+ TwoHundredAndNineteen: "21:9",
34
+ Auto: "auto",
35
+ };
36
+ /**
37
+ * Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
38
+ */
39
+ export const ImageGenerationRequestBackground = {
40
+ Auto: "auto",
41
+ Transparent: "transparent",
42
+ Opaque: "opaque",
43
+ };
44
+ /**
45
+ * Encoding of the returned image bytes.
46
+ */
47
+ export const ImageGenerationRequestOutputFormat = {
48
+ Png: "png",
49
+ Jpeg: "jpeg",
50
+ Webp: "webp",
51
+ };
52
+ /**
53
+ * Rendering quality. Providers without a quality knob ignore this.
54
+ */
55
+ export const ImageGenerationRequestQuality = {
56
+ Auto: "auto",
57
+ Low: "low",
58
+ Medium: "medium",
59
+ High: "high",
60
+ };
61
+ /**
62
+ * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider.
63
+ */
64
+ export const ImageGenerationRequestResolution = {
65
+ FiveHundredAndTwelve: "512",
66
+ OneK: "1K",
67
+ TwoK: "2K",
68
+ FourK: "4K",
69
+ };
70
+ /** @internal */
71
+ export const ImageGenerationRequestAspectRatio$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestAspectRatio);
72
+ /** @internal */
73
+ export const ImageGenerationRequestBackground$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestBackground);
74
+ /** @internal */
75
+ export const ImageGenerationRequestOutputFormat$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestOutputFormat);
76
+ /** @internal */
77
+ export const ImageGenerationRequestOptions$outboundSchema = z.object({
78
+ oneai: z.record(z.string(), z.nullable(z.any())).optional(),
79
+ ai21: z.record(z.string(), z.nullable(z.any())).optional(),
80
+ aionLabs: z.record(z.string(), z.nullable(z.any())).optional(),
81
+ akashml: z.record(z.string(), z.nullable(z.any())).optional(),
82
+ alibaba: z.record(z.string(), z.nullable(z.any())).optional(),
83
+ amazonBedrock: z.record(z.string(), z.nullable(z.any())).optional(),
84
+ amazonNova: z.record(z.string(), z.nullable(z.any())).optional(),
85
+ ambient: z.record(z.string(), z.nullable(z.any())).optional(),
86
+ anthropic: z.record(z.string(), z.nullable(z.any())).optional(),
87
+ anyscale: z.record(z.string(), z.nullable(z.any())).optional(),
88
+ arceeAi: z.record(z.string(), z.nullable(z.any())).optional(),
89
+ atlasCloud: z.record(z.string(), z.nullable(z.any())).optional(),
90
+ atoma: z.record(z.string(), z.nullable(z.any())).optional(),
91
+ avian: z.record(z.string(), z.nullable(z.any())).optional(),
92
+ azure: z.record(z.string(), z.nullable(z.any())).optional(),
93
+ baidu: z.record(z.string(), z.nullable(z.any())).optional(),
94
+ baseten: z.record(z.string(), z.nullable(z.any())).optional(),
95
+ blackForestLabs: z.record(z.string(), z.nullable(z.any())).optional(),
96
+ byteplus: z.record(z.string(), z.nullable(z.any())).optional(),
97
+ centml: z.record(z.string(), z.nullable(z.any())).optional(),
98
+ cerebras: z.record(z.string(), z.nullable(z.any())).optional(),
99
+ chutes: z.record(z.string(), z.nullable(z.any())).optional(),
100
+ cirrascale: z.record(z.string(), z.nullable(z.any())).optional(),
101
+ clarifai: z.record(z.string(), z.nullable(z.any())).optional(),
102
+ cloudflare: z.record(z.string(), z.nullable(z.any())).optional(),
103
+ cohere: z.record(z.string(), z.nullable(z.any())).optional(),
104
+ crofai: z.record(z.string(), z.nullable(z.any())).optional(),
105
+ crucible: z.record(z.string(), z.nullable(z.any())).optional(),
106
+ crusoe: z.record(z.string(), z.nullable(z.any())).optional(),
107
+ darkbloom: z.record(z.string(), z.nullable(z.any())).optional(),
108
+ decart: z.record(z.string(), z.nullable(z.any())).optional(),
109
+ deepinfra: z.record(z.string(), z.nullable(z.any())).optional(),
110
+ deepseek: z.record(z.string(), z.nullable(z.any())).optional(),
111
+ dekallm: z.record(z.string(), z.nullable(z.any())).optional(),
112
+ digitalocean: z.record(z.string(), z.nullable(z.any())).optional(),
113
+ enfer: z.record(z.string(), z.nullable(z.any())).optional(),
114
+ fakeProvider: z.record(z.string(), z.nullable(z.any())).optional(),
115
+ featherless: z.record(z.string(), z.nullable(z.any())).optional(),
116
+ fireworks: z.record(z.string(), z.nullable(z.any())).optional(),
117
+ friendli: z.record(z.string(), z.nullable(z.any())).optional(),
118
+ gmicloud: z.record(z.string(), z.nullable(z.any())).optional(),
119
+ googleAiStudio: z.record(z.string(), z.nullable(z.any())).optional(),
120
+ googleVertex: z.record(z.string(), z.nullable(z.any())).optional(),
121
+ gopomelo: z.record(z.string(), z.nullable(z.any())).optional(),
122
+ groq: z.record(z.string(), z.nullable(z.any())).optional(),
123
+ heygen: z.record(z.string(), z.nullable(z.any())).optional(),
124
+ huggingface: z.record(z.string(), z.nullable(z.any())).optional(),
125
+ hyperbolic: z.record(z.string(), z.nullable(z.any())).optional(),
126
+ hyperbolicQuantized: z.record(z.string(), z.nullable(z.any())).optional(),
127
+ inception: z.record(z.string(), z.nullable(z.any())).optional(),
128
+ inceptron: z.record(z.string(), z.nullable(z.any())).optional(),
129
+ inferactVllm: z.record(z.string(), z.nullable(z.any())).optional(),
130
+ inferenceNet: z.record(z.string(), z.nullable(z.any())).optional(),
131
+ infermatic: z.record(z.string(), z.nullable(z.any())).optional(),
132
+ inflection: z.record(z.string(), z.nullable(z.any())).optional(),
133
+ inocloud: z.record(z.string(), z.nullable(z.any())).optional(),
134
+ ioNet: z.record(z.string(), z.nullable(z.any())).optional(),
135
+ ionstream: z.record(z.string(), z.nullable(z.any())).optional(),
136
+ klusterai: z.record(z.string(), z.nullable(z.any())).optional(),
137
+ lambda: z.record(z.string(), z.nullable(z.any())).optional(),
138
+ lepton: z.record(z.string(), z.nullable(z.any())).optional(),
139
+ liquid: z.record(z.string(), z.nullable(z.any())).optional(),
140
+ lynn: z.record(z.string(), z.nullable(z.any())).optional(),
141
+ lynnPrivate: z.record(z.string(), z.nullable(z.any())).optional(),
142
+ mancer: z.record(z.string(), z.nullable(z.any())).optional(),
143
+ mancerOld: z.record(z.string(), z.nullable(z.any())).optional(),
144
+ mara: z.record(z.string(), z.nullable(z.any())).optional(),
145
+ meta: z.record(z.string(), z.nullable(z.any())).optional(),
146
+ minimax: z.record(z.string(), z.nullable(z.any())).optional(),
147
+ mistral: z.record(z.string(), z.nullable(z.any())).optional(),
148
+ modal: z.record(z.string(), z.nullable(z.any())).optional(),
149
+ modelrun: z.record(z.string(), z.nullable(z.any())).optional(),
150
+ modular: z.record(z.string(), z.nullable(z.any())).optional(),
151
+ moonshotai: z.record(z.string(), z.nullable(z.any())).optional(),
152
+ morph: z.record(z.string(), z.nullable(z.any())).optional(),
153
+ ncompass: z.record(z.string(), z.nullable(z.any())).optional(),
154
+ nebius: z.record(z.string(), z.nullable(z.any())).optional(),
155
+ nexAgi: z.record(z.string(), z.nullable(z.any())).optional(),
156
+ nextbit: z.record(z.string(), z.nullable(z.any())).optional(),
157
+ nineteen: z.record(z.string(), z.nullable(z.any())).optional(),
158
+ novita: z.record(z.string(), z.nullable(z.any())).optional(),
159
+ nvidia: z.record(z.string(), z.nullable(z.any())).optional(),
160
+ octoai: z.record(z.string(), z.nullable(z.any())).optional(),
161
+ openInference: z.record(z.string(), z.nullable(z.any())).optional(),
162
+ openai: z.record(z.string(), z.nullable(z.any())).optional(),
163
+ parasail: z.record(z.string(), z.nullable(z.any())).optional(),
164
+ perceptron: z.record(z.string(), z.nullable(z.any())).optional(),
165
+ perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
166
+ phala: z.record(z.string(), z.nullable(z.any())).optional(),
167
+ poolside: z.record(z.string(), z.nullable(z.any())).optional(),
168
+ recraft: z.record(z.string(), z.nullable(z.any())).optional(),
169
+ recursal: z.record(z.string(), z.nullable(z.any())).optional(),
170
+ reflection: z.record(z.string(), z.nullable(z.any())).optional(),
171
+ reka: z.record(z.string(), z.nullable(z.any())).optional(),
172
+ relace: z.record(z.string(), z.nullable(z.any())).optional(),
173
+ replicate: z.record(z.string(), z.nullable(z.any())).optional(),
174
+ sakanaAi: z.record(z.string(), z.nullable(z.any())).optional(),
175
+ sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
176
+ sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
177
+ seed: z.record(z.string(), z.nullable(z.any())).optional(),
178
+ sfCompute: z.record(z.string(), z.nullable(z.any())).optional(),
179
+ siliconflow: z.record(z.string(), z.nullable(z.any())).optional(),
180
+ sourceful: z.record(z.string(), z.nullable(z.any())).optional(),
181
+ stealth: z.record(z.string(), z.nullable(z.any())).optional(),
182
+ stepfun: z.record(z.string(), z.nullable(z.any())).optional(),
183
+ streamlake: z.record(z.string(), z.nullable(z.any())).optional(),
184
+ switchpoint: z.record(z.string(), z.nullable(z.any())).optional(),
185
+ targon: z.record(z.string(), z.nullable(z.any())).optional(),
186
+ tenstorrent: z.record(z.string(), z.nullable(z.any())).optional(),
187
+ together: z.record(z.string(), z.nullable(z.any())).optional(),
188
+ togetherLite: z.record(z.string(), z.nullable(z.any())).optional(),
189
+ ubicloud: z.record(z.string(), z.nullable(z.any())).optional(),
190
+ upstage: z.record(z.string(), z.nullable(z.any())).optional(),
191
+ venice: z.record(z.string(), z.nullable(z.any())).optional(),
192
+ wafer: z.record(z.string(), z.nullable(z.any())).optional(),
193
+ wandb: z.record(z.string(), z.nullable(z.any())).optional(),
194
+ xai: z.record(z.string(), z.nullable(z.any())).optional(),
195
+ xiaomi: z.record(z.string(), z.nullable(z.any())).optional(),
196
+ zAi: z.record(z.string(), z.nullable(z.any())).optional(),
197
+ }).transform((v) => {
198
+ return remap$(v, {
199
+ oneai: "01ai",
200
+ aionLabs: "aion-labs",
201
+ amazonBedrock: "amazon-bedrock",
202
+ amazonNova: "amazon-nova",
203
+ arceeAi: "arcee-ai",
204
+ atlasCloud: "atlas-cloud",
205
+ blackForestLabs: "black-forest-labs",
206
+ fakeProvider: "fake-provider",
207
+ googleAiStudio: "google-ai-studio",
208
+ googleVertex: "google-vertex",
209
+ hyperbolicQuantized: "hyperbolic-quantized",
210
+ inferactVllm: "inferact-vllm",
211
+ inferenceNet: "inference-net",
212
+ ioNet: "io-net",
213
+ lynnPrivate: "lynn-private",
214
+ mancerOld: "mancer-old",
215
+ nexAgi: "nex-agi",
216
+ openInference: "open-inference",
217
+ sakanaAi: "sakana-ai",
218
+ sambanovaCloaked: "sambanova-cloaked",
219
+ sfCompute: "sf-compute",
220
+ togetherLite: "together-lite",
221
+ zAi: "z-ai",
222
+ });
223
+ });
224
+ export function imageGenerationRequestOptionsToJSON(imageGenerationRequestOptions) {
225
+ return JSON.stringify(ImageGenerationRequestOptions$outboundSchema.parse(imageGenerationRequestOptions));
226
+ }
227
+ /** @internal */
228
+ export const ImageGenerationRequestProvider$outboundSchema = z.object({
229
+ options: z.lazy(() => ImageGenerationRequestOptions$outboundSchema)
230
+ .optional(),
231
+ });
232
+ export function imageGenerationRequestProviderToJSON(imageGenerationRequestProvider) {
233
+ return JSON.stringify(ImageGenerationRequestProvider$outboundSchema.parse(imageGenerationRequestProvider));
234
+ }
235
+ /** @internal */
236
+ export const ImageGenerationRequestQuality$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestQuality);
237
+ /** @internal */
238
+ export const ImageGenerationRequestResolution$outboundSchema = openEnums.outboundSchema(ImageGenerationRequestResolution);
239
+ /** @internal */
240
+ export const ImageGenerationRequest$outboundSchema = z.object({
241
+ aspectRatio: ImageGenerationRequestAspectRatio$outboundSchema.optional(),
242
+ background: ImageGenerationRequestBackground$outboundSchema.optional(),
243
+ inputReferences: z.array(ContentPartImage$outboundSchema).optional(),
244
+ model: z.string(),
245
+ n: z.int().optional(),
246
+ outputCompression: z.int().optional(),
247
+ outputFormat: ImageGenerationRequestOutputFormat$outboundSchema.optional(),
248
+ prompt: z.string(),
249
+ provider: z.lazy(() => ImageGenerationRequestProvider$outboundSchema)
250
+ .optional(),
251
+ quality: ImageGenerationRequestQuality$outboundSchema.optional(),
252
+ resolution: ImageGenerationRequestResolution$outboundSchema.optional(),
253
+ seed: z.int().optional(),
254
+ size: z.string().optional(),
255
+ stream: z.boolean().optional(),
256
+ }).transform((v) => {
257
+ return remap$(v, {
258
+ aspectRatio: "aspect_ratio",
259
+ inputReferences: "input_references",
260
+ outputCompression: "output_compression",
261
+ outputFormat: "output_format",
262
+ });
263
+ });
264
+ export function imageGenerationRequestToJSON(imageGenerationRequest) {
265
+ return JSON.stringify(ImageGenerationRequest$outboundSchema.parse(imageGenerationRequest));
266
+ }
267
+ //# sourceMappingURL=imagegenerationrequest.js.map
@@ -0,0 +1,34 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { ImageGenerationUsage } from "./imagegenerationusage.js";
5
+ export type ImageGenerationResponseData = {
6
+ /**
7
+ * Base64-encoded image bytes
8
+ */
9
+ b64Json: string;
10
+ };
11
+ /**
12
+ * Image generation response
13
+ */
14
+ export type ImageGenerationResponse = {
15
+ /**
16
+ * Unix timestamp (seconds) when the image was generated
17
+ */
18
+ created: number;
19
+ /**
20
+ * Generated images
21
+ */
22
+ data: Array<ImageGenerationResponseData>;
23
+ /**
24
+ * Token and cost usage for the image generation request, when available
25
+ */
26
+ usage?: ImageGenerationUsage | undefined;
27
+ };
28
+ /** @internal */
29
+ export declare const ImageGenerationResponseData$inboundSchema: z.ZodType<ImageGenerationResponseData, unknown>;
30
+ export declare function imageGenerationResponseDataFromJSON(jsonString: string): SafeParseResult<ImageGenerationResponseData, SDKValidationError>;
31
+ /** @internal */
32
+ export declare const ImageGenerationResponse$inboundSchema: z.ZodType<ImageGenerationResponse, unknown>;
33
+ export declare function imageGenerationResponseFromJSON(jsonString: string): SafeParseResult<ImageGenerationResponse, SDKValidationError>;
34
+ //# sourceMappingURL=imagegenerationresponse.d.ts.map
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 18aeba0f13cc
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ImageGenerationUsage$inboundSchema, } from "./imagegenerationusage.js";
9
+ /** @internal */
10
+ export const ImageGenerationResponseData$inboundSchema = z.object({
11
+ b64_json: z.string(),
12
+ }).transform((v) => {
13
+ return remap$(v, {
14
+ "b64_json": "b64Json",
15
+ });
16
+ });
17
+ export function imageGenerationResponseDataFromJSON(jsonString) {
18
+ return safeParse(jsonString, (x) => ImageGenerationResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationResponseData' from JSON`);
19
+ }
20
+ /** @internal */
21
+ export const ImageGenerationResponse$inboundSchema = z.object({
22
+ created: z.int(),
23
+ data: z.array(z.lazy(() => ImageGenerationResponseData$inboundSchema)),
24
+ usage: ImageGenerationUsage$inboundSchema.optional(),
25
+ });
26
+ export function imageGenerationResponseFromJSON(jsonString) {
27
+ return safeParse(jsonString, (x) => ImageGenerationResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationResponse' from JSON`);
28
+ }
29
+ //# sourceMappingURL=imagegenerationresponse.js.map
@@ -2,12 +2,12 @@ import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const Background: {
5
+ export declare const ImageGenerationServerToolBackground: {
6
6
  readonly Transparent: "transparent";
7
7
  readonly Opaque: "opaque";
8
8
  readonly Auto: "auto";
9
9
  };
10
- export type Background = OpenEnum<typeof Background>;
10
+ export type ImageGenerationServerToolBackground = OpenEnum<typeof ImageGenerationServerToolBackground>;
11
11
  export declare const InputFidelity: {
12
12
  readonly High: "high";
13
13
  readonly Low: "low";
@@ -27,19 +27,19 @@ export declare const Moderation: {
27
27
  readonly Low: "low";
28
28
  };
29
29
  export type Moderation = OpenEnum<typeof Moderation>;
30
- export declare const OutputFormat: {
30
+ export declare const ImageGenerationServerToolOutputFormat: {
31
31
  readonly Png: "png";
32
32
  readonly Webp: "webp";
33
33
  readonly Jpeg: "jpeg";
34
34
  };
35
- export type OutputFormat = OpenEnum<typeof OutputFormat>;
36
- export declare const Quality: {
35
+ export type ImageGenerationServerToolOutputFormat = OpenEnum<typeof ImageGenerationServerToolOutputFormat>;
36
+ export declare const ImageGenerationServerToolQuality: {
37
37
  readonly Low: "low";
38
38
  readonly Medium: "medium";
39
39
  readonly High: "high";
40
40
  readonly Auto: "auto";
41
41
  };
42
- export type Quality = OpenEnum<typeof Quality>;
42
+ export type ImageGenerationServerToolQuality = OpenEnum<typeof ImageGenerationServerToolQuality>;
43
43
  export declare const Size: {
44
44
  readonly OneThousandAndTwentyFourx1024: "1024x1024";
45
45
  readonly OneThousandAndTwentyFourx1536: "1024x1536";
@@ -51,22 +51,22 @@ export type Size = OpenEnum<typeof Size>;
51
51
  * Image generation tool configuration
52
52
  */
53
53
  export type ImageGenerationServerTool = {
54
- background?: Background | undefined;
54
+ background?: ImageGenerationServerToolBackground | undefined;
55
55
  inputFidelity?: InputFidelity | null | undefined;
56
56
  inputImageMask?: InputImageMask | undefined;
57
57
  model?: ModelEnum | undefined;
58
58
  moderation?: Moderation | undefined;
59
59
  outputCompression?: number | undefined;
60
- outputFormat?: OutputFormat | undefined;
60
+ outputFormat?: ImageGenerationServerToolOutputFormat | undefined;
61
61
  partialImages?: number | undefined;
62
- quality?: Quality | undefined;
62
+ quality?: ImageGenerationServerToolQuality | undefined;
63
63
  size?: Size | undefined;
64
64
  type: "image_generation";
65
65
  };
66
66
  /** @internal */
67
- export declare const Background$inboundSchema: z.ZodType<Background, unknown>;
67
+ export declare const ImageGenerationServerToolBackground$inboundSchema: z.ZodType<ImageGenerationServerToolBackground, unknown>;
68
68
  /** @internal */
69
- export declare const Background$outboundSchema: z.ZodType<string, Background>;
69
+ export declare const ImageGenerationServerToolBackground$outboundSchema: z.ZodType<string, ImageGenerationServerToolBackground>;
70
70
  /** @internal */
71
71
  export declare const InputFidelity$inboundSchema: z.ZodType<InputFidelity, unknown>;
72
72
  /** @internal */
@@ -91,13 +91,13 @@ export declare const Moderation$inboundSchema: z.ZodType<Moderation, unknown>;
91
91
  /** @internal */
92
92
  export declare const Moderation$outboundSchema: z.ZodType<string, Moderation>;
93
93
  /** @internal */
94
- export declare const OutputFormat$inboundSchema: z.ZodType<OutputFormat, unknown>;
94
+ export declare const ImageGenerationServerToolOutputFormat$inboundSchema: z.ZodType<ImageGenerationServerToolOutputFormat, unknown>;
95
95
  /** @internal */
96
- export declare const OutputFormat$outboundSchema: z.ZodType<string, OutputFormat>;
96
+ export declare const ImageGenerationServerToolOutputFormat$outboundSchema: z.ZodType<string, ImageGenerationServerToolOutputFormat>;
97
97
  /** @internal */
98
- export declare const Quality$inboundSchema: z.ZodType<Quality, unknown>;
98
+ export declare const ImageGenerationServerToolQuality$inboundSchema: z.ZodType<ImageGenerationServerToolQuality, unknown>;
99
99
  /** @internal */
100
- export declare const Quality$outboundSchema: z.ZodType<string, Quality>;
100
+ export declare const ImageGenerationServerToolQuality$outboundSchema: z.ZodType<string, ImageGenerationServerToolQuality>;
101
101
  /** @internal */
102
102
  export declare const Size$inboundSchema: z.ZodType<Size, unknown>;
103
103
  /** @internal */
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import * as openEnums from "../types/enums.js";
9
- export const Background = {
9
+ export const ImageGenerationServerToolBackground = {
10
10
  Transparent: "transparent",
11
11
  Opaque: "opaque",
12
12
  Auto: "auto",
@@ -23,12 +23,12 @@ export const Moderation = {
23
23
  Auto: "auto",
24
24
  Low: "low",
25
25
  };
26
- export const OutputFormat = {
26
+ export const ImageGenerationServerToolOutputFormat = {
27
27
  Png: "png",
28
28
  Webp: "webp",
29
29
  Jpeg: "jpeg",
30
30
  };
31
- export const Quality = {
31
+ export const ImageGenerationServerToolQuality = {
32
32
  Low: "low",
33
33
  Medium: "medium",
34
34
  High: "high",
@@ -41,9 +41,9 @@ export const Size = {
41
41
  Auto: "auto",
42
42
  };
43
43
  /** @internal */
44
- export const Background$inboundSchema = openEnums.inboundSchema(Background);
44
+ export const ImageGenerationServerToolBackground$inboundSchema = openEnums.inboundSchema(ImageGenerationServerToolBackground);
45
45
  /** @internal */
46
- export const Background$outboundSchema = openEnums.outboundSchema(Background);
46
+ export const ImageGenerationServerToolBackground$outboundSchema = openEnums.outboundSchema(ImageGenerationServerToolBackground);
47
47
  /** @internal */
48
48
  export const InputFidelity$inboundSchema = openEnums.inboundSchema(InputFidelity);
49
49
  /** @internal */
@@ -85,15 +85,13 @@ export const Moderation$inboundSchema = openEnums.inboundSchema(Moderation);
85
85
  /** @internal */
86
86
  export const Moderation$outboundSchema = openEnums.outboundSchema(Moderation);
87
87
  /** @internal */
88
- export const OutputFormat$inboundSchema = openEnums.inboundSchema(OutputFormat);
88
+ export const ImageGenerationServerToolOutputFormat$inboundSchema = openEnums.inboundSchema(ImageGenerationServerToolOutputFormat);
89
89
  /** @internal */
90
- export const OutputFormat$outboundSchema = openEnums.outboundSchema(OutputFormat);
90
+ export const ImageGenerationServerToolOutputFormat$outboundSchema = openEnums.outboundSchema(ImageGenerationServerToolOutputFormat);
91
91
  /** @internal */
92
- export const Quality$inboundSchema = openEnums
93
- .inboundSchema(Quality);
92
+ export const ImageGenerationServerToolQuality$inboundSchema = openEnums.inboundSchema(ImageGenerationServerToolQuality);
94
93
  /** @internal */
95
- export const Quality$outboundSchema = openEnums
96
- .outboundSchema(Quality);
94
+ export const ImageGenerationServerToolQuality$outboundSchema = openEnums.outboundSchema(ImageGenerationServerToolQuality);
97
95
  /** @internal */
98
96
  export const Size$inboundSchema = openEnums
99
97
  .inboundSchema(Size);
@@ -102,15 +100,15 @@ export const Size$outboundSchema = openEnums
102
100
  .outboundSchema(Size);
103
101
  /** @internal */
104
102
  export const ImageGenerationServerTool$inboundSchema = z.object({
105
- background: Background$inboundSchema.optional(),
103
+ background: ImageGenerationServerToolBackground$inboundSchema.optional(),
106
104
  input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(),
107
105
  input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(),
108
106
  model: ModelEnum$inboundSchema.optional(),
109
107
  moderation: Moderation$inboundSchema.optional(),
110
108
  output_compression: z.int().optional(),
111
- output_format: OutputFormat$inboundSchema.optional(),
109
+ output_format: ImageGenerationServerToolOutputFormat$inboundSchema.optional(),
112
110
  partial_images: z.int().optional(),
113
- quality: Quality$inboundSchema.optional(),
111
+ quality: ImageGenerationServerToolQuality$inboundSchema.optional(),
114
112
  size: Size$inboundSchema.optional(),
115
113
  type: z.literal("image_generation"),
116
114
  }).transform((v) => {
@@ -124,15 +122,15 @@ export const ImageGenerationServerTool$inboundSchema = z.object({
124
122
  });
125
123
  /** @internal */
126
124
  export const ImageGenerationServerTool$outboundSchema = z.object({
127
- background: Background$outboundSchema.optional(),
125
+ background: ImageGenerationServerToolBackground$outboundSchema.optional(),
128
126
  inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(),
129
127
  inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(),
130
128
  model: ModelEnum$outboundSchema.optional(),
131
129
  moderation: Moderation$outboundSchema.optional(),
132
130
  outputCompression: z.int().optional(),
133
- outputFormat: OutputFormat$outboundSchema.optional(),
131
+ outputFormat: ImageGenerationServerToolOutputFormat$outboundSchema.optional(),
134
132
  partialImages: z.int().optional(),
135
- quality: Quality$outboundSchema.optional(),
133
+ quality: ImageGenerationServerToolQuality$outboundSchema.optional(),
136
134
  size: Size$outboundSchema.optional(),
137
135
  type: z.literal("image_generation"),
138
136
  }).transform((v) => {
@@ -0,0 +1,119 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { AnthropicSpeed } from "./anthropicspeed.js";
4
+ import { AnthropicUsageIteration } from "./anthropicusageiteration.js";
5
+ import { CostDetails } from "./costdetails.js";
6
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
7
+ export type ImageGenerationUsageCompletionTokensDetails = {
8
+ /**
9
+ * Tokens generated by the model for audio output.
10
+ */
11
+ audioTokens?: number | null | undefined;
12
+ /**
13
+ * Tokens generated by the model for image output.
14
+ */
15
+ imageTokens?: number | null | undefined;
16
+ /**
17
+ * Tokens generated by the model for reasoning.
18
+ */
19
+ reasoningTokens?: number | null | undefined;
20
+ };
21
+ /**
22
+ * Breakdown of tokens used in the prompt.
23
+ */
24
+ export type ImageGenerationUsagePromptTokensDetails = {
25
+ /**
26
+ * Tokens used for input audio.
27
+ */
28
+ audioTokens?: number | null | undefined;
29
+ /**
30
+ * Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
31
+ */
32
+ cacheWriteTokens?: number | null | undefined;
33
+ /**
34
+ * Tokens cached by the endpoint.
35
+ */
36
+ cachedTokens?: number | null | undefined;
37
+ /**
38
+ * Tokens used for input files/documents.
39
+ */
40
+ fileTokens?: number | null | undefined;
41
+ /**
42
+ * Tokens used for input video.
43
+ */
44
+ videoTokens?: number | null | undefined;
45
+ };
46
+ /**
47
+ * Usage for server-side tool execution (e.g., web search)
48
+ */
49
+ export type ServerToolUse = {
50
+ /**
51
+ * Number of OpenRouter server tool calls that executed and produced a result.
52
+ */
53
+ toolCallsExecuted?: number | null | undefined;
54
+ /**
55
+ * 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.
56
+ */
57
+ toolCallsRequested?: number | null | undefined;
58
+ /**
59
+ * 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.
60
+ */
61
+ webSearchRequests?: number | null | undefined;
62
+ };
63
+ /**
64
+ * Token and cost usage for the image generation request, when available
65
+ */
66
+ export type ImageGenerationUsage = {
67
+ /**
68
+ * The tokens generated
69
+ */
70
+ completionTokens: number;
71
+ completionTokensDetails?: ImageGenerationUsageCompletionTokensDetails | null | undefined;
72
+ /**
73
+ * Cost of the completion
74
+ */
75
+ cost?: number | null | undefined;
76
+ /**
77
+ * Breakdown of upstream inference costs
78
+ */
79
+ costDetails?: CostDetails | null | undefined;
80
+ /**
81
+ * Whether a request was made using a Bring Your Own Key configuration
82
+ */
83
+ isByok?: boolean | undefined;
84
+ iterations?: Array<AnthropicUsageIteration> | null | undefined;
85
+ /**
86
+ * Including images, input audio, and tools if any
87
+ */
88
+ promptTokens: number;
89
+ /**
90
+ * Breakdown of tokens used in the prompt.
91
+ */
92
+ promptTokensDetails?: ImageGenerationUsagePromptTokensDetails | null | undefined;
93
+ /**
94
+ * Usage for server-side tool execution (e.g., web search)
95
+ */
96
+ serverToolUse?: ServerToolUse | null | undefined;
97
+ /**
98
+ * The service tier used by the upstream provider for this request
99
+ */
100
+ serviceTier?: string | null | undefined;
101
+ speed?: AnthropicSpeed | null | undefined;
102
+ /**
103
+ * Sum of the above two fields
104
+ */
105
+ totalTokens: number;
106
+ };
107
+ /** @internal */
108
+ export declare const ImageGenerationUsageCompletionTokensDetails$inboundSchema: z.ZodType<ImageGenerationUsageCompletionTokensDetails, unknown>;
109
+ export declare function imageGenerationUsageCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsageCompletionTokensDetails, SDKValidationError>;
110
+ /** @internal */
111
+ export declare const ImageGenerationUsagePromptTokensDetails$inboundSchema: z.ZodType<ImageGenerationUsagePromptTokensDetails, unknown>;
112
+ export declare function imageGenerationUsagePromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsagePromptTokensDetails, SDKValidationError>;
113
+ /** @internal */
114
+ export declare const ServerToolUse$inboundSchema: z.ZodType<ServerToolUse, unknown>;
115
+ export declare function serverToolUseFromJSON(jsonString: string): SafeParseResult<ServerToolUse, SDKValidationError>;
116
+ /** @internal */
117
+ export declare const ImageGenerationUsage$inboundSchema: z.ZodType<ImageGenerationUsage, unknown>;
118
+ export declare function imageGenerationUsageFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsage, SDKValidationError>;
119
+ //# sourceMappingURL=imagegenerationusage.d.ts.map