openai 6.35.0 → 6.37.0

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 (777) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/azure.d.mts +4 -1
  3. package/azure.d.mts.map +1 -1
  4. package/azure.d.ts +4 -1
  5. package/azure.d.ts.map +1 -1
  6. package/azure.js +4 -3
  7. package/azure.js.map +1 -1
  8. package/azure.mjs +4 -3
  9. package/azure.mjs.map +1 -1
  10. package/beta/realtime/websocket.d.mts.map +1 -1
  11. package/beta/realtime/websocket.d.ts.map +1 -1
  12. package/beta/realtime/websocket.js +7 -2
  13. package/beta/realtime/websocket.js.map +1 -1
  14. package/beta/realtime/websocket.mjs +7 -2
  15. package/beta/realtime/websocket.mjs.map +1 -1
  16. package/beta/realtime/ws.d.mts.map +1 -1
  17. package/beta/realtime/ws.d.ts.map +1 -1
  18. package/beta/realtime/ws.js +5 -1
  19. package/beta/realtime/ws.js.map +1 -1
  20. package/beta/realtime/ws.mjs +5 -1
  21. package/beta/realtime/ws.mjs.map +1 -1
  22. package/bin/migration-config.json +735 -0
  23. package/client.d.mts +30 -8
  24. package/client.d.mts.map +1 -1
  25. package/client.d.ts +30 -8
  26. package/client.d.ts.map +1 -1
  27. package/client.js +78 -22
  28. package/client.js.map +1 -1
  29. package/client.mjs +78 -22
  30. package/client.mjs.map +1 -1
  31. package/core/pagination.d.mts +18 -0
  32. package/core/pagination.d.mts.map +1 -1
  33. package/core/pagination.d.ts +18 -0
  34. package/core/pagination.d.ts.map +1 -1
  35. package/core/pagination.js +32 -1
  36. package/core/pagination.js.map +1 -1
  37. package/core/pagination.mjs +30 -0
  38. package/core/pagination.mjs.map +1 -1
  39. package/internal/request-options.d.mts +4 -0
  40. package/internal/request-options.d.mts.map +1 -1
  41. package/internal/request-options.d.ts +4 -0
  42. package/internal/request-options.d.ts.map +1 -1
  43. package/internal/request-options.js.map +1 -1
  44. package/internal/request-options.mjs.map +1 -1
  45. package/internal/utils/log.d.mts.map +1 -1
  46. package/internal/utils/log.d.ts.map +1 -1
  47. package/internal/utils/log.js +2 -0
  48. package/internal/utils/log.js.map +1 -1
  49. package/internal/utils/log.mjs +2 -0
  50. package/internal/utils/log.mjs.map +1 -1
  51. package/package.json +1 -1
  52. package/realtime/websocket.d.mts.map +1 -1
  53. package/realtime/websocket.d.ts.map +1 -1
  54. package/realtime/websocket.js +7 -2
  55. package/realtime/websocket.js.map +1 -1
  56. package/realtime/websocket.mjs +7 -2
  57. package/realtime/websocket.mjs.map +1 -1
  58. package/realtime/ws.d.mts.map +1 -1
  59. package/realtime/ws.d.ts.map +1 -1
  60. package/realtime/ws.js +5 -1
  61. package/realtime/ws.js.map +1 -1
  62. package/realtime/ws.mjs +5 -1
  63. package/realtime/ws.mjs.map +1 -1
  64. package/resources/admin/admin.d.mts +10 -0
  65. package/resources/admin/admin.d.mts.map +1 -0
  66. package/resources/admin/admin.d.ts +10 -0
  67. package/resources/admin/admin.d.ts.map +1 -0
  68. package/resources/admin/admin.js +17 -0
  69. package/resources/admin/admin.js.map +1 -0
  70. package/resources/admin/admin.mjs +12 -0
  71. package/resources/admin/admin.mjs.map +1 -0
  72. package/resources/admin/index.d.mts +3 -0
  73. package/resources/admin/index.d.mts.map +1 -0
  74. package/resources/admin/index.d.ts +3 -0
  75. package/resources/admin/index.d.ts.map +1 -0
  76. package/resources/admin/index.js +9 -0
  77. package/resources/admin/index.js.map +1 -0
  78. package/resources/admin/index.mjs +4 -0
  79. package/resources/admin/index.mjs.map +1 -0
  80. package/resources/admin/organization/admin-api-keys.d.mts +140 -0
  81. package/resources/admin/organization/admin-api-keys.d.mts.map +1 -0
  82. package/resources/admin/organization/admin-api-keys.d.ts +140 -0
  83. package/resources/admin/organization/admin-api-keys.d.ts.map +1 -0
  84. package/resources/admin/organization/admin-api-keys.js +81 -0
  85. package/resources/admin/organization/admin-api-keys.js.map +1 -0
  86. package/resources/admin/organization/admin-api-keys.mjs +77 -0
  87. package/resources/admin/organization/admin-api-keys.mjs.map +1 -0
  88. package/resources/admin/organization/audit-logs.d.mts +1267 -0
  89. package/resources/admin/organization/audit-logs.d.mts.map +1 -0
  90. package/resources/admin/organization/audit-logs.d.ts +1267 -0
  91. package/resources/admin/organization/audit-logs.d.ts.map +1 -0
  92. package/resources/admin/organization/audit-logs.js +31 -0
  93. package/resources/admin/organization/audit-logs.js.map +1 -0
  94. package/resources/admin/organization/audit-logs.mjs +27 -0
  95. package/resources/admin/organization/audit-logs.mjs.map +1 -0
  96. package/resources/admin/organization/certificates.d.mts +322 -0
  97. package/resources/admin/organization/certificates.d.mts.map +1 -0
  98. package/resources/admin/organization/certificates.d.ts +322 -0
  99. package/resources/admin/organization/certificates.d.ts.map +1 -0
  100. package/resources/admin/organization/certificates.js +144 -0
  101. package/resources/admin/organization/certificates.js.map +1 -0
  102. package/resources/admin/organization/certificates.mjs +140 -0
  103. package/resources/admin/organization/certificates.mjs.map +1 -0
  104. package/resources/admin/organization/groups/groups.d.mts +148 -0
  105. package/resources/admin/organization/groups/groups.d.mts.map +1 -0
  106. package/resources/admin/organization/groups/groups.d.ts +148 -0
  107. package/resources/admin/organization/groups/groups.d.ts.map +1 -0
  108. package/resources/admin/organization/groups/groups.js +92 -0
  109. package/resources/admin/organization/groups/groups.js.map +1 -0
  110. package/resources/admin/organization/groups/groups.mjs +87 -0
  111. package/resources/admin/organization/groups/groups.mjs.map +1 -0
  112. package/resources/admin/organization/groups/index.d.mts +4 -0
  113. package/resources/admin/organization/groups/index.d.mts.map +1 -0
  114. package/resources/admin/organization/groups/index.d.ts +4 -0
  115. package/resources/admin/organization/groups/index.d.ts.map +1 -0
  116. package/resources/admin/organization/groups/index.js +11 -0
  117. package/resources/admin/organization/groups/index.js.map +1 -0
  118. package/resources/admin/organization/groups/index.mjs +5 -0
  119. package/resources/admin/organization/groups/index.mjs.map +1 -0
  120. package/resources/admin/organization/groups/roles.d.mts +182 -0
  121. package/resources/admin/organization/groups/roles.d.mts.map +1 -0
  122. package/resources/admin/organization/groups/roles.d.ts +182 -0
  123. package/resources/admin/organization/groups/roles.d.ts.map +1 -0
  124. package/resources/admin/organization/groups/roles.js +65 -0
  125. package/resources/admin/organization/groups/roles.js.map +1 -0
  126. package/resources/admin/organization/groups/roles.mjs +61 -0
  127. package/resources/admin/organization/groups/roles.mjs.map +1 -0
  128. package/resources/admin/organization/groups/users.d.mts +116 -0
  129. package/resources/admin/organization/groups/users.d.mts.map +1 -0
  130. package/resources/admin/organization/groups/users.d.ts +116 -0
  131. package/resources/admin/organization/groups/users.d.ts.map +1 -0
  132. package/resources/admin/organization/groups/users.js +65 -0
  133. package/resources/admin/organization/groups/users.js.map +1 -0
  134. package/resources/admin/organization/groups/users.mjs +61 -0
  135. package/resources/admin/organization/groups/users.mjs.map +1 -0
  136. package/resources/admin/organization/groups.d.mts +2 -0
  137. package/resources/admin/organization/groups.d.mts.map +1 -0
  138. package/resources/admin/organization/groups.d.ts +2 -0
  139. package/resources/admin/organization/groups.d.ts.map +1 -0
  140. package/resources/admin/organization/groups.js +6 -0
  141. package/resources/admin/organization/groups.js.map +1 -0
  142. package/resources/admin/organization/groups.mjs +3 -0
  143. package/resources/admin/organization/groups.mjs.map +1 -0
  144. package/resources/admin/organization/index.d.mts +11 -0
  145. package/resources/admin/organization/index.d.mts.map +1 -0
  146. package/resources/admin/organization/index.d.ts +11 -0
  147. package/resources/admin/organization/index.d.ts.map +1 -0
  148. package/resources/admin/organization/index.js +25 -0
  149. package/resources/admin/organization/index.js.map +1 -0
  150. package/resources/admin/organization/index.mjs +12 -0
  151. package/resources/admin/organization/index.mjs.map +1 -0
  152. package/resources/admin/organization/invites.d.mts +152 -0
  153. package/resources/admin/organization/invites.d.mts.map +1 -0
  154. package/resources/admin/organization/invites.d.ts +152 -0
  155. package/resources/admin/organization/invites.d.ts.map +1 -0
  156. package/resources/admin/organization/invites.js +83 -0
  157. package/resources/admin/organization/invites.js.map +1 -0
  158. package/resources/admin/organization/invites.mjs +79 -0
  159. package/resources/admin/organization/invites.mjs.map +1 -0
  160. package/resources/admin/organization/organization.d.mts +42 -0
  161. package/resources/admin/organization/organization.d.mts.map +1 -0
  162. package/resources/admin/organization/organization.d.ts +42 -0
  163. package/resources/admin/organization/organization.d.ts.map +1 -0
  164. package/resources/admin/organization/organization.js +49 -0
  165. package/resources/admin/organization/organization.js.map +1 -0
  166. package/resources/admin/organization/organization.mjs +44 -0
  167. package/resources/admin/organization/organization.mjs.map +1 -0
  168. package/resources/admin/organization/projects/api-keys.d.mts +167 -0
  169. package/resources/admin/organization/projects/api-keys.d.mts.map +1 -0
  170. package/resources/admin/organization/projects/api-keys.d.ts +167 -0
  171. package/resources/admin/organization/projects/api-keys.d.ts.map +1 -0
  172. package/resources/admin/organization/projects/api-keys.js +68 -0
  173. package/resources/admin/organization/projects/api-keys.js.map +1 -0
  174. package/resources/admin/organization/projects/api-keys.mjs +64 -0
  175. package/resources/admin/organization/projects/api-keys.mjs.map +1 -0
  176. package/resources/admin/organization/projects/certificates.d.mts +186 -0
  177. package/resources/admin/organization/projects/certificates.d.mts.map +1 -0
  178. package/resources/admin/organization/projects/certificates.d.ts +186 -0
  179. package/resources/admin/organization/projects/certificates.d.ts.map +1 -0
  180. package/resources/admin/organization/projects/certificates.js +64 -0
  181. package/resources/admin/organization/projects/certificates.js.map +1 -0
  182. package/resources/admin/organization/projects/certificates.mjs +60 -0
  183. package/resources/admin/organization/projects/certificates.mjs.map +1 -0
  184. package/resources/admin/organization/projects/groups/groups.d.mts +119 -0
  185. package/resources/admin/organization/projects/groups/groups.d.mts.map +1 -0
  186. package/resources/admin/organization/projects/groups/groups.d.ts +119 -0
  187. package/resources/admin/organization/projects/groups/groups.d.ts.map +1 -0
  188. package/resources/admin/organization/projects/groups/groups.js +73 -0
  189. package/resources/admin/organization/projects/groups/groups.js.map +1 -0
  190. package/resources/admin/organization/projects/groups/groups.mjs +68 -0
  191. package/resources/admin/organization/projects/groups/groups.mjs.map +1 -0
  192. package/resources/admin/organization/projects/groups/index.d.mts +3 -0
  193. package/resources/admin/organization/projects/groups/index.d.mts.map +1 -0
  194. package/resources/admin/organization/projects/groups/index.d.ts +3 -0
  195. package/resources/admin/organization/projects/groups/index.d.ts.map +1 -0
  196. package/resources/admin/organization/projects/groups/index.js +9 -0
  197. package/resources/admin/organization/projects/groups/index.js.map +1 -0
  198. package/resources/admin/organization/projects/groups/index.mjs +4 -0
  199. package/resources/admin/organization/projects/groups/index.mjs.map +1 -0
  200. package/resources/admin/organization/projects/groups/roles.d.mts +195 -0
  201. package/resources/admin/organization/projects/groups/roles.d.mts.map +1 -0
  202. package/resources/admin/organization/projects/groups/roles.d.ts +195 -0
  203. package/resources/admin/organization/projects/groups/roles.d.ts.map +1 -0
  204. package/resources/admin/organization/projects/groups/roles.js +68 -0
  205. package/resources/admin/organization/projects/groups/roles.js.map +1 -0
  206. package/resources/admin/organization/projects/groups/roles.mjs +64 -0
  207. package/resources/admin/organization/projects/groups/roles.mjs.map +1 -0
  208. package/resources/admin/organization/projects/groups.d.mts +2 -0
  209. package/resources/admin/organization/projects/groups.d.mts.map +1 -0
  210. package/resources/admin/organization/projects/groups.d.ts +2 -0
  211. package/resources/admin/organization/projects/groups.d.ts.map +1 -0
  212. package/resources/admin/organization/projects/groups.js +6 -0
  213. package/resources/admin/organization/projects/groups.js.map +1 -0
  214. package/resources/admin/organization/projects/groups.mjs +3 -0
  215. package/resources/admin/organization/projects/groups.mjs.map +1 -0
  216. package/resources/admin/organization/projects/index.d.mts +9 -0
  217. package/resources/admin/organization/projects/index.d.mts.map +1 -0
  218. package/resources/admin/organization/projects/index.d.ts +9 -0
  219. package/resources/admin/organization/projects/index.d.ts.map +1 -0
  220. package/resources/admin/organization/projects/index.js +21 -0
  221. package/resources/admin/organization/projects/index.js.map +1 -0
  222. package/resources/admin/organization/projects/index.mjs +10 -0
  223. package/resources/admin/organization/projects/index.mjs.map +1 -0
  224. package/resources/admin/organization/projects/projects.d.mts +172 -0
  225. package/resources/admin/organization/projects/projects.d.mts.map +1 -0
  226. package/resources/admin/organization/projects/projects.d.ts +172 -0
  227. package/resources/admin/organization/projects/projects.d.ts.map +1 -0
  228. package/resources/admin/organization/projects/projects.js +133 -0
  229. package/resources/admin/organization/projects/projects.js.map +1 -0
  230. package/resources/admin/organization/projects/projects.mjs +128 -0
  231. package/resources/admin/organization/projects/projects.mjs.map +1 -0
  232. package/resources/admin/organization/projects/rate-limits.d.mts +120 -0
  233. package/resources/admin/organization/projects/rate-limits.d.mts.map +1 -0
  234. package/resources/admin/organization/projects/rate-limits.d.ts +120 -0
  235. package/resources/admin/organization/projects/rate-limits.d.ts.map +1 -0
  236. package/resources/admin/organization/projects/rate-limits.js +47 -0
  237. package/resources/admin/organization/projects/rate-limits.js.map +1 -0
  238. package/resources/admin/organization/projects/rate-limits.mjs +43 -0
  239. package/resources/admin/organization/projects/rate-limits.mjs.map +1 -0
  240. package/resources/admin/organization/projects/roles.d.mts +127 -0
  241. package/resources/admin/organization/projects/roles.d.mts.map +1 -0
  242. package/resources/admin/organization/projects/roles.d.ts +127 -0
  243. package/resources/admin/organization/projects/roles.d.ts.map +1 -0
  244. package/resources/admin/organization/projects/roles.js +89 -0
  245. package/resources/admin/organization/projects/roles.js.map +1 -0
  246. package/resources/admin/organization/projects/roles.mjs +85 -0
  247. package/resources/admin/organization/projects/roles.mjs.map +1 -0
  248. package/resources/admin/organization/projects/service-accounts.d.mts +141 -0
  249. package/resources/admin/organization/projects/service-accounts.d.mts.map +1 -0
  250. package/resources/admin/organization/projects/service-accounts.d.ts +141 -0
  251. package/resources/admin/organization/projects/service-accounts.d.ts.map +1 -0
  252. package/resources/admin/organization/projects/service-accounts.js +85 -0
  253. package/resources/admin/organization/projects/service-accounts.js.map +1 -0
  254. package/resources/admin/organization/projects/service-accounts.mjs +81 -0
  255. package/resources/admin/organization/projects/service-accounts.mjs.map +1 -0
  256. package/resources/admin/organization/projects/users/index.d.mts +3 -0
  257. package/resources/admin/organization/projects/users/index.d.mts.map +1 -0
  258. package/resources/admin/organization/projects/users/index.d.ts +3 -0
  259. package/resources/admin/organization/projects/users/index.d.ts.map +1 -0
  260. package/resources/admin/organization/projects/users/index.js +9 -0
  261. package/resources/admin/organization/projects/users/index.js.map +1 -0
  262. package/resources/admin/organization/projects/users/index.mjs +4 -0
  263. package/resources/admin/organization/projects/users/index.mjs.map +1 -0
  264. package/resources/admin/organization/projects/users/roles.d.mts +169 -0
  265. package/resources/admin/organization/projects/users/roles.d.mts.map +1 -0
  266. package/resources/admin/organization/projects/users/roles.d.ts +169 -0
  267. package/resources/admin/organization/projects/users/roles.d.ts.map +1 -0
  268. package/resources/admin/organization/projects/users/roles.js +68 -0
  269. package/resources/admin/organization/projects/users/roles.js.map +1 -0
  270. package/resources/admin/organization/projects/users/roles.mjs +64 -0
  271. package/resources/admin/organization/projects/users/roles.mjs.map +1 -0
  272. package/resources/admin/organization/projects/users/users.d.mts +157 -0
  273. package/resources/admin/organization/projects/users/users.d.mts.map +1 -0
  274. package/resources/admin/organization/projects/users/users.d.ts +157 -0
  275. package/resources/admin/organization/projects/users/users.d.ts.map +1 -0
  276. package/resources/admin/organization/projects/users/users.js +116 -0
  277. package/resources/admin/organization/projects/users/users.js.map +1 -0
  278. package/resources/admin/organization/projects/users/users.mjs +111 -0
  279. package/resources/admin/organization/projects/users/users.mjs.map +1 -0
  280. package/resources/admin/organization/projects/users.d.mts +2 -0
  281. package/resources/admin/organization/projects/users.d.mts.map +1 -0
  282. package/resources/admin/organization/projects/users.d.ts +2 -0
  283. package/resources/admin/organization/projects/users.d.ts.map +1 -0
  284. package/resources/admin/organization/projects/users.js +6 -0
  285. package/resources/admin/organization/projects/users.js.map +1 -0
  286. package/resources/admin/organization/projects/users.mjs +3 -0
  287. package/resources/admin/organization/projects/users.mjs.map +1 -0
  288. package/resources/admin/organization/projects.d.mts +2 -0
  289. package/resources/admin/organization/projects.d.mts.map +1 -0
  290. package/resources/admin/organization/projects.d.ts +2 -0
  291. package/resources/admin/organization/projects.d.ts.map +1 -0
  292. package/resources/admin/organization/projects.js +6 -0
  293. package/resources/admin/organization/projects.js.map +1 -0
  294. package/resources/admin/organization/projects.mjs +3 -0
  295. package/resources/admin/organization/projects.mjs.map +1 -0
  296. package/resources/admin/organization/roles.d.mts +142 -0
  297. package/resources/admin/organization/roles.d.mts.map +1 -0
  298. package/resources/admin/organization/roles.d.ts +142 -0
  299. package/resources/admin/organization/roles.d.ts.map +1 -0
  300. package/resources/admin/organization/roles.js +80 -0
  301. package/resources/admin/organization/roles.js.map +1 -0
  302. package/resources/admin/organization/roles.mjs +76 -0
  303. package/resources/admin/organization/roles.mjs.map +1 -0
  304. package/resources/admin/organization/usage.d.mts +3564 -0
  305. package/resources/admin/organization/usage.d.mts.map +1 -0
  306. package/resources/admin/organization/usage.d.ts +3564 -0
  307. package/resources/admin/organization/usage.d.ts.map +1 -0
  308. package/resources/admin/organization/usage.js +171 -0
  309. package/resources/admin/organization/usage.js.map +1 -0
  310. package/resources/admin/organization/usage.mjs +167 -0
  311. package/resources/admin/organization/usage.mjs.map +1 -0
  312. package/resources/admin/organization/users/index.d.mts +3 -0
  313. package/resources/admin/organization/users/index.d.mts.map +1 -0
  314. package/resources/admin/organization/users/index.d.ts +3 -0
  315. package/resources/admin/organization/users/index.d.ts.map +1 -0
  316. package/resources/admin/organization/users/index.js +9 -0
  317. package/resources/admin/organization/users/index.js.map +1 -0
  318. package/resources/admin/organization/users/index.mjs +4 -0
  319. package/resources/admin/organization/users/index.mjs.map +1 -0
  320. package/resources/admin/organization/users/roles.d.mts +156 -0
  321. package/resources/admin/organization/users/roles.d.mts.map +1 -0
  322. package/resources/admin/organization/users/roles.d.ts +156 -0
  323. package/resources/admin/organization/users/roles.d.ts.map +1 -0
  324. package/resources/admin/organization/users/roles.js +65 -0
  325. package/resources/admin/organization/users/roles.js.map +1 -0
  326. package/resources/admin/organization/users/roles.mjs +61 -0
  327. package/resources/admin/organization/users/roles.mjs.map +1 -0
  328. package/resources/admin/organization/users/users.d.mts +185 -0
  329. package/resources/admin/organization/users/users.d.mts.map +1 -0
  330. package/resources/admin/organization/users/users.d.ts +185 -0
  331. package/resources/admin/organization/users/users.d.ts.map +1 -0
  332. package/resources/admin/organization/users/users.js +84 -0
  333. package/resources/admin/organization/users/users.js.map +1 -0
  334. package/resources/admin/organization/users/users.mjs +79 -0
  335. package/resources/admin/organization/users/users.mjs.map +1 -0
  336. package/resources/admin/organization/users.d.mts +2 -0
  337. package/resources/admin/organization/users.d.mts.map +1 -0
  338. package/resources/admin/organization/users.d.ts +2 -0
  339. package/resources/admin/organization/users.d.ts.map +1 -0
  340. package/resources/admin/organization/users.js +6 -0
  341. package/resources/admin/organization/users.js.map +1 -0
  342. package/resources/admin/organization/users.mjs +3 -0
  343. package/resources/admin/organization/users.mjs.map +1 -0
  344. package/resources/admin/organization.d.mts +2 -0
  345. package/resources/admin/organization.d.mts.map +1 -0
  346. package/resources/admin/organization.d.ts +2 -0
  347. package/resources/admin/organization.d.ts.map +1 -0
  348. package/resources/admin/organization.js +6 -0
  349. package/resources/admin/organization.js.map +1 -0
  350. package/resources/admin/organization.mjs +3 -0
  351. package/resources/admin/organization.mjs.map +1 -0
  352. package/resources/admin.d.mts +2 -0
  353. package/resources/admin.d.mts.map +1 -0
  354. package/resources/admin.d.ts +2 -0
  355. package/resources/admin.d.ts.map +1 -0
  356. package/resources/admin.js +6 -0
  357. package/resources/admin.js.map +1 -0
  358. package/resources/admin.mjs +3 -0
  359. package/resources/admin.mjs.map +1 -0
  360. package/resources/audio/speech.d.mts.map +1 -1
  361. package/resources/audio/speech.d.ts.map +1 -1
  362. package/resources/audio/speech.js +1 -0
  363. package/resources/audio/speech.js.map +1 -1
  364. package/resources/audio/speech.mjs +1 -0
  365. package/resources/audio/speech.mjs.map +1 -1
  366. package/resources/audio/transcriptions.d.mts.map +1 -1
  367. package/resources/audio/transcriptions.d.ts.map +1 -1
  368. package/resources/audio/transcriptions.js +1 -0
  369. package/resources/audio/transcriptions.js.map +1 -1
  370. package/resources/audio/transcriptions.mjs +1 -0
  371. package/resources/audio/transcriptions.mjs.map +1 -1
  372. package/resources/audio/translations.d.mts.map +1 -1
  373. package/resources/audio/translations.d.ts.map +1 -1
  374. package/resources/audio/translations.js +1 -1
  375. package/resources/audio/translations.js.map +1 -1
  376. package/resources/audio/translations.mjs +1 -1
  377. package/resources/audio/translations.mjs.map +1 -1
  378. package/resources/batches.d.mts.map +1 -1
  379. package/resources/batches.d.ts.map +1 -1
  380. package/resources/batches.js +11 -4
  381. package/resources/batches.js.map +1 -1
  382. package/resources/batches.mjs +11 -4
  383. package/resources/batches.mjs.map +1 -1
  384. package/resources/beta/assistants.d.mts.map +1 -1
  385. package/resources/beta/assistants.d.ts.map +1 -1
  386. package/resources/beta/assistants.js +5 -0
  387. package/resources/beta/assistants.js.map +1 -1
  388. package/resources/beta/assistants.mjs +5 -0
  389. package/resources/beta/assistants.mjs.map +1 -1
  390. package/resources/beta/chatkit/sessions.d.mts.map +1 -1
  391. package/resources/beta/chatkit/sessions.d.ts.map +1 -1
  392. package/resources/beta/chatkit/sessions.js +2 -0
  393. package/resources/beta/chatkit/sessions.js.map +1 -1
  394. package/resources/beta/chatkit/sessions.mjs +2 -0
  395. package/resources/beta/chatkit/sessions.mjs.map +1 -1
  396. package/resources/beta/chatkit/threads.d.mts.map +1 -1
  397. package/resources/beta/chatkit/threads.d.ts.map +1 -1
  398. package/resources/beta/chatkit/threads.js +9 -1
  399. package/resources/beta/chatkit/threads.js.map +1 -1
  400. package/resources/beta/chatkit/threads.mjs +9 -1
  401. package/resources/beta/chatkit/threads.mjs.map +1 -1
  402. package/resources/beta/realtime/sessions.d.mts.map +1 -1
  403. package/resources/beta/realtime/sessions.d.ts.map +1 -1
  404. package/resources/beta/realtime/sessions.js +1 -0
  405. package/resources/beta/realtime/sessions.js.map +1 -1
  406. package/resources/beta/realtime/sessions.mjs +1 -0
  407. package/resources/beta/realtime/sessions.mjs.map +1 -1
  408. package/resources/beta/realtime/transcription-sessions.d.mts.map +1 -1
  409. package/resources/beta/realtime/transcription-sessions.d.ts.map +1 -1
  410. package/resources/beta/realtime/transcription-sessions.js +1 -0
  411. package/resources/beta/realtime/transcription-sessions.js.map +1 -1
  412. package/resources/beta/realtime/transcription-sessions.mjs +1 -0
  413. package/resources/beta/realtime/transcription-sessions.mjs.map +1 -1
  414. package/resources/beta/threads/messages.d.mts.map +1 -1
  415. package/resources/beta/threads/messages.d.ts.map +1 -1
  416. package/resources/beta/threads/messages.js +5 -0
  417. package/resources/beta/threads/messages.js.map +1 -1
  418. package/resources/beta/threads/messages.mjs +5 -0
  419. package/resources/beta/threads/messages.mjs.map +1 -1
  420. package/resources/beta/threads/runs/runs.d.mts.map +1 -1
  421. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  422. package/resources/beta/threads/runs/runs.js +6 -0
  423. package/resources/beta/threads/runs/runs.js.map +1 -1
  424. package/resources/beta/threads/runs/runs.mjs +6 -0
  425. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  426. package/resources/beta/threads/runs/steps.d.mts.map +1 -1
  427. package/resources/beta/threads/runs/steps.d.ts.map +1 -1
  428. package/resources/beta/threads/runs/steps.js +2 -0
  429. package/resources/beta/threads/runs/steps.js.map +1 -1
  430. package/resources/beta/threads/runs/steps.mjs +2 -0
  431. package/resources/beta/threads/runs/steps.mjs.map +1 -1
  432. package/resources/beta/threads/threads.d.mts.map +1 -1
  433. package/resources/beta/threads/threads.d.ts.map +1 -1
  434. package/resources/beta/threads/threads.js +5 -0
  435. package/resources/beta/threads/threads.js.map +1 -1
  436. package/resources/beta/threads/threads.mjs +5 -0
  437. package/resources/beta/threads/threads.mjs.map +1 -1
  438. package/resources/chat/completions/completions.d.mts +4 -4
  439. package/resources/chat/completions/completions.d.mts.map +1 -1
  440. package/resources/chat/completions/completions.d.ts +4 -4
  441. package/resources/chat/completions/completions.d.ts.map +1 -1
  442. package/resources/chat/completions/completions.js +24 -5
  443. package/resources/chat/completions/completions.js.map +1 -1
  444. package/resources/chat/completions/completions.mjs +24 -5
  445. package/resources/chat/completions/completions.mjs.map +1 -1
  446. package/resources/chat/completions/messages.js +1 -1
  447. package/resources/chat/completions/messages.js.map +1 -1
  448. package/resources/chat/completions/messages.mjs +1 -1
  449. package/resources/chat/completions/messages.mjs.map +1 -1
  450. package/resources/completions.d.mts.map +1 -1
  451. package/resources/completions.d.ts.map +1 -1
  452. package/resources/completions.js +6 -1
  453. package/resources/completions.js.map +1 -1
  454. package/resources/completions.mjs +6 -1
  455. package/resources/completions.mjs.map +1 -1
  456. package/resources/containers/containers.d.mts.map +1 -1
  457. package/resources/containers/containers.d.ts.map +1 -1
  458. package/resources/containers/containers.js +11 -3
  459. package/resources/containers/containers.js.map +1 -1
  460. package/resources/containers/containers.mjs +11 -3
  461. package/resources/containers/containers.mjs.map +1 -1
  462. package/resources/containers/files/content.d.mts.map +1 -1
  463. package/resources/containers/files/content.d.ts.map +1 -1
  464. package/resources/containers/files/content.js +1 -0
  465. package/resources/containers/files/content.js.map +1 -1
  466. package/resources/containers/files/content.mjs +1 -0
  467. package/resources/containers/files/content.mjs.map +1 -1
  468. package/resources/containers/files/files.d.mts.map +1 -1
  469. package/resources/containers/files/files.d.ts.map +1 -1
  470. package/resources/containers/files/files.js +7 -2
  471. package/resources/containers/files/files.js.map +1 -1
  472. package/resources/containers/files/files.mjs +7 -2
  473. package/resources/containers/files/files.mjs.map +1 -1
  474. package/resources/conversations/conversations.d.mts.map +1 -1
  475. package/resources/conversations/conversations.d.ts.map +1 -1
  476. package/resources/conversations/conversations.js +14 -4
  477. package/resources/conversations/conversations.js.map +1 -1
  478. package/resources/conversations/conversations.mjs +14 -4
  479. package/resources/conversations/conversations.mjs.map +1 -1
  480. package/resources/conversations/items.d.mts.map +1 -1
  481. package/resources/conversations/items.d.ts.map +1 -1
  482. package/resources/conversations/items.js +11 -3
  483. package/resources/conversations/items.js.map +1 -1
  484. package/resources/conversations/items.mjs +11 -3
  485. package/resources/conversations/items.mjs.map +1 -1
  486. package/resources/embeddings.d.mts.map +1 -1
  487. package/resources/embeddings.d.ts.map +1 -1
  488. package/resources/embeddings.js +1 -0
  489. package/resources/embeddings.js.map +1 -1
  490. package/resources/embeddings.mjs +1 -0
  491. package/resources/embeddings.mjs.map +1 -1
  492. package/resources/evals/evals.d.mts.map +1 -1
  493. package/resources/evals/evals.d.ts.map +1 -1
  494. package/resources/evals/evals.js +9 -5
  495. package/resources/evals/evals.js.map +1 -1
  496. package/resources/evals/evals.mjs +9 -5
  497. package/resources/evals/evals.mjs.map +1 -1
  498. package/resources/evals/runs/output-items.d.mts.map +1 -1
  499. package/resources/evals/runs/output-items.d.ts.map +1 -1
  500. package/resources/evals/runs/output-items.js +5 -2
  501. package/resources/evals/runs/output-items.js.map +1 -1
  502. package/resources/evals/runs/output-items.mjs +5 -2
  503. package/resources/evals/runs/output-items.mjs.map +1 -1
  504. package/resources/evals/runs/runs.d.mts.map +1 -1
  505. package/resources/evals/runs/runs.d.ts.map +1 -1
  506. package/resources/evals/runs/runs.js +18 -4
  507. package/resources/evals/runs/runs.js.map +1 -1
  508. package/resources/evals/runs/runs.mjs +18 -4
  509. package/resources/evals/runs/runs.mjs.map +1 -1
  510. package/resources/files.d.mts +8 -1
  511. package/resources/files.d.mts.map +1 -1
  512. package/resources/files.d.ts +8 -1
  513. package/resources/files.d.ts.map +1 -1
  514. package/resources/files.js +17 -5
  515. package/resources/files.js.map +1 -1
  516. package/resources/files.mjs +17 -5
  517. package/resources/files.mjs.map +1 -1
  518. package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
  519. package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
  520. package/resources/fine-tuning/alpha/graders.js +10 -2
  521. package/resources/fine-tuning/alpha/graders.js.map +1 -1
  522. package/resources/fine-tuning/alpha/graders.mjs +10 -2
  523. package/resources/fine-tuning/alpha/graders.mjs.map +1 -1
  524. package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
  525. package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
  526. package/resources/fine-tuning/checkpoints/permissions.js +4 -3
  527. package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
  528. package/resources/fine-tuning/checkpoints/permissions.mjs +4 -3
  529. package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
  530. package/resources/fine-tuning/jobs/checkpoints.js +1 -1
  531. package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
  532. package/resources/fine-tuning/jobs/checkpoints.mjs +1 -1
  533. package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
  534. package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
  535. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
  536. package/resources/fine-tuning/jobs/jobs.js +23 -7
  537. package/resources/fine-tuning/jobs/jobs.js.map +1 -1
  538. package/resources/fine-tuning/jobs/jobs.mjs +23 -7
  539. package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
  540. package/resources/images.d.mts +53 -24
  541. package/resources/images.d.mts.map +1 -1
  542. package/resources/images.d.ts +53 -24
  543. package/resources/images.d.ts.map +1 -1
  544. package/resources/images.js +8 -3
  545. package/resources/images.js.map +1 -1
  546. package/resources/images.mjs +8 -3
  547. package/resources/images.mjs.map +1 -1
  548. package/resources/index.d.mts +1 -0
  549. package/resources/index.d.mts.map +1 -1
  550. package/resources/index.d.ts +1 -0
  551. package/resources/index.d.ts.map +1 -1
  552. package/resources/index.js +3 -1
  553. package/resources/index.js.map +1 -1
  554. package/resources/index.mjs +1 -0
  555. package/resources/index.mjs.map +1 -1
  556. package/resources/models.js +3 -3
  557. package/resources/models.js.map +1 -1
  558. package/resources/models.mjs +3 -3
  559. package/resources/models.mjs.map +1 -1
  560. package/resources/moderations.js +1 -1
  561. package/resources/moderations.js.map +1 -1
  562. package/resources/moderations.mjs +1 -1
  563. package/resources/moderations.mjs.map +1 -1
  564. package/resources/realtime/calls.d.mts +10 -1
  565. package/resources/realtime/calls.d.mts.map +1 -1
  566. package/resources/realtime/calls.d.ts +10 -1
  567. package/resources/realtime/calls.d.ts.map +1 -1
  568. package/resources/realtime/calls.js +4 -0
  569. package/resources/realtime/calls.js.map +1 -1
  570. package/resources/realtime/calls.mjs +4 -0
  571. package/resources/realtime/calls.mjs.map +1 -1
  572. package/resources/realtime/client-secrets.d.mts +24 -37
  573. package/resources/realtime/client-secrets.d.mts.map +1 -1
  574. package/resources/realtime/client-secrets.d.ts +24 -37
  575. package/resources/realtime/client-secrets.d.ts.map +1 -1
  576. package/resources/realtime/client-secrets.js +5 -1
  577. package/resources/realtime/client-secrets.js.map +1 -1
  578. package/resources/realtime/client-secrets.mjs +5 -1
  579. package/resources/realtime/client-secrets.mjs.map +1 -1
  580. package/resources/realtime/index.d.mts +1 -1
  581. package/resources/realtime/index.d.mts.map +1 -1
  582. package/resources/realtime/index.d.ts +1 -1
  583. package/resources/realtime/index.d.ts.map +1 -1
  584. package/resources/realtime/index.js.map +1 -1
  585. package/resources/realtime/index.mjs.map +1 -1
  586. package/resources/realtime/realtime.d.mts +545 -10
  587. package/resources/realtime/realtime.d.mts.map +1 -1
  588. package/resources/realtime/realtime.d.ts +545 -10
  589. package/resources/realtime/realtime.d.ts.map +1 -1
  590. package/resources/realtime/realtime.js.map +1 -1
  591. package/resources/realtime/realtime.mjs.map +1 -1
  592. package/resources/responses/input-items.js +1 -1
  593. package/resources/responses/input-items.js.map +1 -1
  594. package/resources/responses/input-items.mjs +1 -1
  595. package/resources/responses/input-items.mjs.map +1 -1
  596. package/resources/responses/input-tokens.d.mts.map +1 -1
  597. package/resources/responses/input-tokens.d.ts.map +1 -1
  598. package/resources/responses/input-tokens.js +5 -1
  599. package/resources/responses/input-tokens.js.map +1 -1
  600. package/resources/responses/input-tokens.mjs +5 -1
  601. package/resources/responses/input-tokens.mjs.map +1 -1
  602. package/resources/responses/responses.d.mts +45 -11
  603. package/resources/responses/responses.d.mts.map +1 -1
  604. package/resources/responses/responses.d.ts +45 -11
  605. package/resources/responses/responses.d.ts.map +1 -1
  606. package/resources/responses/responses.js +13 -3
  607. package/resources/responses/responses.js.map +1 -1
  608. package/resources/responses/responses.mjs +13 -3
  609. package/resources/responses/responses.mjs.map +1 -1
  610. package/resources/responses/ws-base.d.mts.map +1 -1
  611. package/resources/responses/ws-base.d.ts.map +1 -1
  612. package/resources/responses/ws-base.js +3 -1
  613. package/resources/responses/ws-base.js.map +1 -1
  614. package/resources/responses/ws-base.mjs +3 -1
  615. package/resources/responses/ws-base.mjs.map +1 -1
  616. package/resources/skills/content.d.mts.map +1 -1
  617. package/resources/skills/content.d.ts.map +1 -1
  618. package/resources/skills/content.js +1 -0
  619. package/resources/skills/content.js.map +1 -1
  620. package/resources/skills/content.mjs +1 -0
  621. package/resources/skills/content.mjs.map +1 -1
  622. package/resources/skills/skills.d.mts.map +1 -1
  623. package/resources/skills/skills.d.ts.map +1 -1
  624. package/resources/skills/skills.js +13 -5
  625. package/resources/skills/skills.js.map +1 -1
  626. package/resources/skills/skills.mjs +13 -5
  627. package/resources/skills/skills.mjs.map +1 -1
  628. package/resources/skills/versions/content.d.mts.map +1 -1
  629. package/resources/skills/versions/content.d.ts.map +1 -1
  630. package/resources/skills/versions/content.js +1 -0
  631. package/resources/skills/versions/content.js.map +1 -1
  632. package/resources/skills/versions/content.mjs +1 -0
  633. package/resources/skills/versions/content.mjs.map +1 -1
  634. package/resources/skills/versions/versions.d.mts.map +1 -1
  635. package/resources/skills/versions/versions.d.ts.map +1 -1
  636. package/resources/skills/versions/versions.js +10 -3
  637. package/resources/skills/versions/versions.js.map +1 -1
  638. package/resources/skills/versions/versions.mjs +10 -3
  639. package/resources/skills/versions/versions.mjs.map +1 -1
  640. package/resources/uploads/parts.js +1 -1
  641. package/resources/uploads/parts.js.map +1 -1
  642. package/resources/uploads/parts.mjs +1 -1
  643. package/resources/uploads/parts.mjs.map +1 -1
  644. package/resources/uploads/uploads.d.mts.map +1 -1
  645. package/resources/uploads/uploads.d.ts.map +1 -1
  646. package/resources/uploads/uploads.js +10 -3
  647. package/resources/uploads/uploads.js.map +1 -1
  648. package/resources/uploads/uploads.mjs +10 -3
  649. package/resources/uploads/uploads.mjs.map +1 -1
  650. package/resources/vector-stores/file-batches.d.mts.map +1 -1
  651. package/resources/vector-stores/file-batches.d.ts.map +1 -1
  652. package/resources/vector-stores/file-batches.js +9 -1
  653. package/resources/vector-stores/file-batches.js.map +1 -1
  654. package/resources/vector-stores/file-batches.mjs +9 -1
  655. package/resources/vector-stores/file-batches.mjs.map +1 -1
  656. package/resources/vector-stores/files.d.mts.map +1 -1
  657. package/resources/vector-stores/files.d.ts.map +1 -1
  658. package/resources/vector-stores/files.js +10 -1
  659. package/resources/vector-stores/files.js.map +1 -1
  660. package/resources/vector-stores/files.mjs +10 -1
  661. package/resources/vector-stores/files.mjs.map +1 -1
  662. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  663. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  664. package/resources/vector-stores/vector-stores.js +6 -0
  665. package/resources/vector-stores/vector-stores.js.map +1 -1
  666. package/resources/vector-stores/vector-stores.mjs +6 -0
  667. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  668. package/resources/videos.d.mts.map +1 -1
  669. package/resources/videos.d.ts.map +1 -1
  670. package/resources/videos.js +17 -9
  671. package/resources/videos.js.map +1 -1
  672. package/resources/videos.mjs +17 -9
  673. package/resources/videos.mjs.map +1 -1
  674. package/src/azure.ts +7 -3
  675. package/src/beta/realtime/websocket.ts +7 -2
  676. package/src/beta/realtime/ws.ts +5 -1
  677. package/src/client.ts +114 -27
  678. package/src/core/pagination.ts +62 -0
  679. package/src/internal/request-options.ts +1 -0
  680. package/src/internal/utils/log.ts +2 -0
  681. package/src/realtime/websocket.ts +7 -2
  682. package/src/realtime/ws.ts +5 -1
  683. package/src/resources/admin/admin.ts +15 -0
  684. package/src/resources/admin/index.ts +4 -0
  685. package/src/resources/admin/organization/admin-api-keys.ts +199 -0
  686. package/src/resources/admin/organization/audit-logs.ts +1597 -0
  687. package/src/resources/admin/organization/certificates.ts +458 -0
  688. package/src/resources/admin/organization/groups/groups.ts +251 -0
  689. package/src/resources/admin/organization/groups/index.ts +32 -0
  690. package/src/resources/admin/organization/groups/roles.ts +239 -0
  691. package/src/resources/admin/organization/groups/users.ts +164 -0
  692. package/src/resources/admin/organization/groups.ts +3 -0
  693. package/src/resources/admin/organization/index.ts +99 -0
  694. package/src/resources/admin/organization/invites.ts +214 -0
  695. package/src/resources/admin/organization/organization.ts +232 -0
  696. package/src/resources/admin/organization/projects/api-keys.ts +239 -0
  697. package/src/resources/admin/organization/projects/certificates.ts +269 -0
  698. package/src/resources/admin/organization/projects/groups/groups.ts +193 -0
  699. package/src/resources/admin/organization/projects/groups/index.ts +21 -0
  700. package/src/resources/admin/organization/projects/groups/roles.ts +261 -0
  701. package/src/resources/admin/organization/projects/groups.ts +3 -0
  702. package/src/resources/admin/organization/projects/index.ts +77 -0
  703. package/src/resources/admin/organization/projects/projects.ts +372 -0
  704. package/src/resources/admin/organization/projects/rate-limits.ts +173 -0
  705. package/src/resources/admin/organization/projects/roles.ts +182 -0
  706. package/src/resources/admin/organization/projects/service-accounts.ts +224 -0
  707. package/src/resources/admin/organization/projects/users/index.ts +23 -0
  708. package/src/resources/admin/organization/projects/users/roles.ts +226 -0
  709. package/src/resources/admin/organization/projects/users/users.ts +252 -0
  710. package/src/resources/admin/organization/projects/users.ts +3 -0
  711. package/src/resources/admin/organization/projects.ts +3 -0
  712. package/src/resources/admin/organization/roles.ts +200 -0
  713. package/src/resources/admin/organization/usage.ts +4483 -0
  714. package/src/resources/admin/organization/users/index.ts +20 -0
  715. package/src/resources/admin/organization/users/roles.ts +208 -0
  716. package/src/resources/admin/organization/users/users.ts +287 -0
  717. package/src/resources/admin/organization/users.ts +3 -0
  718. package/src/resources/admin/organization.ts +3 -0
  719. package/src/resources/admin.ts +3 -0
  720. package/src/resources/audio/speech.ts +1 -0
  721. package/src/resources/audio/transcriptions.ts +1 -0
  722. package/src/resources/audio/translations.ts +4 -1
  723. package/src/resources/batches.ts +11 -4
  724. package/src/resources/beta/assistants.ts +5 -0
  725. package/src/resources/beta/chatkit/sessions.ts +2 -0
  726. package/src/resources/beta/chatkit/threads.ts +9 -1
  727. package/src/resources/beta/realtime/sessions.ts +1 -0
  728. package/src/resources/beta/realtime/transcription-sessions.ts +1 -0
  729. package/src/resources/beta/threads/messages.ts +5 -0
  730. package/src/resources/beta/threads/runs/runs.ts +6 -0
  731. package/src/resources/beta/threads/runs/steps.ts +2 -0
  732. package/src/resources/beta/threads/threads.ts +5 -0
  733. package/src/resources/chat/completions/completions.ts +28 -11
  734. package/src/resources/chat/completions/messages.ts +1 -1
  735. package/src/resources/completions.ts +6 -3
  736. package/src/resources/containers/containers.ts +11 -3
  737. package/src/resources/containers/files/content.ts +1 -0
  738. package/src/resources/containers/files/files.ts +7 -2
  739. package/src/resources/conversations/conversations.ts +14 -4
  740. package/src/resources/conversations/items.ts +11 -3
  741. package/src/resources/embeddings.ts +1 -0
  742. package/src/resources/evals/evals.ts +9 -5
  743. package/src/resources/evals/runs/output-items.ts +5 -2
  744. package/src/resources/evals/runs/runs.ts +18 -4
  745. package/src/resources/files.ts +20 -5
  746. package/src/resources/fine-tuning/alpha/graders.ts +10 -2
  747. package/src/resources/fine-tuning/checkpoints/permissions.ts +4 -3
  748. package/src/resources/fine-tuning/jobs/checkpoints.ts +1 -1
  749. package/src/resources/fine-tuning/jobs/jobs.ts +23 -7
  750. package/src/resources/images.ts +71 -27
  751. package/src/resources/index.ts +1 -0
  752. package/src/resources/models.ts +3 -3
  753. package/src/resources/moderations.ts +1 -1
  754. package/src/resources/realtime/api.md +18 -1
  755. package/src/resources/realtime/calls.ts +16 -0
  756. package/src/resources/realtime/client-secrets.ts +30 -38
  757. package/src/resources/realtime/index.ts +0 -1
  758. package/src/resources/realtime/realtime.ts +647 -8
  759. package/src/resources/responses/input-items.ts +1 -1
  760. package/src/resources/responses/input-tokens.ts +5 -1
  761. package/src/resources/responses/responses.ts +66 -15
  762. package/src/resources/responses/ws-base.ts +3 -1
  763. package/src/resources/skills/content.ts +1 -0
  764. package/src/resources/skills/skills.ts +16 -5
  765. package/src/resources/skills/versions/content.ts +1 -0
  766. package/src/resources/skills/versions/versions.ts +10 -3
  767. package/src/resources/uploads/parts.ts +1 -1
  768. package/src/resources/uploads/uploads.ts +10 -3
  769. package/src/resources/vector-stores/file-batches.ts +9 -1
  770. package/src/resources/vector-stores/files.ts +10 -1
  771. package/src/resources/vector-stores/vector-stores.ts +6 -0
  772. package/src/resources/videos.ts +20 -9
  773. package/src/version.ts +1 -1
  774. package/version.d.mts +1 -1
  775. package/version.d.ts +1 -1
  776. package/version.js +1 -1
  777. package/version.mjs +1 -1
