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

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