openai-mcp-test 0.0.1

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 (1367) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +487 -0
  3. package/api-promise.d.mts +2 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +2 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +6 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +2 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/bin/cli +46 -0
  12. package/bin/migration-config.json +1043 -0
  13. package/client.d.mts +293 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +293 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +557 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +553 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +50 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +50 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +118 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +102 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/pagination.d.mts +89 -0
  38. package/core/pagination.d.mts.map +1 -0
  39. package/core/pagination.d.ts +89 -0
  40. package/core/pagination.d.ts.map +1 -0
  41. package/core/pagination.js +156 -0
  42. package/core/pagination.js.map +1 -0
  43. package/core/pagination.mjs +148 -0
  44. package/core/pagination.mjs.map +1 -0
  45. package/core/resource.d.mts +6 -0
  46. package/core/resource.d.mts.map +1 -0
  47. package/core/resource.d.ts +6 -0
  48. package/core/resource.d.ts.map +1 -0
  49. package/core/resource.js +11 -0
  50. package/core/resource.js.map +1 -0
  51. package/core/resource.mjs +7 -0
  52. package/core/resource.mjs.map +1 -0
  53. package/core/streaming.d.mts +33 -0
  54. package/core/streaming.d.mts.map +1 -0
  55. package/core/streaming.d.ts +33 -0
  56. package/core/streaming.d.ts.map +1 -0
  57. package/core/streaming.js +277 -0
  58. package/core/streaming.js.map +1 -0
  59. package/core/streaming.mjs +272 -0
  60. package/core/streaming.mjs.map +1 -0
  61. package/core/uploads.d.mts +3 -0
  62. package/core/uploads.d.mts.map +1 -0
  63. package/core/uploads.d.ts +3 -0
  64. package/core/uploads.d.ts.map +1 -0
  65. package/core/uploads.js +6 -0
  66. package/core/uploads.js.map +1 -0
  67. package/core/uploads.mjs +2 -0
  68. package/core/uploads.mjs.map +1 -0
  69. package/error.d.mts +2 -0
  70. package/error.d.mts.map +1 -0
  71. package/error.d.ts +2 -0
  72. package/error.d.ts.map +1 -0
  73. package/error.js +6 -0
  74. package/error.js.map +1 -0
  75. package/error.mjs +2 -0
  76. package/error.mjs.map +1 -0
  77. package/index.d.mts +7 -0
  78. package/index.d.mts.map +1 -0
  79. package/index.d.ts +7 -0
  80. package/index.d.ts.map +1 -0
  81. package/index.js +32 -0
  82. package/index.js.map +1 -0
  83. package/index.mjs +8 -0
  84. package/index.mjs.map +1 -0
  85. package/internal/builtin-types.d.mts +73 -0
  86. package/internal/builtin-types.d.mts.map +1 -0
  87. package/internal/builtin-types.d.ts +73 -0
  88. package/internal/builtin-types.d.ts.map +1 -0
  89. package/internal/builtin-types.js +4 -0
  90. package/internal/builtin-types.js.map +1 -0
  91. package/internal/builtin-types.mjs +3 -0
  92. package/internal/builtin-types.mjs.map +1 -0
  93. package/internal/decoders/line.d.mts +17 -0
  94. package/internal/decoders/line.d.mts.map +1 -0
  95. package/internal/decoders/line.d.ts +17 -0
  96. package/internal/decoders/line.d.ts.map +1 -0
  97. package/internal/decoders/line.js +113 -0
  98. package/internal/decoders/line.js.map +1 -0
  99. package/internal/decoders/line.mjs +108 -0
  100. package/internal/decoders/line.mjs.map +1 -0
  101. package/internal/detect-platform.d.mts +15 -0
  102. package/internal/detect-platform.d.mts.map +1 -0
  103. package/internal/detect-platform.d.ts +15 -0
  104. package/internal/detect-platform.d.ts.map +1 -0
  105. package/internal/detect-platform.js +162 -0
  106. package/internal/detect-platform.js.map +1 -0
  107. package/internal/detect-platform.mjs +157 -0
  108. package/internal/detect-platform.mjs.map +1 -0
  109. package/internal/errors.d.mts +3 -0
  110. package/internal/errors.d.mts.map +1 -0
  111. package/internal/errors.d.ts +3 -0
  112. package/internal/errors.d.ts.map +1 -0
  113. package/internal/errors.js +41 -0
  114. package/internal/errors.js.map +1 -0
  115. package/internal/errors.mjs +36 -0
  116. package/internal/errors.mjs.map +1 -0
  117. package/internal/headers.d.mts +20 -0
  118. package/internal/headers.d.mts.map +1 -0
  119. package/internal/headers.d.ts +20 -0
  120. package/internal/headers.d.ts.map +1 -0
  121. package/internal/headers.js +79 -0
  122. package/internal/headers.js.map +1 -0
  123. package/internal/headers.mjs +74 -0
  124. package/internal/headers.mjs.map +1 -0
  125. package/internal/parse.d.mts +12 -0
  126. package/internal/parse.d.mts.map +1 -0
  127. package/internal/parse.d.ts +12 -0
  128. package/internal/parse.d.ts.map +1 -0
  129. package/internal/parse.js +50 -0
  130. package/internal/parse.js.map +1 -0
  131. package/internal/parse.mjs +47 -0
  132. package/internal/parse.mjs.map +1 -0
  133. package/internal/qs/formats.d.mts +7 -0
  134. package/internal/qs/formats.d.mts.map +1 -0
  135. package/internal/qs/formats.d.ts +7 -0
  136. package/internal/qs/formats.d.ts.map +1 -0
  137. package/internal/qs/formats.js +13 -0
  138. package/internal/qs/formats.js.map +1 -0
  139. package/internal/qs/formats.mjs +9 -0
  140. package/internal/qs/formats.mjs.map +1 -0
  141. package/internal/qs/index.d.mts +10 -0
  142. package/internal/qs/index.d.mts.map +1 -0
  143. package/internal/qs/index.d.ts +10 -0
  144. package/internal/qs/index.d.ts.map +1 -0
  145. package/internal/qs/index.js +14 -0
  146. package/internal/qs/index.js.map +1 -0
  147. package/internal/qs/index.mjs +10 -0
  148. package/internal/qs/index.mjs.map +1 -0
  149. package/internal/qs/stringify.d.mts +3 -0
  150. package/internal/qs/stringify.d.mts.map +1 -0
  151. package/internal/qs/stringify.d.ts +3 -0
  152. package/internal/qs/stringify.d.ts.map +1 -0
  153. package/internal/qs/stringify.js +277 -0
  154. package/internal/qs/stringify.js.map +1 -0
  155. package/internal/qs/stringify.mjs +274 -0
  156. package/internal/qs/stringify.mjs.map +1 -0
  157. package/internal/qs/types.d.mts +57 -0
  158. package/internal/qs/types.d.mts.map +1 -0
  159. package/internal/qs/types.d.ts +57 -0
  160. package/internal/qs/types.d.ts.map +1 -0
  161. package/internal/qs/types.js +3 -0
  162. package/internal/qs/types.js.map +1 -0
  163. package/internal/qs/types.mjs +2 -0
  164. package/internal/qs/types.mjs.map +1 -0
  165. package/internal/qs/utils.d.mts +15 -0
  166. package/internal/qs/utils.d.mts.map +1 -0
  167. package/internal/qs/utils.d.ts +15 -0
  168. package/internal/qs/utils.d.ts.map +1 -0
  169. package/internal/qs/utils.js +230 -0
  170. package/internal/qs/utils.js.map +1 -0
  171. package/internal/qs/utils.mjs +217 -0
  172. package/internal/qs/utils.mjs.map +1 -0
  173. package/internal/request-options.d.mts +77 -0
  174. package/internal/request-options.d.mts.map +1 -0
  175. package/internal/request-options.d.ts +77 -0
  176. package/internal/request-options.d.ts.map +1 -0
  177. package/internal/request-options.js +14 -0
  178. package/internal/request-options.js.map +1 -0
  179. package/internal/request-options.mjs +10 -0
  180. package/internal/request-options.mjs.map +1 -0
  181. package/internal/shim-types.d.mts +17 -0
  182. package/internal/shim-types.d.mts.map +1 -0
  183. package/internal/shim-types.d.ts +17 -0
  184. package/internal/shim-types.d.ts.map +1 -0
  185. package/internal/shim-types.js +4 -0
  186. package/internal/shim-types.js.map +1 -0
  187. package/internal/shim-types.mjs +3 -0
  188. package/internal/shim-types.mjs.map +1 -0
  189. package/internal/shims.d.mts +20 -0
  190. package/internal/shims.d.mts.map +1 -0
  191. package/internal/shims.d.ts +20 -0
  192. package/internal/shims.d.ts.map +1 -0
  193. package/internal/shims.js +92 -0
  194. package/internal/shims.js.map +1 -0
  195. package/internal/shims.mjs +85 -0
  196. package/internal/shims.mjs.map +1 -0
  197. package/internal/to-file.d.mts +45 -0
  198. package/internal/to-file.d.mts.map +1 -0
  199. package/internal/to-file.d.ts +45 -0
  200. package/internal/to-file.d.ts.map +1 -0
  201. package/internal/to-file.js +91 -0
  202. package/internal/to-file.js.map +1 -0
  203. package/internal/to-file.mjs +88 -0
  204. package/internal/to-file.mjs.map +1 -0
  205. package/internal/tslib.js +81 -0
  206. package/internal/tslib.mjs +17 -0
  207. package/internal/types.d.mts +69 -0
  208. package/internal/types.d.mts.map +1 -0
  209. package/internal/types.d.ts +69 -0
  210. package/internal/types.d.ts.map +1 -0
  211. package/internal/types.js +4 -0
  212. package/internal/types.js.map +1 -0
  213. package/internal/types.mjs +3 -0
  214. package/internal/types.mjs.map +1 -0
  215. package/internal/uploads.d.mts +42 -0
  216. package/internal/uploads.d.mts.map +1 -0
  217. package/internal/uploads.d.ts +42 -0
  218. package/internal/uploads.d.ts.map +1 -0
  219. package/internal/uploads.js +141 -0
  220. package/internal/uploads.js.map +1 -0
  221. package/internal/uploads.mjs +131 -0
  222. package/internal/uploads.mjs.map +1 -0
  223. package/internal/utils/base64.d.mts +3 -0
  224. package/internal/utils/base64.d.mts.map +1 -0
  225. package/internal/utils/base64.d.ts +3 -0
  226. package/internal/utils/base64.d.ts.map +1 -0
  227. package/internal/utils/base64.js +38 -0
  228. package/internal/utils/base64.js.map +1 -0
  229. package/internal/utils/base64.mjs +33 -0
  230. package/internal/utils/base64.mjs.map +1 -0
  231. package/internal/utils/bytes.d.mts +4 -0
  232. package/internal/utils/bytes.d.mts.map +1 -0
  233. package/internal/utils/bytes.d.ts +4 -0
  234. package/internal/utils/bytes.d.ts.map +1 -0
  235. package/internal/utils/bytes.js +31 -0
  236. package/internal/utils/bytes.js.map +1 -0
  237. package/internal/utils/bytes.mjs +26 -0
  238. package/internal/utils/bytes.mjs.map +1 -0
  239. package/internal/utils/env.d.mts +9 -0
  240. package/internal/utils/env.d.mts.map +1 -0
  241. package/internal/utils/env.d.ts +9 -0
  242. package/internal/utils/env.d.ts.map +1 -0
  243. package/internal/utils/env.js +22 -0
  244. package/internal/utils/env.js.map +1 -0
  245. package/internal/utils/env.mjs +18 -0
  246. package/internal/utils/env.mjs.map +1 -0
  247. package/internal/utils/log.d.mts +37 -0
  248. package/internal/utils/log.d.mts.map +1 -0
  249. package/internal/utils/log.d.ts +37 -0
  250. package/internal/utils/log.d.ts.map +1 -0
  251. package/internal/utils/log.js +85 -0
  252. package/internal/utils/log.js.map +1 -0
  253. package/internal/utils/log.mjs +79 -0
  254. package/internal/utils/log.mjs.map +1 -0
  255. package/internal/utils/path.d.mts +15 -0
  256. package/internal/utils/path.d.mts.map +1 -0
  257. package/internal/utils/path.d.ts +15 -0
  258. package/internal/utils/path.d.ts.map +1 -0
  259. package/internal/utils/path.js +79 -0
  260. package/internal/utils/path.js.map +1 -0
  261. package/internal/utils/path.mjs +74 -0
  262. package/internal/utils/path.mjs.map +1 -0
  263. package/internal/utils/sleep.d.mts +2 -0
  264. package/internal/utils/sleep.d.mts.map +1 -0
  265. package/internal/utils/sleep.d.ts +2 -0
  266. package/internal/utils/sleep.d.ts.map +1 -0
  267. package/internal/utils/sleep.js +7 -0
  268. package/internal/utils/sleep.js.map +1 -0
  269. package/internal/utils/sleep.mjs +3 -0
  270. package/internal/utils/sleep.mjs.map +1 -0
  271. package/internal/utils/uuid.d.mts +5 -0
  272. package/internal/utils/uuid.d.mts.map +1 -0
  273. package/internal/utils/uuid.d.ts +5 -0
  274. package/internal/utils/uuid.d.ts.map +1 -0
  275. package/internal/utils/uuid.js +19 -0
  276. package/internal/utils/uuid.js.map +1 -0
  277. package/internal/utils/uuid.mjs +15 -0
  278. package/internal/utils/uuid.mjs.map +1 -0
  279. package/internal/utils/values.d.mts +18 -0
  280. package/internal/utils/values.d.mts.map +1 -0
  281. package/internal/utils/values.d.ts +18 -0
  282. package/internal/utils/values.d.ts.map +1 -0
  283. package/internal/utils/values.js +112 -0
  284. package/internal/utils/values.js.map +1 -0
  285. package/internal/utils/values.mjs +94 -0
  286. package/internal/utils/values.mjs.map +1 -0
  287. package/internal/utils.d.mts +7 -0
  288. package/internal/utils.d.mts.map +1 -0
  289. package/internal/utils.d.ts +7 -0
  290. package/internal/utils.d.ts.map +1 -0
  291. package/internal/utils.js +11 -0
  292. package/internal/utils.js.map +1 -0
  293. package/internal/utils.mjs +8 -0
  294. package/internal/utils.mjs.map +1 -0
  295. package/package.json +161 -0
  296. package/pagination.d.mts +2 -0
  297. package/pagination.d.mts.map +1 -0
  298. package/pagination.d.ts +2 -0
  299. package/pagination.d.ts.map +1 -0
  300. package/pagination.js +6 -0
  301. package/pagination.js.map +1 -0
  302. package/pagination.mjs +2 -0
  303. package/pagination.mjs.map +1 -0
  304. package/resource.d.mts +2 -0
  305. package/resource.d.mts.map +1 -0
  306. package/resource.d.ts +2 -0
  307. package/resource.d.ts.map +1 -0
  308. package/resource.js +6 -0
  309. package/resource.js.map +1 -0
  310. package/resource.mjs +2 -0
  311. package/resource.mjs.map +1 -0
  312. package/resources/audio/audio.d.mts +28 -0
  313. package/resources/audio/audio.d.mts.map +1 -0
  314. package/resources/audio/audio.d.ts +28 -0
  315. package/resources/audio/audio.d.ts.map +1 -0
  316. package/resources/audio/audio.js +25 -0
  317. package/resources/audio/audio.js.map +1 -0
  318. package/resources/audio/audio.mjs +20 -0
  319. package/resources/audio/audio.mjs.map +1 -0
  320. package/resources/audio/index.d.mts +5 -0
  321. package/resources/audio/index.d.mts.map +1 -0
  322. package/resources/audio/index.d.ts +5 -0
  323. package/resources/audio/index.d.ts.map +1 -0
  324. package/resources/audio/index.js +13 -0
  325. package/resources/audio/index.js.map +1 -0
  326. package/resources/audio/index.mjs +6 -0
  327. package/resources/audio/index.mjs.map +1 -0
  328. package/resources/audio/speech.d.mts +67 -0
  329. package/resources/audio/speech.d.mts.map +1 -0
  330. package/resources/audio/speech.d.ts +67 -0
  331. package/resources/audio/speech.d.ts.map +1 -0
  332. package/resources/audio/speech.js +35 -0
  333. package/resources/audio/speech.js.map +1 -0
  334. package/resources/audio/speech.mjs +31 -0
  335. package/resources/audio/speech.mjs.map +1 -0
  336. package/resources/audio/transcriptions.d.mts +656 -0
  337. package/resources/audio/transcriptions.d.mts.map +1 -0
  338. package/resources/audio/transcriptions.d.ts +656 -0
  339. package/resources/audio/transcriptions.d.ts.map +1 -0
  340. package/resources/audio/transcriptions.js +13 -0
  341. package/resources/audio/transcriptions.js.map +1 -0
  342. package/resources/audio/transcriptions.mjs +9 -0
  343. package/resources/audio/transcriptions.mjs.map +1 -0
  344. package/resources/audio/translations.d.mts +78 -0
  345. package/resources/audio/translations.d.mts.map +1 -0
  346. package/resources/audio/translations.d.ts +78 -0
  347. package/resources/audio/translations.d.ts.map +1 -0
  348. package/resources/audio/translations.js +24 -0
  349. package/resources/audio/translations.js.map +1 -0
  350. package/resources/audio/translations.mjs +20 -0
  351. package/resources/audio/translations.mjs.map +1 -0
  352. package/resources/audio.d.mts +2 -0
  353. package/resources/audio.d.mts.map +1 -0
  354. package/resources/audio.d.ts +2 -0
  355. package/resources/audio.d.ts.map +1 -0
  356. package/resources/audio.js +6 -0
  357. package/resources/audio.js.map +1 -0
  358. package/resources/audio.mjs +3 -0
  359. package/resources/audio.mjs.map +1 -0
  360. package/resources/batches.d.mts +280 -0
  361. package/resources/batches.d.mts.map +1 -0
  362. package/resources/batches.d.ts +280 -0
  363. package/resources/batches.d.ts.map +1 -0
  364. package/resources/batches.js +37 -0
  365. package/resources/batches.js.map +1 -0
  366. package/resources/batches.mjs +33 -0
  367. package/resources/batches.mjs.map +1 -0
  368. package/resources/beta/assistants.d.mts +1221 -0
  369. package/resources/beta/assistants.d.mts.map +1 -0
  370. package/resources/beta/assistants.d.ts +1221 -0
  371. package/resources/beta/assistants.d.ts.map +1 -0
  372. package/resources/beta/assistants.js +70 -0
  373. package/resources/beta/assistants.js.map +1 -0
  374. package/resources/beta/assistants.mjs +66 -0
  375. package/resources/beta/assistants.mjs.map +1 -0
  376. package/resources/beta/beta.d.mts +18 -0
  377. package/resources/beta/beta.d.mts.map +1 -0
  378. package/resources/beta/beta.d.ts +18 -0
  379. package/resources/beta/beta.d.ts.map +1 -0
  380. package/resources/beta/beta.js +25 -0
  381. package/resources/beta/beta.js.map +1 -0
  382. package/resources/beta/beta.mjs +20 -0
  383. package/resources/beta/beta.mjs.map +1 -0
  384. package/resources/beta/chatkit/chatkit.d.mts +51 -0
  385. package/resources/beta/chatkit/chatkit.d.mts.map +1 -0
  386. package/resources/beta/chatkit/chatkit.d.ts +51 -0
  387. package/resources/beta/chatkit/chatkit.d.ts.map +1 -0
  388. package/resources/beta/chatkit/chatkit.js +21 -0
  389. package/resources/beta/chatkit/chatkit.js.map +1 -0
  390. package/resources/beta/chatkit/chatkit.mjs +16 -0
  391. package/resources/beta/chatkit/chatkit.mjs.map +1 -0
  392. package/resources/beta/chatkit/index.d.mts +4 -0
  393. package/resources/beta/chatkit/index.d.mts.map +1 -0
  394. package/resources/beta/chatkit/index.d.ts +4 -0
  395. package/resources/beta/chatkit/index.d.ts.map +1 -0
  396. package/resources/beta/chatkit/index.js +11 -0
  397. package/resources/beta/chatkit/index.js.map +1 -0
  398. package/resources/beta/chatkit/index.mjs +5 -0
  399. package/resources/beta/chatkit/index.mjs.map +1 -0
  400. package/resources/beta/chatkit/sessions.d.mts +59 -0
  401. package/resources/beta/chatkit/sessions.d.mts.map +1 -0
  402. package/resources/beta/chatkit/sessions.d.ts +59 -0
  403. package/resources/beta/chatkit/sessions.d.ts.map +1 -0
  404. package/resources/beta/chatkit/sessions.js +47 -0
  405. package/resources/beta/chatkit/sessions.js.map +1 -0
  406. package/resources/beta/chatkit/sessions.mjs +43 -0
  407. package/resources/beta/chatkit/sessions.mjs.map +1 -0
  408. package/resources/beta/chatkit/threads.d.mts +811 -0
  409. package/resources/beta/chatkit/threads.d.mts.map +1 -0
  410. package/resources/beta/chatkit/threads.d.ts +811 -0
  411. package/resources/beta/chatkit/threads.d.ts.map +1 -0
  412. package/resources/beta/chatkit/threads.js +77 -0
  413. package/resources/beta/chatkit/threads.js.map +1 -0
  414. package/resources/beta/chatkit/threads.mjs +73 -0
  415. package/resources/beta/chatkit/threads.mjs.map +1 -0
  416. package/resources/beta/chatkit.d.mts +2 -0
  417. package/resources/beta/chatkit.d.mts.map +1 -0
  418. package/resources/beta/chatkit.d.ts +2 -0
  419. package/resources/beta/chatkit.d.ts.map +1 -0
  420. package/resources/beta/chatkit.js +6 -0
  421. package/resources/beta/chatkit.js.map +1 -0
  422. package/resources/beta/chatkit.mjs +3 -0
  423. package/resources/beta/chatkit.mjs.map +1 -0
  424. package/resources/beta/index.d.mts +5 -0
  425. package/resources/beta/index.d.mts.map +1 -0
  426. package/resources/beta/index.d.ts +5 -0
  427. package/resources/beta/index.d.ts.map +1 -0
  428. package/resources/beta/index.js +13 -0
  429. package/resources/beta/index.js.map +1 -0
  430. package/resources/beta/index.mjs +6 -0
  431. package/resources/beta/index.mjs.map +1 -0
  432. package/resources/beta/threads/index.d.mts +4 -0
  433. package/resources/beta/threads/index.d.mts.map +1 -0
  434. package/resources/beta/threads/index.d.ts +4 -0
  435. package/resources/beta/threads/index.d.ts.map +1 -0
  436. package/resources/beta/threads/index.js +11 -0
  437. package/resources/beta/threads/index.js.map +1 -0
  438. package/resources/beta/threads/index.mjs +5 -0
  439. package/resources/beta/threads/index.mjs.map +1 -0
  440. package/resources/beta/threads/messages.d.mts +594 -0
  441. package/resources/beta/threads/messages.d.mts.map +1 -0
  442. package/resources/beta/threads/messages.d.ts +594 -0
  443. package/resources/beta/threads/messages.d.ts.map +1 -0
  444. package/resources/beta/threads/messages.js +76 -0
  445. package/resources/beta/threads/messages.js.map +1 -0
  446. package/resources/beta/threads/messages.mjs +72 -0
  447. package/resources/beta/threads/messages.mjs.map +1 -0
  448. package/resources/beta/threads/runs/index.d.mts +3 -0
  449. package/resources/beta/threads/runs/index.d.mts.map +1 -0
  450. package/resources/beta/threads/runs/index.d.ts +3 -0
  451. package/resources/beta/threads/runs/index.d.ts.map +1 -0
  452. package/resources/beta/threads/runs/index.js +9 -0
  453. package/resources/beta/threads/runs/index.js.map +1 -0
  454. package/resources/beta/threads/runs/index.mjs +4 -0
  455. package/resources/beta/threads/runs/index.mjs.map +1 -0
  456. package/resources/beta/threads/runs/runs.d.mts +694 -0
  457. package/resources/beta/threads/runs/runs.d.mts.map +1 -0
  458. package/resources/beta/threads/runs/runs.d.ts +694 -0
  459. package/resources/beta/threads/runs/runs.d.ts.map +1 -0
  460. package/resources/beta/threads/runs/runs.js +91 -0
  461. package/resources/beta/threads/runs/runs.js.map +1 -0
  462. package/resources/beta/threads/runs/runs.mjs +86 -0
  463. package/resources/beta/threads/runs/runs.mjs.map +1 -0
  464. package/resources/beta/threads/runs/steps.d.mts +615 -0
  465. package/resources/beta/threads/runs/steps.d.mts.map +1 -0
  466. package/resources/beta/threads/runs/steps.d.ts +615 -0
  467. package/resources/beta/threads/runs/steps.d.ts.map +1 -0
  468. package/resources/beta/threads/runs/steps.js +41 -0
  469. package/resources/beta/threads/runs/steps.js.map +1 -0
  470. package/resources/beta/threads/runs/steps.mjs +37 -0
  471. package/resources/beta/threads/runs/steps.mjs.map +1 -0
  472. package/resources/beta/threads/runs.d.mts +2 -0
  473. package/resources/beta/threads/runs.d.mts.map +1 -0
  474. package/resources/beta/threads/runs.d.ts +2 -0
  475. package/resources/beta/threads/runs.d.ts.map +1 -0
  476. package/resources/beta/threads/runs.js +6 -0
  477. package/resources/beta/threads/runs.js.map +1 -0
  478. package/resources/beta/threads/runs.mjs +3 -0
  479. package/resources/beta/threads/runs.mjs.map +1 -0
  480. package/resources/beta/threads/threads.d.mts +757 -0
  481. package/resources/beta/threads/threads.d.mts.map +1 -0
  482. package/resources/beta/threads/threads.d.ts +757 -0
  483. package/resources/beta/threads/threads.d.ts.map +1 -0
  484. package/resources/beta/threads/threads.js +80 -0
  485. package/resources/beta/threads/threads.js.map +1 -0
  486. package/resources/beta/threads/threads.mjs +75 -0
  487. package/resources/beta/threads/threads.mjs.map +1 -0
  488. package/resources/beta/threads.d.mts +2 -0
  489. package/resources/beta/threads.d.mts.map +1 -0
  490. package/resources/beta/threads.d.ts +2 -0
  491. package/resources/beta/threads.d.ts.map +1 -0
  492. package/resources/beta/threads.js +6 -0
  493. package/resources/beta/threads.js.map +1 -0
  494. package/resources/beta/threads.mjs +3 -0
  495. package/resources/beta/threads.mjs.map +1 -0
  496. package/resources/beta.d.mts +2 -0
  497. package/resources/beta.d.mts.map +1 -0
  498. package/resources/beta.d.ts +2 -0
  499. package/resources/beta.d.ts.map +1 -0
  500. package/resources/beta.js +6 -0
  501. package/resources/beta.js.map +1 -0
  502. package/resources/beta.mjs +3 -0
  503. package/resources/beta.mjs.map +1 -0
  504. package/resources/chat/chat.d.mts +13 -0
  505. package/resources/chat/chat.d.mts.map +1 -0
  506. package/resources/chat/chat.d.ts +13 -0
  507. package/resources/chat/chat.d.ts.map +1 -0
  508. package/resources/chat/chat.js +17 -0
  509. package/resources/chat/chat.js.map +1 -0
  510. package/resources/chat/chat.mjs +12 -0
  511. package/resources/chat/chat.mjs.map +1 -0
  512. package/resources/chat/completions/completions.d.mts +1598 -0
  513. package/resources/chat/completions/completions.d.mts.map +1 -0
  514. package/resources/chat/completions/completions.d.ts +1598 -0
  515. package/resources/chat/completions/completions.d.ts.map +1 -0
  516. package/resources/chat/completions/completions.js +79 -0
  517. package/resources/chat/completions/completions.js.map +1 -0
  518. package/resources/chat/completions/completions.mjs +74 -0
  519. package/resources/chat/completions/completions.mjs.map +1 -0
  520. package/resources/chat/completions/index.d.mts +3 -0
  521. package/resources/chat/completions/index.d.mts.map +1 -0
  522. package/resources/chat/completions/index.d.ts +3 -0
  523. package/resources/chat/completions/index.d.ts.map +1 -0
  524. package/resources/chat/completions/index.js +9 -0
  525. package/resources/chat/completions/index.js.map +1 -0
  526. package/resources/chat/completions/index.mjs +4 -0
  527. package/resources/chat/completions/index.mjs.map +1 -0
  528. package/resources/chat/completions/messages.d.mts +34 -0
  529. package/resources/chat/completions/messages.d.mts.map +1 -0
  530. package/resources/chat/completions/messages.d.ts +34 -0
  531. package/resources/chat/completions/messages.d.ts.map +1 -0
  532. package/resources/chat/completions/messages.js +28 -0
  533. package/resources/chat/completions/messages.js.map +1 -0
  534. package/resources/chat/completions/messages.mjs +24 -0
  535. package/resources/chat/completions/messages.mjs.map +1 -0
  536. package/resources/chat/completions.d.mts +2 -0
  537. package/resources/chat/completions.d.mts.map +1 -0
  538. package/resources/chat/completions.d.ts +2 -0
  539. package/resources/chat/completions.d.ts.map +1 -0
  540. package/resources/chat/completions.js +6 -0
  541. package/resources/chat/completions.js.map +1 -0
  542. package/resources/chat/completions.mjs +3 -0
  543. package/resources/chat/completions.mjs.map +1 -0
  544. package/resources/chat/index.d.mts +3 -0
  545. package/resources/chat/index.d.mts.map +1 -0
  546. package/resources/chat/index.d.ts +3 -0
  547. package/resources/chat/index.d.ts.map +1 -0
  548. package/resources/chat/index.js +9 -0
  549. package/resources/chat/index.js.map +1 -0
  550. package/resources/chat/index.mjs +4 -0
  551. package/resources/chat/index.mjs.map +1 -0
  552. package/resources/chat.d.mts +2 -0
  553. package/resources/chat.d.mts.map +1 -0
  554. package/resources/chat.d.ts +2 -0
  555. package/resources/chat.d.ts.map +1 -0
  556. package/resources/chat.js +6 -0
  557. package/resources/chat.js.map +1 -0
  558. package/resources/chat.mjs +3 -0
  559. package/resources/chat.mjs.map +1 -0
  560. package/resources/completions.d.mts +332 -0
  561. package/resources/completions.d.mts.map +1 -0
  562. package/resources/completions.d.ts +332 -0
  563. package/resources/completions.d.ts.map +1 -0
  564. package/resources/completions.js +12 -0
  565. package/resources/completions.js.map +1 -0
  566. package/resources/completions.mjs +8 -0
  567. package/resources/completions.mjs.map +1 -0
  568. package/resources/containers/containers.d.mts +292 -0
  569. package/resources/containers/containers.d.mts.map +1 -0
  570. package/resources/containers/containers.d.ts +292 -0
  571. package/resources/containers/containers.d.ts.map +1 -0
  572. package/resources/containers/containers.js +47 -0
  573. package/resources/containers/containers.js.map +1 -0
  574. package/resources/containers/containers.mjs +42 -0
  575. package/resources/containers/containers.mjs.map +1 -0
  576. package/resources/containers/files/content.d.mts +16 -0
  577. package/resources/containers/files/content.d.mts.map +1 -0
  578. package/resources/containers/files/content.d.ts +16 -0
  579. package/resources/containers/files/content.d.ts.map +1 -0
  580. package/resources/containers/files/content.js +22 -0
  581. package/resources/containers/files/content.js.map +1 -0
  582. package/resources/containers/files/content.mjs +18 -0
  583. package/resources/containers/files/content.mjs.map +1 -0
  584. package/resources/containers/files/files.d.mts +148 -0
  585. package/resources/containers/files/files.d.mts.map +1 -0
  586. package/resources/containers/files/files.d.ts +148 -0
  587. package/resources/containers/files/files.d.ts.map +1 -0
  588. package/resources/containers/files/files.js +56 -0
  589. package/resources/containers/files/files.js.map +1 -0
  590. package/resources/containers/files/files.mjs +51 -0
  591. package/resources/containers/files/files.mjs.map +1 -0
  592. package/resources/containers/files/index.d.mts +3 -0
  593. package/resources/containers/files/index.d.mts.map +1 -0
  594. package/resources/containers/files/index.d.ts +3 -0
  595. package/resources/containers/files/index.d.ts.map +1 -0
  596. package/resources/containers/files/index.js +9 -0
  597. package/resources/containers/files/index.js.map +1 -0
  598. package/resources/containers/files/index.mjs +4 -0
  599. package/resources/containers/files/index.mjs.map +1 -0
  600. package/resources/containers/files.d.mts +2 -0
  601. package/resources/containers/files.d.mts.map +1 -0
  602. package/resources/containers/files.d.ts +2 -0
  603. package/resources/containers/files.d.ts.map +1 -0
  604. package/resources/containers/files.js +6 -0
  605. package/resources/containers/files.js.map +1 -0
  606. package/resources/containers/files.mjs +3 -0
  607. package/resources/containers/files.mjs.map +1 -0
  608. package/resources/containers/index.d.mts +3 -0
  609. package/resources/containers/index.d.mts.map +1 -0
  610. package/resources/containers/index.d.ts +3 -0
  611. package/resources/containers/index.d.ts.map +1 -0
  612. package/resources/containers/index.js +9 -0
  613. package/resources/containers/index.js.map +1 -0
  614. package/resources/containers/index.mjs +4 -0
  615. package/resources/containers/index.mjs.map +1 -0
  616. package/resources/containers.d.mts +2 -0
  617. package/resources/containers.d.mts.map +1 -0
  618. package/resources/containers.d.ts +2 -0
  619. package/resources/containers.d.ts.map +1 -0
  620. package/resources/containers.js +6 -0
  621. package/resources/containers.js.map +1 -0
  622. package/resources/containers.mjs +3 -0
  623. package/resources/containers.mjs.map +1 -0
  624. package/resources/conversations/conversations.d.mts +176 -0
  625. package/resources/conversations/conversations.d.mts.map +1 -0
  626. package/resources/conversations/conversations.d.ts +176 -0
  627. package/resources/conversations/conversations.d.ts.map +1 -0
  628. package/resources/conversations/conversations.js +42 -0
  629. package/resources/conversations/conversations.js.map +1 -0
  630. package/resources/conversations/conversations.mjs +37 -0
  631. package/resources/conversations/conversations.mjs.map +1 -0
  632. package/resources/conversations/index.d.mts +3 -0
  633. package/resources/conversations/index.d.mts.map +1 -0
  634. package/resources/conversations/index.d.ts +3 -0
  635. package/resources/conversations/index.d.ts.map +1 -0
  636. package/resources/conversations/index.js +9 -0
  637. package/resources/conversations/index.js.map +1 -0
  638. package/resources/conversations/index.mjs +4 -0
  639. package/resources/conversations/index.mjs.map +1 -0
  640. package/resources/conversations/items.d.mts +367 -0
  641. package/resources/conversations/items.d.mts.map +1 -0
  642. package/resources/conversations/items.d.ts +367 -0
  643. package/resources/conversations/items.d.ts.map +1 -0
  644. package/resources/conversations/items.js +42 -0
  645. package/resources/conversations/items.js.map +1 -0
  646. package/resources/conversations/items.mjs +38 -0
  647. package/resources/conversations/items.mjs.map +1 -0
  648. package/resources/conversations.d.mts +2 -0
  649. package/resources/conversations.d.mts.map +1 -0
  650. package/resources/conversations.d.ts +2 -0
  651. package/resources/conversations.d.ts.map +1 -0
  652. package/resources/conversations.js +6 -0
  653. package/resources/conversations.js.map +1 -0
  654. package/resources/conversations.mjs +3 -0
  655. package/resources/conversations.mjs.map +1 -0
  656. package/resources/embeddings.d.mts +113 -0
  657. package/resources/embeddings.d.mts.map +1 -0
  658. package/resources/embeddings.d.ts +113 -0
  659. package/resources/embeddings.d.ts.map +1 -0
  660. package/resources/embeddings.js +24 -0
  661. package/resources/embeddings.js.map +1 -0
  662. package/resources/embeddings.mjs +20 -0
  663. package/resources/embeddings.mjs.map +1 -0
  664. package/resources/evals/evals.d.mts +736 -0
  665. package/resources/evals/evals.d.mts.map +1 -0
  666. package/resources/evals/evals.d.ts +736 -0
  667. package/resources/evals/evals.d.ts.map +1 -0
  668. package/resources/evals/evals.js +54 -0
  669. package/resources/evals/evals.js.map +1 -0
  670. package/resources/evals/evals.mjs +49 -0
  671. package/resources/evals/evals.mjs.map +1 -0
  672. package/resources/evals/index.d.mts +3 -0
  673. package/resources/evals/index.d.mts.map +1 -0
  674. package/resources/evals/index.d.ts +3 -0
  675. package/resources/evals/index.d.ts.map +1 -0
  676. package/resources/evals/index.js +9 -0
  677. package/resources/evals/index.js.map +1 -0
  678. package/resources/evals/index.mjs +4 -0
  679. package/resources/evals/index.mjs.map +1 -0
  680. package/resources/evals/runs/index.d.mts +3 -0
  681. package/resources/evals/runs/index.d.mts.map +1 -0
  682. package/resources/evals/runs/index.d.ts +3 -0
  683. package/resources/evals/runs/index.d.ts.map +1 -0
  684. package/resources/evals/runs/index.js +9 -0
  685. package/resources/evals/runs/index.js.map +1 -0
  686. package/resources/evals/runs/index.mjs +4 -0
  687. package/resources/evals/runs/index.mjs.map +1 -0
  688. package/resources/evals/runs/output-items.d.mts +382 -0
  689. package/resources/evals/runs/output-items.d.mts.map +1 -0
  690. package/resources/evals/runs/output-items.d.ts +382 -0
  691. package/resources/evals/runs/output-items.d.ts.map +1 -0
  692. package/resources/evals/runs/output-items.js +25 -0
  693. package/resources/evals/runs/output-items.js.map +1 -0
  694. package/resources/evals/runs/output-items.mjs +21 -0
  695. package/resources/evals/runs/output-items.mjs.map +1 -0
  696. package/resources/evals/runs/runs.d.mts +2385 -0
  697. package/resources/evals/runs/runs.d.mts.map +1 -0
  698. package/resources/evals/runs/runs.d.ts +2385 -0
  699. package/resources/evals/runs/runs.d.ts.map +1 -0
  700. package/resources/evals/runs/runs.js +57 -0
  701. package/resources/evals/runs/runs.js.map +1 -0
  702. package/resources/evals/runs/runs.mjs +52 -0
  703. package/resources/evals/runs/runs.mjs.map +1 -0
  704. package/resources/evals/runs.d.mts +2 -0
  705. package/resources/evals/runs.d.mts.map +1 -0
  706. package/resources/evals/runs.d.ts +2 -0
  707. package/resources/evals/runs.d.ts.map +1 -0
  708. package/resources/evals/runs.js +6 -0
  709. package/resources/evals/runs.js.map +1 -0
  710. package/resources/evals/runs.mjs +3 -0
  711. package/resources/evals/runs.mjs.map +1 -0
  712. package/resources/evals.d.mts +2 -0
  713. package/resources/evals.d.mts.map +1 -0
  714. package/resources/evals.d.ts +2 -0
  715. package/resources/evals.d.ts.map +1 -0
  716. package/resources/evals.js +6 -0
  717. package/resources/evals.js.map +1 -0
  718. package/resources/evals.mjs +3 -0
  719. package/resources/evals.mjs.map +1 -0
  720. package/resources/files.d.mts +164 -0
  721. package/resources/files.d.mts.map +1 -0
  722. package/resources/files.d.ts +164 -0
  723. package/resources/files.d.ts.map +1 -0
  724. package/resources/files.js +66 -0
  725. package/resources/files.js.map +1 -0
  726. package/resources/files.mjs +62 -0
  727. package/resources/files.mjs.map +1 -0
  728. package/resources/fine-tuning/alpha/alpha.d.mts +10 -0
  729. package/resources/fine-tuning/alpha/alpha.d.mts.map +1 -0
  730. package/resources/fine-tuning/alpha/alpha.d.ts +10 -0
  731. package/resources/fine-tuning/alpha/alpha.d.ts.map +1 -0
  732. package/resources/fine-tuning/alpha/alpha.js +17 -0
  733. package/resources/fine-tuning/alpha/alpha.js.map +1 -0
  734. package/resources/fine-tuning/alpha/alpha.mjs +12 -0
  735. package/resources/fine-tuning/alpha/alpha.mjs.map +1 -0
  736. package/resources/fine-tuning/alpha/graders.d.mts +119 -0
  737. package/resources/fine-tuning/alpha/graders.d.mts.map +1 -0
  738. package/resources/fine-tuning/alpha/graders.d.ts +119 -0
  739. package/resources/fine-tuning/alpha/graders.d.ts.map +1 -0
  740. package/resources/fine-tuning/alpha/graders.js +49 -0
  741. package/resources/fine-tuning/alpha/graders.js.map +1 -0
  742. package/resources/fine-tuning/alpha/graders.mjs +45 -0
  743. package/resources/fine-tuning/alpha/graders.mjs.map +1 -0
  744. package/resources/fine-tuning/alpha/index.d.mts +3 -0
  745. package/resources/fine-tuning/alpha/index.d.mts.map +1 -0
  746. package/resources/fine-tuning/alpha/index.d.ts +3 -0
  747. package/resources/fine-tuning/alpha/index.d.ts.map +1 -0
  748. package/resources/fine-tuning/alpha/index.js +9 -0
  749. package/resources/fine-tuning/alpha/index.js.map +1 -0
  750. package/resources/fine-tuning/alpha/index.mjs +4 -0
  751. package/resources/fine-tuning/alpha/index.mjs.map +1 -0
  752. package/resources/fine-tuning/alpha.d.mts +2 -0
  753. package/resources/fine-tuning/alpha.d.mts.map +1 -0
  754. package/resources/fine-tuning/alpha.d.ts +2 -0
  755. package/resources/fine-tuning/alpha.d.ts.map +1 -0
  756. package/resources/fine-tuning/alpha.js +6 -0
  757. package/resources/fine-tuning/alpha.js.map +1 -0
  758. package/resources/fine-tuning/alpha.mjs +3 -0
  759. package/resources/fine-tuning/alpha.mjs.map +1 -0
  760. package/resources/fine-tuning/checkpoints/checkpoints.d.mts +10 -0
  761. package/resources/fine-tuning/checkpoints/checkpoints.d.mts.map +1 -0
  762. package/resources/fine-tuning/checkpoints/checkpoints.d.ts +10 -0
  763. package/resources/fine-tuning/checkpoints/checkpoints.d.ts.map +1 -0
  764. package/resources/fine-tuning/checkpoints/checkpoints.js +17 -0
  765. package/resources/fine-tuning/checkpoints/checkpoints.js.map +1 -0
  766. package/resources/fine-tuning/checkpoints/checkpoints.mjs +12 -0
  767. package/resources/fine-tuning/checkpoints/checkpoints.mjs.map +1 -0
  768. package/resources/fine-tuning/checkpoints/index.d.mts +3 -0
  769. package/resources/fine-tuning/checkpoints/index.d.mts.map +1 -0
  770. package/resources/fine-tuning/checkpoints/index.d.ts +3 -0
  771. package/resources/fine-tuning/checkpoints/index.d.ts.map +1 -0
  772. package/resources/fine-tuning/checkpoints/index.js +9 -0
  773. package/resources/fine-tuning/checkpoints/index.js.map +1 -0
  774. package/resources/fine-tuning/checkpoints/index.mjs +4 -0
  775. package/resources/fine-tuning/checkpoints/index.mjs.map +1 -0
  776. package/resources/fine-tuning/checkpoints/permissions.d.mts +160 -0
  777. package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -0
  778. package/resources/fine-tuning/checkpoints/permissions.d.ts +160 -0
  779. package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -0
  780. package/resources/fine-tuning/checkpoints/permissions.js +73 -0
  781. package/resources/fine-tuning/checkpoints/permissions.js.map +1 -0
  782. package/resources/fine-tuning/checkpoints/permissions.mjs +69 -0
  783. package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -0
  784. package/resources/fine-tuning/checkpoints.d.mts +2 -0
  785. package/resources/fine-tuning/checkpoints.d.mts.map +1 -0
  786. package/resources/fine-tuning/checkpoints.d.ts +2 -0
  787. package/resources/fine-tuning/checkpoints.d.ts.map +1 -0
  788. package/resources/fine-tuning/checkpoints.js +6 -0
  789. package/resources/fine-tuning/checkpoints.js.map +1 -0
  790. package/resources/fine-tuning/checkpoints.mjs +3 -0
  791. package/resources/fine-tuning/checkpoints.mjs.map +1 -0
  792. package/resources/fine-tuning/fine-tuning.d.mts +22 -0
  793. package/resources/fine-tuning/fine-tuning.d.mts.map +1 -0
  794. package/resources/fine-tuning/fine-tuning.d.ts +22 -0
  795. package/resources/fine-tuning/fine-tuning.d.ts.map +1 -0
  796. package/resources/fine-tuning/fine-tuning.js +29 -0
  797. package/resources/fine-tuning/fine-tuning.js.map +1 -0
  798. package/resources/fine-tuning/fine-tuning.mjs +24 -0
  799. package/resources/fine-tuning/fine-tuning.mjs.map +1 -0
  800. package/resources/fine-tuning/index.d.mts +6 -0
  801. package/resources/fine-tuning/index.d.mts.map +1 -0
  802. package/resources/fine-tuning/index.d.ts +6 -0
  803. package/resources/fine-tuning/index.d.ts.map +1 -0
  804. package/resources/fine-tuning/index.js +15 -0
  805. package/resources/fine-tuning/index.js.map +1 -0
  806. package/resources/fine-tuning/index.mjs +7 -0
  807. package/resources/fine-tuning/index.mjs.map +1 -0
  808. package/resources/fine-tuning/jobs/checkpoints.d.mts +74 -0
  809. package/resources/fine-tuning/jobs/checkpoints.d.mts.map +1 -0
  810. package/resources/fine-tuning/jobs/checkpoints.d.ts +74 -0
  811. package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -0
  812. package/resources/fine-tuning/jobs/checkpoints.js +27 -0
  813. package/resources/fine-tuning/jobs/checkpoints.js.map +1 -0
  814. package/resources/fine-tuning/jobs/checkpoints.mjs +23 -0
  815. package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -0
  816. package/resources/fine-tuning/jobs/index.d.mts +3 -0
  817. package/resources/fine-tuning/jobs/index.d.mts.map +1 -0
  818. package/resources/fine-tuning/jobs/index.d.ts +3 -0
  819. package/resources/fine-tuning/jobs/index.d.ts.map +1 -0
  820. package/resources/fine-tuning/jobs/index.js +9 -0
  821. package/resources/fine-tuning/jobs/index.js.map +1 -0
  822. package/resources/fine-tuning/jobs/index.mjs +4 -0
  823. package/resources/fine-tuning/jobs/index.mjs.map +1 -0
  824. package/resources/fine-tuning/jobs/jobs.d.mts +528 -0
  825. package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -0
  826. package/resources/fine-tuning/jobs/jobs.d.ts +528 -0
  827. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -0
  828. package/resources/fine-tuning/jobs/jobs.js +123 -0
  829. package/resources/fine-tuning/jobs/jobs.js.map +1 -0
  830. package/resources/fine-tuning/jobs/jobs.mjs +118 -0
  831. package/resources/fine-tuning/jobs/jobs.mjs.map +1 -0
  832. package/resources/fine-tuning/jobs.d.mts +2 -0
  833. package/resources/fine-tuning/jobs.d.mts.map +1 -0
  834. package/resources/fine-tuning/jobs.d.ts +2 -0
  835. package/resources/fine-tuning/jobs.d.ts.map +1 -0
  836. package/resources/fine-tuning/jobs.js +6 -0
  837. package/resources/fine-tuning/jobs.js.map +1 -0
  838. package/resources/fine-tuning/jobs.mjs +3 -0
  839. package/resources/fine-tuning/jobs.mjs.map +1 -0
  840. package/resources/fine-tuning/methods.d.mts +120 -0
  841. package/resources/fine-tuning/methods.d.mts.map +1 -0
  842. package/resources/fine-tuning/methods.d.ts +120 -0
  843. package/resources/fine-tuning/methods.d.ts.map +1 -0
  844. package/resources/fine-tuning/methods.js +9 -0
  845. package/resources/fine-tuning/methods.js.map +1 -0
  846. package/resources/fine-tuning/methods.mjs +5 -0
  847. package/resources/fine-tuning/methods.mjs.map +1 -0
  848. package/resources/fine-tuning.d.mts +2 -0
  849. package/resources/fine-tuning.d.mts.map +1 -0
  850. package/resources/fine-tuning.d.ts +2 -0
  851. package/resources/fine-tuning.d.ts.map +1 -0
  852. package/resources/fine-tuning.js +6 -0
  853. package/resources/fine-tuning.js.map +1 -0
  854. package/resources/fine-tuning.mjs +3 -0
  855. package/resources/fine-tuning.mjs.map +1 -0
  856. package/resources/graders/grader-models.d.mts +354 -0
  857. package/resources/graders/grader-models.d.mts.map +1 -0
  858. package/resources/graders/grader-models.d.ts +354 -0
  859. package/resources/graders/grader-models.d.ts.map +1 -0
  860. package/resources/graders/grader-models.js +9 -0
  861. package/resources/graders/grader-models.js.map +1 -0
  862. package/resources/graders/grader-models.mjs +5 -0
  863. package/resources/graders/grader-models.mjs.map +1 -0
  864. package/resources/graders/graders.d.mts +10 -0
  865. package/resources/graders/graders.d.mts.map +1 -0
  866. package/resources/graders/graders.d.ts +10 -0
  867. package/resources/graders/graders.d.ts.map +1 -0
  868. package/resources/graders/graders.js +17 -0
  869. package/resources/graders/graders.js.map +1 -0
  870. package/resources/graders/graders.mjs +12 -0
  871. package/resources/graders/graders.mjs.map +1 -0
  872. package/resources/graders/index.d.mts +3 -0
  873. package/resources/graders/index.d.mts.map +1 -0
  874. package/resources/graders/index.d.ts +3 -0
  875. package/resources/graders/index.d.ts.map +1 -0
  876. package/resources/graders/index.js +9 -0
  877. package/resources/graders/index.js.map +1 -0
  878. package/resources/graders/index.mjs +4 -0
  879. package/resources/graders/index.mjs.map +1 -0
  880. package/resources/graders.d.mts +2 -0
  881. package/resources/graders.d.mts.map +1 -0
  882. package/resources/graders.d.ts +2 -0
  883. package/resources/graders.d.ts.map +1 -0
  884. package/resources/graders.js +6 -0
  885. package/resources/graders.js.map +1 -0
  886. package/resources/graders.mjs +3 -0
  887. package/resources/graders.mjs.map +1 -0
  888. package/resources/images.d.mts +676 -0
  889. package/resources/images.d.mts.map +1 -0
  890. package/resources/images.d.ts +676 -0
  891. package/resources/images.d.ts.map +1 -0
  892. package/resources/images.js +29 -0
  893. package/resources/images.js.map +1 -0
  894. package/resources/images.mjs +25 -0
  895. package/resources/images.mjs.map +1 -0
  896. package/resources/index.d.mts +24 -0
  897. package/resources/index.d.mts.map +1 -0
  898. package/resources/index.d.ts +24 -0
  899. package/resources/index.d.ts.map +1 -0
  900. package/resources/index.js +50 -0
  901. package/resources/index.js.map +1 -0
  902. package/resources/index.mjs +25 -0
  903. package/resources/index.mjs.map +1 -0
  904. package/resources/models.d.mts +52 -0
  905. package/resources/models.d.mts.map +1 -0
  906. package/resources/models.d.ts +52 -0
  907. package/resources/models.d.ts.map +1 -0
  908. package/resources/models.js +32 -0
  909. package/resources/models.js.map +1 -0
  910. package/resources/models.mjs +28 -0
  911. package/resources/models.mjs.map +1 -0
  912. package/resources/moderations.d.mts +295 -0
  913. package/resources/moderations.d.mts.map +1 -0
  914. package/resources/moderations.d.ts +295 -0
  915. package/resources/moderations.d.ts.map +1 -0
  916. package/resources/moderations.js +16 -0
  917. package/resources/moderations.js.map +1 -0
  918. package/resources/moderations.mjs +12 -0
  919. package/resources/moderations.mjs.map +1 -0
  920. package/resources/realtime/calls.d.mts +158 -0
  921. package/resources/realtime/calls.d.mts.map +1 -0
  922. package/resources/realtime/calls.d.ts +158 -0
  923. package/resources/realtime/calls.d.ts.map +1 -0
  924. package/resources/realtime/calls.js +75 -0
  925. package/resources/realtime/calls.js.map +1 -0
  926. package/resources/realtime/calls.mjs +71 -0
  927. package/resources/realtime/calls.mjs.map +1 -0
  928. package/resources/realtime/client-secrets.d.mts +638 -0
  929. package/resources/realtime/client-secrets.d.mts.map +1 -0
  930. package/resources/realtime/client-secrets.d.ts +638 -0
  931. package/resources/realtime/client-secrets.d.ts.map +1 -0
  932. package/resources/realtime/client-secrets.js +35 -0
  933. package/resources/realtime/client-secrets.js.map +1 -0
  934. package/resources/realtime/client-secrets.mjs +31 -0
  935. package/resources/realtime/client-secrets.mjs.map +1 -0
  936. package/resources/realtime/index.d.mts +4 -0
  937. package/resources/realtime/index.d.mts.map +1 -0
  938. package/resources/realtime/index.d.ts +4 -0
  939. package/resources/realtime/index.d.ts.map +1 -0
  940. package/resources/realtime/index.js +11 -0
  941. package/resources/realtime/index.js.map +1 -0
  942. package/resources/realtime/index.mjs +5 -0
  943. package/resources/realtime/index.mjs.map +1 -0
  944. package/resources/realtime/realtime.d.mts +3941 -0
  945. package/resources/realtime/realtime.d.mts.map +1 -0
  946. package/resources/realtime/realtime.d.ts +3941 -0
  947. package/resources/realtime/realtime.d.ts.map +1 -0
  948. package/resources/realtime/realtime.js +21 -0
  949. package/resources/realtime/realtime.js.map +1 -0
  950. package/resources/realtime/realtime.mjs +16 -0
  951. package/resources/realtime/realtime.mjs.map +1 -0
  952. package/resources/realtime.d.mts +2 -0
  953. package/resources/realtime.d.mts.map +1 -0
  954. package/resources/realtime.d.ts +2 -0
  955. package/resources/realtime.d.ts.map +1 -0
  956. package/resources/realtime.js +6 -0
  957. package/resources/realtime.js.map +1 -0
  958. package/resources/realtime.mjs +3 -0
  959. package/resources/realtime.mjs.map +1 -0
  960. package/resources/responses/index.d.mts +4 -0
  961. package/resources/responses/index.d.mts.map +1 -0
  962. package/resources/responses/index.d.ts +4 -0
  963. package/resources/responses/index.d.ts.map +1 -0
  964. package/resources/responses/index.js +11 -0
  965. package/resources/responses/index.js.map +1 -0
  966. package/resources/responses/index.mjs +5 -0
  967. package/resources/responses/index.mjs.map +1 -0
  968. package/resources/responses/input-items.d.mts +65 -0
  969. package/resources/responses/input-items.d.mts.map +1 -0
  970. package/resources/responses/input-items.d.ts +65 -0
  971. package/resources/responses/input-items.d.ts.map +1 -0
  972. package/resources/responses/input-items.js +27 -0
  973. package/resources/responses/input-items.js.map +1 -0
  974. package/resources/responses/input-items.mjs +23 -0
  975. package/resources/responses/input-items.mjs.map +1 -0
  976. package/resources/responses/input-tokens.d.mts +129 -0
  977. package/resources/responses/input-tokens.d.mts.map +1 -0
  978. package/resources/responses/input-tokens.d.ts +129 -0
  979. package/resources/responses/input-tokens.d.ts.map +1 -0
  980. package/resources/responses/input-tokens.js +23 -0
  981. package/resources/responses/input-tokens.js.map +1 -0
  982. package/resources/responses/input-tokens.mjs +19 -0
  983. package/resources/responses/input-tokens.mjs.map +1 -0
  984. package/resources/responses/responses.d.mts +5561 -0
  985. package/resources/responses/responses.d.mts.map +1 -0
  986. package/resources/responses/responses.d.ts +5561 -0
  987. package/resources/responses/responses.d.ts.map +1 -0
  988. package/resources/responses/responses.js +82 -0
  989. package/resources/responses/responses.js.map +1 -0
  990. package/resources/responses/responses.mjs +77 -0
  991. package/resources/responses/responses.mjs.map +1 -0
  992. package/resources/responses.d.mts +2 -0
  993. package/resources/responses.d.mts.map +1 -0
  994. package/resources/responses.d.ts +2 -0
  995. package/resources/responses.d.ts.map +1 -0
  996. package/resources/responses.js +6 -0
  997. package/resources/responses.js.map +1 -0
  998. package/resources/responses.mjs +3 -0
  999. package/resources/responses.mjs.map +1 -0
  1000. package/resources/shared.d.mts +287 -0
  1001. package/resources/shared.d.mts.map +1 -0
  1002. package/resources/shared.d.ts +287 -0
  1003. package/resources/shared.d.ts.map +1 -0
  1004. package/resources/shared.js +4 -0
  1005. package/resources/shared.js.map +1 -0
  1006. package/resources/shared.mjs +3 -0
  1007. package/resources/shared.mjs.map +1 -0
  1008. package/resources/skills/content.d.mts +10 -0
  1009. package/resources/skills/content.d.mts.map +1 -0
  1010. package/resources/skills/content.d.ts +10 -0
  1011. package/resources/skills/content.d.ts.map +1 -0
  1012. package/resources/skills/content.js +21 -0
  1013. package/resources/skills/content.js.map +1 -0
  1014. package/resources/skills/content.mjs +17 -0
  1015. package/resources/skills/content.mjs.map +1 -0
  1016. package/resources/skills/index.d.mts +4 -0
  1017. package/resources/skills/index.d.mts.map +1 -0
  1018. package/resources/skills/index.d.ts +4 -0
  1019. package/resources/skills/index.d.ts.map +1 -0
  1020. package/resources/skills/index.js +11 -0
  1021. package/resources/skills/index.js.map +1 -0
  1022. package/resources/skills/index.mjs +5 -0
  1023. package/resources/skills/index.mjs.map +1 -0
  1024. package/resources/skills/skills.d.mts +116 -0
  1025. package/resources/skills/skills.d.mts.map +1 -0
  1026. package/resources/skills/skills.d.ts +116 -0
  1027. package/resources/skills/skills.d.ts.map +1 -0
  1028. package/resources/skills/skills.js +54 -0
  1029. package/resources/skills/skills.js.map +1 -0
  1030. package/resources/skills/skills.mjs +49 -0
  1031. package/resources/skills/skills.mjs.map +1 -0
  1032. package/resources/skills/versions/content.d.mts +19 -0
  1033. package/resources/skills/versions/content.d.mts.map +1 -0
  1034. package/resources/skills/versions/content.d.ts +19 -0
  1035. package/resources/skills/versions/content.d.ts.map +1 -0
  1036. package/resources/skills/versions/content.js +22 -0
  1037. package/resources/skills/versions/content.js.map +1 -0
  1038. package/resources/skills/versions/content.mjs +18 -0
  1039. package/resources/skills/versions/content.mjs.map +1 -0
  1040. package/resources/skills/versions/index.d.mts +3 -0
  1041. package/resources/skills/versions/index.d.mts.map +1 -0
  1042. package/resources/skills/versions/index.d.ts +3 -0
  1043. package/resources/skills/versions/index.d.ts.map +1 -0
  1044. package/resources/skills/versions/index.js +9 -0
  1045. package/resources/skills/versions/index.js.map +1 -0
  1046. package/resources/skills/versions/index.mjs +4 -0
  1047. package/resources/skills/versions/index.mjs.map +1 -0
  1048. package/resources/skills/versions/versions.d.mts +121 -0
  1049. package/resources/skills/versions/versions.d.mts.map +1 -0
  1050. package/resources/skills/versions/versions.d.ts +121 -0
  1051. package/resources/skills/versions/versions.d.ts.map +1 -0
  1052. package/resources/skills/versions/versions.js +49 -0
  1053. package/resources/skills/versions/versions.js.map +1 -0
  1054. package/resources/skills/versions/versions.mjs +44 -0
  1055. package/resources/skills/versions/versions.mjs.map +1 -0
  1056. package/resources/skills/versions.d.mts +2 -0
  1057. package/resources/skills/versions.d.mts.map +1 -0
  1058. package/resources/skills/versions.d.ts +2 -0
  1059. package/resources/skills/versions.d.ts.map +1 -0
  1060. package/resources/skills/versions.js +6 -0
  1061. package/resources/skills/versions.js.map +1 -0
  1062. package/resources/skills/versions.mjs +3 -0
  1063. package/resources/skills/versions.mjs.map +1 -0
  1064. package/resources/skills.d.mts +2 -0
  1065. package/resources/skills.d.mts.map +1 -0
  1066. package/resources/skills.d.ts +2 -0
  1067. package/resources/skills.d.ts.map +1 -0
  1068. package/resources/skills.js +6 -0
  1069. package/resources/skills.js.map +1 -0
  1070. package/resources/skills.mjs +3 -0
  1071. package/resources/skills.mjs.map +1 -0
  1072. package/resources/uploads/index.d.mts +3 -0
  1073. package/resources/uploads/index.d.mts.map +1 -0
  1074. package/resources/uploads/index.d.ts +3 -0
  1075. package/resources/uploads/index.d.ts.map +1 -0
  1076. package/resources/uploads/index.js +9 -0
  1077. package/resources/uploads/index.js.map +1 -0
  1078. package/resources/uploads/index.mjs +4 -0
  1079. package/resources/uploads/index.mjs.map +1 -0
  1080. package/resources/uploads/parts.d.mts +51 -0
  1081. package/resources/uploads/parts.d.mts.map +1 -0
  1082. package/resources/uploads/parts.d.ts +51 -0
  1083. package/resources/uploads/parts.d.ts.map +1 -0
  1084. package/resources/uploads/parts.js +27 -0
  1085. package/resources/uploads/parts.js.map +1 -0
  1086. package/resources/uploads/parts.mjs +23 -0
  1087. package/resources/uploads/parts.mjs.map +1 -0
  1088. package/resources/uploads/uploads.d.mts +163 -0
  1089. package/resources/uploads/uploads.d.mts.map +1 -0
  1090. package/resources/uploads/uploads.d.ts +163 -0
  1091. package/resources/uploads/uploads.d.ts.map +1 -0
  1092. package/resources/uploads/uploads.js +72 -0
  1093. package/resources/uploads/uploads.js.map +1 -0
  1094. package/resources/uploads/uploads.mjs +67 -0
  1095. package/resources/uploads/uploads.mjs.map +1 -0
  1096. package/resources/uploads.d.mts +2 -0
  1097. package/resources/uploads.d.mts.map +1 -0
  1098. package/resources/uploads.d.ts +2 -0
  1099. package/resources/uploads.d.ts.map +1 -0
  1100. package/resources/uploads.js +6 -0
  1101. package/resources/uploads.js.map +1 -0
  1102. package/resources/uploads.mjs +3 -0
  1103. package/resources/uploads.mjs.map +1 -0
  1104. package/resources/vector-stores/file-batches.d.mts +179 -0
  1105. package/resources/vector-stores/file-batches.d.mts.map +1 -0
  1106. package/resources/vector-stores/file-batches.d.ts +179 -0
  1107. package/resources/vector-stores/file-batches.d.ts.map +1 -0
  1108. package/resources/vector-stores/file-batches.js +50 -0
  1109. package/resources/vector-stores/file-batches.js.map +1 -0
  1110. package/resources/vector-stores/file-batches.mjs +46 -0
  1111. package/resources/vector-stores/file-batches.mjs.map +1 -0
  1112. package/resources/vector-stores/files.d.mts +202 -0
  1113. package/resources/vector-stores/files.d.mts.map +1 -0
  1114. package/resources/vector-stores/files.d.ts +202 -0
  1115. package/resources/vector-stores/files.d.ts.map +1 -0
  1116. package/resources/vector-stores/files.js +75 -0
  1117. package/resources/vector-stores/files.js.map +1 -0
  1118. package/resources/vector-stores/files.mjs +71 -0
  1119. package/resources/vector-stores/files.mjs.map +1 -0
  1120. package/resources/vector-stores/index.d.mts +4 -0
  1121. package/resources/vector-stores/index.d.mts.map +1 -0
  1122. package/resources/vector-stores/index.d.ts +4 -0
  1123. package/resources/vector-stores/index.d.ts.map +1 -0
  1124. package/resources/vector-stores/index.js +11 -0
  1125. package/resources/vector-stores/index.js.map +1 -0
  1126. package/resources/vector-stores/index.mjs +5 -0
  1127. package/resources/vector-stores/index.mjs.map +1 -0
  1128. package/resources/vector-stores/vector-stores.d.mts +378 -0
  1129. package/resources/vector-stores/vector-stores.d.mts.map +1 -0
  1130. package/resources/vector-stores/vector-stores.d.ts +378 -0
  1131. package/resources/vector-stores/vector-stores.d.ts.map +1 -0
  1132. package/resources/vector-stores/vector-stores.js +84 -0
  1133. package/resources/vector-stores/vector-stores.js.map +1 -0
  1134. package/resources/vector-stores/vector-stores.mjs +79 -0
  1135. package/resources/vector-stores/vector-stores.mjs.map +1 -0
  1136. package/resources/vector-stores.d.mts +2 -0
  1137. package/resources/vector-stores.d.mts.map +1 -0
  1138. package/resources/vector-stores.d.ts +2 -0
  1139. package/resources/vector-stores.d.ts.map +1 -0
  1140. package/resources/vector-stores.js +6 -0
  1141. package/resources/vector-stores.js.map +1 -0
  1142. package/resources/vector-stores.mjs +3 -0
  1143. package/resources/vector-stores.mjs.map +1 -0
  1144. package/resources/videos.d.mts +171 -0
  1145. package/resources/videos.d.mts.map +1 -0
  1146. package/resources/videos.d.ts +171 -0
  1147. package/resources/videos.d.ts.map +1 -0
  1148. package/resources/videos.js +56 -0
  1149. package/resources/videos.js.map +1 -0
  1150. package/resources/videos.mjs +52 -0
  1151. package/resources/videos.mjs.map +1 -0
  1152. package/resources/webhooks/index.d.mts +2 -0
  1153. package/resources/webhooks/index.d.mts.map +1 -0
  1154. package/resources/webhooks/index.d.ts +2 -0
  1155. package/resources/webhooks/index.d.ts.map +1 -0
  1156. package/resources/webhooks/index.js +7 -0
  1157. package/resources/webhooks/index.js.map +1 -0
  1158. package/resources/webhooks/index.mjs +3 -0
  1159. package/resources/webhooks/index.mjs.map +1 -0
  1160. package/resources/webhooks/webhooks.d.mts +571 -0
  1161. package/resources/webhooks/webhooks.d.mts.map +1 -0
  1162. package/resources/webhooks/webhooks.d.ts +571 -0
  1163. package/resources/webhooks/webhooks.d.ts.map +1 -0
  1164. package/resources/webhooks/webhooks.js +12 -0
  1165. package/resources/webhooks/webhooks.js.map +1 -0
  1166. package/resources/webhooks/webhooks.mjs +8 -0
  1167. package/resources/webhooks/webhooks.mjs.map +1 -0
  1168. package/resources/webhooks.d.mts +2 -0
  1169. package/resources/webhooks.d.mts.map +1 -0
  1170. package/resources/webhooks.d.ts +2 -0
  1171. package/resources/webhooks.d.ts.map +1 -0
  1172. package/resources/webhooks.js +6 -0
  1173. package/resources/webhooks.js.map +1 -0
  1174. package/resources/webhooks.mjs +3 -0
  1175. package/resources/webhooks.mjs.map +1 -0
  1176. package/resources.d.mts +2 -0
  1177. package/resources.d.mts.map +1 -0
  1178. package/resources.d.ts +2 -0
  1179. package/resources.d.ts.map +1 -0
  1180. package/resources.js +5 -0
  1181. package/resources.js.map +1 -0
  1182. package/resources.mjs +2 -0
  1183. package/resources.mjs.map +1 -0
  1184. package/src/api-promise.ts +2 -0
  1185. package/src/client.ts +1292 -0
  1186. package/src/core/README.md +3 -0
  1187. package/src/core/api-promise.ts +92 -0
  1188. package/src/core/error.ts +142 -0
  1189. package/src/core/pagination.ts +264 -0
  1190. package/src/core/resource.ts +11 -0
  1191. package/src/core/streaming.ts +332 -0
  1192. package/src/core/uploads.ts +2 -0
  1193. package/src/error.ts +2 -0
  1194. package/src/index.ts +23 -0
  1195. package/src/internal/README.md +3 -0
  1196. package/src/internal/builtin-types.ts +93 -0
  1197. package/src/internal/decoders/line.ts +135 -0
  1198. package/src/internal/detect-platform.ts +196 -0
  1199. package/src/internal/errors.ts +33 -0
  1200. package/src/internal/headers.ts +97 -0
  1201. package/src/internal/parse.ts +70 -0
  1202. package/src/internal/qs/LICENSE.md +13 -0
  1203. package/src/internal/qs/README.md +3 -0
  1204. package/src/internal/qs/formats.ts +10 -0
  1205. package/src/internal/qs/index.ts +13 -0
  1206. package/src/internal/qs/stringify.ts +385 -0
  1207. package/src/internal/qs/types.ts +71 -0
  1208. package/src/internal/qs/utils.ts +265 -0
  1209. package/src/internal/request-options.ts +93 -0
  1210. package/src/internal/shim-types.ts +26 -0
  1211. package/src/internal/shims.ts +107 -0
  1212. package/src/internal/to-file.ts +154 -0
  1213. package/src/internal/types.ts +95 -0
  1214. package/src/internal/uploads.ts +187 -0
  1215. package/src/internal/utils/base64.ts +40 -0
  1216. package/src/internal/utils/bytes.ts +32 -0
  1217. package/src/internal/utils/env.ts +18 -0
  1218. package/src/internal/utils/log.ts +126 -0
  1219. package/src/internal/utils/path.ts +88 -0
  1220. package/src/internal/utils/sleep.ts +3 -0
  1221. package/src/internal/utils/uuid.ts +17 -0
  1222. package/src/internal/utils/values.ts +105 -0
  1223. package/src/internal/utils.ts +8 -0
  1224. package/src/lib/.keep +4 -0
  1225. package/src/pagination.ts +2 -0
  1226. package/src/resource.ts +2 -0
  1227. package/src/resources/audio/audio.ts +91 -0
  1228. package/src/resources/audio/index.ts +29 -0
  1229. package/src/resources/audio/speech.ts +97 -0
  1230. package/src/resources/audio/transcriptions.ts +805 -0
  1231. package/src/resources/audio/translations.ts +103 -0
  1232. package/src/resources/audio.ts +3 -0
  1233. package/src/resources/batches.ts +367 -0
  1234. package/src/resources/beta/assistants.ts +1538 -0
  1235. package/src/resources/beta/beta.ts +87 -0
  1236. package/src/resources/beta/chatkit/chatkit.ts +112 -0
  1237. package/src/resources/beta/chatkit/index.ts +30 -0
  1238. package/src/resources/beta/chatkit/sessions.ts +81 -0
  1239. package/src/resources/beta/chatkit/threads.ts +1037 -0
  1240. package/src/resources/beta/chatkit.ts +3 -0
  1241. package/src/resources/beta/index.ts +36 -0
  1242. package/src/resources/beta/threads/index.ts +70 -0
  1243. package/src/resources/beta/threads/messages.ts +792 -0
  1244. package/src/resources/beta/threads/runs/index.ts +43 -0
  1245. package/src/resources/beta/threads/runs/runs.ts +947 -0
  1246. package/src/resources/beta/threads/runs/steps.ts +756 -0
  1247. package/src/resources/beta/threads/runs.ts +3 -0
  1248. package/src/resources/beta/threads/threads.ts +1028 -0
  1249. package/src/resources/beta/threads.ts +3 -0
  1250. package/src/resources/beta.ts +3 -0
  1251. package/src/resources/chat/chat.ts +110 -0
  1252. package/src/resources/chat/completions/completions.ts +1932 -0
  1253. package/src/resources/chat/completions/index.ts +49 -0
  1254. package/src/resources/chat/completions/messages.ts +50 -0
  1255. package/src/resources/chat/completions.ts +3 -0
  1256. package/src/resources/chat/index.ts +49 -0
  1257. package/src/resources/chat.ts +3 -0
  1258. package/src/resources/completions.ts +397 -0
  1259. package/src/resources/containers/containers.ts +395 -0
  1260. package/src/resources/containers/files/content.ts +29 -0
  1261. package/src/resources/containers/files/files.ts +228 -0
  1262. package/src/resources/containers/files/index.ts +14 -0
  1263. package/src/resources/containers/files.ts +3 -0
  1264. package/src/resources/containers/index.ts +22 -0
  1265. package/src/resources/containers.ts +3 -0
  1266. package/src/resources/conversations/api.md +37 -0
  1267. package/src/resources/conversations/conversations.ts +277 -0
  1268. package/src/resources/conversations/index.ts +13 -0
  1269. package/src/resources/conversations/items.ts +502 -0
  1270. package/src/resources/conversations.ts +3 -0
  1271. package/src/resources/embeddings.ts +138 -0
  1272. package/src/resources/evals/evals.ts +930 -0
  1273. package/src/resources/evals/index.ts +33 -0
  1274. package/src/resources/evals/runs/index.ts +27 -0
  1275. package/src/resources/evals/runs/output-items.ts +477 -0
  1276. package/src/resources/evals/runs/runs.ts +2869 -0
  1277. package/src/resources/evals/runs.ts +3 -0
  1278. package/src/resources/evals.ts +3 -0
  1279. package/src/resources/files.ts +229 -0
  1280. package/src/resources/fine-tuning/alpha/alpha.ts +27 -0
  1281. package/src/resources/fine-tuning/alpha/graders.ts +171 -0
  1282. package/src/resources/fine-tuning/alpha/index.ts +10 -0
  1283. package/src/resources/fine-tuning/alpha.ts +3 -0
  1284. package/src/resources/fine-tuning/checkpoints/checkpoints.ts +33 -0
  1285. package/src/resources/fine-tuning/checkpoints/index.ts +13 -0
  1286. package/src/resources/fine-tuning/checkpoints/permissions.ts +227 -0
  1287. package/src/resources/fine-tuning/checkpoints.ts +3 -0
  1288. package/src/resources/fine-tuning/fine-tuning.ts +73 -0
  1289. package/src/resources/fine-tuning/index.ts +27 -0
  1290. package/src/resources/fine-tuning/jobs/checkpoints.ts +107 -0
  1291. package/src/resources/fine-tuning/jobs/index.ts +21 -0
  1292. package/src/resources/fine-tuning/jobs/jobs.ts +654 -0
  1293. package/src/resources/fine-tuning/jobs.ts +3 -0
  1294. package/src/resources/fine-tuning/methods.ts +152 -0
  1295. package/src/resources/fine-tuning.ts +3 -0
  1296. package/src/resources/graders/grader-models.ts +450 -0
  1297. package/src/resources/graders/graders.ts +33 -0
  1298. package/src/resources/graders/index.ts +13 -0
  1299. package/src/resources/graders.ts +3 -0
  1300. package/src/resources/images.ts +848 -0
  1301. package/src/resources/index.ts +145 -0
  1302. package/src/resources/models.ts +73 -0
  1303. package/src/resources/moderations.ts +367 -0
  1304. package/src/resources/realtime/api.md +128 -0
  1305. package/src/resources/realtime/calls.ts +226 -0
  1306. package/src/resources/realtime/client-secrets.ts +761 -0
  1307. package/src/resources/realtime/index.ts +13 -0
  1308. package/src/resources/realtime/realtime.ts +4844 -0
  1309. package/src/resources/realtime.ts +3 -0
  1310. package/src/resources/responses/api.md +167 -0
  1311. package/src/resources/responses/index.ts +5 -0
  1312. package/src/resources/responses/input-items.ts +87 -0
  1313. package/src/resources/responses/input-tokens.ts +164 -0
  1314. package/src/resources/responses/responses.ts +7000 -0
  1315. package/src/resources/responses.ts +3 -0
  1316. package/src/resources/shared.ts +423 -0
  1317. package/src/resources/skills/content.ts +20 -0
  1318. package/src/resources/skills/index.ts +24 -0
  1319. package/src/resources/skills/skills.ts +191 -0
  1320. package/src/resources/skills/versions/content.ts +32 -0
  1321. package/src/resources/skills/versions/index.ts +14 -0
  1322. package/src/resources/skills/versions/versions.ts +196 -0
  1323. package/src/resources/skills/versions.ts +3 -0
  1324. package/src/resources/skills.ts +3 -0
  1325. package/src/resources/uploads/index.ts +4 -0
  1326. package/src/resources/uploads/parts.ts +66 -0
  1327. package/src/resources/uploads/uploads.ts +201 -0
  1328. package/src/resources/uploads.ts +3 -0
  1329. package/src/resources/vector-stores/file-batches.ts +255 -0
  1330. package/src/resources/vector-stores/files.ts +306 -0
  1331. package/src/resources/vector-stores/index.ts +43 -0
  1332. package/src/resources/vector-stores/vector-stores.ts +562 -0
  1333. package/src/resources/vector-stores.ts +3 -0
  1334. package/src/resources/videos.ts +257 -0
  1335. package/src/resources/webhooks/api.md +24 -0
  1336. package/src/resources/webhooks/index.ts +3 -0
  1337. package/src/resources/webhooks/webhooks.ts +702 -0
  1338. package/src/resources/webhooks.ts +3 -0
  1339. package/src/resources.ts +1 -0
  1340. package/src/streaming.ts +2 -0
  1341. package/src/tsconfig.json +11 -0
  1342. package/src/uploads.ts +2 -0
  1343. package/src/version.ts +1 -0
  1344. package/streaming.d.mts +2 -0
  1345. package/streaming.d.mts.map +1 -0
  1346. package/streaming.d.ts +2 -0
  1347. package/streaming.d.ts.map +1 -0
  1348. package/streaming.js +6 -0
  1349. package/streaming.js.map +1 -0
  1350. package/streaming.mjs +2 -0
  1351. package/streaming.mjs.map +1 -0
  1352. package/uploads.d.mts +2 -0
  1353. package/uploads.d.mts.map +1 -0
  1354. package/uploads.d.ts +2 -0
  1355. package/uploads.d.ts.map +1 -0
  1356. package/uploads.js +6 -0
  1357. package/uploads.js.map +1 -0
  1358. package/uploads.mjs +2 -0
  1359. package/uploads.mjs.map +1 -0
  1360. package/version.d.mts +2 -0
  1361. package/version.d.mts.map +1 -0
  1362. package/version.d.ts +2 -0
  1363. package/version.d.ts.map +1 -0
  1364. package/version.js +5 -0
  1365. package/version.js.map +1 -0
  1366. package/version.mjs +2 -0
  1367. package/version.mjs.map +1 -0