@@ -0,0 +1,4483 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { RequestOptions } from '../../../internal/request-options';
6
+
7
+ export class Usage extends APIResource {
8
+ /**
9
+ * Get audio speeches usage details for the organization.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const response =
14
+ * await client.admin.organization.usage.audioSpeeches({
15
+ * start_time: 0,
16
+ * });
17
+ * ```
18
+ */
19
+ audioSpeeches(
20
+ query: UsageAudioSpeechesParams,
21
+ options?: RequestOptions,
22
+ ): APIPromise<UsageAudioSpeechesResponse> {
23
+ return this._client.get('/organization/usage/audio_speeches', {
24
+ query,
25
+ ...options,
26
+ __security: { adminAPIKeyAuth: true },
27
+ });
28
+ }
29
+
30
+ /**
31
+ * Get audio transcriptions usage details for the organization.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const response =
36
+ * await client.admin.organization.usage.audioTranscriptions(
37
+ * { start_time: 0 },
38
+ * );
39
+ * ```
40
+ */
41
+ audioTranscriptions(
42
+ query: UsageAudioTranscriptionsParams,
43
+ options?: RequestOptions,
44
+ ): APIPromise<UsageAudioTranscriptionsResponse> {
45
+ return this._client.get('/organization/usage/audio_transcriptions', {
46
+ query,
47
+ ...options,
48
+ __security: { adminAPIKeyAuth: true },
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Get code interpreter sessions usage details for the organization.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response =
58
+ * await client.admin.organization.usage.codeInterpreterSessions(
59
+ * { start_time: 0 },
60
+ * );
61
+ * ```
62
+ */
63
+ codeInterpreterSessions(
64
+ query: UsageCodeInterpreterSessionsParams,
65
+ options?: RequestOptions,
66
+ ): APIPromise<UsageCodeInterpreterSessionsResponse> {
67
+ return this._client.get('/organization/usage/code_interpreter_sessions', {
68
+ query,
69
+ ...options,
70
+ __security: { adminAPIKeyAuth: true },
71
+ });
72
+ }
73
+
74
+ /**
75
+ * Get completions usage details for the organization.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const response =
80
+ * await client.admin.organization.usage.completions({
81
+ * start_time: 0,
82
+ * });
83
+ * ```
84
+ */
85
+ completions(query: UsageCompletionsParams, options?: RequestOptions): APIPromise<UsageCompletionsResponse> {
86
+ return this._client.get('/organization/usage/completions', {
87
+ query,
88
+ ...options,
89
+ __security: { adminAPIKeyAuth: true },
90
+ });
91
+ }
92
+
93
+ /**
94
+ * Get costs details for the organization.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const response =
99
+ * await client.admin.organization.usage.costs({
100
+ * start_time: 0,
101
+ * });
102
+ * ```
103
+ */
104
+ costs(query: UsageCostsParams, options?: RequestOptions): APIPromise<UsageCostsResponse> {
105
+ return this._client.get('/organization/costs', {
106
+ query,
107
+ ...options,
108
+ __security: { adminAPIKeyAuth: true },
109
+ });
110
+ }
111
+
112
+ /**
113
+ * Get embeddings usage details for the organization.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * const response =
118
+ * await client.admin.organization.usage.embeddings({
119
+ * start_time: 0,
120
+ * });
121
+ * ```
122
+ */
123
+ embeddings(query: UsageEmbeddingsParams, options?: RequestOptions): APIPromise<UsageEmbeddingsResponse> {
124
+ return this._client.get('/organization/usage/embeddings', {
125
+ query,
126
+ ...options,
127
+ __security: { adminAPIKeyAuth: true },
128
+ });
129
+ }
130
+
131
+ /**
132
+ * Get images usage details for the organization.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * const response =
137
+ * await client.admin.organization.usage.images({
138
+ * start_time: 0,
139
+ * });
140
+ * ```
141
+ */
142
+ images(query: UsageImagesParams, options?: RequestOptions): APIPromise<UsageImagesResponse> {
143
+ return this._client.get('/organization/usage/images', {
144
+ query,
145
+ ...options,
146
+ __security: { adminAPIKeyAuth: true },
147
+ });
148
+ }
149
+
150
+ /**
151
+ * Get moderations usage details for the organization.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const response =
156
+ * await client.admin.organization.usage.moderations({
157
+ * start_time: 0,
158
+ * });
159
+ * ```
160
+ */
161
+ moderations(query: UsageModerationsParams, options?: RequestOptions): APIPromise<UsageModerationsResponse> {
162
+ return this._client.get('/organization/usage/moderations', {
163
+ query,
164
+ ...options,
165
+ __security: { adminAPIKeyAuth: true },
166
+ });
167
+ }
168
+
169
+ /**
170
+ * Get vector stores usage details for the organization.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * const response =
175
+ * await client.admin.organization.usage.vectorStores({
176
+ * start_time: 0,
177
+ * });
178
+ * ```
179
+ */
180
+ vectorStores(
181
+ query: UsageVectorStoresParams,
182
+ options?: RequestOptions,
183
+ ): APIPromise<UsageVectorStoresResponse> {
184
+ return this._client.get('/organization/usage/vector_stores', {
185
+ query,
186
+ ...options,
187
+ __security: { adminAPIKeyAuth: true },
188
+ });
189
+ }
190
+ }
191
+
192
+ export interface UsageAudioSpeechesResponse {
193
+ data: Array<UsageAudioSpeechesResponse.Data>;
194
+
195
+ has_more: boolean;
196
+
197
+ next_page: string | null;
198
+
199
+ object: 'page';
200
+ }
201
+
202
+ export namespace UsageAudioSpeechesResponse {
203
+ export interface Data {
204
+ end_time: number;
205
+
206
+ object: 'bucket';
207
+
208
+ results: Array<
209
+ | Data.OrganizationUsageCompletionsResult
210
+ | Data.OrganizationUsageEmbeddingsResult
211
+ | Data.OrganizationUsageModerationsResult
212
+ | Data.OrganizationUsageImagesResult
213
+ | Data.OrganizationUsageAudioSpeechesResult
214
+ | Data.OrganizationUsageAudioTranscriptionsResult
215
+ | Data.OrganizationUsageVectorStoresResult
216
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
217
+ | Data.OrganizationCostsResult
218
+ >;
219
+
220
+ start_time: number;
221
+ }
222
+
223
+ export namespace Data {
224
+ /**
225
+ * The aggregated completions usage details of the specific time bucket.
226
+ */
227
+ export interface OrganizationUsageCompletionsResult {
228
+ /**
229
+ * The aggregated number of text input tokens used, including cached tokens. For
230
+ * customers subscribe to scale tier, this includes scale tier tokens.
231
+ */
232
+ input_tokens: number;
233
+
234
+ /**
235
+ * The count of requests made to the model.
236
+ */
237
+ num_model_requests: number;
238
+
239
+ object: 'organization.usage.completions.result';
240
+
241
+ /**
242
+ * The aggregated number of text output tokens used. For customers subscribe to
243
+ * scale tier, this includes scale tier tokens.
244
+ */
245
+ output_tokens: number;
246
+
247
+ /**
248
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
249
+ * usage result.
250
+ */
251
+ api_key_id?: string | null;
252
+
253
+ /**
254
+ * When `group_by=batch`, this field tells whether the grouped usage result is
255
+ * batch or not.
256
+ */
257
+ batch?: boolean | null;
258
+
259
+ /**
260
+ * The aggregated number of audio input tokens used, including cached tokens.
261
+ */
262
+ input_audio_tokens?: number;
263
+
264
+ /**
265
+ * The aggregated number of text input tokens that has been cached from previous
266
+ * requests. For customers subscribe to scale tier, this includes scale tier
267
+ * tokens.
268
+ */
269
+ input_cached_tokens?: number;
270
+
271
+ /**
272
+ * When `group_by=model`, this field provides the model name of the grouped usage
273
+ * result.
274
+ */
275
+ model?: string | null;
276
+
277
+ /**
278
+ * The aggregated number of audio output tokens used.
279
+ */
280
+ output_audio_tokens?: number;
281
+
282
+ /**
283
+ * When `group_by=project_id`, this field provides the project ID of the grouped
284
+ * usage result.
285
+ */
286
+ project_id?: string | null;
287
+
288
+ /**
289
+ * When `group_by=service_tier`, this field provides the service tier of the
290
+ * grouped usage result.
291
+ */
292
+ service_tier?: string | null;
293
+
294
+ /**
295
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
296
+ * result.
297
+ */
298
+ user_id?: string | null;
299
+ }
300
+
301
+ /**
302
+ * The aggregated embeddings usage details of the specific time bucket.
303
+ */
304
+ export interface OrganizationUsageEmbeddingsResult {
305
+ /**
306
+ * The aggregated number of input tokens used.
307
+ */
308
+ input_tokens: number;
309
+
310
+ /**
311
+ * The count of requests made to the model.
312
+ */
313
+ num_model_requests: number;
314
+
315
+ object: 'organization.usage.embeddings.result';
316
+
317
+ /**
318
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
319
+ * usage result.
320
+ */
321
+ api_key_id?: string | null;
322
+
323
+ /**
324
+ * When `group_by=model`, this field provides the model name of the grouped usage
325
+ * result.
326
+ */
327
+ model?: string | null;
328
+
329
+ /**
330
+ * When `group_by=project_id`, this field provides the project ID of the grouped
331
+ * usage result.
332
+ */
333
+ project_id?: string | null;
334
+
335
+ /**
336
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
337
+ * result.
338
+ */
339
+ user_id?: string | null;
340
+ }
341
+
342
+ /**
343
+ * The aggregated moderations usage details of the specific time bucket.
344
+ */
345
+ export interface OrganizationUsageModerationsResult {
346
+ /**
347
+ * The aggregated number of input tokens used.
348
+ */
349
+ input_tokens: number;
350
+
351
+ /**
352
+ * The count of requests made to the model.
353
+ */
354
+ num_model_requests: number;
355
+
356
+ object: 'organization.usage.moderations.result';
357
+
358
+ /**
359
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
360
+ * usage result.
361
+ */
362
+ api_key_id?: string | null;
363
+
364
+ /**
365
+ * When `group_by=model`, this field provides the model name of the grouped usage
366
+ * result.
367
+ */
368
+ model?: string | null;
369
+
370
+ /**
371
+ * When `group_by=project_id`, this field provides the project ID of the grouped
372
+ * usage result.
373
+ */
374
+ project_id?: string | null;
375
+
376
+ /**
377
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
378
+ * result.
379
+ */
380
+ user_id?: string | null;
381
+ }
382
+
383
+ /**
384
+ * The aggregated images usage details of the specific time bucket.
385
+ */
386
+ export interface OrganizationUsageImagesResult {
387
+ /**
388
+ * The number of images processed.
389
+ */
390
+ images: number;
391
+
392
+ /**
393
+ * The count of requests made to the model.
394
+ */
395
+ num_model_requests: number;
396
+
397
+ object: 'organization.usage.images.result';
398
+
399
+ /**
400
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
401
+ * usage result.
402
+ */
403
+ api_key_id?: string | null;
404
+
405
+ /**
406
+ * When `group_by=model`, this field provides the model name of the grouped usage
407
+ * result.
408
+ */
409
+ model?: string | null;
410
+
411
+ /**
412
+ * When `group_by=project_id`, this field provides the project ID of the grouped
413
+ * usage result.
414
+ */
415
+ project_id?: string | null;
416
+
417
+ /**
418
+ * When `group_by=size`, this field provides the image size of the grouped usage
419
+ * result.
420
+ */
421
+ size?: string | null;
422
+
423
+ /**
424
+ * When `group_by=source`, this field provides the source of the grouped usage
425
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
426
+ */
427
+ source?: string | null;
428
+
429
+ /**
430
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
431
+ * result.
432
+ */
433
+ user_id?: string | null;
434
+ }
435
+
436
+ /**
437
+ * The aggregated audio speeches usage details of the specific time bucket.
438
+ */
439
+ export interface OrganizationUsageAudioSpeechesResult {
440
+ /**
441
+ * The number of characters processed.
442
+ */
443
+ characters: number;
444
+
445
+ /**
446
+ * The count of requests made to the model.
447
+ */
448
+ num_model_requests: number;
449
+
450
+ object: 'organization.usage.audio_speeches.result';
451
+
452
+ /**
453
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
454
+ * usage result.
455
+ */
456
+ api_key_id?: string | null;
457
+
458
+ /**
459
+ * When `group_by=model`, this field provides the model name of the grouped usage
460
+ * result.
461
+ */
462
+ model?: string | null;
463
+
464
+ /**
465
+ * When `group_by=project_id`, this field provides the project ID of the grouped
466
+ * usage result.
467
+ */
468
+ project_id?: string | null;
469
+
470
+ /**
471
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
472
+ * result.
473
+ */
474
+ user_id?: string | null;
475
+ }
476
+
477
+ /**
478
+ * The aggregated audio transcriptions usage details of the specific time bucket.
479
+ */
480
+ export interface OrganizationUsageAudioTranscriptionsResult {
481
+ /**
482
+ * The count of requests made to the model.
483
+ */
484
+ num_model_requests: number;
485
+
486
+ object: 'organization.usage.audio_transcriptions.result';
487
+
488
+ /**
489
+ * The number of seconds processed.
490
+ */
491
+ seconds: number;
492
+
493
+ /**
494
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
495
+ * usage result.
496
+ */
497
+ api_key_id?: string | null;
498
+
499
+ /**
500
+ * When `group_by=model`, this field provides the model name of the grouped usage
501
+ * result.
502
+ */
503
+ model?: string | null;
504
+
505
+ /**
506
+ * When `group_by=project_id`, this field provides the project ID of the grouped
507
+ * usage result.
508
+ */
509
+ project_id?: string | null;
510
+
511
+ /**
512
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
513
+ * result.
514
+ */
515
+ user_id?: string | null;
516
+ }
517
+
518
+ /**
519
+ * The aggregated vector stores usage details of the specific time bucket.
520
+ */
521
+ export interface OrganizationUsageVectorStoresResult {
522
+ object: 'organization.usage.vector_stores.result';
523
+
524
+ /**
525
+ * The vector stores usage in bytes.
526
+ */
527
+ usage_bytes: number;
528
+
529
+ /**
530
+ * When `group_by=project_id`, this field provides the project ID of the grouped
531
+ * usage result.
532
+ */
533
+ project_id?: string | null;
534
+ }
535
+
536
+ /**
537
+ * The aggregated code interpreter sessions usage details of the specific time
538
+ * bucket.
539
+ */
540
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
541
+ /**
542
+ * The number of code interpreter sessions.
543
+ */
544
+ num_sessions: number;
545
+
546
+ object: 'organization.usage.code_interpreter_sessions.result';
547
+
548
+ /**
549
+ * When `group_by=project_id`, this field provides the project ID of the grouped
550
+ * usage result.
551
+ */
552
+ project_id?: string | null;
553
+ }
554
+
555
+ /**
556
+ * The aggregated costs details of the specific time bucket.
557
+ */
558
+ export interface OrganizationCostsResult {
559
+ object: 'organization.costs.result';
560
+
561
+ /**
562
+ * The monetary value in its associated currency.
563
+ */
564
+ amount?: OrganizationCostsResult.Amount;
565
+
566
+ /**
567
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
568
+ * costs result.
569
+ */
570
+ api_key_id?: string | null;
571
+
572
+ /**
573
+ * When `group_by=line_item`, this field provides the line item of the grouped
574
+ * costs result.
575
+ */
576
+ line_item?: string | null;
577
+
578
+ /**
579
+ * When `group_by=project_id`, this field provides the project ID of the grouped
580
+ * costs result.
581
+ */
582
+ project_id?: string | null;
583
+
584
+ /**
585
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
586
+ * result.
587
+ */
588
+ quantity?: number | null;
589
+ }
590
+
591
+ export namespace OrganizationCostsResult {
592
+ /**
593
+ * The monetary value in its associated currency.
594
+ */
595
+ export interface Amount {
596
+ /**
597
+ * Lowercase ISO-4217 currency e.g. "usd"
598
+ */
599
+ currency?: string;
600
+
601
+ /**
602
+ * The numeric value of the cost.
603
+ */
604
+ value?: number;
605
+ }
606
+ }
607
+ }
608
+ }
609
+
610
+ export interface UsageAudioTranscriptionsResponse {
611
+ data: Array<UsageAudioTranscriptionsResponse.Data>;
612
+
613
+ has_more: boolean;
614
+
615
+ next_page: string | null;
616
+
617
+ object: 'page';
618
+ }
619
+
620
+ export namespace UsageAudioTranscriptionsResponse {
621
+ export interface Data {
622
+ end_time: number;
623
+
624
+ object: 'bucket';
625
+
626
+ results: Array<
627
+ | Data.OrganizationUsageCompletionsResult
628
+ | Data.OrganizationUsageEmbeddingsResult
629
+ | Data.OrganizationUsageModerationsResult
630
+ | Data.OrganizationUsageImagesResult
631
+ | Data.OrganizationUsageAudioSpeechesResult
632
+ | Data.OrganizationUsageAudioTranscriptionsResult
633
+ | Data.OrganizationUsageVectorStoresResult
634
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
635
+ | Data.OrganizationCostsResult
636
+ >;
637
+
638
+ start_time: number;
639
+ }
640
+
641
+ export namespace Data {
642
+ /**
643
+ * The aggregated completions usage details of the specific time bucket.
644
+ */
645
+ export interface OrganizationUsageCompletionsResult {
646
+ /**
647
+ * The aggregated number of text input tokens used, including cached tokens. For
648
+ * customers subscribe to scale tier, this includes scale tier tokens.
649
+ */
650
+ input_tokens: number;
651
+
652
+ /**
653
+ * The count of requests made to the model.
654
+ */
655
+ num_model_requests: number;
656
+
657
+ object: 'organization.usage.completions.result';
658
+
659
+ /**
660
+ * The aggregated number of text output tokens used. For customers subscribe to
661
+ * scale tier, this includes scale tier tokens.
662
+ */
663
+ output_tokens: number;
664
+
665
+ /**
666
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
667
+ * usage result.
668
+ */
669
+ api_key_id?: string | null;
670
+
671
+ /**
672
+ * When `group_by=batch`, this field tells whether the grouped usage result is
673
+ * batch or not.
674
+ */
675
+ batch?: boolean | null;
676
+
677
+ /**
678
+ * The aggregated number of audio input tokens used, including cached tokens.
679
+ */
680
+ input_audio_tokens?: number;
681
+
682
+ /**
683
+ * The aggregated number of text input tokens that has been cached from previous
684
+ * requests. For customers subscribe to scale tier, this includes scale tier
685
+ * tokens.
686
+ */
687
+ input_cached_tokens?: number;
688
+
689
+ /**
690
+ * When `group_by=model`, this field provides the model name of the grouped usage
691
+ * result.
692
+ */
693
+ model?: string | null;
694
+
695
+ /**
696
+ * The aggregated number of audio output tokens used.
697
+ */
698
+ output_audio_tokens?: number;
699
+
700
+ /**
701
+ * When `group_by=project_id`, this field provides the project ID of the grouped
702
+ * usage result.
703
+ */
704
+ project_id?: string | null;
705
+
706
+ /**
707
+ * When `group_by=service_tier`, this field provides the service tier of the
708
+ * grouped usage result.
709
+ */
710
+ service_tier?: string | null;
711
+
712
+ /**
713
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
714
+ * result.
715
+ */
716
+ user_id?: string | null;
717
+ }
718
+
719
+ /**
720
+ * The aggregated embeddings usage details of the specific time bucket.
721
+ */
722
+ export interface OrganizationUsageEmbeddingsResult {
723
+ /**
724
+ * The aggregated number of input tokens used.
725
+ */
726
+ input_tokens: number;
727
+
728
+ /**
729
+ * The count of requests made to the model.
730
+ */
731
+ num_model_requests: number;
732
+
733
+ object: 'organization.usage.embeddings.result';
734
+
735
+ /**
736
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
737
+ * usage result.
738
+ */
739
+ api_key_id?: string | null;
740
+
741
+ /**
742
+ * When `group_by=model`, this field provides the model name of the grouped usage
743
+ * result.
744
+ */
745
+ model?: string | null;
746
+
747
+ /**
748
+ * When `group_by=project_id`, this field provides the project ID of the grouped
749
+ * usage result.
750
+ */
751
+ project_id?: string | null;
752
+
753
+ /**
754
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
755
+ * result.
756
+ */
757
+ user_id?: string | null;
758
+ }
759
+
760
+ /**
761
+ * The aggregated moderations usage details of the specific time bucket.
762
+ */
763
+ export interface OrganizationUsageModerationsResult {
764
+ /**
765
+ * The aggregated number of input tokens used.
766
+ */
767
+ input_tokens: number;
768
+
769
+ /**
770
+ * The count of requests made to the model.
771
+ */
772
+ num_model_requests: number;
773
+
774
+ object: 'organization.usage.moderations.result';
775
+
776
+ /**
777
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
778
+ * usage result.
779
+ */
780
+ api_key_id?: string | null;
781
+
782
+ /**
783
+ * When `group_by=model`, this field provides the model name of the grouped usage
784
+ * result.
785
+ */
786
+ model?: string | null;
787
+
788
+ /**
789
+ * When `group_by=project_id`, this field provides the project ID of the grouped
790
+ * usage result.
791
+ */
792
+ project_id?: string | null;
793
+
794
+ /**
795
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
796
+ * result.
797
+ */
798
+ user_id?: string | null;
799
+ }
800
+
801
+ /**
802
+ * The aggregated images usage details of the specific time bucket.
803
+ */
804
+ export interface OrganizationUsageImagesResult {
805
+ /**
806
+ * The number of images processed.
807
+ */
808
+ images: number;
809
+
810
+ /**
811
+ * The count of requests made to the model.
812
+ */
813
+ num_model_requests: number;
814
+
815
+ object: 'organization.usage.images.result';
816
+
817
+ /**
818
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
819
+ * usage result.
820
+ */
821
+ api_key_id?: string | null;
822
+
823
+ /**
824
+ * When `group_by=model`, this field provides the model name of the grouped usage
825
+ * result.
826
+ */
827
+ model?: string | null;
828
+
829
+ /**
830
+ * When `group_by=project_id`, this field provides the project ID of the grouped
831
+ * usage result.
832
+ */
833
+ project_id?: string | null;
834
+
835
+ /**
836
+ * When `group_by=size`, this field provides the image size of the grouped usage
837
+ * result.
838
+ */
839
+ size?: string | null;
840
+
841
+ /**
842
+ * When `group_by=source`, this field provides the source of the grouped usage
843
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
844
+ */
845
+ source?: string | null;
846
+
847
+ /**
848
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
849
+ * result.
850
+ */
851
+ user_id?: string | null;
852
+ }
853
+
854
+ /**
855
+ * The aggregated audio speeches usage details of the specific time bucket.
856
+ */
857
+ export interface OrganizationUsageAudioSpeechesResult {
858
+ /**
859
+ * The number of characters processed.
860
+ */
861
+ characters: number;
862
+
863
+ /**
864
+ * The count of requests made to the model.
865
+ */
866
+ num_model_requests: number;
867
+
868
+ object: 'organization.usage.audio_speeches.result';
869
+
870
+ /**
871
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
872
+ * usage result.
873
+ */
874
+ api_key_id?: string | null;
875
+
876
+ /**
877
+ * When `group_by=model`, this field provides the model name of the grouped usage
878
+ * result.
879
+ */
880
+ model?: string | null;
881
+
882
+ /**
883
+ * When `group_by=project_id`, this field provides the project ID of the grouped
884
+ * usage result.
885
+ */
886
+ project_id?: string | null;
887
+
888
+ /**
889
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
890
+ * result.
891
+ */
892
+ user_id?: string | null;
893
+ }
894
+
895
+ /**
896
+ * The aggregated audio transcriptions usage details of the specific time bucket.
897
+ */
898
+ export interface OrganizationUsageAudioTranscriptionsResult {
899
+ /**
900
+ * The count of requests made to the model.
901
+ */
902
+ num_model_requests: number;
903
+
904
+ object: 'organization.usage.audio_transcriptions.result';
905
+
906
+ /**
907
+ * The number of seconds processed.
908
+ */
909
+ seconds: number;
910
+
911
+ /**
912
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
913
+ * usage result.
914
+ */
915
+ api_key_id?: string | null;
916
+
917
+ /**
918
+ * When `group_by=model`, this field provides the model name of the grouped usage
919
+ * result.
920
+ */
921
+ model?: string | null;
922
+
923
+ /**
924
+ * When `group_by=project_id`, this field provides the project ID of the grouped
925
+ * usage result.
926
+ */
927
+ project_id?: string | null;
928
+
929
+ /**
930
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
931
+ * result.
932
+ */
933
+ user_id?: string | null;
934
+ }
935
+
936
+ /**
937
+ * The aggregated vector stores usage details of the specific time bucket.
938
+ */
939
+ export interface OrganizationUsageVectorStoresResult {
940
+ object: 'organization.usage.vector_stores.result';
941
+
942
+ /**
943
+ * The vector stores usage in bytes.
944
+ */
945
+ usage_bytes: number;
946
+
947
+ /**
948
+ * When `group_by=project_id`, this field provides the project ID of the grouped
949
+ * usage result.
950
+ */
951
+ project_id?: string | null;
952
+ }
953
+
954
+ /**
955
+ * The aggregated code interpreter sessions usage details of the specific time
956
+ * bucket.
957
+ */
958
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
959
+ /**
960
+ * The number of code interpreter sessions.
961
+ */
962
+ num_sessions: number;
963
+
964
+ object: 'organization.usage.code_interpreter_sessions.result';
965
+
966
+ /**
967
+ * When `group_by=project_id`, this field provides the project ID of the grouped
968
+ * usage result.
969
+ */
970
+ project_id?: string | null;
971
+ }
972
+
973
+ /**
974
+ * The aggregated costs details of the specific time bucket.
975
+ */
976
+ export interface OrganizationCostsResult {
977
+ object: 'organization.costs.result';
978
+
979
+ /**
980
+ * The monetary value in its associated currency.
981
+ */
982
+ amount?: OrganizationCostsResult.Amount;
983
+
984
+ /**
985
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
986
+ * costs result.
987
+ */
988
+ api_key_id?: string | null;
989
+
990
+ /**
991
+ * When `group_by=line_item`, this field provides the line item of the grouped
992
+ * costs result.
993
+ */
994
+ line_item?: string | null;
995
+
996
+ /**
997
+ * When `group_by=project_id`, this field provides the project ID of the grouped
998
+ * costs result.
999
+ */
1000
+ project_id?: string | null;
1001
+
1002
+ /**
1003
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
1004
+ * result.
1005
+ */
1006
+ quantity?: number | null;
1007
+ }
1008
+
1009
+ export namespace OrganizationCostsResult {
1010
+ /**
1011
+ * The monetary value in its associated currency.
1012
+ */
1013
+ export interface Amount {
1014
+ /**
1015
+ * Lowercase ISO-4217 currency e.g. "usd"
1016
+ */
1017
+ currency?: string;
1018
+
1019
+ /**
1020
+ * The numeric value of the cost.
1021
+ */
1022
+ value?: number;
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+
1028
+ export interface UsageCodeInterpreterSessionsResponse {
1029
+ data: Array<UsageCodeInterpreterSessionsResponse.Data>;
1030
+
1031
+ has_more: boolean;
1032
+
1033
+ next_page: string | null;
1034
+
1035
+ object: 'page';
1036
+ }
1037
+
1038
+ export namespace UsageCodeInterpreterSessionsResponse {
1039
+ export interface Data {
1040
+ end_time: number;
1041
+
1042
+ object: 'bucket';
1043
+
1044
+ results: Array<
1045
+ | Data.OrganizationUsageCompletionsResult
1046
+ | Data.OrganizationUsageEmbeddingsResult
1047
+ | Data.OrganizationUsageModerationsResult
1048
+ | Data.OrganizationUsageImagesResult
1049
+ | Data.OrganizationUsageAudioSpeechesResult
1050
+ | Data.OrganizationUsageAudioTranscriptionsResult
1051
+ | Data.OrganizationUsageVectorStoresResult
1052
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
1053
+ | Data.OrganizationCostsResult
1054
+ >;
1055
+
1056
+ start_time: number;
1057
+ }
1058
+
1059
+ export namespace Data {
1060
+ /**
1061
+ * The aggregated completions usage details of the specific time bucket.
1062
+ */
1063
+ export interface OrganizationUsageCompletionsResult {
1064
+ /**
1065
+ * The aggregated number of text input tokens used, including cached tokens. For
1066
+ * customers subscribe to scale tier, this includes scale tier tokens.
1067
+ */
1068
+ input_tokens: number;
1069
+
1070
+ /**
1071
+ * The count of requests made to the model.
1072
+ */
1073
+ num_model_requests: number;
1074
+
1075
+ object: 'organization.usage.completions.result';
1076
+
1077
+ /**
1078
+ * The aggregated number of text output tokens used. For customers subscribe to
1079
+ * scale tier, this includes scale tier tokens.
1080
+ */
1081
+ output_tokens: number;
1082
+
1083
+ /**
1084
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1085
+ * usage result.
1086
+ */
1087
+ api_key_id?: string | null;
1088
+
1089
+ /**
1090
+ * When `group_by=batch`, this field tells whether the grouped usage result is
1091
+ * batch or not.
1092
+ */
1093
+ batch?: boolean | null;
1094
+
1095
+ /**
1096
+ * The aggregated number of audio input tokens used, including cached tokens.
1097
+ */
1098
+ input_audio_tokens?: number;
1099
+
1100
+ /**
1101
+ * The aggregated number of text input tokens that has been cached from previous
1102
+ * requests. For customers subscribe to scale tier, this includes scale tier
1103
+ * tokens.
1104
+ */
1105
+ input_cached_tokens?: number;
1106
+
1107
+ /**
1108
+ * When `group_by=model`, this field provides the model name of the grouped usage
1109
+ * result.
1110
+ */
1111
+ model?: string | null;
1112
+
1113
+ /**
1114
+ * The aggregated number of audio output tokens used.
1115
+ */
1116
+ output_audio_tokens?: number;
1117
+
1118
+ /**
1119
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1120
+ * usage result.
1121
+ */
1122
+ project_id?: string | null;
1123
+
1124
+ /**
1125
+ * When `group_by=service_tier`, this field provides the service tier of the
1126
+ * grouped usage result.
1127
+ */
1128
+ service_tier?: string | null;
1129
+
1130
+ /**
1131
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1132
+ * result.
1133
+ */
1134
+ user_id?: string | null;
1135
+ }
1136
+
1137
+ /**
1138
+ * The aggregated embeddings usage details of the specific time bucket.
1139
+ */
1140
+ export interface OrganizationUsageEmbeddingsResult {
1141
+ /**
1142
+ * The aggregated number of input tokens used.
1143
+ */
1144
+ input_tokens: number;
1145
+
1146
+ /**
1147
+ * The count of requests made to the model.
1148
+ */
1149
+ num_model_requests: number;
1150
+
1151
+ object: 'organization.usage.embeddings.result';
1152
+
1153
+ /**
1154
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1155
+ * usage result.
1156
+ */
1157
+ api_key_id?: string | null;
1158
+
1159
+ /**
1160
+ * When `group_by=model`, this field provides the model name of the grouped usage
1161
+ * result.
1162
+ */
1163
+ model?: string | null;
1164
+
1165
+ /**
1166
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1167
+ * usage result.
1168
+ */
1169
+ project_id?: string | null;
1170
+
1171
+ /**
1172
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1173
+ * result.
1174
+ */
1175
+ user_id?: string | null;
1176
+ }
1177
+
1178
+ /**
1179
+ * The aggregated moderations usage details of the specific time bucket.
1180
+ */
1181
+ export interface OrganizationUsageModerationsResult {
1182
+ /**
1183
+ * The aggregated number of input tokens used.
1184
+ */
1185
+ input_tokens: number;
1186
+
1187
+ /**
1188
+ * The count of requests made to the model.
1189
+ */
1190
+ num_model_requests: number;
1191
+
1192
+ object: 'organization.usage.moderations.result';
1193
+
1194
+ /**
1195
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1196
+ * usage result.
1197
+ */
1198
+ api_key_id?: string | null;
1199
+
1200
+ /**
1201
+ * When `group_by=model`, this field provides the model name of the grouped usage
1202
+ * result.
1203
+ */
1204
+ model?: string | null;
1205
+
1206
+ /**
1207
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1208
+ * usage result.
1209
+ */
1210
+ project_id?: string | null;
1211
+
1212
+ /**
1213
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1214
+ * result.
1215
+ */
1216
+ user_id?: string | null;
1217
+ }
1218
+
1219
+ /**
1220
+ * The aggregated images usage details of the specific time bucket.
1221
+ */
1222
+ export interface OrganizationUsageImagesResult {
1223
+ /**
1224
+ * The number of images processed.
1225
+ */
1226
+ images: number;
1227
+
1228
+ /**
1229
+ * The count of requests made to the model.
1230
+ */
1231
+ num_model_requests: number;
1232
+
1233
+ object: 'organization.usage.images.result';
1234
+
1235
+ /**
1236
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1237
+ * usage result.
1238
+ */
1239
+ api_key_id?: string | null;
1240
+
1241
+ /**
1242
+ * When `group_by=model`, this field provides the model name of the grouped usage
1243
+ * result.
1244
+ */
1245
+ model?: string | null;
1246
+
1247
+ /**
1248
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1249
+ * usage result.
1250
+ */
1251
+ project_id?: string | null;
1252
+
1253
+ /**
1254
+ * When `group_by=size`, this field provides the image size of the grouped usage
1255
+ * result.
1256
+ */
1257
+ size?: string | null;
1258
+
1259
+ /**
1260
+ * When `group_by=source`, this field provides the source of the grouped usage
1261
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
1262
+ */
1263
+ source?: string | null;
1264
+
1265
+ /**
1266
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1267
+ * result.
1268
+ */
1269
+ user_id?: string | null;
1270
+ }
1271
+
1272
+ /**
1273
+ * The aggregated audio speeches usage details of the specific time bucket.
1274
+ */
1275
+ export interface OrganizationUsageAudioSpeechesResult {
1276
+ /**
1277
+ * The number of characters processed.
1278
+ */
1279
+ characters: number;
1280
+
1281
+ /**
1282
+ * The count of requests made to the model.
1283
+ */
1284
+ num_model_requests: number;
1285
+
1286
+ object: 'organization.usage.audio_speeches.result';
1287
+
1288
+ /**
1289
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1290
+ * usage result.
1291
+ */
1292
+ api_key_id?: string | null;
1293
+
1294
+ /**
1295
+ * When `group_by=model`, this field provides the model name of the grouped usage
1296
+ * result.
1297
+ */
1298
+ model?: string | null;
1299
+
1300
+ /**
1301
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1302
+ * usage result.
1303
+ */
1304
+ project_id?: string | null;
1305
+
1306
+ /**
1307
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1308
+ * result.
1309
+ */
1310
+ user_id?: string | null;
1311
+ }
1312
+
1313
+ /**
1314
+ * The aggregated audio transcriptions usage details of the specific time bucket.
1315
+ */
1316
+ export interface OrganizationUsageAudioTranscriptionsResult {
1317
+ /**
1318
+ * The count of requests made to the model.
1319
+ */
1320
+ num_model_requests: number;
1321
+
1322
+ object: 'organization.usage.audio_transcriptions.result';
1323
+
1324
+ /**
1325
+ * The number of seconds processed.
1326
+ */
1327
+ seconds: number;
1328
+
1329
+ /**
1330
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1331
+ * usage result.
1332
+ */
1333
+ api_key_id?: string | null;
1334
+
1335
+ /**
1336
+ * When `group_by=model`, this field provides the model name of the grouped usage
1337
+ * result.
1338
+ */
1339
+ model?: string | null;
1340
+
1341
+ /**
1342
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1343
+ * usage result.
1344
+ */
1345
+ project_id?: string | null;
1346
+
1347
+ /**
1348
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1349
+ * result.
1350
+ */
1351
+ user_id?: string | null;
1352
+ }
1353
+
1354
+ /**
1355
+ * The aggregated vector stores usage details of the specific time bucket.
1356
+ */
1357
+ export interface OrganizationUsageVectorStoresResult {
1358
+ object: 'organization.usage.vector_stores.result';
1359
+
1360
+ /**
1361
+ * The vector stores usage in bytes.
1362
+ */
1363
+ usage_bytes: number;
1364
+
1365
+ /**
1366
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1367
+ * usage result.
1368
+ */
1369
+ project_id?: string | null;
1370
+ }
1371
+
1372
+ /**
1373
+ * The aggregated code interpreter sessions usage details of the specific time
1374
+ * bucket.
1375
+ */
1376
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
1377
+ /**
1378
+ * The number of code interpreter sessions.
1379
+ */
1380
+ num_sessions: number;
1381
+
1382
+ object: 'organization.usage.code_interpreter_sessions.result';
1383
+
1384
+ /**
1385
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1386
+ * usage result.
1387
+ */
1388
+ project_id?: string | null;
1389
+ }
1390
+
1391
+ /**
1392
+ * The aggregated costs details of the specific time bucket.
1393
+ */
1394
+ export interface OrganizationCostsResult {
1395
+ object: 'organization.costs.result';
1396
+
1397
+ /**
1398
+ * The monetary value in its associated currency.
1399
+ */
1400
+ amount?: OrganizationCostsResult.Amount;
1401
+
1402
+ /**
1403
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
1404
+ * costs result.
1405
+ */
1406
+ api_key_id?: string | null;
1407
+
1408
+ /**
1409
+ * When `group_by=line_item`, this field provides the line item of the grouped
1410
+ * costs result.
1411
+ */
1412
+ line_item?: string | null;
1413
+
1414
+ /**
1415
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1416
+ * costs result.
1417
+ */
1418
+ project_id?: string | null;
1419
+
1420
+ /**
1421
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
1422
+ * result.
1423
+ */
1424
+ quantity?: number | null;
1425
+ }
1426
+
1427
+ export namespace OrganizationCostsResult {
1428
+ /**
1429
+ * The monetary value in its associated currency.
1430
+ */
1431
+ export interface Amount {
1432
+ /**
1433
+ * Lowercase ISO-4217 currency e.g. "usd"
1434
+ */
1435
+ currency?: string;
1436
+
1437
+ /**
1438
+ * The numeric value of the cost.
1439
+ */
1440
+ value?: number;
1441
+ }
1442
+ }
1443
+ }
1444
+ }
1445
+
1446
+ export interface UsageCompletionsResponse {
1447
+ data: Array<UsageCompletionsResponse.Data>;
1448
+
1449
+ has_more: boolean;
1450
+
1451
+ next_page: string | null;
1452
+
1453
+ object: 'page';
1454
+ }
1455
+
1456
+ export namespace UsageCompletionsResponse {
1457
+ export interface Data {
1458
+ end_time: number;
1459
+
1460
+ object: 'bucket';
1461
+
1462
+ results: Array<
1463
+ | Data.OrganizationUsageCompletionsResult
1464
+ | Data.OrganizationUsageEmbeddingsResult
1465
+ | Data.OrganizationUsageModerationsResult
1466
+ | Data.OrganizationUsageImagesResult
1467
+ | Data.OrganizationUsageAudioSpeechesResult
1468
+ | Data.OrganizationUsageAudioTranscriptionsResult
1469
+ | Data.OrganizationUsageVectorStoresResult
1470
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
1471
+ | Data.OrganizationCostsResult
1472
+ >;
1473
+
1474
+ start_time: number;
1475
+ }
1476
+
1477
+ export namespace Data {
1478
+ /**
1479
+ * The aggregated completions usage details of the specific time bucket.
1480
+ */
1481
+ export interface OrganizationUsageCompletionsResult {
1482
+ /**
1483
+ * The aggregated number of text input tokens used, including cached tokens. For
1484
+ * customers subscribe to scale tier, this includes scale tier tokens.
1485
+ */
1486
+ input_tokens: number;
1487
+
1488
+ /**
1489
+ * The count of requests made to the model.
1490
+ */
1491
+ num_model_requests: number;
1492
+
1493
+ object: 'organization.usage.completions.result';
1494
+
1495
+ /**
1496
+ * The aggregated number of text output tokens used. For customers subscribe to
1497
+ * scale tier, this includes scale tier tokens.
1498
+ */
1499
+ output_tokens: number;
1500
+
1501
+ /**
1502
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1503
+ * usage result.
1504
+ */
1505
+ api_key_id?: string | null;
1506
+
1507
+ /**
1508
+ * When `group_by=batch`, this field tells whether the grouped usage result is
1509
+ * batch or not.
1510
+ */
1511
+ batch?: boolean | null;
1512
+
1513
+ /**
1514
+ * The aggregated number of audio input tokens used, including cached tokens.
1515
+ */
1516
+ input_audio_tokens?: number;
1517
+
1518
+ /**
1519
+ * The aggregated number of text input tokens that has been cached from previous
1520
+ * requests. For customers subscribe to scale tier, this includes scale tier
1521
+ * tokens.
1522
+ */
1523
+ input_cached_tokens?: number;
1524
+
1525
+ /**
1526
+ * When `group_by=model`, this field provides the model name of the grouped usage
1527
+ * result.
1528
+ */
1529
+ model?: string | null;
1530
+
1531
+ /**
1532
+ * The aggregated number of audio output tokens used.
1533
+ */
1534
+ output_audio_tokens?: number;
1535
+
1536
+ /**
1537
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1538
+ * usage result.
1539
+ */
1540
+ project_id?: string | null;
1541
+
1542
+ /**
1543
+ * When `group_by=service_tier`, this field provides the service tier of the
1544
+ * grouped usage result.
1545
+ */
1546
+ service_tier?: string | null;
1547
+
1548
+ /**
1549
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1550
+ * result.
1551
+ */
1552
+ user_id?: string | null;
1553
+ }
1554
+
1555
+ /**
1556
+ * The aggregated embeddings usage details of the specific time bucket.
1557
+ */
1558
+ export interface OrganizationUsageEmbeddingsResult {
1559
+ /**
1560
+ * The aggregated number of input tokens used.
1561
+ */
1562
+ input_tokens: number;
1563
+
1564
+ /**
1565
+ * The count of requests made to the model.
1566
+ */
1567
+ num_model_requests: number;
1568
+
1569
+ object: 'organization.usage.embeddings.result';
1570
+
1571
+ /**
1572
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1573
+ * usage result.
1574
+ */
1575
+ api_key_id?: string | null;
1576
+
1577
+ /**
1578
+ * When `group_by=model`, this field provides the model name of the grouped usage
1579
+ * result.
1580
+ */
1581
+ model?: string | null;
1582
+
1583
+ /**
1584
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1585
+ * usage result.
1586
+ */
1587
+ project_id?: string | null;
1588
+
1589
+ /**
1590
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1591
+ * result.
1592
+ */
1593
+ user_id?: string | null;
1594
+ }
1595
+
1596
+ /**
1597
+ * The aggregated moderations usage details of the specific time bucket.
1598
+ */
1599
+ export interface OrganizationUsageModerationsResult {
1600
+ /**
1601
+ * The aggregated number of input tokens used.
1602
+ */
1603
+ input_tokens: number;
1604
+
1605
+ /**
1606
+ * The count of requests made to the model.
1607
+ */
1608
+ num_model_requests: number;
1609
+
1610
+ object: 'organization.usage.moderations.result';
1611
+
1612
+ /**
1613
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1614
+ * usage result.
1615
+ */
1616
+ api_key_id?: string | null;
1617
+
1618
+ /**
1619
+ * When `group_by=model`, this field provides the model name of the grouped usage
1620
+ * result.
1621
+ */
1622
+ model?: string | null;
1623
+
1624
+ /**
1625
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1626
+ * usage result.
1627
+ */
1628
+ project_id?: string | null;
1629
+
1630
+ /**
1631
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1632
+ * result.
1633
+ */
1634
+ user_id?: string | null;
1635
+ }
1636
+
1637
+ /**
1638
+ * The aggregated images usage details of the specific time bucket.
1639
+ */
1640
+ export interface OrganizationUsageImagesResult {
1641
+ /**
1642
+ * The number of images processed.
1643
+ */
1644
+ images: number;
1645
+
1646
+ /**
1647
+ * The count of requests made to the model.
1648
+ */
1649
+ num_model_requests: number;
1650
+
1651
+ object: 'organization.usage.images.result';
1652
+
1653
+ /**
1654
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1655
+ * usage result.
1656
+ */
1657
+ api_key_id?: string | null;
1658
+
1659
+ /**
1660
+ * When `group_by=model`, this field provides the model name of the grouped usage
1661
+ * result.
1662
+ */
1663
+ model?: string | null;
1664
+
1665
+ /**
1666
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1667
+ * usage result.
1668
+ */
1669
+ project_id?: string | null;
1670
+
1671
+ /**
1672
+ * When `group_by=size`, this field provides the image size of the grouped usage
1673
+ * result.
1674
+ */
1675
+ size?: string | null;
1676
+
1677
+ /**
1678
+ * When `group_by=source`, this field provides the source of the grouped usage
1679
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
1680
+ */
1681
+ source?: string | null;
1682
+
1683
+ /**
1684
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1685
+ * result.
1686
+ */
1687
+ user_id?: string | null;
1688
+ }
1689
+
1690
+ /**
1691
+ * The aggregated audio speeches usage details of the specific time bucket.
1692
+ */
1693
+ export interface OrganizationUsageAudioSpeechesResult {
1694
+ /**
1695
+ * The number of characters processed.
1696
+ */
1697
+ characters: number;
1698
+
1699
+ /**
1700
+ * The count of requests made to the model.
1701
+ */
1702
+ num_model_requests: number;
1703
+
1704
+ object: 'organization.usage.audio_speeches.result';
1705
+
1706
+ /**
1707
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1708
+ * usage result.
1709
+ */
1710
+ api_key_id?: string | null;
1711
+
1712
+ /**
1713
+ * When `group_by=model`, this field provides the model name of the grouped usage
1714
+ * result.
1715
+ */
1716
+ model?: string | null;
1717
+
1718
+ /**
1719
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1720
+ * usage result.
1721
+ */
1722
+ project_id?: string | null;
1723
+
1724
+ /**
1725
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1726
+ * result.
1727
+ */
1728
+ user_id?: string | null;
1729
+ }
1730
+
1731
+ /**
1732
+ * The aggregated audio transcriptions usage details of the specific time bucket.
1733
+ */
1734
+ export interface OrganizationUsageAudioTranscriptionsResult {
1735
+ /**
1736
+ * The count of requests made to the model.
1737
+ */
1738
+ num_model_requests: number;
1739
+
1740
+ object: 'organization.usage.audio_transcriptions.result';
1741
+
1742
+ /**
1743
+ * The number of seconds processed.
1744
+ */
1745
+ seconds: number;
1746
+
1747
+ /**
1748
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1749
+ * usage result.
1750
+ */
1751
+ api_key_id?: string | null;
1752
+
1753
+ /**
1754
+ * When `group_by=model`, this field provides the model name of the grouped usage
1755
+ * result.
1756
+ */
1757
+ model?: string | null;
1758
+
1759
+ /**
1760
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1761
+ * usage result.
1762
+ */
1763
+ project_id?: string | null;
1764
+
1765
+ /**
1766
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1767
+ * result.
1768
+ */
1769
+ user_id?: string | null;
1770
+ }
1771
+
1772
+ /**
1773
+ * The aggregated vector stores usage details of the specific time bucket.
1774
+ */
1775
+ export interface OrganizationUsageVectorStoresResult {
1776
+ object: 'organization.usage.vector_stores.result';
1777
+
1778
+ /**
1779
+ * The vector stores usage in bytes.
1780
+ */
1781
+ usage_bytes: number;
1782
+
1783
+ /**
1784
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1785
+ * usage result.
1786
+ */
1787
+ project_id?: string | null;
1788
+ }
1789
+
1790
+ /**
1791
+ * The aggregated code interpreter sessions usage details of the specific time
1792
+ * bucket.
1793
+ */
1794
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
1795
+ /**
1796
+ * The number of code interpreter sessions.
1797
+ */
1798
+ num_sessions: number;
1799
+
1800
+ object: 'organization.usage.code_interpreter_sessions.result';
1801
+
1802
+ /**
1803
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1804
+ * usage result.
1805
+ */
1806
+ project_id?: string | null;
1807
+ }
1808
+
1809
+ /**
1810
+ * The aggregated costs details of the specific time bucket.
1811
+ */
1812
+ export interface OrganizationCostsResult {
1813
+ object: 'organization.costs.result';
1814
+
1815
+ /**
1816
+ * The monetary value in its associated currency.
1817
+ */
1818
+ amount?: OrganizationCostsResult.Amount;
1819
+
1820
+ /**
1821
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
1822
+ * costs result.
1823
+ */
1824
+ api_key_id?: string | null;
1825
+
1826
+ /**
1827
+ * When `group_by=line_item`, this field provides the line item of the grouped
1828
+ * costs result.
1829
+ */
1830
+ line_item?: string | null;
1831
+
1832
+ /**
1833
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1834
+ * costs result.
1835
+ */
1836
+ project_id?: string | null;
1837
+
1838
+ /**
1839
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
1840
+ * result.
1841
+ */
1842
+ quantity?: number | null;
1843
+ }
1844
+
1845
+ export namespace OrganizationCostsResult {
1846
+ /**
1847
+ * The monetary value in its associated currency.
1848
+ */
1849
+ export interface Amount {
1850
+ /**
1851
+ * Lowercase ISO-4217 currency e.g. "usd"
1852
+ */
1853
+ currency?: string;
1854
+
1855
+ /**
1856
+ * The numeric value of the cost.
1857
+ */
1858
+ value?: number;
1859
+ }
1860
+ }
1861
+ }
1862
+ }
1863
+
1864
+ export interface UsageCostsResponse {
1865
+ data: Array<UsageCostsResponse.Data>;
1866
+
1867
+ has_more: boolean;
1868
+
1869
+ next_page: string | null;
1870
+
1871
+ object: 'page';
1872
+ }
1873
+
1874
+ export namespace UsageCostsResponse {
1875
+ export interface Data {
1876
+ end_time: number;
1877
+
1878
+ object: 'bucket';
1879
+
1880
+ results: Array<
1881
+ | Data.OrganizationUsageCompletionsResult
1882
+ | Data.OrganizationUsageEmbeddingsResult
1883
+ | Data.OrganizationUsageModerationsResult
1884
+ | Data.OrganizationUsageImagesResult
1885
+ | Data.OrganizationUsageAudioSpeechesResult
1886
+ | Data.OrganizationUsageAudioTranscriptionsResult
1887
+ | Data.OrganizationUsageVectorStoresResult
1888
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
1889
+ | Data.OrganizationCostsResult
1890
+ >;
1891
+
1892
+ start_time: number;
1893
+ }
1894
+
1895
+ export namespace Data {
1896
+ /**
1897
+ * The aggregated completions usage details of the specific time bucket.
1898
+ */
1899
+ export interface OrganizationUsageCompletionsResult {
1900
+ /**
1901
+ * The aggregated number of text input tokens used, including cached tokens. For
1902
+ * customers subscribe to scale tier, this includes scale tier tokens.
1903
+ */
1904
+ input_tokens: number;
1905
+
1906
+ /**
1907
+ * The count of requests made to the model.
1908
+ */
1909
+ num_model_requests: number;
1910
+
1911
+ object: 'organization.usage.completions.result';
1912
+
1913
+ /**
1914
+ * The aggregated number of text output tokens used. For customers subscribe to
1915
+ * scale tier, this includes scale tier tokens.
1916
+ */
1917
+ output_tokens: number;
1918
+
1919
+ /**
1920
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1921
+ * usage result.
1922
+ */
1923
+ api_key_id?: string | null;
1924
+
1925
+ /**
1926
+ * When `group_by=batch`, this field tells whether the grouped usage result is
1927
+ * batch or not.
1928
+ */
1929
+ batch?: boolean | null;
1930
+
1931
+ /**
1932
+ * The aggregated number of audio input tokens used, including cached tokens.
1933
+ */
1934
+ input_audio_tokens?: number;
1935
+
1936
+ /**
1937
+ * The aggregated number of text input tokens that has been cached from previous
1938
+ * requests. For customers subscribe to scale tier, this includes scale tier
1939
+ * tokens.
1940
+ */
1941
+ input_cached_tokens?: number;
1942
+
1943
+ /**
1944
+ * When `group_by=model`, this field provides the model name of the grouped usage
1945
+ * result.
1946
+ */
1947
+ model?: string | null;
1948
+
1949
+ /**
1950
+ * The aggregated number of audio output tokens used.
1951
+ */
1952
+ output_audio_tokens?: number;
1953
+
1954
+ /**
1955
+ * When `group_by=project_id`, this field provides the project ID of the grouped
1956
+ * usage result.
1957
+ */
1958
+ project_id?: string | null;
1959
+
1960
+ /**
1961
+ * When `group_by=service_tier`, this field provides the service tier of the
1962
+ * grouped usage result.
1963
+ */
1964
+ service_tier?: string | null;
1965
+
1966
+ /**
1967
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
1968
+ * result.
1969
+ */
1970
+ user_id?: string | null;
1971
+ }
1972
+
1973
+ /**
1974
+ * The aggregated embeddings usage details of the specific time bucket.
1975
+ */
1976
+ export interface OrganizationUsageEmbeddingsResult {
1977
+ /**
1978
+ * The aggregated number of input tokens used.
1979
+ */
1980
+ input_tokens: number;
1981
+
1982
+ /**
1983
+ * The count of requests made to the model.
1984
+ */
1985
+ num_model_requests: number;
1986
+
1987
+ object: 'organization.usage.embeddings.result';
1988
+
1989
+ /**
1990
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
1991
+ * usage result.
1992
+ */
1993
+ api_key_id?: string | null;
1994
+
1995
+ /**
1996
+ * When `group_by=model`, this field provides the model name of the grouped usage
1997
+ * result.
1998
+ */
1999
+ model?: string | null;
2000
+
2001
+ /**
2002
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2003
+ * usage result.
2004
+ */
2005
+ project_id?: string | null;
2006
+
2007
+ /**
2008
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2009
+ * result.
2010
+ */
2011
+ user_id?: string | null;
2012
+ }
2013
+
2014
+ /**
2015
+ * The aggregated moderations usage details of the specific time bucket.
2016
+ */
2017
+ export interface OrganizationUsageModerationsResult {
2018
+ /**
2019
+ * The aggregated number of input tokens used.
2020
+ */
2021
+ input_tokens: number;
2022
+
2023
+ /**
2024
+ * The count of requests made to the model.
2025
+ */
2026
+ num_model_requests: number;
2027
+
2028
+ object: 'organization.usage.moderations.result';
2029
+
2030
+ /**
2031
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2032
+ * usage result.
2033
+ */
2034
+ api_key_id?: string | null;
2035
+
2036
+ /**
2037
+ * When `group_by=model`, this field provides the model name of the grouped usage
2038
+ * result.
2039
+ */
2040
+ model?: string | null;
2041
+
2042
+ /**
2043
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2044
+ * usage result.
2045
+ */
2046
+ project_id?: string | null;
2047
+
2048
+ /**
2049
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2050
+ * result.
2051
+ */
2052
+ user_id?: string | null;
2053
+ }
2054
+
2055
+ /**
2056
+ * The aggregated images usage details of the specific time bucket.
2057
+ */
2058
+ export interface OrganizationUsageImagesResult {
2059
+ /**
2060
+ * The number of images processed.
2061
+ */
2062
+ images: number;
2063
+
2064
+ /**
2065
+ * The count of requests made to the model.
2066
+ */
2067
+ num_model_requests: number;
2068
+
2069
+ object: 'organization.usage.images.result';
2070
+
2071
+ /**
2072
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2073
+ * usage result.
2074
+ */
2075
+ api_key_id?: string | null;
2076
+
2077
+ /**
2078
+ * When `group_by=model`, this field provides the model name of the grouped usage
2079
+ * result.
2080
+ */
2081
+ model?: string | null;
2082
+
2083
+ /**
2084
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2085
+ * usage result.
2086
+ */
2087
+ project_id?: string | null;
2088
+
2089
+ /**
2090
+ * When `group_by=size`, this field provides the image size of the grouped usage
2091
+ * result.
2092
+ */
2093
+ size?: string | null;
2094
+
2095
+ /**
2096
+ * When `group_by=source`, this field provides the source of the grouped usage
2097
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
2098
+ */
2099
+ source?: string | null;
2100
+
2101
+ /**
2102
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2103
+ * result.
2104
+ */
2105
+ user_id?: string | null;
2106
+ }
2107
+
2108
+ /**
2109
+ * The aggregated audio speeches usage details of the specific time bucket.
2110
+ */
2111
+ export interface OrganizationUsageAudioSpeechesResult {
2112
+ /**
2113
+ * The number of characters processed.
2114
+ */
2115
+ characters: number;
2116
+
2117
+ /**
2118
+ * The count of requests made to the model.
2119
+ */
2120
+ num_model_requests: number;
2121
+
2122
+ object: 'organization.usage.audio_speeches.result';
2123
+
2124
+ /**
2125
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2126
+ * usage result.
2127
+ */
2128
+ api_key_id?: string | null;
2129
+
2130
+ /**
2131
+ * When `group_by=model`, this field provides the model name of the grouped usage
2132
+ * result.
2133
+ */
2134
+ model?: string | null;
2135
+
2136
+ /**
2137
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2138
+ * usage result.
2139
+ */
2140
+ project_id?: string | null;
2141
+
2142
+ /**
2143
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2144
+ * result.
2145
+ */
2146
+ user_id?: string | null;
2147
+ }
2148
+
2149
+ /**
2150
+ * The aggregated audio transcriptions usage details of the specific time bucket.
2151
+ */
2152
+ export interface OrganizationUsageAudioTranscriptionsResult {
2153
+ /**
2154
+ * The count of requests made to the model.
2155
+ */
2156
+ num_model_requests: number;
2157
+
2158
+ object: 'organization.usage.audio_transcriptions.result';
2159
+
2160
+ /**
2161
+ * The number of seconds processed.
2162
+ */
2163
+ seconds: number;
2164
+
2165
+ /**
2166
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2167
+ * usage result.
2168
+ */
2169
+ api_key_id?: string | null;
2170
+
2171
+ /**
2172
+ * When `group_by=model`, this field provides the model name of the grouped usage
2173
+ * result.
2174
+ */
2175
+ model?: string | null;
2176
+
2177
+ /**
2178
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2179
+ * usage result.
2180
+ */
2181
+ project_id?: string | null;
2182
+
2183
+ /**
2184
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2185
+ * result.
2186
+ */
2187
+ user_id?: string | null;
2188
+ }
2189
+
2190
+ /**
2191
+ * The aggregated vector stores usage details of the specific time bucket.
2192
+ */
2193
+ export interface OrganizationUsageVectorStoresResult {
2194
+ object: 'organization.usage.vector_stores.result';
2195
+
2196
+ /**
2197
+ * The vector stores usage in bytes.
2198
+ */
2199
+ usage_bytes: number;
2200
+
2201
+ /**
2202
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2203
+ * usage result.
2204
+ */
2205
+ project_id?: string | null;
2206
+ }
2207
+
2208
+ /**
2209
+ * The aggregated code interpreter sessions usage details of the specific time
2210
+ * bucket.
2211
+ */
2212
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
2213
+ /**
2214
+ * The number of code interpreter sessions.
2215
+ */
2216
+ num_sessions: number;
2217
+
2218
+ object: 'organization.usage.code_interpreter_sessions.result';
2219
+
2220
+ /**
2221
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2222
+ * usage result.
2223
+ */
2224
+ project_id?: string | null;
2225
+ }
2226
+
2227
+ /**
2228
+ * The aggregated costs details of the specific time bucket.
2229
+ */
2230
+ export interface OrganizationCostsResult {
2231
+ object: 'organization.costs.result';
2232
+
2233
+ /**
2234
+ * The monetary value in its associated currency.
2235
+ */
2236
+ amount?: OrganizationCostsResult.Amount;
2237
+
2238
+ /**
2239
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
2240
+ * costs result.
2241
+ */
2242
+ api_key_id?: string | null;
2243
+
2244
+ /**
2245
+ * When `group_by=line_item`, this field provides the line item of the grouped
2246
+ * costs result.
2247
+ */
2248
+ line_item?: string | null;
2249
+
2250
+ /**
2251
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2252
+ * costs result.
2253
+ */
2254
+ project_id?: string | null;
2255
+
2256
+ /**
2257
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
2258
+ * result.
2259
+ */
2260
+ quantity?: number | null;
2261
+ }
2262
+
2263
+ export namespace OrganizationCostsResult {
2264
+ /**
2265
+ * The monetary value in its associated currency.
2266
+ */
2267
+ export interface Amount {
2268
+ /**
2269
+ * Lowercase ISO-4217 currency e.g. "usd"
2270
+ */
2271
+ currency?: string;
2272
+
2273
+ /**
2274
+ * The numeric value of the cost.
2275
+ */
2276
+ value?: number;
2277
+ }
2278
+ }
2279
+ }
2280
+ }
2281
+
2282
+ export interface UsageEmbeddingsResponse {
2283
+ data: Array<UsageEmbeddingsResponse.Data>;
2284
+
2285
+ has_more: boolean;
2286
+
2287
+ next_page: string | null;
2288
+
2289
+ object: 'page';
2290
+ }
2291
+
2292
+ export namespace UsageEmbeddingsResponse {
2293
+ export interface Data {
2294
+ end_time: number;
2295
+
2296
+ object: 'bucket';
2297
+
2298
+ results: Array<
2299
+ | Data.OrganizationUsageCompletionsResult
2300
+ | Data.OrganizationUsageEmbeddingsResult
2301
+ | Data.OrganizationUsageModerationsResult
2302
+ | Data.OrganizationUsageImagesResult
2303
+ | Data.OrganizationUsageAudioSpeechesResult
2304
+ | Data.OrganizationUsageAudioTranscriptionsResult
2305
+ | Data.OrganizationUsageVectorStoresResult
2306
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
2307
+ | Data.OrganizationCostsResult
2308
+ >;
2309
+
2310
+ start_time: number;
2311
+ }
2312
+
2313
+ export namespace Data {
2314
+ /**
2315
+ * The aggregated completions usage details of the specific time bucket.
2316
+ */
2317
+ export interface OrganizationUsageCompletionsResult {
2318
+ /**
2319
+ * The aggregated number of text input tokens used, including cached tokens. For
2320
+ * customers subscribe to scale tier, this includes scale tier tokens.
2321
+ */
2322
+ input_tokens: number;
2323
+
2324
+ /**
2325
+ * The count of requests made to the model.
2326
+ */
2327
+ num_model_requests: number;
2328
+
2329
+ object: 'organization.usage.completions.result';
2330
+
2331
+ /**
2332
+ * The aggregated number of text output tokens used. For customers subscribe to
2333
+ * scale tier, this includes scale tier tokens.
2334
+ */
2335
+ output_tokens: number;
2336
+
2337
+ /**
2338
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2339
+ * usage result.
2340
+ */
2341
+ api_key_id?: string | null;
2342
+
2343
+ /**
2344
+ * When `group_by=batch`, this field tells whether the grouped usage result is
2345
+ * batch or not.
2346
+ */
2347
+ batch?: boolean | null;
2348
+
2349
+ /**
2350
+ * The aggregated number of audio input tokens used, including cached tokens.
2351
+ */
2352
+ input_audio_tokens?: number;
2353
+
2354
+ /**
2355
+ * The aggregated number of text input tokens that has been cached from previous
2356
+ * requests. For customers subscribe to scale tier, this includes scale tier
2357
+ * tokens.
2358
+ */
2359
+ input_cached_tokens?: number;
2360
+
2361
+ /**
2362
+ * When `group_by=model`, this field provides the model name of the grouped usage
2363
+ * result.
2364
+ */
2365
+ model?: string | null;
2366
+
2367
+ /**
2368
+ * The aggregated number of audio output tokens used.
2369
+ */
2370
+ output_audio_tokens?: number;
2371
+
2372
+ /**
2373
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2374
+ * usage result.
2375
+ */
2376
+ project_id?: string | null;
2377
+
2378
+ /**
2379
+ * When `group_by=service_tier`, this field provides the service tier of the
2380
+ * grouped usage result.
2381
+ */
2382
+ service_tier?: string | null;
2383
+
2384
+ /**
2385
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2386
+ * result.
2387
+ */
2388
+ user_id?: string | null;
2389
+ }
2390
+
2391
+ /**
2392
+ * The aggregated embeddings usage details of the specific time bucket.
2393
+ */
2394
+ export interface OrganizationUsageEmbeddingsResult {
2395
+ /**
2396
+ * The aggregated number of input tokens used.
2397
+ */
2398
+ input_tokens: number;
2399
+
2400
+ /**
2401
+ * The count of requests made to the model.
2402
+ */
2403
+ num_model_requests: number;
2404
+
2405
+ object: 'organization.usage.embeddings.result';
2406
+
2407
+ /**
2408
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2409
+ * usage result.
2410
+ */
2411
+ api_key_id?: string | null;
2412
+
2413
+ /**
2414
+ * When `group_by=model`, this field provides the model name of the grouped usage
2415
+ * result.
2416
+ */
2417
+ model?: string | null;
2418
+
2419
+ /**
2420
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2421
+ * usage result.
2422
+ */
2423
+ project_id?: string | null;
2424
+
2425
+ /**
2426
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2427
+ * result.
2428
+ */
2429
+ user_id?: string | null;
2430
+ }
2431
+
2432
+ /**
2433
+ * The aggregated moderations usage details of the specific time bucket.
2434
+ */
2435
+ export interface OrganizationUsageModerationsResult {
2436
+ /**
2437
+ * The aggregated number of input tokens used.
2438
+ */
2439
+ input_tokens: number;
2440
+
2441
+ /**
2442
+ * The count of requests made to the model.
2443
+ */
2444
+ num_model_requests: number;
2445
+
2446
+ object: 'organization.usage.moderations.result';
2447
+
2448
+ /**
2449
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2450
+ * usage result.
2451
+ */
2452
+ api_key_id?: string | null;
2453
+
2454
+ /**
2455
+ * When `group_by=model`, this field provides the model name of the grouped usage
2456
+ * result.
2457
+ */
2458
+ model?: string | null;
2459
+
2460
+ /**
2461
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2462
+ * usage result.
2463
+ */
2464
+ project_id?: string | null;
2465
+
2466
+ /**
2467
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2468
+ * result.
2469
+ */
2470
+ user_id?: string | null;
2471
+ }
2472
+
2473
+ /**
2474
+ * The aggregated images usage details of the specific time bucket.
2475
+ */
2476
+ export interface OrganizationUsageImagesResult {
2477
+ /**
2478
+ * The number of images processed.
2479
+ */
2480
+ images: number;
2481
+
2482
+ /**
2483
+ * The count of requests made to the model.
2484
+ */
2485
+ num_model_requests: number;
2486
+
2487
+ object: 'organization.usage.images.result';
2488
+
2489
+ /**
2490
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2491
+ * usage result.
2492
+ */
2493
+ api_key_id?: string | null;
2494
+
2495
+ /**
2496
+ * When `group_by=model`, this field provides the model name of the grouped usage
2497
+ * result.
2498
+ */
2499
+ model?: string | null;
2500
+
2501
+ /**
2502
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2503
+ * usage result.
2504
+ */
2505
+ project_id?: string | null;
2506
+
2507
+ /**
2508
+ * When `group_by=size`, this field provides the image size of the grouped usage
2509
+ * result.
2510
+ */
2511
+ size?: string | null;
2512
+
2513
+ /**
2514
+ * When `group_by=source`, this field provides the source of the grouped usage
2515
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
2516
+ */
2517
+ source?: string | null;
2518
+
2519
+ /**
2520
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2521
+ * result.
2522
+ */
2523
+ user_id?: string | null;
2524
+ }
2525
+
2526
+ /**
2527
+ * The aggregated audio speeches usage details of the specific time bucket.
2528
+ */
2529
+ export interface OrganizationUsageAudioSpeechesResult {
2530
+ /**
2531
+ * The number of characters processed.
2532
+ */
2533
+ characters: number;
2534
+
2535
+ /**
2536
+ * The count of requests made to the model.
2537
+ */
2538
+ num_model_requests: number;
2539
+
2540
+ object: 'organization.usage.audio_speeches.result';
2541
+
2542
+ /**
2543
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2544
+ * usage result.
2545
+ */
2546
+ api_key_id?: string | null;
2547
+
2548
+ /**
2549
+ * When `group_by=model`, this field provides the model name of the grouped usage
2550
+ * result.
2551
+ */
2552
+ model?: string | null;
2553
+
2554
+ /**
2555
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2556
+ * usage result.
2557
+ */
2558
+ project_id?: string | null;
2559
+
2560
+ /**
2561
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2562
+ * result.
2563
+ */
2564
+ user_id?: string | null;
2565
+ }
2566
+
2567
+ /**
2568
+ * The aggregated audio transcriptions usage details of the specific time bucket.
2569
+ */
2570
+ export interface OrganizationUsageAudioTranscriptionsResult {
2571
+ /**
2572
+ * The count of requests made to the model.
2573
+ */
2574
+ num_model_requests: number;
2575
+
2576
+ object: 'organization.usage.audio_transcriptions.result';
2577
+
2578
+ /**
2579
+ * The number of seconds processed.
2580
+ */
2581
+ seconds: number;
2582
+
2583
+ /**
2584
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2585
+ * usage result.
2586
+ */
2587
+ api_key_id?: string | null;
2588
+
2589
+ /**
2590
+ * When `group_by=model`, this field provides the model name of the grouped usage
2591
+ * result.
2592
+ */
2593
+ model?: string | null;
2594
+
2595
+ /**
2596
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2597
+ * usage result.
2598
+ */
2599
+ project_id?: string | null;
2600
+
2601
+ /**
2602
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2603
+ * result.
2604
+ */
2605
+ user_id?: string | null;
2606
+ }
2607
+
2608
+ /**
2609
+ * The aggregated vector stores usage details of the specific time bucket.
2610
+ */
2611
+ export interface OrganizationUsageVectorStoresResult {
2612
+ object: 'organization.usage.vector_stores.result';
2613
+
2614
+ /**
2615
+ * The vector stores usage in bytes.
2616
+ */
2617
+ usage_bytes: number;
2618
+
2619
+ /**
2620
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2621
+ * usage result.
2622
+ */
2623
+ project_id?: string | null;
2624
+ }
2625
+
2626
+ /**
2627
+ * The aggregated code interpreter sessions usage details of the specific time
2628
+ * bucket.
2629
+ */
2630
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
2631
+ /**
2632
+ * The number of code interpreter sessions.
2633
+ */
2634
+ num_sessions: number;
2635
+
2636
+ object: 'organization.usage.code_interpreter_sessions.result';
2637
+
2638
+ /**
2639
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2640
+ * usage result.
2641
+ */
2642
+ project_id?: string | null;
2643
+ }
2644
+
2645
+ /**
2646
+ * The aggregated costs details of the specific time bucket.
2647
+ */
2648
+ export interface OrganizationCostsResult {
2649
+ object: 'organization.costs.result';
2650
+
2651
+ /**
2652
+ * The monetary value in its associated currency.
2653
+ */
2654
+ amount?: OrganizationCostsResult.Amount;
2655
+
2656
+ /**
2657
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
2658
+ * costs result.
2659
+ */
2660
+ api_key_id?: string | null;
2661
+
2662
+ /**
2663
+ * When `group_by=line_item`, this field provides the line item of the grouped
2664
+ * costs result.
2665
+ */
2666
+ line_item?: string | null;
2667
+
2668
+ /**
2669
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2670
+ * costs result.
2671
+ */
2672
+ project_id?: string | null;
2673
+
2674
+ /**
2675
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
2676
+ * result.
2677
+ */
2678
+ quantity?: number | null;
2679
+ }
2680
+
2681
+ export namespace OrganizationCostsResult {
2682
+ /**
2683
+ * The monetary value in its associated currency.
2684
+ */
2685
+ export interface Amount {
2686
+ /**
2687
+ * Lowercase ISO-4217 currency e.g. "usd"
2688
+ */
2689
+ currency?: string;
2690
+
2691
+ /**
2692
+ * The numeric value of the cost.
2693
+ */
2694
+ value?: number;
2695
+ }
2696
+ }
2697
+ }
2698
+ }
2699
+
2700
+ export interface UsageImagesResponse {
2701
+ data: Array<UsageImagesResponse.Data>;
2702
+
2703
+ has_more: boolean;
2704
+
2705
+ next_page: string | null;
2706
+
2707
+ object: 'page';
2708
+ }
2709
+
2710
+ export namespace UsageImagesResponse {
2711
+ export interface Data {
2712
+ end_time: number;
2713
+
2714
+ object: 'bucket';
2715
+
2716
+ results: Array<
2717
+ | Data.OrganizationUsageCompletionsResult
2718
+ | Data.OrganizationUsageEmbeddingsResult
2719
+ | Data.OrganizationUsageModerationsResult
2720
+ | Data.OrganizationUsageImagesResult
2721
+ | Data.OrganizationUsageAudioSpeechesResult
2722
+ | Data.OrganizationUsageAudioTranscriptionsResult
2723
+ | Data.OrganizationUsageVectorStoresResult
2724
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
2725
+ | Data.OrganizationCostsResult
2726
+ >;
2727
+
2728
+ start_time: number;
2729
+ }
2730
+
2731
+ export namespace Data {
2732
+ /**
2733
+ * The aggregated completions usage details of the specific time bucket.
2734
+ */
2735
+ export interface OrganizationUsageCompletionsResult {
2736
+ /**
2737
+ * The aggregated number of text input tokens used, including cached tokens. For
2738
+ * customers subscribe to scale tier, this includes scale tier tokens.
2739
+ */
2740
+ input_tokens: number;
2741
+
2742
+ /**
2743
+ * The count of requests made to the model.
2744
+ */
2745
+ num_model_requests: number;
2746
+
2747
+ object: 'organization.usage.completions.result';
2748
+
2749
+ /**
2750
+ * The aggregated number of text output tokens used. For customers subscribe to
2751
+ * scale tier, this includes scale tier tokens.
2752
+ */
2753
+ output_tokens: number;
2754
+
2755
+ /**
2756
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2757
+ * usage result.
2758
+ */
2759
+ api_key_id?: string | null;
2760
+
2761
+ /**
2762
+ * When `group_by=batch`, this field tells whether the grouped usage result is
2763
+ * batch or not.
2764
+ */
2765
+ batch?: boolean | null;
2766
+
2767
+ /**
2768
+ * The aggregated number of audio input tokens used, including cached tokens.
2769
+ */
2770
+ input_audio_tokens?: number;
2771
+
2772
+ /**
2773
+ * The aggregated number of text input tokens that has been cached from previous
2774
+ * requests. For customers subscribe to scale tier, this includes scale tier
2775
+ * tokens.
2776
+ */
2777
+ input_cached_tokens?: number;
2778
+
2779
+ /**
2780
+ * When `group_by=model`, this field provides the model name of the grouped usage
2781
+ * result.
2782
+ */
2783
+ model?: string | null;
2784
+
2785
+ /**
2786
+ * The aggregated number of audio output tokens used.
2787
+ */
2788
+ output_audio_tokens?: number;
2789
+
2790
+ /**
2791
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2792
+ * usage result.
2793
+ */
2794
+ project_id?: string | null;
2795
+
2796
+ /**
2797
+ * When `group_by=service_tier`, this field provides the service tier of the
2798
+ * grouped usage result.
2799
+ */
2800
+ service_tier?: string | null;
2801
+
2802
+ /**
2803
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2804
+ * result.
2805
+ */
2806
+ user_id?: string | null;
2807
+ }
2808
+
2809
+ /**
2810
+ * The aggregated embeddings usage details of the specific time bucket.
2811
+ */
2812
+ export interface OrganizationUsageEmbeddingsResult {
2813
+ /**
2814
+ * The aggregated number of input tokens used.
2815
+ */
2816
+ input_tokens: number;
2817
+
2818
+ /**
2819
+ * The count of requests made to the model.
2820
+ */
2821
+ num_model_requests: number;
2822
+
2823
+ object: 'organization.usage.embeddings.result';
2824
+
2825
+ /**
2826
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2827
+ * usage result.
2828
+ */
2829
+ api_key_id?: string | null;
2830
+
2831
+ /**
2832
+ * When `group_by=model`, this field provides the model name of the grouped usage
2833
+ * result.
2834
+ */
2835
+ model?: string | null;
2836
+
2837
+ /**
2838
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2839
+ * usage result.
2840
+ */
2841
+ project_id?: string | null;
2842
+
2843
+ /**
2844
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2845
+ * result.
2846
+ */
2847
+ user_id?: string | null;
2848
+ }
2849
+
2850
+ /**
2851
+ * The aggregated moderations usage details of the specific time bucket.
2852
+ */
2853
+ export interface OrganizationUsageModerationsResult {
2854
+ /**
2855
+ * The aggregated number of input tokens used.
2856
+ */
2857
+ input_tokens: number;
2858
+
2859
+ /**
2860
+ * The count of requests made to the model.
2861
+ */
2862
+ num_model_requests: number;
2863
+
2864
+ object: 'organization.usage.moderations.result';
2865
+
2866
+ /**
2867
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2868
+ * usage result.
2869
+ */
2870
+ api_key_id?: string | null;
2871
+
2872
+ /**
2873
+ * When `group_by=model`, this field provides the model name of the grouped usage
2874
+ * result.
2875
+ */
2876
+ model?: string | null;
2877
+
2878
+ /**
2879
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2880
+ * usage result.
2881
+ */
2882
+ project_id?: string | null;
2883
+
2884
+ /**
2885
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2886
+ * result.
2887
+ */
2888
+ user_id?: string | null;
2889
+ }
2890
+
2891
+ /**
2892
+ * The aggregated images usage details of the specific time bucket.
2893
+ */
2894
+ export interface OrganizationUsageImagesResult {
2895
+ /**
2896
+ * The number of images processed.
2897
+ */
2898
+ images: number;
2899
+
2900
+ /**
2901
+ * The count of requests made to the model.
2902
+ */
2903
+ num_model_requests: number;
2904
+
2905
+ object: 'organization.usage.images.result';
2906
+
2907
+ /**
2908
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2909
+ * usage result.
2910
+ */
2911
+ api_key_id?: string | null;
2912
+
2913
+ /**
2914
+ * When `group_by=model`, this field provides the model name of the grouped usage
2915
+ * result.
2916
+ */
2917
+ model?: string | null;
2918
+
2919
+ /**
2920
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2921
+ * usage result.
2922
+ */
2923
+ project_id?: string | null;
2924
+
2925
+ /**
2926
+ * When `group_by=size`, this field provides the image size of the grouped usage
2927
+ * result.
2928
+ */
2929
+ size?: string | null;
2930
+
2931
+ /**
2932
+ * When `group_by=source`, this field provides the source of the grouped usage
2933
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
2934
+ */
2935
+ source?: string | null;
2936
+
2937
+ /**
2938
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2939
+ * result.
2940
+ */
2941
+ user_id?: string | null;
2942
+ }
2943
+
2944
+ /**
2945
+ * The aggregated audio speeches usage details of the specific time bucket.
2946
+ */
2947
+ export interface OrganizationUsageAudioSpeechesResult {
2948
+ /**
2949
+ * The number of characters processed.
2950
+ */
2951
+ characters: number;
2952
+
2953
+ /**
2954
+ * The count of requests made to the model.
2955
+ */
2956
+ num_model_requests: number;
2957
+
2958
+ object: 'organization.usage.audio_speeches.result';
2959
+
2960
+ /**
2961
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
2962
+ * usage result.
2963
+ */
2964
+ api_key_id?: string | null;
2965
+
2966
+ /**
2967
+ * When `group_by=model`, this field provides the model name of the grouped usage
2968
+ * result.
2969
+ */
2970
+ model?: string | null;
2971
+
2972
+ /**
2973
+ * When `group_by=project_id`, this field provides the project ID of the grouped
2974
+ * usage result.
2975
+ */
2976
+ project_id?: string | null;
2977
+
2978
+ /**
2979
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
2980
+ * result.
2981
+ */
2982
+ user_id?: string | null;
2983
+ }
2984
+
2985
+ /**
2986
+ * The aggregated audio transcriptions usage details of the specific time bucket.
2987
+ */
2988
+ export interface OrganizationUsageAudioTranscriptionsResult {
2989
+ /**
2990
+ * The count of requests made to the model.
2991
+ */
2992
+ num_model_requests: number;
2993
+
2994
+ object: 'organization.usage.audio_transcriptions.result';
2995
+
2996
+ /**
2997
+ * The number of seconds processed.
2998
+ */
2999
+ seconds: number;
3000
+
3001
+ /**
3002
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3003
+ * usage result.
3004
+ */
3005
+ api_key_id?: string | null;
3006
+
3007
+ /**
3008
+ * When `group_by=model`, this field provides the model name of the grouped usage
3009
+ * result.
3010
+ */
3011
+ model?: string | null;
3012
+
3013
+ /**
3014
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3015
+ * usage result.
3016
+ */
3017
+ project_id?: string | null;
3018
+
3019
+ /**
3020
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3021
+ * result.
3022
+ */
3023
+ user_id?: string | null;
3024
+ }
3025
+
3026
+ /**
3027
+ * The aggregated vector stores usage details of the specific time bucket.
3028
+ */
3029
+ export interface OrganizationUsageVectorStoresResult {
3030
+ object: 'organization.usage.vector_stores.result';
3031
+
3032
+ /**
3033
+ * The vector stores usage in bytes.
3034
+ */
3035
+ usage_bytes: number;
3036
+
3037
+ /**
3038
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3039
+ * usage result.
3040
+ */
3041
+ project_id?: string | null;
3042
+ }
3043
+
3044
+ /**
3045
+ * The aggregated code interpreter sessions usage details of the specific time
3046
+ * bucket.
3047
+ */
3048
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
3049
+ /**
3050
+ * The number of code interpreter sessions.
3051
+ */
3052
+ num_sessions: number;
3053
+
3054
+ object: 'organization.usage.code_interpreter_sessions.result';
3055
+
3056
+ /**
3057
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3058
+ * usage result.
3059
+ */
3060
+ project_id?: string | null;
3061
+ }
3062
+
3063
+ /**
3064
+ * The aggregated costs details of the specific time bucket.
3065
+ */
3066
+ export interface OrganizationCostsResult {
3067
+ object: 'organization.costs.result';
3068
+
3069
+ /**
3070
+ * The monetary value in its associated currency.
3071
+ */
3072
+ amount?: OrganizationCostsResult.Amount;
3073
+
3074
+ /**
3075
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
3076
+ * costs result.
3077
+ */
3078
+ api_key_id?: string | null;
3079
+
3080
+ /**
3081
+ * When `group_by=line_item`, this field provides the line item of the grouped
3082
+ * costs result.
3083
+ */
3084
+ line_item?: string | null;
3085
+
3086
+ /**
3087
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3088
+ * costs result.
3089
+ */
3090
+ project_id?: string | null;
3091
+
3092
+ /**
3093
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
3094
+ * result.
3095
+ */
3096
+ quantity?: number | null;
3097
+ }
3098
+
3099
+ export namespace OrganizationCostsResult {
3100
+ /**
3101
+ * The monetary value in its associated currency.
3102
+ */
3103
+ export interface Amount {
3104
+ /**
3105
+ * Lowercase ISO-4217 currency e.g. "usd"
3106
+ */
3107
+ currency?: string;
3108
+
3109
+ /**
3110
+ * The numeric value of the cost.
3111
+ */
3112
+ value?: number;
3113
+ }
3114
+ }
3115
+ }
3116
+ }
3117
+
3118
+ export interface UsageModerationsResponse {
3119
+ data: Array<UsageModerationsResponse.Data>;
3120
+
3121
+ has_more: boolean;
3122
+
3123
+ next_page: string | null;
3124
+
3125
+ object: 'page';
3126
+ }
3127
+
3128
+ export namespace UsageModerationsResponse {
3129
+ export interface Data {
3130
+ end_time: number;
3131
+
3132
+ object: 'bucket';
3133
+
3134
+ results: Array<
3135
+ | Data.OrganizationUsageCompletionsResult
3136
+ | Data.OrganizationUsageEmbeddingsResult
3137
+ | Data.OrganizationUsageModerationsResult
3138
+ | Data.OrganizationUsageImagesResult
3139
+ | Data.OrganizationUsageAudioSpeechesResult
3140
+ | Data.OrganizationUsageAudioTranscriptionsResult
3141
+ | Data.OrganizationUsageVectorStoresResult
3142
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
3143
+ | Data.OrganizationCostsResult
3144
+ >;
3145
+
3146
+ start_time: number;
3147
+ }
3148
+
3149
+ export namespace Data {
3150
+ /**
3151
+ * The aggregated completions usage details of the specific time bucket.
3152
+ */
3153
+ export interface OrganizationUsageCompletionsResult {
3154
+ /**
3155
+ * The aggregated number of text input tokens used, including cached tokens. For
3156
+ * customers subscribe to scale tier, this includes scale tier tokens.
3157
+ */
3158
+ input_tokens: number;
3159
+
3160
+ /**
3161
+ * The count of requests made to the model.
3162
+ */
3163
+ num_model_requests: number;
3164
+
3165
+ object: 'organization.usage.completions.result';
3166
+
3167
+ /**
3168
+ * The aggregated number of text output tokens used. For customers subscribe to
3169
+ * scale tier, this includes scale tier tokens.
3170
+ */
3171
+ output_tokens: number;
3172
+
3173
+ /**
3174
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3175
+ * usage result.
3176
+ */
3177
+ api_key_id?: string | null;
3178
+
3179
+ /**
3180
+ * When `group_by=batch`, this field tells whether the grouped usage result is
3181
+ * batch or not.
3182
+ */
3183
+ batch?: boolean | null;
3184
+
3185
+ /**
3186
+ * The aggregated number of audio input tokens used, including cached tokens.
3187
+ */
3188
+ input_audio_tokens?: number;
3189
+
3190
+ /**
3191
+ * The aggregated number of text input tokens that has been cached from previous
3192
+ * requests. For customers subscribe to scale tier, this includes scale tier
3193
+ * tokens.
3194
+ */
3195
+ input_cached_tokens?: number;
3196
+
3197
+ /**
3198
+ * When `group_by=model`, this field provides the model name of the grouped usage
3199
+ * result.
3200
+ */
3201
+ model?: string | null;
3202
+
3203
+ /**
3204
+ * The aggregated number of audio output tokens used.
3205
+ */
3206
+ output_audio_tokens?: number;
3207
+
3208
+ /**
3209
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3210
+ * usage result.
3211
+ */
3212
+ project_id?: string | null;
3213
+
3214
+ /**
3215
+ * When `group_by=service_tier`, this field provides the service tier of the
3216
+ * grouped usage result.
3217
+ */
3218
+ service_tier?: string | null;
3219
+
3220
+ /**
3221
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3222
+ * result.
3223
+ */
3224
+ user_id?: string | null;
3225
+ }
3226
+
3227
+ /**
3228
+ * The aggregated embeddings usage details of the specific time bucket.
3229
+ */
3230
+ export interface OrganizationUsageEmbeddingsResult {
3231
+ /**
3232
+ * The aggregated number of input tokens used.
3233
+ */
3234
+ input_tokens: number;
3235
+
3236
+ /**
3237
+ * The count of requests made to the model.
3238
+ */
3239
+ num_model_requests: number;
3240
+
3241
+ object: 'organization.usage.embeddings.result';
3242
+
3243
+ /**
3244
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3245
+ * usage result.
3246
+ */
3247
+ api_key_id?: string | null;
3248
+
3249
+ /**
3250
+ * When `group_by=model`, this field provides the model name of the grouped usage
3251
+ * result.
3252
+ */
3253
+ model?: string | null;
3254
+
3255
+ /**
3256
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3257
+ * usage result.
3258
+ */
3259
+ project_id?: string | null;
3260
+
3261
+ /**
3262
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3263
+ * result.
3264
+ */
3265
+ user_id?: string | null;
3266
+ }
3267
+
3268
+ /**
3269
+ * The aggregated moderations usage details of the specific time bucket.
3270
+ */
3271
+ export interface OrganizationUsageModerationsResult {
3272
+ /**
3273
+ * The aggregated number of input tokens used.
3274
+ */
3275
+ input_tokens: number;
3276
+
3277
+ /**
3278
+ * The count of requests made to the model.
3279
+ */
3280
+ num_model_requests: number;
3281
+
3282
+ object: 'organization.usage.moderations.result';
3283
+
3284
+ /**
3285
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3286
+ * usage result.
3287
+ */
3288
+ api_key_id?: string | null;
3289
+
3290
+ /**
3291
+ * When `group_by=model`, this field provides the model name of the grouped usage
3292
+ * result.
3293
+ */
3294
+ model?: string | null;
3295
+
3296
+ /**
3297
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3298
+ * usage result.
3299
+ */
3300
+ project_id?: string | null;
3301
+
3302
+ /**
3303
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3304
+ * result.
3305
+ */
3306
+ user_id?: string | null;
3307
+ }
3308
+
3309
+ /**
3310
+ * The aggregated images usage details of the specific time bucket.
3311
+ */
3312
+ export interface OrganizationUsageImagesResult {
3313
+ /**
3314
+ * The number of images processed.
3315
+ */
3316
+ images: number;
3317
+
3318
+ /**
3319
+ * The count of requests made to the model.
3320
+ */
3321
+ num_model_requests: number;
3322
+
3323
+ object: 'organization.usage.images.result';
3324
+
3325
+ /**
3326
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3327
+ * usage result.
3328
+ */
3329
+ api_key_id?: string | null;
3330
+
3331
+ /**
3332
+ * When `group_by=model`, this field provides the model name of the grouped usage
3333
+ * result.
3334
+ */
3335
+ model?: string | null;
3336
+
3337
+ /**
3338
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3339
+ * usage result.
3340
+ */
3341
+ project_id?: string | null;
3342
+
3343
+ /**
3344
+ * When `group_by=size`, this field provides the image size of the grouped usage
3345
+ * result.
3346
+ */
3347
+ size?: string | null;
3348
+
3349
+ /**
3350
+ * When `group_by=source`, this field provides the source of the grouped usage
3351
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
3352
+ */
3353
+ source?: string | null;
3354
+
3355
+ /**
3356
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3357
+ * result.
3358
+ */
3359
+ user_id?: string | null;
3360
+ }
3361
+
3362
+ /**
3363
+ * The aggregated audio speeches usage details of the specific time bucket.
3364
+ */
3365
+ export interface OrganizationUsageAudioSpeechesResult {
3366
+ /**
3367
+ * The number of characters processed.
3368
+ */
3369
+ characters: number;
3370
+
3371
+ /**
3372
+ * The count of requests made to the model.
3373
+ */
3374
+ num_model_requests: number;
3375
+
3376
+ object: 'organization.usage.audio_speeches.result';
3377
+
3378
+ /**
3379
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3380
+ * usage result.
3381
+ */
3382
+ api_key_id?: string | null;
3383
+
3384
+ /**
3385
+ * When `group_by=model`, this field provides the model name of the grouped usage
3386
+ * result.
3387
+ */
3388
+ model?: string | null;
3389
+
3390
+ /**
3391
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3392
+ * usage result.
3393
+ */
3394
+ project_id?: string | null;
3395
+
3396
+ /**
3397
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3398
+ * result.
3399
+ */
3400
+ user_id?: string | null;
3401
+ }
3402
+
3403
+ /**
3404
+ * The aggregated audio transcriptions usage details of the specific time bucket.
3405
+ */
3406
+ export interface OrganizationUsageAudioTranscriptionsResult {
3407
+ /**
3408
+ * The count of requests made to the model.
3409
+ */
3410
+ num_model_requests: number;
3411
+
3412
+ object: 'organization.usage.audio_transcriptions.result';
3413
+
3414
+ /**
3415
+ * The number of seconds processed.
3416
+ */
3417
+ seconds: number;
3418
+
3419
+ /**
3420
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3421
+ * usage result.
3422
+ */
3423
+ api_key_id?: string | null;
3424
+
3425
+ /**
3426
+ * When `group_by=model`, this field provides the model name of the grouped usage
3427
+ * result.
3428
+ */
3429
+ model?: string | null;
3430
+
3431
+ /**
3432
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3433
+ * usage result.
3434
+ */
3435
+ project_id?: string | null;
3436
+
3437
+ /**
3438
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3439
+ * result.
3440
+ */
3441
+ user_id?: string | null;
3442
+ }
3443
+
3444
+ /**
3445
+ * The aggregated vector stores usage details of the specific time bucket.
3446
+ */
3447
+ export interface OrganizationUsageVectorStoresResult {
3448
+ object: 'organization.usage.vector_stores.result';
3449
+
3450
+ /**
3451
+ * The vector stores usage in bytes.
3452
+ */
3453
+ usage_bytes: number;
3454
+
3455
+ /**
3456
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3457
+ * usage result.
3458
+ */
3459
+ project_id?: string | null;
3460
+ }
3461
+
3462
+ /**
3463
+ * The aggregated code interpreter sessions usage details of the specific time
3464
+ * bucket.
3465
+ */
3466
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
3467
+ /**
3468
+ * The number of code interpreter sessions.
3469
+ */
3470
+ num_sessions: number;
3471
+
3472
+ object: 'organization.usage.code_interpreter_sessions.result';
3473
+
3474
+ /**
3475
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3476
+ * usage result.
3477
+ */
3478
+ project_id?: string | null;
3479
+ }
3480
+
3481
+ /**
3482
+ * The aggregated costs details of the specific time bucket.
3483
+ */
3484
+ export interface OrganizationCostsResult {
3485
+ object: 'organization.costs.result';
3486
+
3487
+ /**
3488
+ * The monetary value in its associated currency.
3489
+ */
3490
+ amount?: OrganizationCostsResult.Amount;
3491
+
3492
+ /**
3493
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
3494
+ * costs result.
3495
+ */
3496
+ api_key_id?: string | null;
3497
+
3498
+ /**
3499
+ * When `group_by=line_item`, this field provides the line item of the grouped
3500
+ * costs result.
3501
+ */
3502
+ line_item?: string | null;
3503
+
3504
+ /**
3505
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3506
+ * costs result.
3507
+ */
3508
+ project_id?: string | null;
3509
+
3510
+ /**
3511
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
3512
+ * result.
3513
+ */
3514
+ quantity?: number | null;
3515
+ }
3516
+
3517
+ export namespace OrganizationCostsResult {
3518
+ /**
3519
+ * The monetary value in its associated currency.
3520
+ */
3521
+ export interface Amount {
3522
+ /**
3523
+ * Lowercase ISO-4217 currency e.g. "usd"
3524
+ */
3525
+ currency?: string;
3526
+
3527
+ /**
3528
+ * The numeric value of the cost.
3529
+ */
3530
+ value?: number;
3531
+ }
3532
+ }
3533
+ }
3534
+ }
3535
+
3536
+ export interface UsageVectorStoresResponse {
3537
+ data: Array<UsageVectorStoresResponse.Data>;
3538
+
3539
+ has_more: boolean;
3540
+
3541
+ next_page: string | null;
3542
+
3543
+ object: 'page';
3544
+ }
3545
+
3546
+ export namespace UsageVectorStoresResponse {
3547
+ export interface Data {
3548
+ end_time: number;
3549
+
3550
+ object: 'bucket';
3551
+
3552
+ results: Array<
3553
+ | Data.OrganizationUsageCompletionsResult
3554
+ | Data.OrganizationUsageEmbeddingsResult
3555
+ | Data.OrganizationUsageModerationsResult
3556
+ | Data.OrganizationUsageImagesResult
3557
+ | Data.OrganizationUsageAudioSpeechesResult
3558
+ | Data.OrganizationUsageAudioTranscriptionsResult
3559
+ | Data.OrganizationUsageVectorStoresResult
3560
+ | Data.OrganizationUsageCodeInterpreterSessionsResult
3561
+ | Data.OrganizationCostsResult
3562
+ >;
3563
+
3564
+ start_time: number;
3565
+ }
3566
+
3567
+ export namespace Data {
3568
+ /**
3569
+ * The aggregated completions usage details of the specific time bucket.
3570
+ */
3571
+ export interface OrganizationUsageCompletionsResult {
3572
+ /**
3573
+ * The aggregated number of text input tokens used, including cached tokens. For
3574
+ * customers subscribe to scale tier, this includes scale tier tokens.
3575
+ */
3576
+ input_tokens: number;
3577
+
3578
+ /**
3579
+ * The count of requests made to the model.
3580
+ */
3581
+ num_model_requests: number;
3582
+
3583
+ object: 'organization.usage.completions.result';
3584
+
3585
+ /**
3586
+ * The aggregated number of text output tokens used. For customers subscribe to
3587
+ * scale tier, this includes scale tier tokens.
3588
+ */
3589
+ output_tokens: number;
3590
+
3591
+ /**
3592
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3593
+ * usage result.
3594
+ */
3595
+ api_key_id?: string | null;
3596
+
3597
+ /**
3598
+ * When `group_by=batch`, this field tells whether the grouped usage result is
3599
+ * batch or not.
3600
+ */
3601
+ batch?: boolean | null;
3602
+
3603
+ /**
3604
+ * The aggregated number of audio input tokens used, including cached tokens.
3605
+ */
3606
+ input_audio_tokens?: number;
3607
+
3608
+ /**
3609
+ * The aggregated number of text input tokens that has been cached from previous
3610
+ * requests. For customers subscribe to scale tier, this includes scale tier
3611
+ * tokens.
3612
+ */
3613
+ input_cached_tokens?: number;
3614
+
3615
+ /**
3616
+ * When `group_by=model`, this field provides the model name of the grouped usage
3617
+ * result.
3618
+ */
3619
+ model?: string | null;
3620
+
3621
+ /**
3622
+ * The aggregated number of audio output tokens used.
3623
+ */
3624
+ output_audio_tokens?: number;
3625
+
3626
+ /**
3627
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3628
+ * usage result.
3629
+ */
3630
+ project_id?: string | null;
3631
+
3632
+ /**
3633
+ * When `group_by=service_tier`, this field provides the service tier of the
3634
+ * grouped usage result.
3635
+ */
3636
+ service_tier?: string | null;
3637
+
3638
+ /**
3639
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3640
+ * result.
3641
+ */
3642
+ user_id?: string | null;
3643
+ }
3644
+
3645
+ /**
3646
+ * The aggregated embeddings usage details of the specific time bucket.
3647
+ */
3648
+ export interface OrganizationUsageEmbeddingsResult {
3649
+ /**
3650
+ * The aggregated number of input tokens used.
3651
+ */
3652
+ input_tokens: number;
3653
+
3654
+ /**
3655
+ * The count of requests made to the model.
3656
+ */
3657
+ num_model_requests: number;
3658
+
3659
+ object: 'organization.usage.embeddings.result';
3660
+
3661
+ /**
3662
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3663
+ * usage result.
3664
+ */
3665
+ api_key_id?: string | null;
3666
+
3667
+ /**
3668
+ * When `group_by=model`, this field provides the model name of the grouped usage
3669
+ * result.
3670
+ */
3671
+ model?: string | null;
3672
+
3673
+ /**
3674
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3675
+ * usage result.
3676
+ */
3677
+ project_id?: string | null;
3678
+
3679
+ /**
3680
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3681
+ * result.
3682
+ */
3683
+ user_id?: string | null;
3684
+ }
3685
+
3686
+ /**
3687
+ * The aggregated moderations usage details of the specific time bucket.
3688
+ */
3689
+ export interface OrganizationUsageModerationsResult {
3690
+ /**
3691
+ * The aggregated number of input tokens used.
3692
+ */
3693
+ input_tokens: number;
3694
+
3695
+ /**
3696
+ * The count of requests made to the model.
3697
+ */
3698
+ num_model_requests: number;
3699
+
3700
+ object: 'organization.usage.moderations.result';
3701
+
3702
+ /**
3703
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3704
+ * usage result.
3705
+ */
3706
+ api_key_id?: string | null;
3707
+
3708
+ /**
3709
+ * When `group_by=model`, this field provides the model name of the grouped usage
3710
+ * result.
3711
+ */
3712
+ model?: string | null;
3713
+
3714
+ /**
3715
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3716
+ * usage result.
3717
+ */
3718
+ project_id?: string | null;
3719
+
3720
+ /**
3721
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3722
+ * result.
3723
+ */
3724
+ user_id?: string | null;
3725
+ }
3726
+
3727
+ /**
3728
+ * The aggregated images usage details of the specific time bucket.
3729
+ */
3730
+ export interface OrganizationUsageImagesResult {
3731
+ /**
3732
+ * The number of images processed.
3733
+ */
3734
+ images: number;
3735
+
3736
+ /**
3737
+ * The count of requests made to the model.
3738
+ */
3739
+ num_model_requests: number;
3740
+
3741
+ object: 'organization.usage.images.result';
3742
+
3743
+ /**
3744
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3745
+ * usage result.
3746
+ */
3747
+ api_key_id?: string | null;
3748
+
3749
+ /**
3750
+ * When `group_by=model`, this field provides the model name of the grouped usage
3751
+ * result.
3752
+ */
3753
+ model?: string | null;
3754
+
3755
+ /**
3756
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3757
+ * usage result.
3758
+ */
3759
+ project_id?: string | null;
3760
+
3761
+ /**
3762
+ * When `group_by=size`, this field provides the image size of the grouped usage
3763
+ * result.
3764
+ */
3765
+ size?: string | null;
3766
+
3767
+ /**
3768
+ * When `group_by=source`, this field provides the source of the grouped usage
3769
+ * result, possible values are `image.generation`, `image.edit`, `image.variation`.
3770
+ */
3771
+ source?: string | null;
3772
+
3773
+ /**
3774
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3775
+ * result.
3776
+ */
3777
+ user_id?: string | null;
3778
+ }
3779
+
3780
+ /**
3781
+ * The aggregated audio speeches usage details of the specific time bucket.
3782
+ */
3783
+ export interface OrganizationUsageAudioSpeechesResult {
3784
+ /**
3785
+ * The number of characters processed.
3786
+ */
3787
+ characters: number;
3788
+
3789
+ /**
3790
+ * The count of requests made to the model.
3791
+ */
3792
+ num_model_requests: number;
3793
+
3794
+ object: 'organization.usage.audio_speeches.result';
3795
+
3796
+ /**
3797
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3798
+ * usage result.
3799
+ */
3800
+ api_key_id?: string | null;
3801
+
3802
+ /**
3803
+ * When `group_by=model`, this field provides the model name of the grouped usage
3804
+ * result.
3805
+ */
3806
+ model?: string | null;
3807
+
3808
+ /**
3809
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3810
+ * usage result.
3811
+ */
3812
+ project_id?: string | null;
3813
+
3814
+ /**
3815
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3816
+ * result.
3817
+ */
3818
+ user_id?: string | null;
3819
+ }
3820
+
3821
+ /**
3822
+ * The aggregated audio transcriptions usage details of the specific time bucket.
3823
+ */
3824
+ export interface OrganizationUsageAudioTranscriptionsResult {
3825
+ /**
3826
+ * The count of requests made to the model.
3827
+ */
3828
+ num_model_requests: number;
3829
+
3830
+ object: 'organization.usage.audio_transcriptions.result';
3831
+
3832
+ /**
3833
+ * The number of seconds processed.
3834
+ */
3835
+ seconds: number;
3836
+
3837
+ /**
3838
+ * When `group_by=api_key_id`, this field provides the API key ID of the grouped
3839
+ * usage result.
3840
+ */
3841
+ api_key_id?: string | null;
3842
+
3843
+ /**
3844
+ * When `group_by=model`, this field provides the model name of the grouped usage
3845
+ * result.
3846
+ */
3847
+ model?: string | null;
3848
+
3849
+ /**
3850
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3851
+ * usage result.
3852
+ */
3853
+ project_id?: string | null;
3854
+
3855
+ /**
3856
+ * When `group_by=user_id`, this field provides the user ID of the grouped usage
3857
+ * result.
3858
+ */
3859
+ user_id?: string | null;
3860
+ }
3861
+
3862
+ /**
3863
+ * The aggregated vector stores usage details of the specific time bucket.
3864
+ */
3865
+ export interface OrganizationUsageVectorStoresResult {
3866
+ object: 'organization.usage.vector_stores.result';
3867
+
3868
+ /**
3869
+ * The vector stores usage in bytes.
3870
+ */
3871
+ usage_bytes: number;
3872
+
3873
+ /**
3874
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3875
+ * usage result.
3876
+ */
3877
+ project_id?: string | null;
3878
+ }
3879
+
3880
+ /**
3881
+ * The aggregated code interpreter sessions usage details of the specific time
3882
+ * bucket.
3883
+ */
3884
+ export interface OrganizationUsageCodeInterpreterSessionsResult {
3885
+ /**
3886
+ * The number of code interpreter sessions.
3887
+ */
3888
+ num_sessions: number;
3889
+
3890
+ object: 'organization.usage.code_interpreter_sessions.result';
3891
+
3892
+ /**
3893
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3894
+ * usage result.
3895
+ */
3896
+ project_id?: string | null;
3897
+ }
3898
+
3899
+ /**
3900
+ * The aggregated costs details of the specific time bucket.
3901
+ */
3902
+ export interface OrganizationCostsResult {
3903
+ object: 'organization.costs.result';
3904
+
3905
+ /**
3906
+ * The monetary value in its associated currency.
3907
+ */
3908
+ amount?: OrganizationCostsResult.Amount;
3909
+
3910
+ /**
3911
+ * When `group_by=api_key_id`, this field provides the API Key ID of the grouped
3912
+ * costs result.
3913
+ */
3914
+ api_key_id?: string | null;
3915
+
3916
+ /**
3917
+ * When `group_by=line_item`, this field provides the line item of the grouped
3918
+ * costs result.
3919
+ */
3920
+ line_item?: string | null;
3921
+
3922
+ /**
3923
+ * When `group_by=project_id`, this field provides the project ID of the grouped
3924
+ * costs result.
3925
+ */
3926
+ project_id?: string | null;
3927
+
3928
+ /**
3929
+ * When `group_by=line_item`, this field provides the quantity of the grouped costs
3930
+ * result.
3931
+ */
3932
+ quantity?: number | null;
3933
+ }
3934
+
3935
+ export namespace OrganizationCostsResult {
3936
+ /**
3937
+ * The monetary value in its associated currency.
3938
+ */
3939
+ export interface Amount {
3940
+ /**
3941
+ * Lowercase ISO-4217 currency e.g. "usd"
3942
+ */
3943
+ currency?: string;
3944
+
3945
+ /**
3946
+ * The numeric value of the cost.
3947
+ */
3948
+ value?: number;
3949
+ }
3950
+ }
3951
+ }
3952
+ }
3953
+
3954
+ export interface UsageAudioSpeechesParams {
3955
+ /**
3956
+ * Start time (Unix seconds) of the query time range, inclusive.
3957
+ */
3958
+ start_time: number;
3959
+
3960
+ /**
3961
+ * Return only usage for these API keys.
3962
+ */
3963
+ api_key_ids?: Array<string>;
3964
+
3965
+ /**
3966
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
3967
+ * supported, default to `1d`.
3968
+ */
3969
+ bucket_width?: '1m' | '1h' | '1d';
3970
+
3971
+ /**
3972
+ * End time (Unix seconds) of the query time range, exclusive.
3973
+ */
3974
+ end_time?: number;
3975
+
3976
+ /**
3977
+ * Group the usage data by the specified fields. Support fields include
3978
+ * `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.
3979
+ */
3980
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;
3981
+
3982
+ /**
3983
+ * Specifies the number of buckets to return.
3984
+ *
3985
+ * - `bucket_width=1d`: default: 7, max: 31
3986
+ * - `bucket_width=1h`: default: 24, max: 168
3987
+ * - `bucket_width=1m`: default: 60, max: 1440
3988
+ */
3989
+ limit?: number;
3990
+
3991
+ /**
3992
+ * Return only usage for these models.
3993
+ */
3994
+ models?: Array<string>;
3995
+
3996
+ /**
3997
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
3998
+ * previous response.
3999
+ */
4000
+ page?: string;
4001
+
4002
+ /**
4003
+ * Return only usage for these projects.
4004
+ */
4005
+ project_ids?: Array<string>;
4006
+
4007
+ /**
4008
+ * Return only usage for these users.
4009
+ */
4010
+ user_ids?: Array<string>;
4011
+ }
4012
+
4013
+ export interface UsageAudioTranscriptionsParams {
4014
+ /**
4015
+ * Start time (Unix seconds) of the query time range, inclusive.
4016
+ */
4017
+ start_time: number;
4018
+
4019
+ /**
4020
+ * Return only usage for these API keys.
4021
+ */
4022
+ api_key_ids?: Array<string>;
4023
+
4024
+ /**
4025
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4026
+ * supported, default to `1d`.
4027
+ */
4028
+ bucket_width?: '1m' | '1h' | '1d';
4029
+
4030
+ /**
4031
+ * End time (Unix seconds) of the query time range, exclusive.
4032
+ */
4033
+ end_time?: number;
4034
+
4035
+ /**
4036
+ * Group the usage data by the specified fields. Support fields include
4037
+ * `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.
4038
+ */
4039
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;
4040
+
4041
+ /**
4042
+ * Specifies the number of buckets to return.
4043
+ *
4044
+ * - `bucket_width=1d`: default: 7, max: 31
4045
+ * - `bucket_width=1h`: default: 24, max: 168
4046
+ * - `bucket_width=1m`: default: 60, max: 1440
4047
+ */
4048
+ limit?: number;
4049
+
4050
+ /**
4051
+ * Return only usage for these models.
4052
+ */
4053
+ models?: Array<string>;
4054
+
4055
+ /**
4056
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4057
+ * previous response.
4058
+ */
4059
+ page?: string;
4060
+
4061
+ /**
4062
+ * Return only usage for these projects.
4063
+ */
4064
+ project_ids?: Array<string>;
4065
+
4066
+ /**
4067
+ * Return only usage for these users.
4068
+ */
4069
+ user_ids?: Array<string>;
4070
+ }
4071
+
4072
+ export interface UsageCodeInterpreterSessionsParams {
4073
+ /**
4074
+ * Start time (Unix seconds) of the query time range, inclusive.
4075
+ */
4076
+ start_time: number;
4077
+
4078
+ /**
4079
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4080
+ * supported, default to `1d`.
4081
+ */
4082
+ bucket_width?: '1m' | '1h' | '1d';
4083
+
4084
+ /**
4085
+ * End time (Unix seconds) of the query time range, exclusive.
4086
+ */
4087
+ end_time?: number;
4088
+
4089
+ /**
4090
+ * Group the usage data by the specified fields. Support fields include
4091
+ * `project_id`.
4092
+ */
4093
+ group_by?: Array<'project_id'>;
4094
+
4095
+ /**
4096
+ * Specifies the number of buckets to return.
4097
+ *
4098
+ * - `bucket_width=1d`: default: 7, max: 31
4099
+ * - `bucket_width=1h`: default: 24, max: 168
4100
+ * - `bucket_width=1m`: default: 60, max: 1440
4101
+ */
4102
+ limit?: number;
4103
+
4104
+ /**
4105
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4106
+ * previous response.
4107
+ */
4108
+ page?: string;
4109
+
4110
+ /**
4111
+ * Return only usage for these projects.
4112
+ */
4113
+ project_ids?: Array<string>;
4114
+ }
4115
+
4116
+ export interface UsageCompletionsParams {
4117
+ /**
4118
+ * Start time (Unix seconds) of the query time range, inclusive.
4119
+ */
4120
+ start_time: number;
4121
+
4122
+ /**
4123
+ * Return only usage for these API keys.
4124
+ */
4125
+ api_key_ids?: Array<string>;
4126
+
4127
+ /**
4128
+ * If `true`, return batch jobs only. If `false`, return non-batch jobs only. By
4129
+ * default, return both.
4130
+ */
4131
+ batch?: boolean;
4132
+
4133
+ /**
4134
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4135
+ * supported, default to `1d`.
4136
+ */
4137
+ bucket_width?: '1m' | '1h' | '1d';
4138
+
4139
+ /**
4140
+ * End time (Unix seconds) of the query time range, exclusive.
4141
+ */
4142
+ end_time?: number;
4143
+
4144
+ /**
4145
+ * Group the usage data by the specified fields. Support fields include
4146
+ * `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any
4147
+ * combination of them.
4148
+ */
4149
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'batch' | 'service_tier'>;
4150
+
4151
+ /**
4152
+ * Specifies the number of buckets to return.
4153
+ *
4154
+ * - `bucket_width=1d`: default: 7, max: 31
4155
+ * - `bucket_width=1h`: default: 24, max: 168
4156
+ * - `bucket_width=1m`: default: 60, max: 1440
4157
+ */
4158
+ limit?: number;
4159
+
4160
+ /**
4161
+ * Return only usage for these models.
4162
+ */
4163
+ models?: Array<string>;
4164
+
4165
+ /**
4166
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4167
+ * previous response.
4168
+ */
4169
+ page?: string;
4170
+
4171
+ /**
4172
+ * Return only usage for these projects.
4173
+ */
4174
+ project_ids?: Array<string>;
4175
+
4176
+ /**
4177
+ * Return only usage for these users.
4178
+ */
4179
+ user_ids?: Array<string>;
4180
+ }
4181
+
4182
+ export interface UsageCostsParams {
4183
+ /**
4184
+ * Start time (Unix seconds) of the query time range, inclusive.
4185
+ */
4186
+ start_time: number;
4187
+
4188
+ /**
4189
+ * Return only costs for these API keys.
4190
+ */
4191
+ api_key_ids?: Array<string>;
4192
+
4193
+ /**
4194
+ * Width of each time bucket in response. Currently only `1d` is supported, default
4195
+ * to `1d`.
4196
+ */
4197
+ bucket_width?: '1d';
4198
+
4199
+ /**
4200
+ * End time (Unix seconds) of the query time range, exclusive.
4201
+ */
4202
+ end_time?: number;
4203
+
4204
+ /**
4205
+ * Group the costs by the specified fields. Support fields include `project_id`,
4206
+ * `line_item`, `api_key_id` and any combination of them.
4207
+ */
4208
+ group_by?: Array<'project_id' | 'line_item' | 'api_key_id'>;
4209
+
4210
+ /**
4211
+ * A limit on the number of buckets to be returned. Limit can range between 1 and
4212
+ * 180, and the default is 7.
4213
+ */
4214
+ limit?: number;
4215
+
4216
+ /**
4217
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4218
+ * previous response.
4219
+ */
4220
+ page?: string;
4221
+
4222
+ /**
4223
+ * Return only costs for these projects.
4224
+ */
4225
+ project_ids?: Array<string>;
4226
+ }
4227
+
4228
+ export interface UsageEmbeddingsParams {
4229
+ /**
4230
+ * Start time (Unix seconds) of the query time range, inclusive.
4231
+ */
4232
+ start_time: number;
4233
+
4234
+ /**
4235
+ * Return only usage for these API keys.
4236
+ */
4237
+ api_key_ids?: Array<string>;
4238
+
4239
+ /**
4240
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4241
+ * supported, default to `1d`.
4242
+ */
4243
+ bucket_width?: '1m' | '1h' | '1d';
4244
+
4245
+ /**
4246
+ * End time (Unix seconds) of the query time range, exclusive.
4247
+ */
4248
+ end_time?: number;
4249
+
4250
+ /**
4251
+ * Group the usage data by the specified fields. Support fields include
4252
+ * `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.
4253
+ */
4254
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;
4255
+
4256
+ /**
4257
+ * Specifies the number of buckets to return.
4258
+ *
4259
+ * - `bucket_width=1d`: default: 7, max: 31
4260
+ * - `bucket_width=1h`: default: 24, max: 168
4261
+ * - `bucket_width=1m`: default: 60, max: 1440
4262
+ */
4263
+ limit?: number;
4264
+
4265
+ /**
4266
+ * Return only usage for these models.
4267
+ */
4268
+ models?: Array<string>;
4269
+
4270
+ /**
4271
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4272
+ * previous response.
4273
+ */
4274
+ page?: string;
4275
+
4276
+ /**
4277
+ * Return only usage for these projects.
4278
+ */
4279
+ project_ids?: Array<string>;
4280
+
4281
+ /**
4282
+ * Return only usage for these users.
4283
+ */
4284
+ user_ids?: Array<string>;
4285
+ }
4286
+
4287
+ export interface UsageImagesParams {
4288
+ /**
4289
+ * Start time (Unix seconds) of the query time range, inclusive.
4290
+ */
4291
+ start_time: number;
4292
+
4293
+ /**
4294
+ * Return only usage for these API keys.
4295
+ */
4296
+ api_key_ids?: Array<string>;
4297
+
4298
+ /**
4299
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4300
+ * supported, default to `1d`.
4301
+ */
4302
+ bucket_width?: '1m' | '1h' | '1d';
4303
+
4304
+ /**
4305
+ * End time (Unix seconds) of the query time range, exclusive.
4306
+ */
4307
+ end_time?: number;
4308
+
4309
+ /**
4310
+ * Group the usage data by the specified fields. Support fields include
4311
+ * `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any
4312
+ * combination of them.
4313
+ */
4314
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'size' | 'source'>;
4315
+
4316
+ /**
4317
+ * Specifies the number of buckets to return.
4318
+ *
4319
+ * - `bucket_width=1d`: default: 7, max: 31
4320
+ * - `bucket_width=1h`: default: 24, max: 168
4321
+ * - `bucket_width=1m`: default: 60, max: 1440
4322
+ */
4323
+ limit?: number;
4324
+
4325
+ /**
4326
+ * Return only usage for these models.
4327
+ */
4328
+ models?: Array<string>;
4329
+
4330
+ /**
4331
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4332
+ * previous response.
4333
+ */
4334
+ page?: string;
4335
+
4336
+ /**
4337
+ * Return only usage for these projects.
4338
+ */
4339
+ project_ids?: Array<string>;
4340
+
4341
+ /**
4342
+ * Return only usages for these image sizes. Possible values are `256x256`,
4343
+ * `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.
4344
+ */
4345
+ sizes?: Array<'256x256' | '512x512' | '1024x1024' | '1792x1792' | '1024x1792'>;
4346
+
4347
+ /**
4348
+ * Return only usages for these sources. Possible values are `image.generation`,
4349
+ * `image.edit`, `image.variation` or any combination of them.
4350
+ */
4351
+ sources?: Array<'image.generation' | 'image.edit' | 'image.variation'>;
4352
+
4353
+ /**
4354
+ * Return only usage for these users.
4355
+ */
4356
+ user_ids?: Array<string>;
4357
+ }
4358
+
4359
+ export interface UsageModerationsParams {
4360
+ /**
4361
+ * Start time (Unix seconds) of the query time range, inclusive.
4362
+ */
4363
+ start_time: number;
4364
+
4365
+ /**
4366
+ * Return only usage for these API keys.
4367
+ */
4368
+ api_key_ids?: Array<string>;
4369
+
4370
+ /**
4371
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4372
+ * supported, default to `1d`.
4373
+ */
4374
+ bucket_width?: '1m' | '1h' | '1d';
4375
+
4376
+ /**
4377
+ * End time (Unix seconds) of the query time range, exclusive.
4378
+ */
4379
+ end_time?: number;
4380
+
4381
+ /**
4382
+ * Group the usage data by the specified fields. Support fields include
4383
+ * `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.
4384
+ */
4385
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model'>;
4386
+
4387
+ /**
4388
+ * Specifies the number of buckets to return.
4389
+ *
4390
+ * - `bucket_width=1d`: default: 7, max: 31
4391
+ * - `bucket_width=1h`: default: 24, max: 168
4392
+ * - `bucket_width=1m`: default: 60, max: 1440
4393
+ */
4394
+ limit?: number;
4395
+
4396
+ /**
4397
+ * Return only usage for these models.
4398
+ */
4399
+ models?: Array<string>;
4400
+
4401
+ /**
4402
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4403
+ * previous response.
4404
+ */
4405
+ page?: string;
4406
+
4407
+ /**
4408
+ * Return only usage for these projects.
4409
+ */
4410
+ project_ids?: Array<string>;
4411
+
4412
+ /**
4413
+ * Return only usage for these users.
4414
+ */
4415
+ user_ids?: Array<string>;
4416
+ }
4417
+
4418
+ export interface UsageVectorStoresParams {
4419
+ /**
4420
+ * Start time (Unix seconds) of the query time range, inclusive.
4421
+ */
4422
+ start_time: number;
4423
+
4424
+ /**
4425
+ * Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
4426
+ * supported, default to `1d`.
4427
+ */
4428
+ bucket_width?: '1m' | '1h' | '1d';
4429
+
4430
+ /**
4431
+ * End time (Unix seconds) of the query time range, exclusive.
4432
+ */
4433
+ end_time?: number;
4434
+
4435
+ /**
4436
+ * Group the usage data by the specified fields. Support fields include
4437
+ * `project_id`.
4438
+ */
4439
+ group_by?: Array<'project_id'>;
4440
+
4441
+ /**
4442
+ * Specifies the number of buckets to return.
4443
+ *
4444
+ * - `bucket_width=1d`: default: 7, max: 31
4445
+ * - `bucket_width=1h`: default: 24, max: 168
4446
+ * - `bucket_width=1m`: default: 60, max: 1440
4447
+ */
4448
+ limit?: number;
4449
+
4450
+ /**
4451
+ * A cursor for use in pagination. Corresponding to the `next_page` field from the
4452
+ * previous response.
4453
+ */
4454
+ page?: string;
4455
+
4456
+ /**
4457
+ * Return only usage for these projects.
4458
+ */
4459
+ project_ids?: Array<string>;
4460
+ }
4461
+
4462
+ export declare namespace Usage {
4463
+ export {
4464
+ type UsageAudioSpeechesResponse as UsageAudioSpeechesResponse,
4465
+ type UsageAudioTranscriptionsResponse as UsageAudioTranscriptionsResponse,
4466
+ type UsageCodeInterpreterSessionsResponse as UsageCodeInterpreterSessionsResponse,
4467
+ type UsageCompletionsResponse as UsageCompletionsResponse,
4468
+ type UsageCostsResponse as UsageCostsResponse,
4469
+ type UsageEmbeddingsResponse as UsageEmbeddingsResponse,
4470
+ type UsageImagesResponse as UsageImagesResponse,
4471
+ type UsageModerationsResponse as UsageModerationsResponse,
4472
+ type UsageVectorStoresResponse as UsageVectorStoresResponse,
4473
+ type UsageAudioSpeechesParams as UsageAudioSpeechesParams,
4474
+ type UsageAudioTranscriptionsParams as UsageAudioTranscriptionsParams,
4475
+ type UsageCodeInterpreterSessionsParams as UsageCodeInterpreterSessionsParams,
4476
+ type UsageCompletionsParams as UsageCompletionsParams,
4477
+ type UsageCostsParams as UsageCostsParams,
4478
+ type UsageEmbeddingsParams as UsageEmbeddingsParams,
4479
+ type UsageImagesParams as UsageImagesParams,
4480
+ type UsageModerationsParams as UsageModerationsParams,
4481
+ type UsageVectorStoresParams as UsageVectorStoresParams,
4482
+ };
4483
+ }