@depup/openai 6.31.0-depup.0

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