@@ -0,0 +1,3941 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as RealtimeAPI from "./realtime.js";
3
+ import * as Shared from "../shared.js";
4
+ import * as CallsAPI from "./calls.js";
5
+ import { CallAcceptParams, CallReferParams, CallRejectParams, Calls } from "./calls.js";
6
+ import * as ClientSecretsAPI from "./client-secrets.js";
7
+ import { ClientSecretCreateParams, ClientSecretCreateResponse, ClientSecrets, RealtimeSessionClientSecret, RealtimeSessionCreateResponse, RealtimeTranscriptionSessionCreateResponse, RealtimeTranscriptionSessionTurnDetection } from "./client-secrets.js";
8
+ import * as ResponsesAPI from "../responses/responses.js";
9
+ export declare class Realtime extends APIResource {
10
+ clientSecrets: ClientSecretsAPI.ClientSecrets;
11
+ calls: CallsAPI.Calls;
12
+ }
13
+ export interface AudioTranscription {
14
+ /**
15
+ * The language of the input audio. Supplying the input language in
16
+ * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
17
+ * format will improve accuracy and latency.
18
+ */
19
+ language?: string;
20
+ /**
21
+ * The model to use for transcription. Current options are `whisper-1`,
22
+ * `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`,
23
+ * `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use
24
+ * `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
25
+ */
26
+ model?: (string & {}) | 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-4o-mini-transcribe-2025-12-15' | 'gpt-4o-transcribe' | 'gpt-4o-transcribe-diarize';
27
+ /**
28
+ * An optional text to guide the model's style or continue a previous audio
29
+ * segment. For `whisper-1`, the
30
+ * [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
31
+ * For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
32
+ * prompt is a free text string, for example "expect words related to technology".
33
+ */
34
+ prompt?: string;
35
+ }
36
+ /**
37
+ * Returned when a conversation is created. Emitted right after session creation.
38
+ */
39
+ export interface ConversationCreatedEvent {
40
+ /**
41
+ * The conversation resource.
42
+ */
43
+ conversation: ConversationCreatedEvent.Conversation;
44
+ /**
45
+ * The unique ID of the server event.
46
+ */
47
+ event_id: string;
48
+ /**
49
+ * The event type, must be `conversation.created`.
50
+ */
51
+ type: 'conversation.created';
52
+ }
53
+ export declare namespace ConversationCreatedEvent {
54
+ /**
55
+ * The conversation resource.
56
+ */
57
+ interface Conversation {
58
+ /**
59
+ * The unique ID of the conversation.
60
+ */
61
+ id?: string;
62
+ /**
63
+ * The object type, must be `realtime.conversation`.
64
+ */
65
+ object?: 'realtime.conversation';
66
+ }
67
+ }
68
+ /**
69
+ * A single item within a Realtime conversation.
70
+ */
71
+ export type ConversationItem = RealtimeConversationItemSystemMessage | RealtimeConversationItemUserMessage | RealtimeConversationItemAssistantMessage | RealtimeConversationItemFunctionCall | RealtimeConversationItemFunctionCallOutput | RealtimeMcpApprovalResponse | RealtimeMcpListTools | RealtimeMcpToolCall | RealtimeMcpApprovalRequest;
72
+ /**
73
+ * Sent by the server when an Item is added to the default Conversation. This can
74
+ * happen in several cases:
75
+ *
76
+ * - When the client sends a `conversation.item.create` event.
77
+ * - When the input audio buffer is committed. In this case the item will be a user
78
+ * message containing the audio from the buffer.
79
+ * - When the model is generating a Response. In this case the
80
+ * `conversation.item.added` event will be sent when the model starts generating
81
+ * a specific Item, and thus it will not yet have any content (and `status` will
82
+ * be `in_progress`).
83
+ *
84
+ * The event will include the full content of the Item (except when model is
85
+ * generating a Response) except for audio data, which can be retrieved separately
86
+ * with a `conversation.item.retrieve` event if necessary.
87
+ */
88
+ export interface ConversationItemAdded {
89
+ /**
90
+ * The unique ID of the server event.
91
+ */
92
+ event_id: string;
93
+ /**
94
+ * A single item within a Realtime conversation.
95
+ */
96
+ item: ConversationItem;
97
+ /**
98
+ * The event type, must be `conversation.item.added`.
99
+ */
100
+ type: 'conversation.item.added';
101
+ /**
102
+ * The ID of the item that precedes this one, if any. This is used to maintain
103
+ * ordering when items are inserted.
104
+ */
105
+ previous_item_id?: string | null;
106
+ }
107
+ /**
108
+ * Add a new Item to the Conversation's context, including messages, function
109
+ * calls, and function call responses. This event can be used both to populate a
110
+ * "history" of the conversation and to add new items mid-stream, but has the
111
+ * current limitation that it cannot populate assistant audio messages.
112
+ *
113
+ * If successful, the server will respond with a `conversation.item.created` event,
114
+ * otherwise an `error` event will be sent.
115
+ */
116
+ export interface ConversationItemCreateEvent {
117
+ /**
118
+ * A single item within a Realtime conversation.
119
+ */
120
+ item: ConversationItem;
121
+ /**
122
+ * The event type, must be `conversation.item.create`.
123
+ */
124
+ type: 'conversation.item.create';
125
+ /**
126
+ * Optional client-generated ID used to identify this event.
127
+ */
128
+ event_id?: string;
129
+ /**
130
+ * The ID of the preceding item after which the new item will be inserted. If not
131
+ * set, the new item will be appended to the end of the conversation.
132
+ *
133
+ * If set to `root`, the new item will be added to the beginning of the
134
+ * conversation.
135
+ *
136
+ * If set to an existing ID, it allows an item to be inserted mid-conversation. If
137
+ * the ID cannot be found, an error will be returned and the item will not be
138
+ * added.
139
+ */
140
+ previous_item_id?: string;
141
+ }
142
+ /**
143
+ * Returned when a conversation item is created. There are several scenarios that
144
+ * produce this event:
145
+ *
146
+ * - The server is generating a Response, which if successful will produce either
147
+ * one or two Items, which will be of type `message` (role `assistant`) or type
148
+ * `function_call`.
149
+ * - The input audio buffer has been committed, either by the client or the server
150
+ * (in `server_vad` mode). The server will take the content of the input audio
151
+ * buffer and add it to a new user message Item.
152
+ * - The client has sent a `conversation.item.create` event to add a new Item to
153
+ * the Conversation.
154
+ */
155
+ export interface ConversationItemCreatedEvent {
156
+ /**
157
+ * The unique ID of the server event.
158
+ */
159
+ event_id: string;
160
+ /**
161
+ * A single item within a Realtime conversation.
162
+ */
163
+ item: ConversationItem;
164
+ /**
165
+ * The event type, must be `conversation.item.created`.
166
+ */
167
+ type: 'conversation.item.created';
168
+ /**
169
+ * The ID of the preceding item in the Conversation context, allows the client to
170
+ * understand the order of the conversation. Can be `null` if the item has no
171
+ * predecessor.
172
+ */
173
+ previous_item_id?: string | null;
174
+ }
175
+ /**
176
+ * Send this event when you want to remove any item from the conversation history.
177
+ * The server will respond with a `conversation.item.deleted` event, unless the
178
+ * item does not exist in the conversation history, in which case the server will
179
+ * respond with an error.
180
+ */
181
+ export interface ConversationItemDeleteEvent {
182
+ /**
183
+ * The ID of the item to delete.
184
+ */
185
+ item_id: string;
186
+ /**
187
+ * The event type, must be `conversation.item.delete`.
188
+ */
189
+ type: 'conversation.item.delete';
190
+ /**
191
+ * Optional client-generated ID used to identify this event.
192
+ */
193
+ event_id?: string;
194
+ }
195
+ /**
196
+ * Returned when an item in the conversation is deleted by the client with a
197
+ * `conversation.item.delete` event. This event is used to synchronize the server's
198
+ * understanding of the conversation history with the client's view.
199
+ */
200
+ export interface ConversationItemDeletedEvent {
201
+ /**
202
+ * The unique ID of the server event.
203
+ */
204
+ event_id: string;
205
+ /**
206
+ * The ID of the item that was deleted.
207
+ */
208
+ item_id: string;
209
+ /**
210
+ * The event type, must be `conversation.item.deleted`.
211
+ */
212
+ type: 'conversation.item.deleted';
213
+ }
214
+ /**
215
+ * Returned when a conversation item is finalized.
216
+ *
217
+ * The event will include the full content of the Item except for audio data, which
218
+ * can be retrieved separately with a `conversation.item.retrieve` event if needed.
219
+ */
220
+ export interface ConversationItemDone {
221
+ /**
222
+ * The unique ID of the server event.
223
+ */
224
+ event_id: string;
225
+ /**
226
+ * A single item within a Realtime conversation.
227
+ */
228
+ item: ConversationItem;
229
+ /**
230
+ * The event type, must be `conversation.item.done`.
231
+ */
232
+ type: 'conversation.item.done';
233
+ /**
234
+ * The ID of the item that precedes this one, if any. This is used to maintain
235
+ * ordering when items are inserted.
236
+ */
237
+ previous_item_id?: string | null;
238
+ }
239
+ /**
240
+ * This event is the output of audio transcription for user audio written to the
241
+ * user audio buffer. Transcription begins when the input audio buffer is committed
242
+ * by the client or server (when VAD is enabled). Transcription runs asynchronously
243
+ * with Response creation, so this event may come before or after the Response
244
+ * events.
245
+ *
246
+ * Realtime API models accept audio natively, and thus input transcription is a
247
+ * separate process run on a separate ASR (Automatic Speech Recognition) model. The
248
+ * transcript may diverge somewhat from the model's interpretation, and should be
249
+ * treated as a rough guide.
250
+ */
251
+ export interface ConversationItemInputAudioTranscriptionCompletedEvent {
252
+ /**
253
+ * The index of the content part containing the audio.
254
+ */
255
+ content_index: number;
256
+ /**
257
+ * The unique ID of the server event.
258
+ */
259
+ event_id: string;
260
+ /**
261
+ * The ID of the item containing the audio that is being transcribed.
262
+ */
263
+ item_id: string;
264
+ /**
265
+ * The transcribed text.
266
+ */
267
+ transcript: string;
268
+ /**
269
+ * The event type, must be `conversation.item.input_audio_transcription.completed`.
270
+ */
271
+ type: 'conversation.item.input_audio_transcription.completed';
272
+ /**
273
+ * Usage statistics for the transcription, this is billed according to the ASR
274
+ * model's pricing rather than the realtime model's pricing.
275
+ */
276
+ usage: ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageTokens | ConversationItemInputAudioTranscriptionCompletedEvent.TranscriptTextUsageDuration;
277
+ /**
278
+ * The log probabilities of the transcription.
279
+ */
280
+ logprobs?: Array<LogProbProperties> | null;
281
+ }
282
+ export declare namespace ConversationItemInputAudioTranscriptionCompletedEvent {
283
+ /**
284
+ * Usage statistics for models billed by token usage.
285
+ */
286
+ interface TranscriptTextUsageTokens {
287
+ /**
288
+ * Number of input tokens billed for this request.
289
+ */
290
+ input_tokens: number;
291
+ /**
292
+ * Number of output tokens generated.
293
+ */
294
+ output_tokens: number;
295
+ /**
296
+ * Total number of tokens used (input + output).
297
+ */
298
+ total_tokens: number;
299
+ /**
300
+ * The type of the usage object. Always `tokens` for this variant.
301
+ */
302
+ type: 'tokens';
303
+ /**
304
+ * Details about the input tokens billed for this request.
305
+ */
306
+ input_token_details?: TranscriptTextUsageTokens.InputTokenDetails;
307
+ }
308
+ namespace TranscriptTextUsageTokens {
309
+ /**
310
+ * Details about the input tokens billed for this request.
311
+ */
312
+ interface InputTokenDetails {
313
+ /**
314
+ * Number of audio tokens billed for this request.
315
+ */
316
+ audio_tokens?: number;
317
+ /**
318
+ * Number of text tokens billed for this request.
319
+ */
320
+ text_tokens?: number;
321
+ }
322
+ }
323
+ /**
324
+ * Usage statistics for models billed by audio input duration.
325
+ */
326
+ interface TranscriptTextUsageDuration {
327
+ /**
328
+ * Duration of the input audio in seconds.
329
+ */
330
+ seconds: number;
331
+ /**
332
+ * The type of the usage object. Always `duration` for this variant.
333
+ */
334
+ type: 'duration';
335
+ }
336
+ }
337
+ /**
338
+ * Returned when the text value of an input audio transcription content part is
339
+ * updated with incremental transcription results.
340
+ */
341
+ export interface ConversationItemInputAudioTranscriptionDeltaEvent {
342
+ /**
343
+ * The unique ID of the server event.
344
+ */
345
+ event_id: string;
346
+ /**
347
+ * The ID of the item containing the audio that is being transcribed.
348
+ */
349
+ item_id: string;
350
+ /**
351
+ * The event type, must be `conversation.item.input_audio_transcription.delta`.
352
+ */
353
+ type: 'conversation.item.input_audio_transcription.delta';
354
+ /**
355
+ * The index of the content part in the item's content array.
356
+ */
357
+ content_index?: number;
358
+ /**
359
+ * The text delta.
360
+ */
361
+ delta?: string;
362
+ /**
363
+ * The log probabilities of the transcription. These can be enabled by
364
+ * configurating the session with
365
+ * `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the
366
+ * array corresponds a log probability of which token would be selected for this
367
+ * chunk of transcription. This can help to identify if it was possible there were
368
+ * multiple valid options for a given chunk of transcription.
369
+ */
370
+ logprobs?: Array<LogProbProperties> | null;
371
+ }
372
+ /**
373
+ * Returned when input audio transcription is configured, and a transcription
374
+ * request for a user message failed. These events are separate from other `error`
375
+ * events so that the client can identify the related Item.
376
+ */
377
+ export interface ConversationItemInputAudioTranscriptionFailedEvent {
378
+ /**
379
+ * The index of the content part containing the audio.
380
+ */
381
+ content_index: number;
382
+ /**
383
+ * Details of the transcription error.
384
+ */
385
+ error: ConversationItemInputAudioTranscriptionFailedEvent.Error;
386
+ /**
387
+ * The unique ID of the server event.
388
+ */
389
+ event_id: string;
390
+ /**
391
+ * The ID of the user message item.
392
+ */
393
+ item_id: string;
394
+ /**
395
+ * The event type, must be `conversation.item.input_audio_transcription.failed`.
396
+ */
397
+ type: 'conversation.item.input_audio_transcription.failed';
398
+ }
399
+ export declare namespace ConversationItemInputAudioTranscriptionFailedEvent {
400
+ /**
401
+ * Details of the transcription error.
402
+ */
403
+ interface Error {
404
+ /**
405
+ * Error code, if any.
406
+ */
407
+ code?: string;
408
+ /**
409
+ * A human-readable error message.
410
+ */
411
+ message?: string;
412
+ /**
413
+ * Parameter related to the error, if any.
414
+ */
415
+ param?: string;
416
+ /**
417
+ * The type of error.
418
+ */
419
+ type?: string;
420
+ }
421
+ }
422
+ /**
423
+ * Returned when an input audio transcription segment is identified for an item.
424
+ */
425
+ export interface ConversationItemInputAudioTranscriptionSegment {
426
+ /**
427
+ * The segment identifier.
428
+ */
429
+ id: string;
430
+ /**
431
+ * The index of the input audio content part within the item.
432
+ */
433
+ content_index: number;
434
+ /**
435
+ * End time of the segment in seconds.
436
+ */
437
+ end: number;
438
+ /**
439
+ * The unique ID of the server event.
440
+ */
441
+ event_id: string;
442
+ /**
443
+ * The ID of the item containing the input audio content.
444
+ */
445
+ item_id: string;
446
+ /**
447
+ * The detected speaker label for this segment.
448
+ */
449
+ speaker: string;
450
+ /**
451
+ * Start time of the segment in seconds.
452
+ */
453
+ start: number;
454
+ /**
455
+ * The text for this segment.
456
+ */
457
+ text: string;
458
+ /**
459
+ * The event type, must be `conversation.item.input_audio_transcription.segment`.
460
+ */
461
+ type: 'conversation.item.input_audio_transcription.segment';
462
+ }
463
+ /**
464
+ * Send this event when you want to retrieve the server's representation of a
465
+ * specific item in the conversation history. This is useful, for example, to
466
+ * inspect user audio after noise cancellation and VAD. The server will respond
467
+ * with a `conversation.item.retrieved` event, unless the item does not exist in
468
+ * the conversation history, in which case the server will respond with an error.
469
+ */
470
+ export interface ConversationItemRetrieveEvent {
471
+ /**
472
+ * The ID of the item to retrieve.
473
+ */
474
+ item_id: string;
475
+ /**
476
+ * The event type, must be `conversation.item.retrieve`.
477
+ */
478
+ type: 'conversation.item.retrieve';
479
+ /**
480
+ * Optional client-generated ID used to identify this event.
481
+ */
482
+ event_id?: string;
483
+ }
484
+ /**
485
+ * Send this event to truncate a previous assistant message’s audio. The server
486
+ * will produce audio faster than realtime, so this event is useful when the user
487
+ * interrupts to truncate audio that has already been sent to the client but not
488
+ * yet played. This will synchronize the server's understanding of the audio with
489
+ * the client's playback.
490
+ *
491
+ * Truncating audio will delete the server-side text transcript to ensure there is
492
+ * not text in the context that hasn't been heard by the user.
493
+ *
494
+ * If successful, the server will respond with a `conversation.item.truncated`
495
+ * event.
496
+ */
497
+ export interface ConversationItemTruncateEvent {
498
+ /**
499
+ * Inclusive duration up to which audio is truncated, in milliseconds. If the
500
+ * audio_end_ms is greater than the actual audio duration, the server will respond
501
+ * with an error.
502
+ */
503
+ audio_end_ms: number;
504
+ /**
505
+ * The index of the content part to truncate. Set this to `0`.
506
+ */
507
+ content_index: number;
508
+ /**
509
+ * The ID of the assistant message item to truncate. Only assistant message items
510
+ * can be truncated.
511
+ */
512
+ item_id: string;
513
+ /**
514
+ * The event type, must be `conversation.item.truncate`.
515
+ */
516
+ type: 'conversation.item.truncate';
517
+ /**
518
+ * Optional client-generated ID used to identify this event.
519
+ */
520
+ event_id?: string;
521
+ }
522
+ /**
523
+ * Returned when an earlier assistant audio message item is truncated by the client
524
+ * with a `conversation.item.truncate` event. This event is used to synchronize the
525
+ * server's understanding of the audio with the client's playback.
526
+ *
527
+ * This action will truncate the audio and remove the server-side text transcript
528
+ * to ensure there is no text in the context that hasn't been heard by the user.
529
+ */
530
+ export interface ConversationItemTruncatedEvent {
531
+ /**
532
+ * The duration up to which the audio was truncated, in milliseconds.
533
+ */
534
+ audio_end_ms: number;
535
+ /**
536
+ * The index of the content part that was truncated.
537
+ */
538
+ content_index: number;
539
+ /**
540
+ * The unique ID of the server event.
541
+ */
542
+ event_id: string;
543
+ /**
544
+ * The ID of the assistant message item that was truncated.
545
+ */
546
+ item_id: string;
547
+ /**
548
+ * The event type, must be `conversation.item.truncated`.
549
+ */
550
+ type: 'conversation.item.truncated';
551
+ }
552
+ /**
553
+ * The item to add to the conversation.
554
+ */
555
+ export interface ConversationItemWithReference {
556
+ /**
557
+ * For an item of type (`message` | `function_call` | `function_call_output`) this
558
+ * field allows the client to assign the unique ID of the item. It is not required
559
+ * because the server will generate one if not provided.
560
+ *
561
+ * For an item of type `item_reference`, this field is required and is a reference
562
+ * to any item that has previously existed in the conversation.
563
+ */
564
+ id?: string;
565
+ /**
566
+ * The arguments of the function call (for `function_call` items).
567
+ */
568
+ arguments?: string;
569
+ /**
570
+ * The ID of the function call (for `function_call` and `function_call_output`
571
+ * items). If passed on a `function_call_output` item, the server will check that a
572
+ * `function_call` item with the same ID exists in the conversation history.
573
+ */
574
+ call_id?: string;
575
+ /**
576
+ * The content of the message, applicable for `message` items.
577
+ *
578
+ * - Message items of role `system` support only `input_text` content
579
+ * - Message items of role `user` support `input_text` and `input_audio` content
580
+ * - Message items of role `assistant` support `text` content.
581
+ */
582
+ content?: Array<ConversationItemWithReference.Content>;
583
+ /**
584
+ * The name of the function being called (for `function_call` items).
585
+ */
586
+ name?: string;
587
+ /**
588
+ * Identifier for the API object being returned - always `realtime.item`.
589
+ */
590
+ object?: 'realtime.item';
591
+ /**
592
+ * The output of the function call (for `function_call_output` items).
593
+ */
594
+ output?: string;
595
+ /**
596
+ * The role of the message sender (`user`, `assistant`, `system`), only applicable
597
+ * for `message` items.
598
+ */
599
+ role?: 'user' | 'assistant' | 'system';
600
+ /**
601
+ * The status of the item (`completed`, `incomplete`, `in_progress`). These have no
602
+ * effect on the conversation, but are accepted for consistency with the
603
+ * `conversation.item.created` event.
604
+ */
605
+ status?: 'completed' | 'incomplete' | 'in_progress';
606
+ /**
607
+ * The type of the item (`message`, `function_call`, `function_call_output`,
608
+ * `item_reference`).
609
+ */
610
+ type?: 'message' | 'function_call' | 'function_call_output' | 'item_reference';
611
+ }
612
+ export declare namespace ConversationItemWithReference {
613
+ interface Content {
614
+ /**
615
+ * ID of a previous conversation item to reference (for `item_reference` content
616
+ * types in `response.create` events). These can reference both client and server
617
+ * created items.
618
+ */
619
+ id?: string;
620
+ /**
621
+ * Base64-encoded audio bytes, used for `input_audio` content type.
622
+ */
623
+ audio?: string;
624
+ /**
625
+ * The text content, used for `input_text` and `text` content types.
626
+ */
627
+ text?: string;
628
+ /**
629
+ * The transcript of the audio, used for `input_audio` content type.
630
+ */
631
+ transcript?: string;
632
+ /**
633
+ * The content type (`input_text`, `input_audio`, `item_reference`, `text`).
634
+ */
635
+ type?: 'input_text' | 'input_audio' | 'item_reference' | 'text';
636
+ }
637
+ }
638
+ /**
639
+ * Send this event to append audio bytes to the input audio buffer. The audio
640
+ * buffer is temporary storage you can write to and later commit. A "commit" will
641
+ * create a new user message item in the conversation history from the buffer
642
+ * content and clear the buffer. Input audio transcription (if enabled) will be
643
+ * generated when the buffer is committed.
644
+ *
645
+ * If VAD is enabled the audio buffer is used to detect speech and the server will
646
+ * decide when to commit. When Server VAD is disabled, you must commit the audio
647
+ * buffer manually. Input audio noise reduction operates on writes to the audio
648
+ * buffer.
649
+ *
650
+ * The client may choose how much audio to place in each event up to a maximum of
651
+ * 15 MiB, for example streaming smaller chunks from the client may allow the VAD
652
+ * to be more responsive. Unlike most other client events, the server will not send
653
+ * a confirmation response to this event.
654
+ */
655
+ export interface InputAudioBufferAppendEvent {
656
+ /**
657
+ * Base64-encoded audio bytes. This must be in the format specified by the
658
+ * `input_audio_format` field in the session configuration.
659
+ */
660
+ audio: string;
661
+ /**
662
+ * The event type, must be `input_audio_buffer.append`.
663
+ */
664
+ type: 'input_audio_buffer.append';
665
+ /**
666
+ * Optional client-generated ID used to identify this event.
667
+ */
668
+ event_id?: string;
669
+ }
670
+ /**
671
+ * Send this event to clear the audio bytes in the buffer. The server will respond
672
+ * with an `input_audio_buffer.cleared` event.
673
+ */
674
+ export interface InputAudioBufferClearEvent {
675
+ /**
676
+ * The event type, must be `input_audio_buffer.clear`.
677
+ */
678
+ type: 'input_audio_buffer.clear';
679
+ /**
680
+ * Optional client-generated ID used to identify this event.
681
+ */
682
+ event_id?: string;
683
+ }
684
+ /**
685
+ * Returned when the input audio buffer is cleared by the client with a
686
+ * `input_audio_buffer.clear` event.
687
+ */
688
+ export interface InputAudioBufferClearedEvent {
689
+ /**
690
+ * The unique ID of the server event.
691
+ */
692
+ event_id: string;
693
+ /**
694
+ * The event type, must be `input_audio_buffer.cleared`.
695
+ */
696
+ type: 'input_audio_buffer.cleared';
697
+ }
698
+ /**
699
+ * Send this event to commit the user input audio buffer, which will create a new
700
+ * user message item in the conversation. This event will produce an error if the
701
+ * input audio buffer is empty. When in Server VAD mode, the client does not need
702
+ * to send this event, the server will commit the audio buffer automatically.
703
+ *
704
+ * Committing the input audio buffer will trigger input audio transcription (if
705
+ * enabled in session configuration), but it will not create a response from the
706
+ * model. The server will respond with an `input_audio_buffer.committed` event.
707
+ */
708
+ export interface InputAudioBufferCommitEvent {
709
+ /**
710
+ * The event type, must be `input_audio_buffer.commit`.
711
+ */
712
+ type: 'input_audio_buffer.commit';
713
+ /**
714
+ * Optional client-generated ID used to identify this event.
715
+ */
716
+ event_id?: string;
717
+ }
718
+ /**
719
+ * Returned when an input audio buffer is committed, either by the client or
720
+ * automatically in server VAD mode. The `item_id` property is the ID of the user
721
+ * message item that will be created, thus a `conversation.item.created` event will
722
+ * also be sent to the client.
723
+ */
724
+ export interface InputAudioBufferCommittedEvent {
725
+ /**
726
+ * The unique ID of the server event.
727
+ */
728
+ event_id: string;
729
+ /**
730
+ * The ID of the user message item that will be created.
731
+ */
732
+ item_id: string;
733
+ /**
734
+ * The event type, must be `input_audio_buffer.committed`.
735
+ */
736
+ type: 'input_audio_buffer.committed';
737
+ /**
738
+ * The ID of the preceding item after which the new item will be inserted. Can be
739
+ * `null` if the item has no predecessor.
740
+ */
741
+ previous_item_id?: string | null;
742
+ }
743
+ /**
744
+ * **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message
745
+ * that represents a telephone keypad press (0–9, \*, #, A–D). The `event` property
746
+ * is the keypad that the user press. The `received_at` is the UTC Unix Timestamp
747
+ * that the server received the event.
748
+ */
749
+ export interface InputAudioBufferDtmfEventReceivedEvent {
750
+ /**
751
+ * The telephone keypad that was pressed by the user.
752
+ */
753
+ event: string;
754
+ /**
755
+ * UTC Unix Timestamp when DTMF Event was received by server.
756
+ */
757
+ received_at: number;
758
+ /**
759
+ * The event type, must be `input_audio_buffer.dtmf_event_received`.
760
+ */
761
+ type: 'input_audio_buffer.dtmf_event_received';
762
+ }
763
+ /**
764
+ * Sent by the server when in `server_vad` mode to indicate that speech has been
765
+ * detected in the audio buffer. This can happen any time audio is added to the
766
+ * buffer (unless speech is already detected). The client may want to use this
767
+ * event to interrupt audio playback or provide visual feedback to the user.
768
+ *
769
+ * The client should expect to receive a `input_audio_buffer.speech_stopped` event
770
+ * when speech stops. The `item_id` property is the ID of the user message item
771
+ * that will be created when speech stops and will also be included in the
772
+ * `input_audio_buffer.speech_stopped` event (unless the client manually commits
773
+ * the audio buffer during VAD activation).
774
+ */
775
+ export interface InputAudioBufferSpeechStartedEvent {
776
+ /**
777
+ * Milliseconds from the start of all audio written to the buffer during the
778
+ * session when speech was first detected. This will correspond to the beginning of
779
+ * audio sent to the model, and thus includes the `prefix_padding_ms` configured in
780
+ * the Session.
781
+ */
782
+ audio_start_ms: number;
783
+ /**
784
+ * The unique ID of the server event.
785
+ */
786
+ event_id: string;
787
+ /**
788
+ * The ID of the user message item that will be created when speech stops.
789
+ */
790
+ item_id: string;
791
+ /**
792
+ * The event type, must be `input_audio_buffer.speech_started`.
793
+ */
794
+ type: 'input_audio_buffer.speech_started';
795
+ }
796
+ /**
797
+ * Returned in `server_vad` mode when the server detects the end of speech in the
798
+ * audio buffer. The server will also send an `conversation.item.created` event
799
+ * with the user message item that is created from the audio buffer.
800
+ */
801
+ export interface InputAudioBufferSpeechStoppedEvent {
802
+ /**
803
+ * Milliseconds since the session started when speech stopped. This will correspond
804
+ * to the end of audio sent to the model, and thus includes the
805
+ * `min_silence_duration_ms` configured in the Session.
806
+ */
807
+ audio_end_ms: number;
808
+ /**
809
+ * The unique ID of the server event.
810
+ */
811
+ event_id: string;
812
+ /**
813
+ * The ID of the user message item that will be created.
814
+ */
815
+ item_id: string;
816
+ /**
817
+ * The event type, must be `input_audio_buffer.speech_stopped`.
818
+ */
819
+ type: 'input_audio_buffer.speech_stopped';
820
+ }
821
+ /**
822
+ * Returned when the Server VAD timeout is triggered for the input audio buffer.
823
+ * This is configured with `idle_timeout_ms` in the `turn_detection` settings of
824
+ * the session, and it indicates that there hasn't been any speech detected for the
825
+ * configured duration.
826
+ *
827
+ * The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio
828
+ * after the last model response up to the triggering time, as an offset from the
829
+ * beginning of audio written to the input audio buffer. This means it demarcates
830
+ * the segment of audio that was silent and the difference between the start and
831
+ * end values will roughly match the configured timeout.
832
+ *
833
+ * The empty audio will be committed to the conversation as an `input_audio` item
834
+ * (there will be a `input_audio_buffer.committed` event) and a model response will
835
+ * be generated. There may be speech that didn't trigger VAD but is still detected
836
+ * by the model, so the model may respond with something relevant to the
837
+ * conversation or a prompt to continue speaking.
838
+ */
839
+ export interface InputAudioBufferTimeoutTriggered {
840
+ /**
841
+ * Millisecond offset of audio written to the input audio buffer at the time the
842
+ * timeout was triggered.
843
+ */
844
+ audio_end_ms: number;
845
+ /**
846
+ * Millisecond offset of audio written to the input audio buffer that was after the
847
+ * playback time of the last model response.
848
+ */
849
+ audio_start_ms: number;
850
+ /**
851
+ * The unique ID of the server event.
852
+ */
853
+ event_id: string;
854
+ /**
855
+ * The ID of the item associated with this segment.
856
+ */
857
+ item_id: string;
858
+ /**
859
+ * The event type, must be `input_audio_buffer.timeout_triggered`.
860
+ */
861
+ type: 'input_audio_buffer.timeout_triggered';
862
+ }
863
+ /**
864
+ * A log probability object.
865
+ */
866
+ export interface LogProbProperties {
867
+ /**
868
+ * The token that was used to generate the log probability.
869
+ */
870
+ token: string;
871
+ /**
872
+ * The bytes that were used to generate the log probability.
873
+ */
874
+ bytes: Array<number>;
875
+ /**
876
+ * The log probability of the token.
877
+ */
878
+ logprob: number;
879
+ }
880
+ /**
881
+ * Returned when listing MCP tools has completed for an item.
882
+ */
883
+ export interface McpListToolsCompleted {
884
+ /**
885
+ * The unique ID of the server event.
886
+ */
887
+ event_id: string;
888
+ /**
889
+ * The ID of the MCP list tools item.
890
+ */
891
+ item_id: string;
892
+ /**
893
+ * The event type, must be `mcp_list_tools.completed`.
894
+ */
895
+ type: 'mcp_list_tools.completed';
896
+ }
897
+ /**
898
+ * Returned when listing MCP tools has failed for an item.
899
+ */
900
+ export interface McpListToolsFailed {
901
+ /**
902
+ * The unique ID of the server event.
903
+ */
904
+ event_id: string;
905
+ /**
906
+ * The ID of the MCP list tools item.
907
+ */
908
+ item_id: string;
909
+ /**
910
+ * The event type, must be `mcp_list_tools.failed`.
911
+ */
912
+ type: 'mcp_list_tools.failed';
913
+ }
914
+ /**
915
+ * Returned when listing MCP tools is in progress for an item.
916
+ */
917
+ export interface McpListToolsInProgress {
918
+ /**
919
+ * The unique ID of the server event.
920
+ */
921
+ event_id: string;
922
+ /**
923
+ * The ID of the MCP list tools item.
924
+ */
925
+ item_id: string;
926
+ /**
927
+ * The event type, must be `mcp_list_tools.in_progress`.
928
+ */
929
+ type: 'mcp_list_tools.in_progress';
930
+ }
931
+ /**
932
+ * Type of noise reduction. `near_field` is for close-talking microphones such as
933
+ * headphones, `far_field` is for far-field microphones such as laptop or
934
+ * conference room microphones.
935
+ */
936
+ export type NoiseReductionType = 'near_field' | 'far_field';
937
+ /**
938
+ * **WebRTC/SIP Only:** Emit to cut off the current audio response. This will
939
+ * trigger the server to stop generating audio and emit a
940
+ * `output_audio_buffer.cleared` event. This event should be preceded by a
941
+ * `response.cancel` client event to stop the generation of the current response.
942
+ * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
943
+ */
944
+ export interface OutputAudioBufferClearEvent {
945
+ /**
946
+ * The event type, must be `output_audio_buffer.clear`.
947
+ */
948
+ type: 'output_audio_buffer.clear';
949
+ /**
950
+ * The unique ID of the client event used for error handling.
951
+ */
952
+ event_id?: string;
953
+ }
954
+ /**
955
+ * Emitted at the beginning of a Response to indicate the updated rate limits. When
956
+ * a Response is created some tokens will be "reserved" for the output tokens, the
957
+ * rate limits shown here reflect that reservation, which is then adjusted
958
+ * accordingly once the Response is completed.
959
+ */
960
+ export interface RateLimitsUpdatedEvent {
961
+ /**
962
+ * The unique ID of the server event.
963
+ */
964
+ event_id: string;
965
+ /**
966
+ * List of rate limit information.
967
+ */
968
+ rate_limits: Array<RateLimitsUpdatedEvent.RateLimit>;
969
+ /**
970
+ * The event type, must be `rate_limits.updated`.
971
+ */
972
+ type: 'rate_limits.updated';
973
+ }
974
+ export declare namespace RateLimitsUpdatedEvent {
975
+ interface RateLimit {
976
+ /**
977
+ * The maximum allowed value for the rate limit.
978
+ */
979
+ limit?: number;
980
+ /**
981
+ * The name of the rate limit (`requests`, `tokens`).
982
+ */
983
+ name?: 'requests' | 'tokens';
984
+ /**
985
+ * The remaining value before the limit is reached.
986
+ */
987
+ remaining?: number;
988
+ /**
989
+ * Seconds until the rate limit resets.
990
+ */
991
+ reset_seconds?: number;
992
+ }
993
+ }
994
+ /**
995
+ * Configuration for input and output audio.
996
+ */
997
+ export interface RealtimeAudioConfig {
998
+ input?: RealtimeAudioConfigInput;
999
+ output?: RealtimeAudioConfigOutput;
1000
+ }
1001
+ export interface RealtimeAudioConfigInput {
1002
+ /**
1003
+ * The format of the input audio.
1004
+ */
1005
+ format?: RealtimeAudioFormats;
1006
+ /**
1007
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
1008
+ * off. Noise reduction filters audio added to the input audio buffer before it is
1009
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
1010
+ * detection accuracy (reducing false positives) and model performance by improving
1011
+ * perception of the input audio.
1012
+ */
1013
+ noise_reduction?: RealtimeAudioConfigInput.NoiseReduction;
1014
+ /**
1015
+ * Configuration for input audio transcription, defaults to off and can be set to
1016
+ * `null` to turn off once on. Input audio transcription is not native to the
1017
+ * model, since the model consumes audio directly. Transcription runs
1018
+ * asynchronously through
1019
+ * [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription)
1020
+ * and should be treated as guidance of input audio content rather than precisely
1021
+ * what the model heard. The client can optionally set the language and prompt for
1022
+ * transcription, these offer additional guidance to the transcription service.
1023
+ */
1024
+ transcription?: AudioTranscription;
1025
+ /**
1026
+ * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
1027
+ * set to `null` to turn off, in which case the client must manually trigger model
1028
+ * response.
1029
+ *
1030
+ * Server VAD means that the model will detect the start and end of speech based on
1031
+ * audio volume and respond at the end of user speech.
1032
+ *
1033
+ * Semantic VAD is more advanced and uses a turn detection model (in conjunction
1034
+ * with VAD) to semantically estimate whether the user has finished speaking, then
1035
+ * dynamically sets a timeout based on this probability. For example, if user audio
1036
+ * trails off with "uhhm", the model will score a low probability of turn end and
1037
+ * wait longer for the user to continue speaking. This can be useful for more
1038
+ * natural conversations, but may have a higher latency.
1039
+ */
1040
+ turn_detection?: RealtimeAudioInputTurnDetection | null;
1041
+ }
1042
+ export declare namespace RealtimeAudioConfigInput {
1043
+ /**
1044
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
1045
+ * off. Noise reduction filters audio added to the input audio buffer before it is
1046
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
1047
+ * detection accuracy (reducing false positives) and model performance by improving
1048
+ * perception of the input audio.
1049
+ */
1050
+ interface NoiseReduction {
1051
+ /**
1052
+ * Type of noise reduction. `near_field` is for close-talking microphones such as
1053
+ * headphones, `far_field` is for far-field microphones such as laptop or
1054
+ * conference room microphones.
1055
+ */
1056
+ type?: RealtimeAPI.NoiseReductionType;
1057
+ }
1058
+ }
1059
+ export interface RealtimeAudioConfigOutput {
1060
+ /**
1061
+ * The format of the output audio.
1062
+ */
1063
+ format?: RealtimeAudioFormats;
1064
+ /**
1065
+ * The speed of the model's spoken response as a multiple of the original speed.
1066
+ * 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed.
1067
+ * This value can only be changed in between model turns, not while a response is
1068
+ * in progress.
1069
+ *
1070
+ * This parameter is a post-processing adjustment to the audio after it is
1071
+ * generated, it's also possible to prompt the model to speak faster or slower.
1072
+ */
1073
+ speed?: number;
1074
+ /**
1075
+ * The voice the model uses to respond. Supported built-in voices are `alloy`,
1076
+ * `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
1077
+ * `cedar`. Voice cannot be changed during the session once the model has responded
1078
+ * with audio at least once. We recommend `marin` and `cedar` for best quality.
1079
+ */
1080
+ voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse' | 'marin' | 'cedar';
1081
+ }
1082
+ /**
1083
+ * The PCM audio format. Only a 24kHz sample rate is supported.
1084
+ */
1085
+ export type RealtimeAudioFormats = RealtimeAudioFormats.AudioPCM | RealtimeAudioFormats.AudioPCMU | RealtimeAudioFormats.AudioPCMA;
1086
+ export declare namespace RealtimeAudioFormats {
1087
+ /**
1088
+ * The PCM audio format. Only a 24kHz sample rate is supported.
1089
+ */
1090
+ interface AudioPCM {
1091
+ /**
1092
+ * The sample rate of the audio. Always `24000`.
1093
+ */
1094
+ rate?: 24000;
1095
+ /**
1096
+ * The audio format. Always `audio/pcm`.
1097
+ */
1098
+ type?: 'audio/pcm';
1099
+ }
1100
+ /**
1101
+ * The G.711 μ-law format.
1102
+ */
1103
+ interface AudioPCMU {
1104
+ /**
1105
+ * The audio format. Always `audio/pcmu`.
1106
+ */
1107
+ type?: 'audio/pcmu';
1108
+ }
1109
+ /**
1110
+ * The G.711 A-law format.
1111
+ */
1112
+ interface AudioPCMA {
1113
+ /**
1114
+ * The audio format. Always `audio/pcma`.
1115
+ */
1116
+ type?: 'audio/pcma';
1117
+ }
1118
+ }
1119
+ /**
1120
+ * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
1121
+ * set to `null` to turn off, in which case the client must manually trigger model
1122
+ * response.
1123
+ *
1124
+ * Server VAD means that the model will detect the start and end of speech based on
1125
+ * audio volume and respond at the end of user speech.
1126
+ *
1127
+ * Semantic VAD is more advanced and uses a turn detection model (in conjunction
1128
+ * with VAD) to semantically estimate whether the user has finished speaking, then
1129
+ * dynamically sets a timeout based on this probability. For example, if user audio
1130
+ * trails off with "uhhm", the model will score a low probability of turn end and
1131
+ * wait longer for the user to continue speaking. This can be useful for more
1132
+ * natural conversations, but may have a higher latency.
1133
+ */
1134
+ export type RealtimeAudioInputTurnDetection = RealtimeAudioInputTurnDetection.ServerVad | RealtimeAudioInputTurnDetection.SemanticVad;
1135
+ export declare namespace RealtimeAudioInputTurnDetection {
1136
+ /**
1137
+ * Server-side voice activity detection (VAD) which flips on when user speech is
1138
+ * detected and off after a period of silence.
1139
+ */
1140
+ interface ServerVad {
1141
+ /**
1142
+ * Type of turn detection, `server_vad` to turn on simple Server VAD.
1143
+ */
1144
+ type: 'server_vad';
1145
+ /**
1146
+ * Whether or not to automatically generate a response when a VAD stop event
1147
+ * occurs. If `interrupt_response` is set to `false` this may fail to create a
1148
+ * response if the model is already responding.
1149
+ *
1150
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
1151
+ * will never respond automatically but VAD events will still be emitted.
1152
+ */
1153
+ create_response?: boolean;
1154
+ /**
1155
+ * Optional timeout after which a model response will be triggered automatically.
1156
+ * This is useful for situations in which a long pause from the user is unexpected,
1157
+ * such as a phone call. The model will effectively prompt the user to continue the
1158
+ * conversation based on the current context.
1159
+ *
1160
+ * The timeout value will be applied after the last model response's audio has
1161
+ * finished playing, i.e. it's set to the `response.done` time plus audio playback
1162
+ * duration.
1163
+ *
1164
+ * An `input_audio_buffer.timeout_triggered` event (plus events associated with the
1165
+ * Response) will be emitted when the timeout is reached. Idle timeout is currently
1166
+ * only supported for `server_vad` mode.
1167
+ */
1168
+ idle_timeout_ms?: number | null;
1169
+ /**
1170
+ * Whether or not to automatically interrupt (cancel) any ongoing response with
1171
+ * output to the default conversation (i.e. `conversation` of `auto`) when a VAD
1172
+ * start event occurs. If `true` then the response will be cancelled, otherwise it
1173
+ * will continue until complete.
1174
+ *
1175
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
1176
+ * will never respond automatically but VAD events will still be emitted.
1177
+ */
1178
+ interrupt_response?: boolean;
1179
+ /**
1180
+ * Used only for `server_vad` mode. Amount of audio to include before the VAD
1181
+ * detected speech (in milliseconds). Defaults to 300ms.
1182
+ */
1183
+ prefix_padding_ms?: number;
1184
+ /**
1185
+ * Used only for `server_vad` mode. Duration of silence to detect speech stop (in
1186
+ * milliseconds). Defaults to 500ms. With shorter values the model will respond
1187
+ * more quickly, but may jump in on short pauses from the user.
1188
+ */
1189
+ silence_duration_ms?: number;
1190
+ /**
1191
+ * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this
1192
+ * defaults to 0.5. A higher threshold will require louder audio to activate the
1193
+ * model, and thus might perform better in noisy environments.
1194
+ */
1195
+ threshold?: number;
1196
+ }
1197
+ /**
1198
+ * Server-side semantic turn detection which uses a model to determine when the
1199
+ * user has finished speaking.
1200
+ */
1201
+ interface SemanticVad {
1202
+ /**
1203
+ * Type of turn detection, `semantic_vad` to turn on Semantic VAD.
1204
+ */
1205
+ type: 'semantic_vad';
1206
+ /**
1207
+ * Whether or not to automatically generate a response when a VAD stop event
1208
+ * occurs.
1209
+ */
1210
+ create_response?: boolean;
1211
+ /**
1212
+ * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low`
1213
+ * will wait longer for the user to continue speaking, `high` will respond more
1214
+ * quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`,
1215
+ * and `high` have max timeouts of 8s, 4s, and 2s respectively.
1216
+ */
1217
+ eagerness?: 'low' | 'medium' | 'high' | 'auto';
1218
+ /**
1219
+ * Whether or not to automatically interrupt any ongoing response with output to
1220
+ * the default conversation (i.e. `conversation` of `auto`) when a VAD start event
1221
+ * occurs.
1222
+ */
1223
+ interrupt_response?: boolean;
1224
+ }
1225
+ }
1226
+ /**
1227
+ * A realtime client event.
1228
+ */
1229
+ export type RealtimeClientEvent = ConversationItemCreateEvent | ConversationItemDeleteEvent | ConversationItemRetrieveEvent | ConversationItemTruncateEvent | InputAudioBufferAppendEvent | InputAudioBufferClearEvent | OutputAudioBufferClearEvent | InputAudioBufferCommitEvent | ResponseCancelEvent | ResponseCreateEvent | SessionUpdateEvent;
1230
+ /**
1231
+ * An assistant message item in a Realtime conversation.
1232
+ */
1233
+ export interface RealtimeConversationItemAssistantMessage {
1234
+ /**
1235
+ * The content of the message.
1236
+ */
1237
+ content: Array<RealtimeConversationItemAssistantMessage.Content>;
1238
+ /**
1239
+ * The role of the message sender. Always `assistant`.
1240
+ */
1241
+ role: 'assistant';
1242
+ /**
1243
+ * The type of the item. Always `message`.
1244
+ */
1245
+ type: 'message';
1246
+ /**
1247
+ * The unique ID of the item. This may be provided by the client or generated by
1248
+ * the server.
1249
+ */
1250
+ id?: string;
1251
+ /**
1252
+ * Identifier for the API object being returned - always `realtime.item`. Optional
1253
+ * when creating a new item.
1254
+ */
1255
+ object?: 'realtime.item';
1256
+ /**
1257
+ * The status of the item. Has no effect on the conversation.
1258
+ */
1259
+ status?: 'completed' | 'incomplete' | 'in_progress';
1260
+ }
1261
+ export declare namespace RealtimeConversationItemAssistantMessage {
1262
+ interface Content {
1263
+ /**
1264
+ * Base64-encoded audio bytes, these will be parsed as the format specified in the
1265
+ * session output audio type configuration. This defaults to PCM 16-bit 24kHz mono
1266
+ * if not specified.
1267
+ */
1268
+ audio?: string;
1269
+ /**
1270
+ * The text content.
1271
+ */
1272
+ text?: string;
1273
+ /**
1274
+ * The transcript of the audio content, this will always be present if the output
1275
+ * type is `audio`.
1276
+ */
1277
+ transcript?: string;
1278
+ /**
1279
+ * The content type, `output_text` or `output_audio` depending on the session
1280
+ * `output_modalities` configuration.
1281
+ */
1282
+ type?: 'output_text' | 'output_audio';
1283
+ }
1284
+ }
1285
+ /**
1286
+ * A function call item in a Realtime conversation.
1287
+ */
1288
+ export interface RealtimeConversationItemFunctionCall {
1289
+ /**
1290
+ * The arguments of the function call. This is a JSON-encoded string representing
1291
+ * the arguments passed to the function, for example
1292
+ * `{"arg1": "value1", "arg2": 42}`.
1293
+ */
1294
+ arguments: string;
1295
+ /**
1296
+ * The name of the function being called.
1297
+ */
1298
+ name: string;
1299
+ /**
1300
+ * The type of the item. Always `function_call`.
1301
+ */
1302
+ type: 'function_call';
1303
+ /**
1304
+ * The unique ID of the item. This may be provided by the client or generated by
1305
+ * the server.
1306
+ */
1307
+ id?: string;
1308
+ /**
1309
+ * The ID of the function call.
1310
+ */
1311
+ call_id?: string;
1312
+ /**
1313
+ * Identifier for the API object being returned - always `realtime.item`. Optional
1314
+ * when creating a new item.
1315
+ */
1316
+ object?: 'realtime.item';
1317
+ /**
1318
+ * The status of the item. Has no effect on the conversation.
1319
+ */
1320
+ status?: 'completed' | 'incomplete' | 'in_progress';
1321
+ }
1322
+ /**
1323
+ * A function call output item in a Realtime conversation.
1324
+ */
1325
+ export interface RealtimeConversationItemFunctionCallOutput {
1326
+ /**
1327
+ * The ID of the function call this output is for.
1328
+ */
1329
+ call_id: string;
1330
+ /**
1331
+ * The output of the function call, this is free text and can contain any
1332
+ * information or simply be empty.
1333
+ */
1334
+ output: string;
1335
+ /**
1336
+ * The type of the item. Always `function_call_output`.
1337
+ */
1338
+ type: 'function_call_output';
1339
+ /**
1340
+ * The unique ID of the item. This may be provided by the client or generated by
1341
+ * the server.
1342
+ */
1343
+ id?: string;
1344
+ /**
1345
+ * Identifier for the API object being returned - always `realtime.item`. Optional
1346
+ * when creating a new item.
1347
+ */
1348
+ object?: 'realtime.item';
1349
+ /**
1350
+ * The status of the item. Has no effect on the conversation.
1351
+ */
1352
+ status?: 'completed' | 'incomplete' | 'in_progress';
1353
+ }
1354
+ /**
1355
+ * A system message in a Realtime conversation can be used to provide additional
1356
+ * context or instructions to the model. This is similar but distinct from the
1357
+ * instruction prompt provided at the start of a conversation, as system messages
1358
+ * can be added at any point in the conversation. For major changes to the
1359
+ * conversation's behavior, use instructions, but for smaller updates (e.g. "the
1360
+ * user is now asking about a different topic"), use system messages.
1361
+ */
1362
+ export interface RealtimeConversationItemSystemMessage {
1363
+ /**
1364
+ * The content of the message.
1365
+ */
1366
+ content: Array<RealtimeConversationItemSystemMessage.Content>;
1367
+ /**
1368
+ * The role of the message sender. Always `system`.
1369
+ */
1370
+ role: 'system';
1371
+ /**
1372
+ * The type of the item. Always `message`.
1373
+ */
1374
+ type: 'message';
1375
+ /**
1376
+ * The unique ID of the item. This may be provided by the client or generated by
1377
+ * the server.
1378
+ */
1379
+ id?: string;
1380
+ /**
1381
+ * Identifier for the API object being returned - always `realtime.item`. Optional
1382
+ * when creating a new item.
1383
+ */
1384
+ object?: 'realtime.item';
1385
+ /**
1386
+ * The status of the item. Has no effect on the conversation.
1387
+ */
1388
+ status?: 'completed' | 'incomplete' | 'in_progress';
1389
+ }
1390
+ export declare namespace RealtimeConversationItemSystemMessage {
1391
+ interface Content {
1392
+ /**
1393
+ * The text content.
1394
+ */
1395
+ text?: string;
1396
+ /**
1397
+ * The content type. Always `input_text` for system messages.
1398
+ */
1399
+ type?: 'input_text';
1400
+ }
1401
+ }
1402
+ /**
1403
+ * A user message item in a Realtime conversation.
1404
+ */
1405
+ export interface RealtimeConversationItemUserMessage {
1406
+ /**
1407
+ * The content of the message.
1408
+ */
1409
+ content: Array<RealtimeConversationItemUserMessage.Content>;
1410
+ /**
1411
+ * The role of the message sender. Always `user`.
1412
+ */
1413
+ role: 'user';
1414
+ /**
1415
+ * The type of the item. Always `message`.
1416
+ */
1417
+ type: 'message';
1418
+ /**
1419
+ * The unique ID of the item. This may be provided by the client or generated by
1420
+ * the server.
1421
+ */
1422
+ id?: string;
1423
+ /**
1424
+ * Identifier for the API object being returned - always `realtime.item`. Optional
1425
+ * when creating a new item.
1426
+ */
1427
+ object?: 'realtime.item';
1428
+ /**
1429
+ * The status of the item. Has no effect on the conversation.
1430
+ */
1431
+ status?: 'completed' | 'incomplete' | 'in_progress';
1432
+ }
1433
+ export declare namespace RealtimeConversationItemUserMessage {
1434
+ interface Content {
1435
+ /**
1436
+ * Base64-encoded audio bytes (for `input_audio`), these will be parsed as the
1437
+ * format specified in the session input audio type configuration. This defaults to
1438
+ * PCM 16-bit 24kHz mono if not specified.
1439
+ */
1440
+ audio?: string;
1441
+ /**
1442
+ * The detail level of the image (for `input_image`). `auto` will default to
1443
+ * `high`.
1444
+ */
1445
+ detail?: 'auto' | 'low' | 'high';
1446
+ /**
1447
+ * Base64-encoded image bytes (for `input_image`) as a data URI. For example
1448
+ * `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG
1449
+ * and JPEG.
1450
+ */
1451
+ image_url?: string;
1452
+ /**
1453
+ * The text content (for `input_text`).
1454
+ */
1455
+ text?: string;
1456
+ /**
1457
+ * Transcript of the audio (for `input_audio`). This is not sent to the model, but
1458
+ * will be attached to the message item for reference.
1459
+ */
1460
+ transcript?: string;
1461
+ /**
1462
+ * The content type (`input_text`, `input_audio`, or `input_image`).
1463
+ */
1464
+ type?: 'input_text' | 'input_audio' | 'input_image';
1465
+ }
1466
+ }
1467
+ /**
1468
+ * Details of the error.
1469
+ */
1470
+ export interface RealtimeError {
1471
+ /**
1472
+ * A human-readable error message.
1473
+ */
1474
+ message: string;
1475
+ /**
1476
+ * The type of error (e.g., "invalid_request_error", "server_error").
1477
+ */
1478
+ type: string;
1479
+ /**
1480
+ * Error code, if any.
1481
+ */
1482
+ code?: string | null;
1483
+ /**
1484
+ * The event_id of the client event that caused the error, if applicable.
1485
+ */
1486
+ event_id?: string | null;
1487
+ /**
1488
+ * Parameter related to the error, if any.
1489
+ */
1490
+ param?: string | null;
1491
+ }
1492
+ /**
1493
+ * Returned when an error occurs, which could be a client problem or a server
1494
+ * problem. Most errors are recoverable and the session will stay open, we
1495
+ * recommend to implementors to monitor and log error messages by default.
1496
+ */
1497
+ export interface RealtimeErrorEvent {
1498
+ /**
1499
+ * Details of the error.
1500
+ */
1501
+ error: RealtimeError;
1502
+ /**
1503
+ * The unique ID of the server event.
1504
+ */
1505
+ event_id: string;
1506
+ /**
1507
+ * The event type, must be `error`.
1508
+ */
1509
+ type: 'error';
1510
+ }
1511
+ export interface RealtimeFunctionTool {
1512
+ /**
1513
+ * The description of the function, including guidance on when and how to call it,
1514
+ * and guidance about what to tell the user when calling (if anything).
1515
+ */
1516
+ description?: string;
1517
+ /**
1518
+ * The name of the function.
1519
+ */
1520
+ name?: string;
1521
+ /**
1522
+ * Parameters of the function in JSON Schema.
1523
+ */
1524
+ parameters?: unknown;
1525
+ /**
1526
+ * The type of the tool, i.e. `function`.
1527
+ */
1528
+ type?: 'function';
1529
+ }
1530
+ /**
1531
+ * A Realtime item requesting human approval of a tool invocation.
1532
+ */
1533
+ export interface RealtimeMcpApprovalRequest {
1534
+ /**
1535
+ * The unique ID of the approval request.
1536
+ */
1537
+ id: string;
1538
+ /**
1539
+ * A JSON string of arguments for the tool.
1540
+ */
1541
+ arguments: string;
1542
+ /**
1543
+ * The name of the tool to run.
1544
+ */
1545
+ name: string;
1546
+ /**
1547
+ * The label of the MCP server making the request.
1548
+ */
1549
+ server_label: string;
1550
+ /**
1551
+ * The type of the item. Always `mcp_approval_request`.
1552
+ */
1553
+ type: 'mcp_approval_request';
1554
+ }
1555
+ /**
1556
+ * A Realtime item responding to an MCP approval request.
1557
+ */
1558
+ export interface RealtimeMcpApprovalResponse {
1559
+ /**
1560
+ * The unique ID of the approval response.
1561
+ */
1562
+ id: string;
1563
+ /**
1564
+ * The ID of the approval request being answered.
1565
+ */
1566
+ approval_request_id: string;
1567
+ /**
1568
+ * Whether the request was approved.
1569
+ */
1570
+ approve: boolean;
1571
+ /**
1572
+ * The type of the item. Always `mcp_approval_response`.
1573
+ */
1574
+ type: 'mcp_approval_response';
1575
+ /**
1576
+ * Optional reason for the decision.
1577
+ */
1578
+ reason?: string | null;
1579
+ }
1580
+ /**
1581
+ * A Realtime item listing tools available on an MCP server.
1582
+ */
1583
+ export interface RealtimeMcpListTools {
1584
+ /**
1585
+ * The label of the MCP server.
1586
+ */
1587
+ server_label: string;
1588
+ /**
1589
+ * The tools available on the server.
1590
+ */
1591
+ tools: Array<RealtimeMcpListTools.Tool>;
1592
+ /**
1593
+ * The type of the item. Always `mcp_list_tools`.
1594
+ */
1595
+ type: 'mcp_list_tools';
1596
+ /**
1597
+ * The unique ID of the list.
1598
+ */
1599
+ id?: string;
1600
+ }
1601
+ export declare namespace RealtimeMcpListTools {
1602
+ /**
1603
+ * A tool available on an MCP server.
1604
+ */
1605
+ interface Tool {
1606
+ /**
1607
+ * The JSON schema describing the tool's input.
1608
+ */
1609
+ input_schema: unknown;
1610
+ /**
1611
+ * The name of the tool.
1612
+ */
1613
+ name: string;
1614
+ /**
1615
+ * Additional annotations about the tool.
1616
+ */
1617
+ annotations?: unknown | null;
1618
+ /**
1619
+ * The description of the tool.
1620
+ */
1621
+ description?: string | null;
1622
+ }
1623
+ }
1624
+ export interface RealtimeMcpProtocolError {
1625
+ code: number;
1626
+ message: string;
1627
+ type: 'protocol_error';
1628
+ }
1629
+ /**
1630
+ * A Realtime item representing an invocation of a tool on an MCP server.
1631
+ */
1632
+ export interface RealtimeMcpToolCall {
1633
+ /**
1634
+ * The unique ID of the tool call.
1635
+ */
1636
+ id: string;
1637
+ /**
1638
+ * A JSON string of the arguments passed to the tool.
1639
+ */
1640
+ arguments: string;
1641
+ /**
1642
+ * The name of the tool that was run.
1643
+ */
1644
+ name: string;
1645
+ /**
1646
+ * The label of the MCP server running the tool.
1647
+ */
1648
+ server_label: string;
1649
+ /**
1650
+ * The type of the item. Always `mcp_call`.
1651
+ */
1652
+ type: 'mcp_call';
1653
+ /**
1654
+ * The ID of an associated approval request, if any.
1655
+ */
1656
+ approval_request_id?: string | null;
1657
+ /**
1658
+ * The error from the tool call, if any.
1659
+ */
1660
+ error?: RealtimeMcpProtocolError | RealtimeMcpToolExecutionError | RealtimeMcphttpError | null;
1661
+ /**
1662
+ * The output from the tool call.
1663
+ */
1664
+ output?: string | null;
1665
+ }
1666
+ export interface RealtimeMcpToolExecutionError {
1667
+ message: string;
1668
+ type: 'tool_execution_error';
1669
+ }
1670
+ export interface RealtimeMcphttpError {
1671
+ code: number;
1672
+ message: string;
1673
+ type: 'http_error';
1674
+ }
1675
+ /**
1676
+ * The response resource.
1677
+ */
1678
+ export interface RealtimeResponse {
1679
+ /**
1680
+ * The unique ID of the response, will look like `resp_1234`.
1681
+ */
1682
+ id?: string;
1683
+ /**
1684
+ * Configuration for audio output.
1685
+ */
1686
+ audio?: RealtimeResponse.Audio;
1687
+ /**
1688
+ * Which conversation the response is added to, determined by the `conversation`
1689
+ * field in the `response.create` event. If `auto`, the response will be added to
1690
+ * the default conversation and the value of `conversation_id` will be an id like
1691
+ * `conv_1234`. If `none`, the response will not be added to any conversation and
1692
+ * the value of `conversation_id` will be `null`. If responses are being triggered
1693
+ * automatically by VAD the response will be added to the default conversation
1694
+ */
1695
+ conversation_id?: string;
1696
+ /**
1697
+ * Maximum number of output tokens for a single assistant response, inclusive of
1698
+ * tool calls, that was used in this response.
1699
+ */
1700
+ max_output_tokens?: number | 'inf';
1701
+ /**
1702
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
1703
+ * for storing additional information about the object in a structured format, and
1704
+ * querying for objects via API or the dashboard.
1705
+ *
1706
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
1707
+ * a maximum length of 512 characters.
1708
+ */
1709
+ metadata?: Shared.Metadata | null;
1710
+ /**
1711
+ * The object type, must be `realtime.response`.
1712
+ */
1713
+ object?: 'realtime.response';
1714
+ /**
1715
+ * The list of output items generated by the response.
1716
+ */
1717
+ output?: Array<ConversationItem>;
1718
+ /**
1719
+ * The set of modalities the model used to respond, currently the only possible
1720
+ * values are `[\"audio\"]`, `[\"text\"]`. Audio output always include a text
1721
+ * transcript. Setting the output to mode `text` will disable audio output from the
1722
+ * model.
1723
+ */
1724
+ output_modalities?: Array<'text' | 'audio'>;
1725
+ /**
1726
+ * The final status of the response (`completed`, `cancelled`, `failed`, or
1727
+ * `incomplete`, `in_progress`).
1728
+ */
1729
+ status?: 'completed' | 'cancelled' | 'failed' | 'incomplete' | 'in_progress';
1730
+ /**
1731
+ * Additional details about the status.
1732
+ */
1733
+ status_details?: RealtimeResponseStatus;
1734
+ /**
1735
+ * Usage statistics for the Response, this will correspond to billing. A Realtime
1736
+ * API session will maintain a conversation context and append new Items to the
1737
+ * Conversation, thus output from previous turns (text and audio tokens) will
1738
+ * become the input for later turns.
1739
+ */
1740
+ usage?: RealtimeResponseUsage;
1741
+ }
1742
+ export declare namespace RealtimeResponse {
1743
+ /**
1744
+ * Configuration for audio output.
1745
+ */
1746
+ interface Audio {
1747
+ output?: Audio.Output;
1748
+ }
1749
+ namespace Audio {
1750
+ interface Output {
1751
+ /**
1752
+ * The format of the output audio.
1753
+ */
1754
+ format?: RealtimeAPI.RealtimeAudioFormats;
1755
+ /**
1756
+ * The voice the model uses to respond. Voice cannot be changed during the session
1757
+ * once the model has responded with audio at least once. Current voice options are
1758
+ * `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
1759
+ * and `cedar`. We recommend `marin` and `cedar` for best quality.
1760
+ */
1761
+ voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse' | 'marin' | 'cedar';
1762
+ }
1763
+ }
1764
+ }
1765
+ /**
1766
+ * Configuration for audio input and output.
1767
+ */
1768
+ export interface RealtimeResponseCreateAudioOutput {
1769
+ output?: RealtimeResponseCreateAudioOutput.Output;
1770
+ }
1771
+ export declare namespace RealtimeResponseCreateAudioOutput {
1772
+ interface Output {
1773
+ /**
1774
+ * The format of the output audio.
1775
+ */
1776
+ format?: RealtimeAPI.RealtimeAudioFormats;
1777
+ /**
1778
+ * The voice the model uses to respond. Supported built-in voices are `alloy`,
1779
+ * `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
1780
+ * `cedar`. Voice cannot be changed during the session once the model has responded
1781
+ * with audio at least once.
1782
+ */
1783
+ voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse' | 'marin' | 'cedar';
1784
+ }
1785
+ }
1786
+ /**
1787
+ * Give the model access to additional tools via remote Model Context Protocol
1788
+ * (MCP) servers.
1789
+ * [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
1790
+ */
1791
+ export interface RealtimeResponseCreateMcpTool {
1792
+ /**
1793
+ * A label for this MCP server, used to identify it in tool calls.
1794
+ */
1795
+ server_label: string;
1796
+ /**
1797
+ * The type of the MCP tool. Always `mcp`.
1798
+ */
1799
+ type: 'mcp';
1800
+ /**
1801
+ * List of allowed tool names or a filter object.
1802
+ */
1803
+ allowed_tools?: Array<string> | RealtimeResponseCreateMcpTool.McpToolFilter | null;
1804
+ /**
1805
+ * An OAuth access token that can be used with a remote MCP server, either with a
1806
+ * custom MCP server URL or a service connector. Your application must handle the
1807
+ * OAuth authorization flow and provide the token here.
1808
+ */
1809
+ authorization?: string;
1810
+ /**
1811
+ * Identifier for service connectors, like those available in ChatGPT. One of
1812
+ * `server_url` or `connector_id` must be provided. Learn more about service
1813
+ * connectors
1814
+ * [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
1815
+ *
1816
+ * Currently supported `connector_id` values are:
1817
+ *
1818
+ * - Dropbox: `connector_dropbox`
1819
+ * - Gmail: `connector_gmail`
1820
+ * - Google Calendar: `connector_googlecalendar`
1821
+ * - Google Drive: `connector_googledrive`
1822
+ * - Microsoft Teams: `connector_microsoftteams`
1823
+ * - Outlook Calendar: `connector_outlookcalendar`
1824
+ * - Outlook Email: `connector_outlookemail`
1825
+ * - SharePoint: `connector_sharepoint`
1826
+ */
1827
+ connector_id?: 'connector_dropbox' | 'connector_gmail' | 'connector_googlecalendar' | 'connector_googledrive' | 'connector_microsoftteams' | 'connector_outlookcalendar' | 'connector_outlookemail' | 'connector_sharepoint';
1828
+ /**
1829
+ * Optional HTTP headers to send to the MCP server. Use for authentication or other
1830
+ * purposes.
1831
+ */
1832
+ headers?: {
1833
+ [key: string]: string;
1834
+ } | null;
1835
+ /**
1836
+ * Specify which of the MCP server's tools require approval.
1837
+ */
1838
+ require_approval?: RealtimeResponseCreateMcpTool.McpToolApprovalFilter | 'always' | 'never' | null;
1839
+ /**
1840
+ * Optional description of the MCP server, used to provide more context.
1841
+ */
1842
+ server_description?: string;
1843
+ /**
1844
+ * The URL for the MCP server. One of `server_url` or `connector_id` must be
1845
+ * provided.
1846
+ */
1847
+ server_url?: string;
1848
+ }
1849
+ export declare namespace RealtimeResponseCreateMcpTool {
1850
+ /**
1851
+ * A filter object to specify which tools are allowed.
1852
+ */
1853
+ interface McpToolFilter {
1854
+ /**
1855
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
1856
+ * is
1857
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1858
+ * it will match this filter.
1859
+ */
1860
+ read_only?: boolean;
1861
+ /**
1862
+ * List of allowed tool names.
1863
+ */
1864
+ tool_names?: Array<string>;
1865
+ }
1866
+ /**
1867
+ * Specify which of the MCP server's tools require approval. Can be `always`,
1868
+ * `never`, or a filter object associated with tools that require approval.
1869
+ */
1870
+ interface McpToolApprovalFilter {
1871
+ /**
1872
+ * A filter object to specify which tools are allowed.
1873
+ */
1874
+ always?: McpToolApprovalFilter.Always;
1875
+ /**
1876
+ * A filter object to specify which tools are allowed.
1877
+ */
1878
+ never?: McpToolApprovalFilter.Never;
1879
+ }
1880
+ namespace McpToolApprovalFilter {
1881
+ /**
1882
+ * A filter object to specify which tools are allowed.
1883
+ */
1884
+ interface Always {
1885
+ /**
1886
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
1887
+ * is
1888
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1889
+ * it will match this filter.
1890
+ */
1891
+ read_only?: boolean;
1892
+ /**
1893
+ * List of allowed tool names.
1894
+ */
1895
+ tool_names?: Array<string>;
1896
+ }
1897
+ /**
1898
+ * A filter object to specify which tools are allowed.
1899
+ */
1900
+ interface Never {
1901
+ /**
1902
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
1903
+ * is
1904
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
1905
+ * it will match this filter.
1906
+ */
1907
+ read_only?: boolean;
1908
+ /**
1909
+ * List of allowed tool names.
1910
+ */
1911
+ tool_names?: Array<string>;
1912
+ }
1913
+ }
1914
+ }
1915
+ /**
1916
+ * Create a new Realtime response with these parameters
1917
+ */
1918
+ export interface RealtimeResponseCreateParams {
1919
+ /**
1920
+ * Configuration for audio input and output.
1921
+ */
1922
+ audio?: RealtimeResponseCreateAudioOutput;
1923
+ /**
1924
+ * Controls which conversation the response is added to. Currently supports `auto`
1925
+ * and `none`, with `auto` as the default value. The `auto` value means that the
1926
+ * contents of the response will be added to the default conversation. Set this to
1927
+ * `none` to create an out-of-band response which will not add items to default
1928
+ * conversation.
1929
+ */
1930
+ conversation?: (string & {}) | 'auto' | 'none';
1931
+ /**
1932
+ * Input items to include in the prompt for the model. Using this field creates a
1933
+ * new context for this Response instead of using the default conversation. An
1934
+ * empty array `[]` will clear the context for this Response. Note that this can
1935
+ * include references to items that previously appeared in the session using their
1936
+ * id.
1937
+ */
1938
+ input?: Array<ConversationItem>;
1939
+ /**
1940
+ * The default system instructions (i.e. system message) prepended to model calls.
1941
+ * This field allows the client to guide the model on desired responses. The model
1942
+ * can be instructed on response content and format, (e.g. "be extremely succinct",
1943
+ * "act friendly", "here are examples of good responses") and on audio behavior
1944
+ * (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
1945
+ * instructions are not guaranteed to be followed by the model, but they provide
1946
+ * guidance to the model on the desired behavior. Note that the server sets default
1947
+ * instructions which will be used if this field is not set and are visible in the
1948
+ * `session.created` event at the start of the session.
1949
+ */
1950
+ instructions?: string;
1951
+ /**
1952
+ * Maximum number of output tokens for a single assistant response, inclusive of
1953
+ * tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
1954
+ * `inf` for the maximum available tokens for a given model. Defaults to `inf`.
1955
+ */
1956
+ max_output_tokens?: number | 'inf';
1957
+ /**
1958
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
1959
+ * for storing additional information about the object in a structured format, and
1960
+ * querying for objects via API or the dashboard.
1961
+ *
1962
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
1963
+ * a maximum length of 512 characters.
1964
+ */
1965
+ metadata?: Shared.Metadata | null;
1966
+ /**
1967
+ * The set of modalities the model used to respond, currently the only possible
1968
+ * values are `[\"audio\"]`, `[\"text\"]`. Audio output always include a text
1969
+ * transcript. Setting the output to mode `text` will disable audio output from the
1970
+ * model.
1971
+ */
1972
+ output_modalities?: Array<'text' | 'audio'>;
1973
+ /**
1974
+ * Reference to a prompt template and its variables.
1975
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
1976
+ */
1977
+ prompt?: ResponsesAPI.ResponsePrompt | null;
1978
+ /**
1979
+ * How the model chooses tools. Provide one of the string modes or force a specific
1980
+ * function/MCP tool.
1981
+ */
1982
+ tool_choice?: ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp;
1983
+ /**
1984
+ * Tools available to the model.
1985
+ */
1986
+ tools?: Array<RealtimeFunctionTool | RealtimeResponseCreateMcpTool>;
1987
+ }
1988
+ /**
1989
+ * Additional details about the status.
1990
+ */
1991
+ export interface RealtimeResponseStatus {
1992
+ /**
1993
+ * A description of the error that caused the response to fail, populated when the
1994
+ * `status` is `failed`.
1995
+ */
1996
+ error?: RealtimeResponseStatus.Error;
1997
+ /**
1998
+ * The reason the Response did not complete. For a `cancelled` Response, one of
1999
+ * `turn_detected` (the server VAD detected a new start of speech) or
2000
+ * `client_cancelled` (the client sent a cancel event). For an `incomplete`
2001
+ * Response, one of `max_output_tokens` or `content_filter` (the server-side safety
2002
+ * filter activated and cut off the response).
2003
+ */
2004
+ reason?: 'turn_detected' | 'client_cancelled' | 'max_output_tokens' | 'content_filter';
2005
+ /**
2006
+ * The type of error that caused the response to fail, corresponding with the
2007
+ * `status` field (`completed`, `cancelled`, `incomplete`, `failed`).
2008
+ */
2009
+ type?: 'completed' | 'cancelled' | 'incomplete' | 'failed';
2010
+ }
2011
+ export declare namespace RealtimeResponseStatus {
2012
+ /**
2013
+ * A description of the error that caused the response to fail, populated when the
2014
+ * `status` is `failed`.
2015
+ */
2016
+ interface Error {
2017
+ /**
2018
+ * Error code, if any.
2019
+ */
2020
+ code?: string;
2021
+ /**
2022
+ * The type of error.
2023
+ */
2024
+ type?: string;
2025
+ }
2026
+ }
2027
+ /**
2028
+ * Usage statistics for the Response, this will correspond to billing. A Realtime
2029
+ * API session will maintain a conversation context and append new Items to the
2030
+ * Conversation, thus output from previous turns (text and audio tokens) will
2031
+ * become the input for later turns.
2032
+ */
2033
+ export interface RealtimeResponseUsage {
2034
+ /**
2035
+ * Details about the input tokens used in the Response. Cached tokens are tokens
2036
+ * from previous turns in the conversation that are included as context for the
2037
+ * current response. Cached tokens here are counted as a subset of input tokens,
2038
+ * meaning input tokens will include cached and uncached tokens.
2039
+ */
2040
+ input_token_details?: RealtimeResponseUsageInputTokenDetails;
2041
+ /**
2042
+ * The number of input tokens used in the Response, including text and audio
2043
+ * tokens.
2044
+ */
2045
+ input_tokens?: number;
2046
+ /**
2047
+ * Details about the output tokens used in the Response.
2048
+ */
2049
+ output_token_details?: RealtimeResponseUsageOutputTokenDetails;
2050
+ /**
2051
+ * The number of output tokens sent in the Response, including text and audio
2052
+ * tokens.
2053
+ */
2054
+ output_tokens?: number;
2055
+ /**
2056
+ * The total number of tokens in the Response including input and output text and
2057
+ * audio tokens.
2058
+ */
2059
+ total_tokens?: number;
2060
+ }
2061
+ /**
2062
+ * Details about the input tokens used in the Response. Cached tokens are tokens
2063
+ * from previous turns in the conversation that are included as context for the
2064
+ * current response. Cached tokens here are counted as a subset of input tokens,
2065
+ * meaning input tokens will include cached and uncached tokens.
2066
+ */
2067
+ export interface RealtimeResponseUsageInputTokenDetails {
2068
+ /**
2069
+ * The number of audio tokens used as input for the Response.
2070
+ */
2071
+ audio_tokens?: number;
2072
+ /**
2073
+ * The number of cached tokens used as input for the Response.
2074
+ */
2075
+ cached_tokens?: number;
2076
+ /**
2077
+ * Details about the cached tokens used as input for the Response.
2078
+ */
2079
+ cached_tokens_details?: RealtimeResponseUsageInputTokenDetails.CachedTokensDetails;
2080
+ /**
2081
+ * The number of image tokens used as input for the Response.
2082
+ */
2083
+ image_tokens?: number;
2084
+ /**
2085
+ * The number of text tokens used as input for the Response.
2086
+ */
2087
+ text_tokens?: number;
2088
+ }
2089
+ export declare namespace RealtimeResponseUsageInputTokenDetails {
2090
+ /**
2091
+ * Details about the cached tokens used as input for the Response.
2092
+ */
2093
+ interface CachedTokensDetails {
2094
+ /**
2095
+ * The number of cached audio tokens used as input for the Response.
2096
+ */
2097
+ audio_tokens?: number;
2098
+ /**
2099
+ * The number of cached image tokens used as input for the Response.
2100
+ */
2101
+ image_tokens?: number;
2102
+ /**
2103
+ * The number of cached text tokens used as input for the Response.
2104
+ */
2105
+ text_tokens?: number;
2106
+ }
2107
+ }
2108
+ /**
2109
+ * Details about the output tokens used in the Response.
2110
+ */
2111
+ export interface RealtimeResponseUsageOutputTokenDetails {
2112
+ /**
2113
+ * The number of audio tokens used in the Response.
2114
+ */
2115
+ audio_tokens?: number;
2116
+ /**
2117
+ * The number of text tokens used in the Response.
2118
+ */
2119
+ text_tokens?: number;
2120
+ }
2121
+ /**
2122
+ * A realtime server event.
2123
+ */
2124
+ export type RealtimeServerEvent = ConversationCreatedEvent | ConversationItemCreatedEvent | ConversationItemDeletedEvent | ConversationItemInputAudioTranscriptionCompletedEvent | ConversationItemInputAudioTranscriptionDeltaEvent | ConversationItemInputAudioTranscriptionFailedEvent | RealtimeServerEvent.ConversationItemRetrieved | ConversationItemTruncatedEvent | RealtimeErrorEvent | InputAudioBufferClearedEvent | InputAudioBufferCommittedEvent | InputAudioBufferDtmfEventReceivedEvent | InputAudioBufferSpeechStartedEvent | InputAudioBufferSpeechStoppedEvent | RateLimitsUpdatedEvent | ResponseAudioDeltaEvent | ResponseAudioDoneEvent | ResponseAudioTranscriptDeltaEvent | ResponseAudioTranscriptDoneEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseCreatedEvent | ResponseDoneEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent | SessionCreatedEvent | SessionUpdatedEvent | RealtimeServerEvent.OutputAudioBufferStarted | RealtimeServerEvent.OutputAudioBufferStopped | RealtimeServerEvent.OutputAudioBufferCleared | ConversationItemAdded | ConversationItemDone | InputAudioBufferTimeoutTriggered | ConversationItemInputAudioTranscriptionSegment | McpListToolsInProgress | McpListToolsCompleted | McpListToolsFailed | ResponseMcpCallArgumentsDelta | ResponseMcpCallArgumentsDone | ResponseMcpCallInProgress | ResponseMcpCallCompleted | ResponseMcpCallFailed;
2125
+ export declare namespace RealtimeServerEvent {
2126
+ /**
2127
+ * Returned when a conversation item is retrieved with
2128
+ * `conversation.item.retrieve`. This is provided as a way to fetch the server's
2129
+ * representation of an item, for example to get access to the post-processed audio
2130
+ * data after noise cancellation and VAD. It includes the full content of the Item,
2131
+ * including audio data.
2132
+ */
2133
+ interface ConversationItemRetrieved {
2134
+ /**
2135
+ * The unique ID of the server event.
2136
+ */
2137
+ event_id: string;
2138
+ /**
2139
+ * A single item within a Realtime conversation.
2140
+ */
2141
+ item: RealtimeAPI.ConversationItem;
2142
+ /**
2143
+ * The event type, must be `conversation.item.retrieved`.
2144
+ */
2145
+ type: 'conversation.item.retrieved';
2146
+ }
2147
+ /**
2148
+ * **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the
2149
+ * client. This event is emitted after an audio content part has been added
2150
+ * (`response.content_part.added`) to the response.
2151
+ * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
2152
+ */
2153
+ interface OutputAudioBufferStarted {
2154
+ /**
2155
+ * The unique ID of the server event.
2156
+ */
2157
+ event_id: string;
2158
+ /**
2159
+ * The unique ID of the response that produced the audio.
2160
+ */
2161
+ response_id: string;
2162
+ /**
2163
+ * The event type, must be `output_audio_buffer.started`.
2164
+ */
2165
+ type: 'output_audio_buffer.started';
2166
+ }
2167
+ /**
2168
+ * **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely
2169
+ * drained on the server, and no more audio is forthcoming. This event is emitted
2170
+ * after the full response data has been sent to the client (`response.done`).
2171
+ * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
2172
+ */
2173
+ interface OutputAudioBufferStopped {
2174
+ /**
2175
+ * The unique ID of the server event.
2176
+ */
2177
+ event_id: string;
2178
+ /**
2179
+ * The unique ID of the response that produced the audio.
2180
+ */
2181
+ response_id: string;
2182
+ /**
2183
+ * The event type, must be `output_audio_buffer.stopped`.
2184
+ */
2185
+ type: 'output_audio_buffer.stopped';
2186
+ }
2187
+ /**
2188
+ * **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This
2189
+ * happens either in VAD mode when the user has interrupted
2190
+ * (`input_audio_buffer.speech_started`), or when the client has emitted the
2191
+ * `output_audio_buffer.clear` event to manually cut off the current audio
2192
+ * response.
2193
+ * [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
2194
+ */
2195
+ interface OutputAudioBufferCleared {
2196
+ /**
2197
+ * The unique ID of the server event.
2198
+ */
2199
+ event_id: string;
2200
+ /**
2201
+ * The unique ID of the response that produced the audio.
2202
+ */
2203
+ response_id: string;
2204
+ /**
2205
+ * The event type, must be `output_audio_buffer.cleared`.
2206
+ */
2207
+ type: 'output_audio_buffer.cleared';
2208
+ }
2209
+ }
2210
+ /**
2211
+ * Realtime session object for the beta interface.
2212
+ */
2213
+ export interface RealtimeSession {
2214
+ /**
2215
+ * Unique identifier for the session that looks like `sess_1234567890abcdef`.
2216
+ */
2217
+ id?: string;
2218
+ /**
2219
+ * Expiration timestamp for the session, in seconds since epoch.
2220
+ */
2221
+ expires_at?: number;
2222
+ /**
2223
+ * Additional fields to include in server outputs.
2224
+ *
2225
+ * - `item.input_audio_transcription.logprobs`: Include logprobs for input audio
2226
+ * transcription.
2227
+ */
2228
+ include?: Array<'item.input_audio_transcription.logprobs'> | null;
2229
+ /**
2230
+ * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For
2231
+ * `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel
2232
+ * (mono), and little-endian byte order.
2233
+ */
2234
+ input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
2235
+ /**
2236
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
2237
+ * off. Noise reduction filters audio added to the input audio buffer before it is
2238
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
2239
+ * detection accuracy (reducing false positives) and model performance by improving
2240
+ * perception of the input audio.
2241
+ */
2242
+ input_audio_noise_reduction?: RealtimeSession.InputAudioNoiseReduction;
2243
+ /**
2244
+ * Configuration for input audio transcription, defaults to off and can be set to
2245
+ * `null` to turn off once on. Input audio transcription is not native to the
2246
+ * model, since the model consumes audio directly. Transcription runs
2247
+ * asynchronously through
2248
+ * [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription)
2249
+ * and should be treated as guidance of input audio content rather than precisely
2250
+ * what the model heard. The client can optionally set the language and prompt for
2251
+ * transcription, these offer additional guidance to the transcription service.
2252
+ */
2253
+ input_audio_transcription?: AudioTranscription | null;
2254
+ /**
2255
+ * The default system instructions (i.e. system message) prepended to model calls.
2256
+ * This field allows the client to guide the model on desired responses. The model
2257
+ * can be instructed on response content and format, (e.g. "be extremely succinct",
2258
+ * "act friendly", "here are examples of good responses") and on audio behavior
2259
+ * (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
2260
+ * instructions are not guaranteed to be followed by the model, but they provide
2261
+ * guidance to the model on the desired behavior.
2262
+ *
2263
+ * Note that the server sets default instructions which will be used if this field
2264
+ * is not set and are visible in the `session.created` event at the start of the
2265
+ * session.
2266
+ */
2267
+ instructions?: string;
2268
+ /**
2269
+ * Maximum number of output tokens for a single assistant response, inclusive of
2270
+ * tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
2271
+ * `inf` for the maximum available tokens for a given model. Defaults to `inf`.
2272
+ */
2273
+ max_response_output_tokens?: number | 'inf';
2274
+ /**
2275
+ * The set of modalities the model can respond with. To disable audio, set this to
2276
+ * ["text"].
2277
+ */
2278
+ modalities?: Array<'text' | 'audio'>;
2279
+ /**
2280
+ * The Realtime model used for this session.
2281
+ */
2282
+ model?: (string & {}) | 'gpt-realtime' | 'gpt-realtime-2025-08-28' | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17' | 'gpt-realtime-mini' | 'gpt-realtime-mini-2025-10-06' | 'gpt-realtime-mini-2025-12-15' | 'gpt-audio-mini' | 'gpt-audio-mini-2025-10-06' | 'gpt-audio-mini-2025-12-15';
2283
+ /**
2284
+ * The object type. Always `realtime.session`.
2285
+ */
2286
+ object?: 'realtime.session';
2287
+ /**
2288
+ * The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
2289
+ * For `pcm16`, output audio is sampled at a rate of 24kHz.
2290
+ */
2291
+ output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
2292
+ /**
2293
+ * Reference to a prompt template and its variables.
2294
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
2295
+ */
2296
+ prompt?: ResponsesAPI.ResponsePrompt | null;
2297
+ /**
2298
+ * The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the
2299
+ * minimum speed. 1.5 is the maximum speed. This value can only be changed in
2300
+ * between model turns, not while a response is in progress.
2301
+ */
2302
+ speed?: number;
2303
+ /**
2304
+ * Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a
2305
+ * temperature of 0.8 is highly recommended for best performance.
2306
+ */
2307
+ temperature?: number;
2308
+ /**
2309
+ * How the model chooses tools. Options are `auto`, `none`, `required`, or specify
2310
+ * a function.
2311
+ */
2312
+ tool_choice?: string;
2313
+ /**
2314
+ * Tools (functions) available to the model.
2315
+ */
2316
+ tools?: Array<RealtimeFunctionTool>;
2317
+ /**
2318
+ * Configuration options for tracing. Set to null to disable tracing. Once tracing
2319
+ * is enabled for a session, the configuration cannot be modified.
2320
+ *
2321
+ * `auto` will create a trace for the session with default values for the workflow
2322
+ * name, group id, and metadata.
2323
+ */
2324
+ tracing?: 'auto' | RealtimeSession.TracingConfiguration | null;
2325
+ /**
2326
+ * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
2327
+ * set to `null` to turn off, in which case the client must manually trigger model
2328
+ * response.
2329
+ *
2330
+ * Server VAD means that the model will detect the start and end of speech based on
2331
+ * audio volume and respond at the end of user speech.
2332
+ *
2333
+ * Semantic VAD is more advanced and uses a turn detection model (in conjunction
2334
+ * with VAD) to semantically estimate whether the user has finished speaking, then
2335
+ * dynamically sets a timeout based on this probability. For example, if user audio
2336
+ * trails off with "uhhm", the model will score a low probability of turn end and
2337
+ * wait longer for the user to continue speaking. This can be useful for more
2338
+ * natural conversations, but may have a higher latency.
2339
+ */
2340
+ turn_detection?: RealtimeSession.ServerVad | RealtimeSession.SemanticVad | null;
2341
+ /**
2342
+ * The voice the model uses to respond. Voice cannot be changed during the session
2343
+ * once the model has responded with audio at least once. Current voice options are
2344
+ * `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
2345
+ */
2346
+ voice?: (string & {}) | 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse' | 'marin' | 'cedar';
2347
+ }
2348
+ export declare namespace RealtimeSession {
2349
+ /**
2350
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
2351
+ * off. Noise reduction filters audio added to the input audio buffer before it is
2352
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
2353
+ * detection accuracy (reducing false positives) and model performance by improving
2354
+ * perception of the input audio.
2355
+ */
2356
+ interface InputAudioNoiseReduction {
2357
+ /**
2358
+ * Type of noise reduction. `near_field` is for close-talking microphones such as
2359
+ * headphones, `far_field` is for far-field microphones such as laptop or
2360
+ * conference room microphones.
2361
+ */
2362
+ type?: RealtimeAPI.NoiseReductionType;
2363
+ }
2364
+ /**
2365
+ * Granular configuration for tracing.
2366
+ */
2367
+ interface TracingConfiguration {
2368
+ /**
2369
+ * The group id to attach to this trace to enable filtering and grouping in the
2370
+ * traces dashboard.
2371
+ */
2372
+ group_id?: string;
2373
+ /**
2374
+ * The arbitrary metadata to attach to this trace to enable filtering in the traces
2375
+ * dashboard.
2376
+ */
2377
+ metadata?: unknown;
2378
+ /**
2379
+ * The name of the workflow to attach to this trace. This is used to name the trace
2380
+ * in the traces dashboard.
2381
+ */
2382
+ workflow_name?: string;
2383
+ }
2384
+ /**
2385
+ * Server-side voice activity detection (VAD) which flips on when user speech is
2386
+ * detected and off after a period of silence.
2387
+ */
2388
+ interface ServerVad {
2389
+ /**
2390
+ * Type of turn detection, `server_vad` to turn on simple Server VAD.
2391
+ */
2392
+ type: 'server_vad';
2393
+ /**
2394
+ * Whether or not to automatically generate a response when a VAD stop event
2395
+ * occurs. If `interrupt_response` is set to `false` this may fail to create a
2396
+ * response if the model is already responding.
2397
+ *
2398
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
2399
+ * will never respond automatically but VAD events will still be emitted.
2400
+ */
2401
+ create_response?: boolean;
2402
+ /**
2403
+ * Optional timeout after which a model response will be triggered automatically.
2404
+ * This is useful for situations in which a long pause from the user is unexpected,
2405
+ * such as a phone call. The model will effectively prompt the user to continue the
2406
+ * conversation based on the current context.
2407
+ *
2408
+ * The timeout value will be applied after the last model response's audio has
2409
+ * finished playing, i.e. it's set to the `response.done` time plus audio playback
2410
+ * duration.
2411
+ *
2412
+ * An `input_audio_buffer.timeout_triggered` event (plus events associated with the
2413
+ * Response) will be emitted when the timeout is reached. Idle timeout is currently
2414
+ * only supported for `server_vad` mode.
2415
+ */
2416
+ idle_timeout_ms?: number | null;
2417
+ /**
2418
+ * Whether or not to automatically interrupt (cancel) any ongoing response with
2419
+ * output to the default conversation (i.e. `conversation` of `auto`) when a VAD
2420
+ * start event occurs. If `true` then the response will be cancelled, otherwise it
2421
+ * will continue until complete.
2422
+ *
2423
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
2424
+ * will never respond automatically but VAD events will still be emitted.
2425
+ */
2426
+ interrupt_response?: boolean;
2427
+ /**
2428
+ * Used only for `server_vad` mode. Amount of audio to include before the VAD
2429
+ * detected speech (in milliseconds). Defaults to 300ms.
2430
+ */
2431
+ prefix_padding_ms?: number;
2432
+ /**
2433
+ * Used only for `server_vad` mode. Duration of silence to detect speech stop (in
2434
+ * milliseconds). Defaults to 500ms. With shorter values the model will respond
2435
+ * more quickly, but may jump in on short pauses from the user.
2436
+ */
2437
+ silence_duration_ms?: number;
2438
+ /**
2439
+ * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this
2440
+ * defaults to 0.5. A higher threshold will require louder audio to activate the
2441
+ * model, and thus might perform better in noisy environments.
2442
+ */
2443
+ threshold?: number;
2444
+ }
2445
+ /**
2446
+ * Server-side semantic turn detection which uses a model to determine when the
2447
+ * user has finished speaking.
2448
+ */
2449
+ interface SemanticVad {
2450
+ /**
2451
+ * Type of turn detection, `semantic_vad` to turn on Semantic VAD.
2452
+ */
2453
+ type: 'semantic_vad';
2454
+ /**
2455
+ * Whether or not to automatically generate a response when a VAD stop event
2456
+ * occurs.
2457
+ */
2458
+ create_response?: boolean;
2459
+ /**
2460
+ * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low`
2461
+ * will wait longer for the user to continue speaking, `high` will respond more
2462
+ * quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`,
2463
+ * and `high` have max timeouts of 8s, 4s, and 2s respectively.
2464
+ */
2465
+ eagerness?: 'low' | 'medium' | 'high' | 'auto';
2466
+ /**
2467
+ * Whether or not to automatically interrupt any ongoing response with output to
2468
+ * the default conversation (i.e. `conversation` of `auto`) when a VAD start event
2469
+ * occurs.
2470
+ */
2471
+ interrupt_response?: boolean;
2472
+ }
2473
+ }
2474
+ /**
2475
+ * Realtime session object configuration.
2476
+ */
2477
+ export interface RealtimeSessionCreateRequest {
2478
+ /**
2479
+ * The type of session to create. Always `realtime` for the Realtime API.
2480
+ */
2481
+ type: 'realtime';
2482
+ /**
2483
+ * Configuration for input and output audio.
2484
+ */
2485
+ audio?: RealtimeAudioConfig;
2486
+ /**
2487
+ * Additional fields to include in server outputs.
2488
+ *
2489
+ * `item.input_audio_transcription.logprobs`: Include logprobs for input audio
2490
+ * transcription.
2491
+ */
2492
+ include?: Array<'item.input_audio_transcription.logprobs'>;
2493
+ /**
2494
+ * The default system instructions (i.e. system message) prepended to model calls.
2495
+ * This field allows the client to guide the model on desired responses. The model
2496
+ * can be instructed on response content and format, (e.g. "be extremely succinct",
2497
+ * "act friendly", "here are examples of good responses") and on audio behavior
2498
+ * (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
2499
+ * instructions are not guaranteed to be followed by the model, but they provide
2500
+ * guidance to the model on the desired behavior.
2501
+ *
2502
+ * Note that the server sets default instructions which will be used if this field
2503
+ * is not set and are visible in the `session.created` event at the start of the
2504
+ * session.
2505
+ */
2506
+ instructions?: string;
2507
+ /**
2508
+ * Maximum number of output tokens for a single assistant response, inclusive of
2509
+ * tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
2510
+ * `inf` for the maximum available tokens for a given model. Defaults to `inf`.
2511
+ */
2512
+ max_output_tokens?: number | 'inf';
2513
+ /**
2514
+ * The Realtime model used for this session.
2515
+ */
2516
+ model?: (string & {}) | 'gpt-realtime' | 'gpt-realtime-2025-08-28' | 'gpt-4o-realtime-preview' | 'gpt-4o-realtime-preview-2024-10-01' | 'gpt-4o-realtime-preview-2024-12-17' | 'gpt-4o-realtime-preview-2025-06-03' | 'gpt-4o-mini-realtime-preview' | 'gpt-4o-mini-realtime-preview-2024-12-17' | 'gpt-realtime-mini' | 'gpt-realtime-mini-2025-10-06' | 'gpt-realtime-mini-2025-12-15' | 'gpt-audio-mini' | 'gpt-audio-mini-2025-10-06' | 'gpt-audio-mini-2025-12-15';
2517
+ /**
2518
+ * The set of modalities the model can respond with. It defaults to `["audio"]`,
2519
+ * indicating that the model will respond with audio plus a transcript. `["text"]`
2520
+ * can be used to make the model respond with text only. It is not possible to
2521
+ * request both `text` and `audio` at the same time.
2522
+ */
2523
+ output_modalities?: Array<'text' | 'audio'>;
2524
+ /**
2525
+ * Reference to a prompt template and its variables.
2526
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
2527
+ */
2528
+ prompt?: ResponsesAPI.ResponsePrompt | null;
2529
+ /**
2530
+ * How the model chooses tools. Provide one of the string modes or force a specific
2531
+ * function/MCP tool.
2532
+ */
2533
+ tool_choice?: RealtimeToolChoiceConfig;
2534
+ /**
2535
+ * Tools available to the model.
2536
+ */
2537
+ tools?: RealtimeToolsConfig;
2538
+ /**
2539
+ * Realtime API can write session traces to the
2540
+ * [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
2541
+ * tracing is enabled for a session, the configuration cannot be modified.
2542
+ *
2543
+ * `auto` will create a trace for the session with default values for the workflow
2544
+ * name, group id, and metadata.
2545
+ */
2546
+ tracing?: RealtimeTracingConfig | null;
2547
+ /**
2548
+ * When the number of tokens in a conversation exceeds the model's input token
2549
+ * limit, the conversation be truncated, meaning messages (starting from the
2550
+ * oldest) will not be included in the model's context. A 32k context model with
2551
+ * 4,096 max output tokens can only include 28,224 tokens in the context before
2552
+ * truncation occurs.
2553
+ *
2554
+ * Clients can configure truncation behavior to truncate with a lower max token
2555
+ * limit, which is an effective way to control token usage and cost.
2556
+ *
2557
+ * Truncation will reduce the number of cached tokens on the next turn (busting the
2558
+ * cache), since messages are dropped from the beginning of the context. However,
2559
+ * clients can also configure truncation to retain messages up to a fraction of the
2560
+ * maximum context size, which will reduce the need for future truncations and thus
2561
+ * improve the cache rate.
2562
+ *
2563
+ * Truncation can be disabled entirely, which means the server will never truncate
2564
+ * but would instead return an error if the conversation exceeds the model's input
2565
+ * token limit.
2566
+ */
2567
+ truncation?: RealtimeTruncation;
2568
+ }
2569
+ /**
2570
+ * How the model chooses tools. Provide one of the string modes or force a specific
2571
+ * function/MCP tool.
2572
+ */
2573
+ export type RealtimeToolChoiceConfig = ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp;
2574
+ /**
2575
+ * Tools available to the model.
2576
+ */
2577
+ export type RealtimeToolsConfig = Array<RealtimeToolsConfigUnion>;
2578
+ /**
2579
+ * Give the model access to additional tools via remote Model Context Protocol
2580
+ * (MCP) servers.
2581
+ * [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
2582
+ */
2583
+ export type RealtimeToolsConfigUnion = RealtimeFunctionTool | RealtimeToolsConfigUnion.Mcp;
2584
+ export declare namespace RealtimeToolsConfigUnion {
2585
+ /**
2586
+ * Give the model access to additional tools via remote Model Context Protocol
2587
+ * (MCP) servers.
2588
+ * [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
2589
+ */
2590
+ interface Mcp {
2591
+ /**
2592
+ * A label for this MCP server, used to identify it in tool calls.
2593
+ */
2594
+ server_label: string;
2595
+ /**
2596
+ * The type of the MCP tool. Always `mcp`.
2597
+ */
2598
+ type: 'mcp';
2599
+ /**
2600
+ * List of allowed tool names or a filter object.
2601
+ */
2602
+ allowed_tools?: Array<string> | Mcp.McpToolFilter | null;
2603
+ /**
2604
+ * An OAuth access token that can be used with a remote MCP server, either with a
2605
+ * custom MCP server URL or a service connector. Your application must handle the
2606
+ * OAuth authorization flow and provide the token here.
2607
+ */
2608
+ authorization?: string;
2609
+ /**
2610
+ * Identifier for service connectors, like those available in ChatGPT. One of
2611
+ * `server_url` or `connector_id` must be provided. Learn more about service
2612
+ * connectors
2613
+ * [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
2614
+ *
2615
+ * Currently supported `connector_id` values are:
2616
+ *
2617
+ * - Dropbox: `connector_dropbox`
2618
+ * - Gmail: `connector_gmail`
2619
+ * - Google Calendar: `connector_googlecalendar`
2620
+ * - Google Drive: `connector_googledrive`
2621
+ * - Microsoft Teams: `connector_microsoftteams`
2622
+ * - Outlook Calendar: `connector_outlookcalendar`
2623
+ * - Outlook Email: `connector_outlookemail`
2624
+ * - SharePoint: `connector_sharepoint`
2625
+ */
2626
+ connector_id?: 'connector_dropbox' | 'connector_gmail' | 'connector_googlecalendar' | 'connector_googledrive' | 'connector_microsoftteams' | 'connector_outlookcalendar' | 'connector_outlookemail' | 'connector_sharepoint';
2627
+ /**
2628
+ * Optional HTTP headers to send to the MCP server. Use for authentication or other
2629
+ * purposes.
2630
+ */
2631
+ headers?: {
2632
+ [key: string]: string;
2633
+ } | null;
2634
+ /**
2635
+ * Specify which of the MCP server's tools require approval.
2636
+ */
2637
+ require_approval?: Mcp.McpToolApprovalFilter | 'always' | 'never' | null;
2638
+ /**
2639
+ * Optional description of the MCP server, used to provide more context.
2640
+ */
2641
+ server_description?: string;
2642
+ /**
2643
+ * The URL for the MCP server. One of `server_url` or `connector_id` must be
2644
+ * provided.
2645
+ */
2646
+ server_url?: string;
2647
+ }
2648
+ namespace Mcp {
2649
+ /**
2650
+ * A filter object to specify which tools are allowed.
2651
+ */
2652
+ interface McpToolFilter {
2653
+ /**
2654
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
2655
+ * is
2656
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2657
+ * it will match this filter.
2658
+ */
2659
+ read_only?: boolean;
2660
+ /**
2661
+ * List of allowed tool names.
2662
+ */
2663
+ tool_names?: Array<string>;
2664
+ }
2665
+ /**
2666
+ * Specify which of the MCP server's tools require approval. Can be `always`,
2667
+ * `never`, or a filter object associated with tools that require approval.
2668
+ */
2669
+ interface McpToolApprovalFilter {
2670
+ /**
2671
+ * A filter object to specify which tools are allowed.
2672
+ */
2673
+ always?: McpToolApprovalFilter.Always;
2674
+ /**
2675
+ * A filter object to specify which tools are allowed.
2676
+ */
2677
+ never?: McpToolApprovalFilter.Never;
2678
+ }
2679
+ namespace McpToolApprovalFilter {
2680
+ /**
2681
+ * A filter object to specify which tools are allowed.
2682
+ */
2683
+ interface Always {
2684
+ /**
2685
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
2686
+ * is
2687
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2688
+ * it will match this filter.
2689
+ */
2690
+ read_only?: boolean;
2691
+ /**
2692
+ * List of allowed tool names.
2693
+ */
2694
+ tool_names?: Array<string>;
2695
+ }
2696
+ /**
2697
+ * A filter object to specify which tools are allowed.
2698
+ */
2699
+ interface Never {
2700
+ /**
2701
+ * Indicates whether or not a tool modifies data or is read-only. If an MCP server
2702
+ * is
2703
+ * [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
2704
+ * it will match this filter.
2705
+ */
2706
+ read_only?: boolean;
2707
+ /**
2708
+ * List of allowed tool names.
2709
+ */
2710
+ tool_names?: Array<string>;
2711
+ }
2712
+ }
2713
+ }
2714
+ }
2715
+ /**
2716
+ * Realtime API can write session traces to the
2717
+ * [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
2718
+ * tracing is enabled for a session, the configuration cannot be modified.
2719
+ *
2720
+ * `auto` will create a trace for the session with default values for the workflow
2721
+ * name, group id, and metadata.
2722
+ */
2723
+ export type RealtimeTracingConfig = 'auto' | RealtimeTracingConfig.TracingConfiguration;
2724
+ export declare namespace RealtimeTracingConfig {
2725
+ /**
2726
+ * Granular configuration for tracing.
2727
+ */
2728
+ interface TracingConfiguration {
2729
+ /**
2730
+ * The group id to attach to this trace to enable filtering and grouping in the
2731
+ * Traces Dashboard.
2732
+ */
2733
+ group_id?: string;
2734
+ /**
2735
+ * The arbitrary metadata to attach to this trace to enable filtering in the Traces
2736
+ * Dashboard.
2737
+ */
2738
+ metadata?: unknown;
2739
+ /**
2740
+ * The name of the workflow to attach to this trace. This is used to name the trace
2741
+ * in the Traces Dashboard.
2742
+ */
2743
+ workflow_name?: string;
2744
+ }
2745
+ }
2746
+ /**
2747
+ * Configuration for input and output audio.
2748
+ */
2749
+ export interface RealtimeTranscriptionSessionAudio {
2750
+ input?: RealtimeTranscriptionSessionAudioInput;
2751
+ }
2752
+ export interface RealtimeTranscriptionSessionAudioInput {
2753
+ /**
2754
+ * The PCM audio format. Only a 24kHz sample rate is supported.
2755
+ */
2756
+ format?: RealtimeAudioFormats;
2757
+ /**
2758
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
2759
+ * off. Noise reduction filters audio added to the input audio buffer before it is
2760
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
2761
+ * detection accuracy (reducing false positives) and model performance by improving
2762
+ * perception of the input audio.
2763
+ */
2764
+ noise_reduction?: RealtimeTranscriptionSessionAudioInput.NoiseReduction;
2765
+ /**
2766
+ * Configuration for input audio transcription, defaults to off and can be set to
2767
+ * `null` to turn off once on. Input audio transcription is not native to the
2768
+ * model, since the model consumes audio directly. Transcription runs
2769
+ * asynchronously through
2770
+ * [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription)
2771
+ * and should be treated as guidance of input audio content rather than precisely
2772
+ * what the model heard. The client can optionally set the language and prompt for
2773
+ * transcription, these offer additional guidance to the transcription service.
2774
+ */
2775
+ transcription?: AudioTranscription;
2776
+ /**
2777
+ * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
2778
+ * set to `null` to turn off, in which case the client must manually trigger model
2779
+ * response.
2780
+ *
2781
+ * Server VAD means that the model will detect the start and end of speech based on
2782
+ * audio volume and respond at the end of user speech.
2783
+ *
2784
+ * Semantic VAD is more advanced and uses a turn detection model (in conjunction
2785
+ * with VAD) to semantically estimate whether the user has finished speaking, then
2786
+ * dynamically sets a timeout based on this probability. For example, if user audio
2787
+ * trails off with "uhhm", the model will score a low probability of turn end and
2788
+ * wait longer for the user to continue speaking. This can be useful for more
2789
+ * natural conversations, but may have a higher latency.
2790
+ */
2791
+ turn_detection?: RealtimeTranscriptionSessionAudioInputTurnDetection | null;
2792
+ }
2793
+ export declare namespace RealtimeTranscriptionSessionAudioInput {
2794
+ /**
2795
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
2796
+ * off. Noise reduction filters audio added to the input audio buffer before it is
2797
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
2798
+ * detection accuracy (reducing false positives) and model performance by improving
2799
+ * perception of the input audio.
2800
+ */
2801
+ interface NoiseReduction {
2802
+ /**
2803
+ * Type of noise reduction. `near_field` is for close-talking microphones such as
2804
+ * headphones, `far_field` is for far-field microphones such as laptop or
2805
+ * conference room microphones.
2806
+ */
2807
+ type?: RealtimeAPI.NoiseReductionType;
2808
+ }
2809
+ }
2810
+ /**
2811
+ * Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
2812
+ * set to `null` to turn off, in which case the client must manually trigger model
2813
+ * response.
2814
+ *
2815
+ * Server VAD means that the model will detect the start and end of speech based on
2816
+ * audio volume and respond at the end of user speech.
2817
+ *
2818
+ * Semantic VAD is more advanced and uses a turn detection model (in conjunction
2819
+ * with VAD) to semantically estimate whether the user has finished speaking, then
2820
+ * dynamically sets a timeout based on this probability. For example, if user audio
2821
+ * trails off with "uhhm", the model will score a low probability of turn end and
2822
+ * wait longer for the user to continue speaking. This can be useful for more
2823
+ * natural conversations, but may have a higher latency.
2824
+ */
2825
+ export type RealtimeTranscriptionSessionAudioInputTurnDetection = RealtimeTranscriptionSessionAudioInputTurnDetection.ServerVad | RealtimeTranscriptionSessionAudioInputTurnDetection.SemanticVad;
2826
+ export declare namespace RealtimeTranscriptionSessionAudioInputTurnDetection {
2827
+ /**
2828
+ * Server-side voice activity detection (VAD) which flips on when user speech is
2829
+ * detected and off after a period of silence.
2830
+ */
2831
+ interface ServerVad {
2832
+ /**
2833
+ * Type of turn detection, `server_vad` to turn on simple Server VAD.
2834
+ */
2835
+ type: 'server_vad';
2836
+ /**
2837
+ * Whether or not to automatically generate a response when a VAD stop event
2838
+ * occurs. If `interrupt_response` is set to `false` this may fail to create a
2839
+ * response if the model is already responding.
2840
+ *
2841
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
2842
+ * will never respond automatically but VAD events will still be emitted.
2843
+ */
2844
+ create_response?: boolean;
2845
+ /**
2846
+ * Optional timeout after which a model response will be triggered automatically.
2847
+ * This is useful for situations in which a long pause from the user is unexpected,
2848
+ * such as a phone call. The model will effectively prompt the user to continue the
2849
+ * conversation based on the current context.
2850
+ *
2851
+ * The timeout value will be applied after the last model response's audio has
2852
+ * finished playing, i.e. it's set to the `response.done` time plus audio playback
2853
+ * duration.
2854
+ *
2855
+ * An `input_audio_buffer.timeout_triggered` event (plus events associated with the
2856
+ * Response) will be emitted when the timeout is reached. Idle timeout is currently
2857
+ * only supported for `server_vad` mode.
2858
+ */
2859
+ idle_timeout_ms?: number | null;
2860
+ /**
2861
+ * Whether or not to automatically interrupt (cancel) any ongoing response with
2862
+ * output to the default conversation (i.e. `conversation` of `auto`) when a VAD
2863
+ * start event occurs. If `true` then the response will be cancelled, otherwise it
2864
+ * will continue until complete.
2865
+ *
2866
+ * If both `create_response` and `interrupt_response` are set to `false`, the model
2867
+ * will never respond automatically but VAD events will still be emitted.
2868
+ */
2869
+ interrupt_response?: boolean;
2870
+ /**
2871
+ * Used only for `server_vad` mode. Amount of audio to include before the VAD
2872
+ * detected speech (in milliseconds). Defaults to 300ms.
2873
+ */
2874
+ prefix_padding_ms?: number;
2875
+ /**
2876
+ * Used only for `server_vad` mode. Duration of silence to detect speech stop (in
2877
+ * milliseconds). Defaults to 500ms. With shorter values the model will respond
2878
+ * more quickly, but may jump in on short pauses from the user.
2879
+ */
2880
+ silence_duration_ms?: number;
2881
+ /**
2882
+ * Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this
2883
+ * defaults to 0.5. A higher threshold will require louder audio to activate the
2884
+ * model, and thus might perform better in noisy environments.
2885
+ */
2886
+ threshold?: number;
2887
+ }
2888
+ /**
2889
+ * Server-side semantic turn detection which uses a model to determine when the
2890
+ * user has finished speaking.
2891
+ */
2892
+ interface SemanticVad {
2893
+ /**
2894
+ * Type of turn detection, `semantic_vad` to turn on Semantic VAD.
2895
+ */
2896
+ type: 'semantic_vad';
2897
+ /**
2898
+ * Whether or not to automatically generate a response when a VAD stop event
2899
+ * occurs.
2900
+ */
2901
+ create_response?: boolean;
2902
+ /**
2903
+ * Used only for `semantic_vad` mode. The eagerness of the model to respond. `low`
2904
+ * will wait longer for the user to continue speaking, `high` will respond more
2905
+ * quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`,
2906
+ * and `high` have max timeouts of 8s, 4s, and 2s respectively.
2907
+ */
2908
+ eagerness?: 'low' | 'medium' | 'high' | 'auto';
2909
+ /**
2910
+ * Whether or not to automatically interrupt any ongoing response with output to
2911
+ * the default conversation (i.e. `conversation` of `auto`) when a VAD start event
2912
+ * occurs.
2913
+ */
2914
+ interrupt_response?: boolean;
2915
+ }
2916
+ }
2917
+ /**
2918
+ * Realtime transcription session object configuration.
2919
+ */
2920
+ export interface RealtimeTranscriptionSessionCreateRequest {
2921
+ /**
2922
+ * The type of session to create. Always `transcription` for transcription
2923
+ * sessions.
2924
+ */
2925
+ type: 'transcription';
2926
+ /**
2927
+ * Configuration for input and output audio.
2928
+ */
2929
+ audio?: RealtimeTranscriptionSessionAudio;
2930
+ /**
2931
+ * Additional fields to include in server outputs.
2932
+ *
2933
+ * `item.input_audio_transcription.logprobs`: Include logprobs for input audio
2934
+ * transcription.
2935
+ */
2936
+ include?: Array<'item.input_audio_transcription.logprobs'>;
2937
+ }
2938
+ /**
2939
+ * When the number of tokens in a conversation exceeds the model's input token
2940
+ * limit, the conversation be truncated, meaning messages (starting from the
2941
+ * oldest) will not be included in the model's context. A 32k context model with
2942
+ * 4,096 max output tokens can only include 28,224 tokens in the context before
2943
+ * truncation occurs.
2944
+ *
2945
+ * Clients can configure truncation behavior to truncate with a lower max token
2946
+ * limit, which is an effective way to control token usage and cost.
2947
+ *
2948
+ * Truncation will reduce the number of cached tokens on the next turn (busting the
2949
+ * cache), since messages are dropped from the beginning of the context. However,
2950
+ * clients can also configure truncation to retain messages up to a fraction of the
2951
+ * maximum context size, which will reduce the need for future truncations and thus
2952
+ * improve the cache rate.
2953
+ *
2954
+ * Truncation can be disabled entirely, which means the server will never truncate
2955
+ * but would instead return an error if the conversation exceeds the model's input
2956
+ * token limit.
2957
+ */
2958
+ export type RealtimeTruncation = 'auto' | 'disabled' | RealtimeTruncationRetentionRatio;
2959
+ /**
2960
+ * Retain a fraction of the conversation tokens when the conversation exceeds the
2961
+ * input token limit. This allows you to amortize truncations across multiple
2962
+ * turns, which can help improve cached token usage.
2963
+ */
2964
+ export interface RealtimeTruncationRetentionRatio {
2965
+ /**
2966
+ * Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when
2967
+ * the conversation exceeds the input token limit. Setting this to `0.8` means that
2968
+ * messages will be dropped until 80% of the maximum allowed tokens are used. This
2969
+ * helps reduce the frequency of truncations and improve cache rates.
2970
+ */
2971
+ retention_ratio: number;
2972
+ /**
2973
+ * Use retention ratio truncation.
2974
+ */
2975
+ type: 'retention_ratio';
2976
+ /**
2977
+ * Optional custom token limits for this truncation strategy. If not provided, the
2978
+ * model's default token limits will be used.
2979
+ */
2980
+ token_limits?: RealtimeTruncationRetentionRatio.TokenLimits;
2981
+ }
2982
+ export declare namespace RealtimeTruncationRetentionRatio {
2983
+ /**
2984
+ * Optional custom token limits for this truncation strategy. If not provided, the
2985
+ * model's default token limits will be used.
2986
+ */
2987
+ interface TokenLimits {
2988
+ /**
2989
+ * Maximum tokens allowed in the conversation after instructions (which including
2990
+ * tool definitions). For example, setting this to 5,000 would mean that truncation
2991
+ * would occur when the conversation exceeds 5,000 tokens after instructions. This
2992
+ * cannot be higher than the model's context window size minus the maximum output
2993
+ * tokens.
2994
+ */
2995
+ post_instructions?: number;
2996
+ }
2997
+ }
2998
+ /**
2999
+ * Returned when the model-generated audio is updated.
3000
+ */
3001
+ export interface ResponseAudioDeltaEvent {
3002
+ /**
3003
+ * The index of the content part in the item's content array.
3004
+ */
3005
+ content_index: number;
3006
+ /**
3007
+ * Base64-encoded audio data delta.
3008
+ */
3009
+ delta: string;
3010
+ /**
3011
+ * The unique ID of the server event.
3012
+ */
3013
+ event_id: string;
3014
+ /**
3015
+ * The ID of the item.
3016
+ */
3017
+ item_id: string;
3018
+ /**
3019
+ * The index of the output item in the response.
3020
+ */
3021
+ output_index: number;
3022
+ /**
3023
+ * The ID of the response.
3024
+ */
3025
+ response_id: string;
3026
+ /**
3027
+ * The event type, must be `response.output_audio.delta`.
3028
+ */
3029
+ type: 'response.output_audio.delta';
3030
+ }
3031
+ /**
3032
+ * Returned when the model-generated audio is done. Also emitted when a Response is
3033
+ * interrupted, incomplete, or cancelled.
3034
+ */
3035
+ export interface ResponseAudioDoneEvent {
3036
+ /**
3037
+ * The index of the content part in the item's content array.
3038
+ */
3039
+ content_index: number;
3040
+ /**
3041
+ * The unique ID of the server event.
3042
+ */
3043
+ event_id: string;
3044
+ /**
3045
+ * The ID of the item.
3046
+ */
3047
+ item_id: string;
3048
+ /**
3049
+ * The index of the output item in the response.
3050
+ */
3051
+ output_index: number;
3052
+ /**
3053
+ * The ID of the response.
3054
+ */
3055
+ response_id: string;
3056
+ /**
3057
+ * The event type, must be `response.output_audio.done`.
3058
+ */
3059
+ type: 'response.output_audio.done';
3060
+ }
3061
+ /**
3062
+ * Returned when the model-generated transcription of audio output is updated.
3063
+ */
3064
+ export interface ResponseAudioTranscriptDeltaEvent {
3065
+ /**
3066
+ * The index of the content part in the item's content array.
3067
+ */
3068
+ content_index: number;
3069
+ /**
3070
+ * The transcript delta.
3071
+ */
3072
+ delta: string;
3073
+ /**
3074
+ * The unique ID of the server event.
3075
+ */
3076
+ event_id: string;
3077
+ /**
3078
+ * The ID of the item.
3079
+ */
3080
+ item_id: string;
3081
+ /**
3082
+ * The index of the output item in the response.
3083
+ */
3084
+ output_index: number;
3085
+ /**
3086
+ * The ID of the response.
3087
+ */
3088
+ response_id: string;
3089
+ /**
3090
+ * The event type, must be `response.output_audio_transcript.delta`.
3091
+ */
3092
+ type: 'response.output_audio_transcript.delta';
3093
+ }
3094
+ /**
3095
+ * Returned when the model-generated transcription of audio output is done
3096
+ * streaming. Also emitted when a Response is interrupted, incomplete, or
3097
+ * cancelled.
3098
+ */
3099
+ export interface ResponseAudioTranscriptDoneEvent {
3100
+ /**
3101
+ * The index of the content part in the item's content array.
3102
+ */
3103
+ content_index: number;
3104
+ /**
3105
+ * The unique ID of the server event.
3106
+ */
3107
+ event_id: string;
3108
+ /**
3109
+ * The ID of the item.
3110
+ */
3111
+ item_id: string;
3112
+ /**
3113
+ * The index of the output item in the response.
3114
+ */
3115
+ output_index: number;
3116
+ /**
3117
+ * The ID of the response.
3118
+ */
3119
+ response_id: string;
3120
+ /**
3121
+ * The final transcript of the audio.
3122
+ */
3123
+ transcript: string;
3124
+ /**
3125
+ * The event type, must be `response.output_audio_transcript.done`.
3126
+ */
3127
+ type: 'response.output_audio_transcript.done';
3128
+ }
3129
+ /**
3130
+ * Send this event to cancel an in-progress response. The server will respond with
3131
+ * a `response.done` event with a status of `response.status=cancelled`. If there
3132
+ * is no response to cancel, the server will respond with an error. It's safe to
3133
+ * call `response.cancel` even if no response is in progress, an error will be
3134
+ * returned the session will remain unaffected.
3135
+ */
3136
+ export interface ResponseCancelEvent {
3137
+ /**
3138
+ * The event type, must be `response.cancel`.
3139
+ */
3140
+ type: 'response.cancel';
3141
+ /**
3142
+ * Optional client-generated ID used to identify this event.
3143
+ */
3144
+ event_id?: string;
3145
+ /**
3146
+ * A specific response ID to cancel - if not provided, will cancel an in-progress
3147
+ * response in the default conversation.
3148
+ */
3149
+ response_id?: string;
3150
+ }
3151
+ /**
3152
+ * Returned when a new content part is added to an assistant message item during
3153
+ * response generation.
3154
+ */
3155
+ export interface ResponseContentPartAddedEvent {
3156
+ /**
3157
+ * The index of the content part in the item's content array.
3158
+ */
3159
+ content_index: number;
3160
+ /**
3161
+ * The unique ID of the server event.
3162
+ */
3163
+ event_id: string;
3164
+ /**
3165
+ * The ID of the item to which the content part was added.
3166
+ */
3167
+ item_id: string;
3168
+ /**
3169
+ * The index of the output item in the response.
3170
+ */
3171
+ output_index: number;
3172
+ /**
3173
+ * The content part that was added.
3174
+ */
3175
+ part: ResponseContentPartAddedEvent.Part;
3176
+ /**
3177
+ * The ID of the response.
3178
+ */
3179
+ response_id: string;
3180
+ /**
3181
+ * The event type, must be `response.content_part.added`.
3182
+ */
3183
+ type: 'response.content_part.added';
3184
+ }
3185
+ export declare namespace ResponseContentPartAddedEvent {
3186
+ /**
3187
+ * The content part that was added.
3188
+ */
3189
+ interface Part {
3190
+ /**
3191
+ * Base64-encoded audio data (if type is "audio").
3192
+ */
3193
+ audio?: string;
3194
+ /**
3195
+ * The text content (if type is "text").
3196
+ */
3197
+ text?: string;
3198
+ /**
3199
+ * The transcript of the audio (if type is "audio").
3200
+ */
3201
+ transcript?: string;
3202
+ /**
3203
+ * The content type ("text", "audio").
3204
+ */
3205
+ type?: 'text' | 'audio';
3206
+ }
3207
+ }
3208
+ /**
3209
+ * Returned when a content part is done streaming in an assistant message item.
3210
+ * Also emitted when a Response is interrupted, incomplete, or cancelled.
3211
+ */
3212
+ export interface ResponseContentPartDoneEvent {
3213
+ /**
3214
+ * The index of the content part in the item's content array.
3215
+ */
3216
+ content_index: number;
3217
+ /**
3218
+ * The unique ID of the server event.
3219
+ */
3220
+ event_id: string;
3221
+ /**
3222
+ * The ID of the item.
3223
+ */
3224
+ item_id: string;
3225
+ /**
3226
+ * The index of the output item in the response.
3227
+ */
3228
+ output_index: number;
3229
+ /**
3230
+ * The content part that is done.
3231
+ */
3232
+ part: ResponseContentPartDoneEvent.Part;
3233
+ /**
3234
+ * The ID of the response.
3235
+ */
3236
+ response_id: string;
3237
+ /**
3238
+ * The event type, must be `response.content_part.done`.
3239
+ */
3240
+ type: 'response.content_part.done';
3241
+ }
3242
+ export declare namespace ResponseContentPartDoneEvent {
3243
+ /**
3244
+ * The content part that is done.
3245
+ */
3246
+ interface Part {
3247
+ /**
3248
+ * Base64-encoded audio data (if type is "audio").
3249
+ */
3250
+ audio?: string;
3251
+ /**
3252
+ * The text content (if type is "text").
3253
+ */
3254
+ text?: string;
3255
+ /**
3256
+ * The transcript of the audio (if type is "audio").
3257
+ */
3258
+ transcript?: string;
3259
+ /**
3260
+ * The content type ("text", "audio").
3261
+ */
3262
+ type?: 'text' | 'audio';
3263
+ }
3264
+ }
3265
+ /**
3266
+ * This event instructs the server to create a Response, which means triggering
3267
+ * model inference. When in Server VAD mode, the server will create Responses
3268
+ * automatically.
3269
+ *
3270
+ * A Response will include at least one Item, and may have two, in which case the
3271
+ * second will be a function call. These Items will be appended to the conversation
3272
+ * history by default.
3273
+ *
3274
+ * The server will respond with a `response.created` event, events for Items and
3275
+ * content created, and finally a `response.done` event to indicate the Response is
3276
+ * complete.
3277
+ *
3278
+ * The `response.create` event includes inference configuration like `instructions`
3279
+ * and `tools`. If these are set, they will override the Session's configuration
3280
+ * for this Response only.
3281
+ *
3282
+ * Responses can be created out-of-band of the default Conversation, meaning that
3283
+ * they can have arbitrary input, and it's possible to disable writing the output
3284
+ * to the Conversation. Only one Response can write to the default Conversation at
3285
+ * a time, but otherwise multiple Responses can be created in parallel. The
3286
+ * `metadata` field is a good way to disambiguate multiple simultaneous Responses.
3287
+ *
3288
+ * Clients can set `conversation` to `none` to create a Response that does not
3289
+ * write to the default Conversation. Arbitrary input can be provided with the
3290
+ * `input` field, which is an array accepting raw Items and references to existing
3291
+ * Items.
3292
+ */
3293
+ export interface ResponseCreateEvent {
3294
+ /**
3295
+ * The event type, must be `response.create`.
3296
+ */
3297
+ type: 'response.create';
3298
+ /**
3299
+ * Optional client-generated ID used to identify this event.
3300
+ */
3301
+ event_id?: string;
3302
+ /**
3303
+ * Create a new Realtime response with these parameters
3304
+ */
3305
+ response?: RealtimeResponseCreateParams;
3306
+ }
3307
+ /**
3308
+ * Returned when a new Response is created. The first event of response creation,
3309
+ * where the response is in an initial state of `in_progress`.
3310
+ */
3311
+ export interface ResponseCreatedEvent {
3312
+ /**
3313
+ * The unique ID of the server event.
3314
+ */
3315
+ event_id: string;
3316
+ /**
3317
+ * The response resource.
3318
+ */
3319
+ response: RealtimeResponse;
3320
+ /**
3321
+ * The event type, must be `response.created`.
3322
+ */
3323
+ type: 'response.created';
3324
+ }
3325
+ /**
3326
+ * Returned when a Response is done streaming. Always emitted, no matter the final
3327
+ * state. The Response object included in the `response.done` event will include
3328
+ * all output Items in the Response but will omit the raw audio data.
3329
+ *
3330
+ * Clients should check the `status` field of the Response to determine if it was
3331
+ * successful (`completed`) or if there was another outcome: `cancelled`, `failed`,
3332
+ * or `incomplete`.
3333
+ *
3334
+ * A response will contain all output items that were generated during the
3335
+ * response, excluding any audio content.
3336
+ */
3337
+ export interface ResponseDoneEvent {
3338
+ /**
3339
+ * The unique ID of the server event.
3340
+ */
3341
+ event_id: string;
3342
+ /**
3343
+ * The response resource.
3344
+ */
3345
+ response: RealtimeResponse;
3346
+ /**
3347
+ * The event type, must be `response.done`.
3348
+ */
3349
+ type: 'response.done';
3350
+ }
3351
+ /**
3352
+ * Returned when the model-generated function call arguments are updated.
3353
+ */
3354
+ export interface ResponseFunctionCallArgumentsDeltaEvent {
3355
+ /**
3356
+ * The ID of the function call.
3357
+ */
3358
+ call_id: string;
3359
+ /**
3360
+ * The arguments delta as a JSON string.
3361
+ */
3362
+ delta: string;
3363
+ /**
3364
+ * The unique ID of the server event.
3365
+ */
3366
+ event_id: string;
3367
+ /**
3368
+ * The ID of the function call item.
3369
+ */
3370
+ item_id: string;
3371
+ /**
3372
+ * The index of the output item in the response.
3373
+ */
3374
+ output_index: number;
3375
+ /**
3376
+ * The ID of the response.
3377
+ */
3378
+ response_id: string;
3379
+ /**
3380
+ * The event type, must be `response.function_call_arguments.delta`.
3381
+ */
3382
+ type: 'response.function_call_arguments.delta';
3383
+ }
3384
+ /**
3385
+ * Returned when the model-generated function call arguments are done streaming.
3386
+ * Also emitted when a Response is interrupted, incomplete, or cancelled.
3387
+ */
3388
+ export interface ResponseFunctionCallArgumentsDoneEvent {
3389
+ /**
3390
+ * The final arguments as a JSON string.
3391
+ */
3392
+ arguments: string;
3393
+ /**
3394
+ * The ID of the function call.
3395
+ */
3396
+ call_id: string;
3397
+ /**
3398
+ * The unique ID of the server event.
3399
+ */
3400
+ event_id: string;
3401
+ /**
3402
+ * The ID of the function call item.
3403
+ */
3404
+ item_id: string;
3405
+ /**
3406
+ * The name of the function that was called.
3407
+ */
3408
+ name: string;
3409
+ /**
3410
+ * The index of the output item in the response.
3411
+ */
3412
+ output_index: number;
3413
+ /**
3414
+ * The ID of the response.
3415
+ */
3416
+ response_id: string;
3417
+ /**
3418
+ * The event type, must be `response.function_call_arguments.done`.
3419
+ */
3420
+ type: 'response.function_call_arguments.done';
3421
+ }
3422
+ /**
3423
+ * Returned when MCP tool call arguments are updated during response generation.
3424
+ */
3425
+ export interface ResponseMcpCallArgumentsDelta {
3426
+ /**
3427
+ * The JSON-encoded arguments delta.
3428
+ */
3429
+ delta: string;
3430
+ /**
3431
+ * The unique ID of the server event.
3432
+ */
3433
+ event_id: string;
3434
+ /**
3435
+ * The ID of the MCP tool call item.
3436
+ */
3437
+ item_id: string;
3438
+ /**
3439
+ * The index of the output item in the response.
3440
+ */
3441
+ output_index: number;
3442
+ /**
3443
+ * The ID of the response.
3444
+ */
3445
+ response_id: string;
3446
+ /**
3447
+ * The event type, must be `response.mcp_call_arguments.delta`.
3448
+ */
3449
+ type: 'response.mcp_call_arguments.delta';
3450
+ /**
3451
+ * If present, indicates the delta text was obfuscated.
3452
+ */
3453
+ obfuscation?: string | null;
3454
+ }
3455
+ /**
3456
+ * Returned when MCP tool call arguments are finalized during response generation.
3457
+ */
3458
+ export interface ResponseMcpCallArgumentsDone {
3459
+ /**
3460
+ * The final JSON-encoded arguments string.
3461
+ */
3462
+ arguments: string;
3463
+ /**
3464
+ * The unique ID of the server event.
3465
+ */
3466
+ event_id: string;
3467
+ /**
3468
+ * The ID of the MCP tool call item.
3469
+ */
3470
+ item_id: string;
3471
+ /**
3472
+ * The index of the output item in the response.
3473
+ */
3474
+ output_index: number;
3475
+ /**
3476
+ * The ID of the response.
3477
+ */
3478
+ response_id: string;
3479
+ /**
3480
+ * The event type, must be `response.mcp_call_arguments.done`.
3481
+ */
3482
+ type: 'response.mcp_call_arguments.done';
3483
+ }
3484
+ /**
3485
+ * Returned when an MCP tool call has completed successfully.
3486
+ */
3487
+ export interface ResponseMcpCallCompleted {
3488
+ /**
3489
+ * The unique ID of the server event.
3490
+ */
3491
+ event_id: string;
3492
+ /**
3493
+ * The ID of the MCP tool call item.
3494
+ */
3495
+ item_id: string;
3496
+ /**
3497
+ * The index of the output item in the response.
3498
+ */
3499
+ output_index: number;
3500
+ /**
3501
+ * The event type, must be `response.mcp_call.completed`.
3502
+ */
3503
+ type: 'response.mcp_call.completed';
3504
+ }
3505
+ /**
3506
+ * Returned when an MCP tool call has failed.
3507
+ */
3508
+ export interface ResponseMcpCallFailed {
3509
+ /**
3510
+ * The unique ID of the server event.
3511
+ */
3512
+ event_id: string;
3513
+ /**
3514
+ * The ID of the MCP tool call item.
3515
+ */
3516
+ item_id: string;
3517
+ /**
3518
+ * The index of the output item in the response.
3519
+ */
3520
+ output_index: number;
3521
+ /**
3522
+ * The event type, must be `response.mcp_call.failed`.
3523
+ */
3524
+ type: 'response.mcp_call.failed';
3525
+ }
3526
+ /**
3527
+ * Returned when an MCP tool call has started and is in progress.
3528
+ */
3529
+ export interface ResponseMcpCallInProgress {
3530
+ /**
3531
+ * The unique ID of the server event.
3532
+ */
3533
+ event_id: string;
3534
+ /**
3535
+ * The ID of the MCP tool call item.
3536
+ */
3537
+ item_id: string;
3538
+ /**
3539
+ * The index of the output item in the response.
3540
+ */
3541
+ output_index: number;
3542
+ /**
3543
+ * The event type, must be `response.mcp_call.in_progress`.
3544
+ */
3545
+ type: 'response.mcp_call.in_progress';
3546
+ }
3547
+ /**
3548
+ * Returned when a new Item is created during Response generation.
3549
+ */
3550
+ export interface ResponseOutputItemAddedEvent {
3551
+ /**
3552
+ * The unique ID of the server event.
3553
+ */
3554
+ event_id: string;
3555
+ /**
3556
+ * A single item within a Realtime conversation.
3557
+ */
3558
+ item: ConversationItem;
3559
+ /**
3560
+ * The index of the output item in the Response.
3561
+ */
3562
+ output_index: number;
3563
+ /**
3564
+ * The ID of the Response to which the item belongs.
3565
+ */
3566
+ response_id: string;
3567
+ /**
3568
+ * The event type, must be `response.output_item.added`.
3569
+ */
3570
+ type: 'response.output_item.added';
3571
+ }
3572
+ /**
3573
+ * Returned when an Item is done streaming. Also emitted when a Response is
3574
+ * interrupted, incomplete, or cancelled.
3575
+ */
3576
+ export interface ResponseOutputItemDoneEvent {
3577
+ /**
3578
+ * The unique ID of the server event.
3579
+ */
3580
+ event_id: string;
3581
+ /**
3582
+ * A single item within a Realtime conversation.
3583
+ */
3584
+ item: ConversationItem;
3585
+ /**
3586
+ * The index of the output item in the Response.
3587
+ */
3588
+ output_index: number;
3589
+ /**
3590
+ * The ID of the Response to which the item belongs.
3591
+ */
3592
+ response_id: string;
3593
+ /**
3594
+ * The event type, must be `response.output_item.done`.
3595
+ */
3596
+ type: 'response.output_item.done';
3597
+ }
3598
+ /**
3599
+ * Returned when the text value of an "output_text" content part is updated.
3600
+ */
3601
+ export interface ResponseTextDeltaEvent {
3602
+ /**
3603
+ * The index of the content part in the item's content array.
3604
+ */
3605
+ content_index: number;
3606
+ /**
3607
+ * The text delta.
3608
+ */
3609
+ delta: string;
3610
+ /**
3611
+ * The unique ID of the server event.
3612
+ */
3613
+ event_id: string;
3614
+ /**
3615
+ * The ID of the item.
3616
+ */
3617
+ item_id: string;
3618
+ /**
3619
+ * The index of the output item in the response.
3620
+ */
3621
+ output_index: number;
3622
+ /**
3623
+ * The ID of the response.
3624
+ */
3625
+ response_id: string;
3626
+ /**
3627
+ * The event type, must be `response.output_text.delta`.
3628
+ */
3629
+ type: 'response.output_text.delta';
3630
+ }
3631
+ /**
3632
+ * Returned when the text value of an "output_text" content part is done streaming.
3633
+ * Also emitted when a Response is interrupted, incomplete, or cancelled.
3634
+ */
3635
+ export interface ResponseTextDoneEvent {
3636
+ /**
3637
+ * The index of the content part in the item's content array.
3638
+ */
3639
+ content_index: number;
3640
+ /**
3641
+ * The unique ID of the server event.
3642
+ */
3643
+ event_id: string;
3644
+ /**
3645
+ * The ID of the item.
3646
+ */
3647
+ item_id: string;
3648
+ /**
3649
+ * The index of the output item in the response.
3650
+ */
3651
+ output_index: number;
3652
+ /**
3653
+ * The ID of the response.
3654
+ */
3655
+ response_id: string;
3656
+ /**
3657
+ * The final text content.
3658
+ */
3659
+ text: string;
3660
+ /**
3661
+ * The event type, must be `response.output_text.done`.
3662
+ */
3663
+ type: 'response.output_text.done';
3664
+ }
3665
+ /**
3666
+ * Returned when a Session is created. Emitted automatically when a new connection
3667
+ * is established as the first server event. This event will contain the default
3668
+ * Session configuration.
3669
+ */
3670
+ export interface SessionCreatedEvent {
3671
+ /**
3672
+ * The unique ID of the server event.
3673
+ */
3674
+ event_id: string;
3675
+ /**
3676
+ * The session configuration.
3677
+ */
3678
+ session: RealtimeSessionCreateRequest | RealtimeTranscriptionSessionCreateRequest;
3679
+ /**
3680
+ * The event type, must be `session.created`.
3681
+ */
3682
+ type: 'session.created';
3683
+ }
3684
+ /**
3685
+ * Send this event to update the session’s configuration. The client may send this
3686
+ * event at any time to update any field except for `voice` and `model`. `voice`
3687
+ * can be updated only if there have been no other audio outputs yet.
3688
+ *
3689
+ * When the server receives a `session.update`, it will respond with a
3690
+ * `session.updated` event showing the full, effective configuration. Only the
3691
+ * fields that are present in the `session.update` are updated. To clear a field
3692
+ * like `instructions`, pass an empty string. To clear a field like `tools`, pass
3693
+ * an empty array. To clear a field like `turn_detection`, pass `null`.
3694
+ */
3695
+ export interface SessionUpdateEvent {
3696
+ /**
3697
+ * Update the Realtime session. Choose either a realtime session or a transcription
3698
+ * session.
3699
+ */
3700
+ session: RealtimeSessionCreateRequest | RealtimeTranscriptionSessionCreateRequest;
3701
+ /**
3702
+ * The event type, must be `session.update`.
3703
+ */
3704
+ type: 'session.update';
3705
+ /**
3706
+ * Optional client-generated ID used to identify this event. This is an arbitrary
3707
+ * string that a client may assign. It will be passed back if there is an error
3708
+ * with the event, but the corresponding `session.updated` event will not include
3709
+ * it.
3710
+ */
3711
+ event_id?: string;
3712
+ }
3713
+ /**
3714
+ * Returned when a session is updated with a `session.update` event, unless there
3715
+ * is an error.
3716
+ */
3717
+ export interface SessionUpdatedEvent {
3718
+ /**
3719
+ * The unique ID of the server event.
3720
+ */
3721
+ event_id: string;
3722
+ /**
3723
+ * The session configuration.
3724
+ */
3725
+ session: RealtimeSessionCreateRequest | RealtimeTranscriptionSessionCreateRequest;
3726
+ /**
3727
+ * The event type, must be `session.updated`.
3728
+ */
3729
+ type: 'session.updated';
3730
+ }
3731
+ /**
3732
+ * Send this event to update a transcription session.
3733
+ */
3734
+ export interface TranscriptionSessionUpdate {
3735
+ /**
3736
+ * Realtime transcription session object configuration.
3737
+ */
3738
+ session: TranscriptionSessionUpdate.Session;
3739
+ /**
3740
+ * The event type, must be `transcription_session.update`.
3741
+ */
3742
+ type: 'transcription_session.update';
3743
+ /**
3744
+ * Optional client-generated ID used to identify this event.
3745
+ */
3746
+ event_id?: string;
3747
+ }
3748
+ export declare namespace TranscriptionSessionUpdate {
3749
+ /**
3750
+ * Realtime transcription session object configuration.
3751
+ */
3752
+ interface Session {
3753
+ /**
3754
+ * The set of items to include in the transcription. Current available items are:
3755
+ * `item.input_audio_transcription.logprobs`
3756
+ */
3757
+ include?: Array<'item.input_audio_transcription.logprobs'>;
3758
+ /**
3759
+ * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For
3760
+ * `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel
3761
+ * (mono), and little-endian byte order.
3762
+ */
3763
+ input_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
3764
+ /**
3765
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
3766
+ * off. Noise reduction filters audio added to the input audio buffer before it is
3767
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
3768
+ * detection accuracy (reducing false positives) and model performance by improving
3769
+ * perception of the input audio.
3770
+ */
3771
+ input_audio_noise_reduction?: Session.InputAudioNoiseReduction;
3772
+ /**
3773
+ * Configuration for input audio transcription. The client can optionally set the
3774
+ * language and prompt for transcription, these offer additional guidance to the
3775
+ * transcription service.
3776
+ */
3777
+ input_audio_transcription?: RealtimeAPI.AudioTranscription;
3778
+ /**
3779
+ * Configuration for turn detection. Can be set to `null` to turn off. Server VAD
3780
+ * means that the model will detect the start and end of speech based on audio
3781
+ * volume and respond at the end of user speech.
3782
+ */
3783
+ turn_detection?: Session.TurnDetection;
3784
+ }
3785
+ namespace Session {
3786
+ /**
3787
+ * Configuration for input audio noise reduction. This can be set to `null` to turn
3788
+ * off. Noise reduction filters audio added to the input audio buffer before it is
3789
+ * sent to VAD and the model. Filtering the audio can improve VAD and turn
3790
+ * detection accuracy (reducing false positives) and model performance by improving
3791
+ * perception of the input audio.
3792
+ */
3793
+ interface InputAudioNoiseReduction {
3794
+ /**
3795
+ * Type of noise reduction. `near_field` is for close-talking microphones such as
3796
+ * headphones, `far_field` is for far-field microphones such as laptop or
3797
+ * conference room microphones.
3798
+ */
3799
+ type?: RealtimeAPI.NoiseReductionType;
3800
+ }
3801
+ /**
3802
+ * Configuration for turn detection. Can be set to `null` to turn off. Server VAD
3803
+ * means that the model will detect the start and end of speech based on audio
3804
+ * volume and respond at the end of user speech.
3805
+ */
3806
+ interface TurnDetection {
3807
+ /**
3808
+ * Amount of audio to include before the VAD detected speech (in milliseconds).
3809
+ * Defaults to 300ms.
3810
+ */
3811
+ prefix_padding_ms?: number;
3812
+ /**
3813
+ * Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
3814
+ * With shorter values the model will respond more quickly, but may jump in on
3815
+ * short pauses from the user.
3816
+ */
3817
+ silence_duration_ms?: number;
3818
+ /**
3819
+ * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
3820
+ * threshold will require louder audio to activate the model, and thus might
3821
+ * perform better in noisy environments.
3822
+ */
3823
+ threshold?: number;
3824
+ /**
3825
+ * Type of turn detection. Only `server_vad` is currently supported for
3826
+ * transcription sessions.
3827
+ */
3828
+ type?: 'server_vad';
3829
+ }
3830
+ }
3831
+ }
3832
+ /**
3833
+ * Returned when a transcription session is updated with a
3834
+ * `transcription_session.update` event, unless there is an error.
3835
+ */
3836
+ export interface TranscriptionSessionUpdatedEvent {
3837
+ /**
3838
+ * The unique ID of the server event.
3839
+ */
3840
+ event_id: string;
3841
+ /**
3842
+ * A new Realtime transcription session configuration.
3843
+ *
3844
+ * When a session is created on the server via REST API, the session object also
3845
+ * contains an ephemeral key. Default TTL for keys is 10 minutes. This property is
3846
+ * not present when a session is updated via the WebSocket API.
3847
+ */
3848
+ session: TranscriptionSessionUpdatedEvent.Session;
3849
+ /**
3850
+ * The event type, must be `transcription_session.updated`.
3851
+ */
3852
+ type: 'transcription_session.updated';
3853
+ }
3854
+ export declare namespace TranscriptionSessionUpdatedEvent {
3855
+ /**
3856
+ * A new Realtime transcription session configuration.
3857
+ *
3858
+ * When a session is created on the server via REST API, the session object also
3859
+ * contains an ephemeral key. Default TTL for keys is 10 minutes. This property is
3860
+ * not present when a session is updated via the WebSocket API.
3861
+ */
3862
+ interface Session {
3863
+ /**
3864
+ * Ephemeral key returned by the API. Only present when the session is created on
3865
+ * the server via REST API.
3866
+ */
3867
+ client_secret: Session.ClientSecret;
3868
+ /**
3869
+ * The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
3870
+ */
3871
+ input_audio_format?: string;
3872
+ /**
3873
+ * Configuration of the transcription model.
3874
+ */
3875
+ input_audio_transcription?: RealtimeAPI.AudioTranscription;
3876
+ /**
3877
+ * The set of modalities the model can respond with. To disable audio, set this to
3878
+ * ["text"].
3879
+ */
3880
+ modalities?: Array<'text' | 'audio'>;
3881
+ /**
3882
+ * Configuration for turn detection. Can be set to `null` to turn off. Server VAD
3883
+ * means that the model will detect the start and end of speech based on audio
3884
+ * volume and respond at the end of user speech.
3885
+ */
3886
+ turn_detection?: Session.TurnDetection;
3887
+ }
3888
+ namespace Session {
3889
+ /**
3890
+ * Ephemeral key returned by the API. Only present when the session is created on
3891
+ * the server via REST API.
3892
+ */
3893
+ interface ClientSecret {
3894
+ /**
3895
+ * Timestamp for when the token expires. Currently, all tokens expire after one
3896
+ * minute.
3897
+ */
3898
+ expires_at: number;
3899
+ /**
3900
+ * Ephemeral key usable in client environments to authenticate connections to the
3901
+ * Realtime API. Use this in client-side environments rather than a standard API
3902
+ * token, which should only be used server-side.
3903
+ */
3904
+ value: string;
3905
+ }
3906
+ /**
3907
+ * Configuration for turn detection. Can be set to `null` to turn off. Server VAD
3908
+ * means that the model will detect the start and end of speech based on audio
3909
+ * volume and respond at the end of user speech.
3910
+ */
3911
+ interface TurnDetection {
3912
+ /**
3913
+ * Amount of audio to include before the VAD detected speech (in milliseconds).
3914
+ * Defaults to 300ms.
3915
+ */
3916
+ prefix_padding_ms?: number;
3917
+ /**
3918
+ * Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
3919
+ * With shorter values the model will respond more quickly, but may jump in on
3920
+ * short pauses from the user.
3921
+ */
3922
+ silence_duration_ms?: number;
3923
+ /**
3924
+ * Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
3925
+ * threshold will require louder audio to activate the model, and thus might
3926
+ * perform better in noisy environments.
3927
+ */
3928
+ threshold?: number;
3929
+ /**
3930
+ * Type of turn detection, only `server_vad` is currently supported.
3931
+ */
3932
+ type?: string;
3933
+ }
3934
+ }
3935
+ }
3936
+ export declare namespace Realtime {
3937
+ export { type AudioTranscription as AudioTranscription, type ConversationCreatedEvent as ConversationCreatedEvent, type ConversationItem as ConversationItem, type ConversationItemAdded as ConversationItemAdded, type ConversationItemCreateEvent as ConversationItemCreateEvent, type ConversationItemCreatedEvent as ConversationItemCreatedEvent, type ConversationItemDeleteEvent as ConversationItemDeleteEvent, type ConversationItemDeletedEvent as ConversationItemDeletedEvent, type ConversationItemDone as ConversationItemDone, type ConversationItemInputAudioTranscriptionCompletedEvent as ConversationItemInputAudioTranscriptionCompletedEvent, type ConversationItemInputAudioTranscriptionDeltaEvent as ConversationItemInputAudioTranscriptionDeltaEvent, type ConversationItemInputAudioTranscriptionFailedEvent as ConversationItemInputAudioTranscriptionFailedEvent, type ConversationItemInputAudioTranscriptionSegment as ConversationItemInputAudioTranscriptionSegment, type ConversationItemRetrieveEvent as ConversationItemRetrieveEvent, type ConversationItemTruncateEvent as ConversationItemTruncateEvent, type ConversationItemTruncatedEvent as ConversationItemTruncatedEvent, type ConversationItemWithReference as ConversationItemWithReference, type InputAudioBufferAppendEvent as InputAudioBufferAppendEvent, type InputAudioBufferClearEvent as InputAudioBufferClearEvent, type InputAudioBufferClearedEvent as InputAudioBufferClearedEvent, type InputAudioBufferCommitEvent as InputAudioBufferCommitEvent, type InputAudioBufferCommittedEvent as InputAudioBufferCommittedEvent, type InputAudioBufferDtmfEventReceivedEvent as InputAudioBufferDtmfEventReceivedEvent, type InputAudioBufferSpeechStartedEvent as InputAudioBufferSpeechStartedEvent, type InputAudioBufferSpeechStoppedEvent as InputAudioBufferSpeechStoppedEvent, type InputAudioBufferTimeoutTriggered as InputAudioBufferTimeoutTriggered, type LogProbProperties as LogProbProperties, type McpListToolsCompleted as McpListToolsCompleted, type McpListToolsFailed as McpListToolsFailed, type McpListToolsInProgress as McpListToolsInProgress, type NoiseReductionType as NoiseReductionType, type OutputAudioBufferClearEvent as OutputAudioBufferClearEvent, type RateLimitsUpdatedEvent as RateLimitsUpdatedEvent, type RealtimeAudioConfig as RealtimeAudioConfig, type RealtimeAudioConfigInput as RealtimeAudioConfigInput, type RealtimeAudioConfigOutput as RealtimeAudioConfigOutput, type RealtimeAudioFormats as RealtimeAudioFormats, type RealtimeAudioInputTurnDetection as RealtimeAudioInputTurnDetection, type RealtimeClientEvent as RealtimeClientEvent, type RealtimeConversationItemAssistantMessage as RealtimeConversationItemAssistantMessage, type RealtimeConversationItemFunctionCall as RealtimeConversationItemFunctionCall, type RealtimeConversationItemFunctionCallOutput as RealtimeConversationItemFunctionCallOutput, type RealtimeConversationItemSystemMessage as RealtimeConversationItemSystemMessage, type RealtimeConversationItemUserMessage as RealtimeConversationItemUserMessage, type RealtimeError as RealtimeError, type RealtimeErrorEvent as RealtimeErrorEvent, type RealtimeFunctionTool as RealtimeFunctionTool, type RealtimeMcpApprovalRequest as RealtimeMcpApprovalRequest, type RealtimeMcpApprovalResponse as RealtimeMcpApprovalResponse, type RealtimeMcpListTools as RealtimeMcpListTools, type RealtimeMcpProtocolError as RealtimeMcpProtocolError, type RealtimeMcpToolCall as RealtimeMcpToolCall, type RealtimeMcpToolExecutionError as RealtimeMcpToolExecutionError, type RealtimeMcphttpError as RealtimeMcphttpError, type RealtimeResponse as RealtimeResponse, type RealtimeResponseCreateAudioOutput as RealtimeResponseCreateAudioOutput, type RealtimeResponseCreateMcpTool as RealtimeResponseCreateMcpTool, type RealtimeResponseCreateParams as RealtimeResponseCreateParams, type RealtimeResponseStatus as RealtimeResponseStatus, type RealtimeResponseUsage as RealtimeResponseUsage, type RealtimeResponseUsageInputTokenDetails as RealtimeResponseUsageInputTokenDetails, type RealtimeResponseUsageOutputTokenDetails as RealtimeResponseUsageOutputTokenDetails, type RealtimeServerEvent as RealtimeServerEvent, type RealtimeSession as RealtimeSession, type RealtimeSessionCreateRequest as RealtimeSessionCreateRequest, type RealtimeToolChoiceConfig as RealtimeToolChoiceConfig, type RealtimeToolsConfig as RealtimeToolsConfig, type RealtimeToolsConfigUnion as RealtimeToolsConfigUnion, type RealtimeTracingConfig as RealtimeTracingConfig, type RealtimeTranscriptionSessionAudio as RealtimeTranscriptionSessionAudio, type RealtimeTranscriptionSessionAudioInput as RealtimeTranscriptionSessionAudioInput, type RealtimeTranscriptionSessionAudioInputTurnDetection as RealtimeTranscriptionSessionAudioInputTurnDetection, type RealtimeTranscriptionSessionCreateRequest as RealtimeTranscriptionSessionCreateRequest, type RealtimeTruncation as RealtimeTruncation, type RealtimeTruncationRetentionRatio as RealtimeTruncationRetentionRatio, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCancelEvent as ResponseCancelEvent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseCreateEvent as ResponseCreateEvent, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseDoneEvent as ResponseDoneEvent, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseMcpCallArgumentsDelta as ResponseMcpCallArgumentsDelta, type ResponseMcpCallArgumentsDone as ResponseMcpCallArgumentsDone, type ResponseMcpCallCompleted as ResponseMcpCallCompleted, type ResponseMcpCallFailed as ResponseMcpCallFailed, type ResponseMcpCallInProgress as ResponseMcpCallInProgress, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type SessionCreatedEvent as SessionCreatedEvent, type SessionUpdateEvent as SessionUpdateEvent, type SessionUpdatedEvent as SessionUpdatedEvent, type TranscriptionSessionUpdate as TranscriptionSessionUpdate, type TranscriptionSessionUpdatedEvent as TranscriptionSessionUpdatedEvent, };
3938
+ export { ClientSecrets as ClientSecrets, type RealtimeSessionClientSecret as RealtimeSessionClientSecret, type RealtimeSessionCreateResponse as RealtimeSessionCreateResponse, type RealtimeTranscriptionSessionCreateResponse as RealtimeTranscriptionSessionCreateResponse, type RealtimeTranscriptionSessionTurnDetection as RealtimeTranscriptionSessionTurnDetection, type ClientSecretCreateResponse as ClientSecretCreateResponse, type ClientSecretCreateParams as ClientSecretCreateParams, };
3939
+ export { Calls as Calls, type CallAcceptParams as CallAcceptParams, type CallReferParams as CallReferParams, type CallRejectParams as CallRejectParams, };
3940
+ }
3941
+ //# sourceMappingURL=realtime.d.ts.map