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