openai 0.86.0 → 0.87.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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +10 -1
  4. data/examples/audio/record_and_play.rb +19 -0
  5. data/examples/responses/websocket_workflows.rb +159 -0
  6. data/lib/openai/helpers/local_audio/errors.rb +27 -0
  7. data/lib/openai/helpers/local_audio/process.rb +158 -0
  8. data/lib/openai/helpers/local_audio.rb +157 -0
  9. data/lib/openai/helpers/realtime/connection.rb +20 -2
  10. data/lib/openai/helpers/realtime/errors.rb +18 -0
  11. data/lib/openai/helpers/realtime/recovery.rb +489 -0
  12. data/lib/openai/helpers/realtime/resources/realtime_extension.rb +26 -1
  13. data/lib/openai/helpers/realtime.rb +1 -0
  14. data/lib/openai/models/beta/beta_response_input_item.rb +84 -1
  15. data/lib/openai/models/beta/beta_response_item.rb +72 -1
  16. data/lib/openai/models/beta/beta_response_output_item.rb +84 -1
  17. data/lib/openai/models/beta/beta_responses_client_event.rb +3 -0
  18. data/lib/openai/models/beta/beta_tool.rb +69 -37
  19. data/lib/openai/models/beta/response_create_params.rb +3 -0
  20. data/lib/openai/models/conversations/conversation_item.rb +82 -1
  21. data/lib/openai/models/image_edit_completed_event.rb +34 -8
  22. data/lib/openai/models/image_edit_params.rb +64 -44
  23. data/lib/openai/models/image_edit_partial_image_event.rb +34 -8
  24. data/lib/openai/models/image_gen_completed_event.rb +34 -8
  25. data/lib/openai/models/image_gen_partial_image_event.rb +34 -8
  26. data/lib/openai/models/image_generate_params.rb +51 -35
  27. data/lib/openai/models/image_model.rb +4 -0
  28. data/lib/openai/models/images_response.rb +37 -13
  29. data/lib/openai/models/responses/response_create_params.rb +3 -0
  30. data/lib/openai/models/responses/response_input_item.rb +84 -1
  31. data/lib/openai/models/responses/response_item.rb +72 -1
  32. data/lib/openai/models/responses/response_output_item.rb +84 -1
  33. data/lib/openai/models/responses/responses_client_event.rb +3 -0
  34. data/lib/openai/models/responses/tool.rb +69 -37
  35. data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +3 -3
  36. data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +5 -3
  37. data/lib/openai/resources/images.rb +12 -14
  38. data/lib/openai/version.rb +1 -1
  39. data/local-audio.md +146 -0
  40. data/rbi/openai/helpers/local_audio/interface.rbi +110 -0
  41. data/rbi/openai/helpers/realtime/connection.rbi +18 -2
  42. data/rbi/openai/helpers/realtime/extensions.rbi +8 -0
  43. data/rbi/openai/helpers/realtime/recovery.rbi +27 -0
  44. data/rbi/openai/models/beta/beta_response_input_item.rbi +86 -1
  45. data/rbi/openai/models/beta/beta_response_item.rbi +78 -1
  46. data/rbi/openai/models/beta/beta_response_output_item.rbi +84 -1
  47. data/rbi/openai/models/beta/beta_responses_client_event.rbi +6 -0
  48. data/rbi/openai/models/beta/beta_tool.rbi +90 -51
  49. data/rbi/openai/models/beta/response_create_params.rbi +6 -0
  50. data/rbi/openai/models/conversations/conversation_item.rbi +88 -1
  51. data/rbi/openai/models/image_edit_completed_event.rbi +20 -9
  52. data/rbi/openai/models/image_edit_params.rbi +89 -60
  53. data/rbi/openai/models/image_edit_partial_image_event.rbi +20 -9
  54. data/rbi/openai/models/image_gen_completed_event.rbi +20 -9
  55. data/rbi/openai/models/image_gen_partial_image_event.rbi +20 -9
  56. data/rbi/openai/models/image_generate_params.rbi +71 -48
  57. data/rbi/openai/models/image_model.rbi +4 -0
  58. data/rbi/openai/models/images_response.rbi +27 -16
  59. data/rbi/openai/models/responses/response_create_params.rbi +6 -0
  60. data/rbi/openai/models/responses/response_input_item.rbi +88 -1
  61. data/rbi/openai/models/responses/response_item.rbi +80 -1
  62. data/rbi/openai/models/responses/response_output_item.rbi +84 -1
  63. data/rbi/openai/models/responses/responses_client_event.rbi +6 -0
  64. data/rbi/openai/models/responses/tool.rbi +90 -51
  65. data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +4 -4
  66. data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +8 -4
  67. data/rbi/openai/resources/beta/responses.rbi +6 -2
  68. data/rbi/openai/resources/images.rbi +106 -76
  69. data/rbi/openai/resources/responses.rbi +6 -0
  70. data/realtime.md +101 -0
  71. data/responses-websocket.md +182 -0
  72. data/sig/openai/helpers/local_audio/interface.rbs +62 -0
  73. data/sig/openai/helpers/realtime/connection.rbs +9 -1
  74. data/sig/openai/helpers/realtime/extensions.rbs +4 -0
  75. data/sig/openai/helpers/realtime/recovery.rbs +19 -0
  76. data/sig/openai/models/beta/beta_response_input_item.rbs +39 -2
  77. data/sig/openai/models/beta/beta_response_item.rbs +39 -2
  78. data/sig/openai/models/beta/beta_response_output_item.rbs +39 -2
  79. data/sig/openai/models/beta/beta_tool.rbs +11 -1
  80. data/sig/openai/models/conversations/conversation_item.rbs +39 -2
  81. data/sig/openai/models/image_edit_completed_event.rbs +11 -4
  82. data/sig/openai/models/image_edit_params.rbs +3 -1
  83. data/sig/openai/models/image_edit_partial_image_event.rbs +11 -4
  84. data/sig/openai/models/image_gen_completed_event.rbs +11 -4
  85. data/sig/openai/models/image_gen_partial_image_event.rbs +11 -4
  86. data/sig/openai/models/image_generate_params.rbs +4 -1
  87. data/sig/openai/models/image_model.rbs +8 -0
  88. data/sig/openai/models/images_response.rbs +10 -4
  89. data/sig/openai/models/responses/response_input_item.rbs +39 -2
  90. data/sig/openai/models/responses/response_item.rbs +39 -2
  91. data/sig/openai/models/responses/response_output_item.rbs +39 -2
  92. data/sig/openai/models/responses/tool.rbs +11 -1
  93. metadata +15 -1
@@ -347,6 +347,15 @@ module OpenAI
347
347
  sig { returns(Symbol) }
348
348
  attr_accessor :type
349
349
 
350
+ # The quality of the image generated by the image generation tool call. One of
351
+ # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
352
+ sig { returns(T.nilable(OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)) }
353
+ attr_accessor :quality
354
+
355
+ # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
356
+ sig { returns(T.nilable(OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::Variants)) }
357
+ attr_accessor :size
358
+
350
359
  # An image generation request made by the model.
351
360
  sig do
352
361
  params(
@@ -357,6 +366,10 @@ module OpenAI
357
366
 
358
367
  status: OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Status::OrSymbol,
359
368
 
369
+ quality: T.nilable(OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::OrSymbol),
370
+
371
+ size: T.nilable(T.any(String, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::OrSymbol)),
372
+
360
373
  type: Symbol
361
374
  )
362
375
  .returns(T.attached_class)
@@ -372,6 +385,13 @@ module OpenAI
372
385
  # The status of the image generation call.
373
386
  status:,
374
387
 
388
+ # The quality of the image generated by the image generation tool call. One of
389
+ # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
390
+ quality: nil,
391
+
392
+ # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
393
+ size: nil,
394
+
375
395
  # The type of the image generation call. Always `image_generation_call`.
376
396
 
377
397
  type: :image_generation_call
@@ -384,7 +404,9 @@ module OpenAI
384
404
  id: String,
385
405
  result: T.nilable(String),
386
406
  status: OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Status::TaggedSymbol,
387
- type: Symbol
407
+ type: Symbol,
408
+ quality: T.nilable(OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol),
409
+ size: T.nilable(OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::Variants)
388
410
  }
389
411
  )
390
412
  end
@@ -422,6 +444,67 @@ module OpenAI
422
444
  def self.values
423
445
  end
424
446
  end
447
+
448
+ # The quality of the image generated by the image generation tool call. One of
449
+ # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
450
+ module Quality
451
+ extend OpenAI::Internal::Type::Enum
452
+
453
+ TaggedSymbol = T.type_alias {
454
+ T.all(Symbol, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality)
455
+ }
456
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
457
+
458
+ LOW = T.let(:low, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
459
+ MEDIUM = T.let(:medium, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
460
+ HIGH = T.let(:high, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
461
+ XHIGH = T.let(:xhigh, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
462
+ MAX = T.let(:max, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
463
+ AUTO = T.let(:auto, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol)
464
+
465
+ sig {
466
+ override.returns(
467
+ T::Array[OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Quality::TaggedSymbol]
468
+ )
469
+ }
470
+ def self.values
471
+ end
472
+ end
473
+
474
+ # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
475
+ module Size
476
+ extend OpenAI::Internal::Type::Union
477
+
478
+ Variants = T.type_alias {
479
+ T.any(String, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::TaggedSymbol)
480
+ }
481
+
482
+ sig {
483
+ override.returns(T::Array[OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::Variants])
484
+ }
485
+ def self.variants
486
+ end
487
+
488
+ TaggedSymbol = T.type_alias do
489
+ T.all(Symbol, OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size)
490
+ end
491
+
492
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
493
+
494
+ SIZE_1024X1024 = T.let(
495
+ :"1024x1024",
496
+ OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::TaggedSymbol
497
+ )
498
+ SIZE_1024X1536 = T.let(
499
+ :"1024x1536",
500
+ OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::TaggedSymbol
501
+ )
502
+ SIZE_1536X1024 = T.let(
503
+ :"1536x1024",
504
+ OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::Size::TaggedSymbol
505
+ )
506
+
507
+ end
425
508
  end
426
509
 
427
510
  class LocalShellCall < OpenAI::Internal::Type::BaseModel
@@ -256,6 +256,9 @@ module OpenAI
256
256
  attr_accessor :service_tier
257
257
 
258
258
  # Whether to store the generated model response for later retrieval via API.
259
+ # Defaults to true when omitted. If set to true, response data will be stored for
260
+ # at least 30 days, subject to the
261
+ # [data retention exceptions](/api/docs/guides/your-data#v1responses).
259
262
  sig { returns(T.nilable(T::Boolean)) }
260
263
  attr_accessor :store
261
264
 
@@ -740,6 +743,9 @@ module OpenAI
740
743
  service_tier: nil,
741
744
 
742
745
  # Whether to store the generated model response for later retrieval via API.
746
+ # Defaults to true when omitted. If set to true, response data will be stored for
747
+ # at least 30 days, subject to the
748
+ # [data retention exceptions](/api/docs/guides/your-data#v1responses).
743
749
  store: nil,
744
750
 
745
751
  # If set to true, the model response data will be streamed to the client as it is
@@ -954,9 +954,11 @@ module OpenAI
954
954
  # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
955
955
  # the model will automatically determine the best background for the image.
956
956
  #
957
- # Transparent backgrounds are available for supported GPT Image models. For
958
- # `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When
959
- # using `transparent`, set the output format to `png` or `webp`.
957
+ # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
958
+ # snapshots, support `opaque` and `transparent` backgrounds. Transparent
959
+ # backgrounds are available for supported GPT Image models. For `gpt-image-2` and
960
+ # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
961
+ # set the output format to `png` or `webp`.
960
962
  sig { returns(T.nilable(OpenAI::Responses::Tool::ImageGeneration::Background::OrSymbol)) }
961
963
  attr_reader :background
962
964
 
@@ -979,7 +981,9 @@ module OpenAI
979
981
  attr_writer :input_image_mask
980
982
 
981
983
  # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
982
- # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, or
984
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
985
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
986
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
983
987
  # `chatgpt-image-latest`. Default: `gpt-image-1`.
984
988
  sig { returns(T.nilable(T.any(String, OpenAI::Responses::Tool::ImageGeneration::Model::OrSymbol))) }
985
989
  attr_reader :model
@@ -1017,25 +1021,28 @@ module OpenAI
1017
1021
  sig { params(partial_images: Integer).void }
1018
1022
  attr_writer :partial_images
1019
1023
 
1020
- # The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
1021
- # Default: `auto`.
1024
+ # The quality of the generated image. The GPT image models support `low`,
1025
+ # `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
1026
+ # including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
1027
+ # `auto`.
1022
1028
  sig { returns(T.nilable(OpenAI::Responses::Tool::ImageGeneration::Quality::OrSymbol)) }
1023
1029
  attr_reader :quality
1024
1030
 
1025
1031
  sig { params(quality: OpenAI::Responses::Tool::ImageGeneration::Quality::OrSymbol).void }
1026
1032
  attr_writer :quality
1027
1033
 
1028
- # The size of the generated images. For `gpt-image-2` and
1029
- # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1030
- # strings, for example `1536x864`. Width and height must both be divisible by 16
1031
- # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1032
- # `2560x1440` are experimental, and the maximum supported resolution is
1033
- # `3840x2160`. The requested size must also satisfy the model's current pixel and
1034
- # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1035
- # supported by the GPT image models; `auto` is supported for models that allow
1036
- # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1037
- # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1038
- # `1024x1792`.
1034
+ # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
1035
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
1036
+ # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
1037
+ # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
1038
+ # Width and height must both be divisible by 16 and the requested aspect ratio
1039
+ # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
1040
+ # the maximum supported resolution is `3840x2160`. The requested size must also
1041
+ # satisfy the model's current pixel and edge limits. The standard sizes
1042
+ # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1043
+ # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1044
+ # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1045
+ # `1024x1024`, `1792x1024`, or `1024x1792`.
1039
1046
  sig { returns(T.nilable(T.any(String, OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol))) }
1040
1047
  attr_reader :size
1041
1048
 
@@ -1081,9 +1088,11 @@ module OpenAI
1081
1088
  # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
1082
1089
  # the model will automatically determine the best background for the image.
1083
1090
  #
1084
- # Transparent backgrounds are available for supported GPT Image models. For
1085
- # `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When
1086
- # using `transparent`, set the output format to `png` or `webp`.
1091
+ # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
1092
+ # snapshots, support `opaque` and `transparent` backgrounds. Transparent
1093
+ # backgrounds are available for supported GPT Image models. For `gpt-image-2` and
1094
+ # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
1095
+ # set the output format to `png` or `webp`.
1087
1096
  background: nil,
1088
1097
 
1089
1098
  # Control how much effort the model will exert to match the style and features,
@@ -1097,7 +1106,9 @@ module OpenAI
1097
1106
  input_image_mask: nil,
1098
1107
 
1099
1108
  # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
1100
- # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, or
1109
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
1110
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
1111
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
1101
1112
  # `chatgpt-image-latest`. Default: `gpt-image-1`.
1102
1113
  model: nil,
1103
1114
 
@@ -1115,21 +1126,24 @@ module OpenAI
1115
1126
  # to 3.
1116
1127
  partial_images: nil,
1117
1128
 
1118
- # The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
1119
- # Default: `auto`.
1129
+ # The quality of the generated image. The GPT image models support `low`,
1130
+ # `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
1131
+ # including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
1132
+ # `auto`.
1120
1133
  quality: nil,
1121
1134
 
1122
- # The size of the generated images. For `gpt-image-2` and
1123
- # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1124
- # strings, for example `1536x864`. Width and height must both be divisible by 16
1125
- # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1126
- # `2560x1440` are experimental, and the maximum supported resolution is
1127
- # `3840x2160`. The requested size must also satisfy the model's current pixel and
1128
- # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1129
- # supported by the GPT image models; `auto` is supported for models that allow
1130
- # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1131
- # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1132
- # `1024x1792`.
1135
+ # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
1136
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
1137
+ # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
1138
+ # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
1139
+ # Width and height must both be divisible by 16 and the requested aspect ratio
1140
+ # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
1141
+ # the maximum supported resolution is `3840x2160`. The requested size must also
1142
+ # satisfy the model's current pixel and edge limits. The standard sizes
1143
+ # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1144
+ # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1145
+ # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1146
+ # `1024x1024`, `1792x1024`, or `1024x1792`.
1133
1147
  size: nil,
1134
1148
 
1135
1149
  # The type of the image generation tool. Always `image_generation`.
@@ -1179,9 +1193,11 @@ module OpenAI
1179
1193
  # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
1180
1194
  # the model will automatically determine the best background for the image.
1181
1195
  #
1182
- # Transparent backgrounds are available for supported GPT Image models. For
1183
- # `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When
1184
- # using `transparent`, set the output format to `png` or `webp`.
1196
+ # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
1197
+ # snapshots, support `opaque` and `transparent` backgrounds. Transparent
1198
+ # backgrounds are available for supported GPT Image models. For `gpt-image-2` and
1199
+ # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
1200
+ # set the output format to `png` or `webp`.
1185
1201
  module Background
1186
1202
  extend OpenAI::Internal::Type::Enum
1187
1203
 
@@ -1270,7 +1286,9 @@ module OpenAI
1270
1286
  end
1271
1287
 
1272
1288
  # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
1273
- # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, or
1289
+ # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
1290
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
1291
+ # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
1274
1292
  # `chatgpt-image-latest`. Default: `gpt-image-1`.
1275
1293
  module Model
1276
1294
  extend OpenAI::Internal::Type::Union
@@ -1294,6 +1312,22 @@ module OpenAI
1294
1312
  :"gpt-image-2-2026-04-21",
1295
1313
  OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1296
1314
  )
1315
+ GPT_IMAGE_2_5_SUNBURST = T.let(
1316
+ :"gpt-image-2.5-sunburst",
1317
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1318
+ )
1319
+ GPT_IMAGE_2_5_SUNBURST_2026_09_08 = T.let(
1320
+ :"gpt-image-2.5-sunburst-2026-09-08",
1321
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1322
+ )
1323
+ GPT_IMAGE_2_5_FLARE = T.let(
1324
+ :"gpt-image-2.5-flare",
1325
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1326
+ )
1327
+ GPT_IMAGE_2_5_FLARE_2026_09_08 = T.let(
1328
+ :"gpt-image-2.5-flare-2026-09-08",
1329
+ OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol
1330
+ )
1297
1331
  GPT_IMAGE_1_5 = T.let(:"gpt-image-1.5", OpenAI::Responses::Tool::ImageGeneration::Model::TaggedSymbol)
1298
1332
  CHATGPT_IMAGE_LATEST = T.let(
1299
1333
  :"chatgpt-image-latest",
@@ -1334,8 +1368,10 @@ module OpenAI
1334
1368
  end
1335
1369
  end
1336
1370
 
1337
- # The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
1338
- # Default: `auto`.
1371
+ # The quality of the generated image. The GPT image models support `low`,
1372
+ # `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
1373
+ # including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
1374
+ # `auto`.
1339
1375
  module Quality
1340
1376
  extend OpenAI::Internal::Type::Enum
1341
1377
 
@@ -1345,6 +1381,8 @@ module OpenAI
1345
1381
  LOW = T.let(:low, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1346
1382
  MEDIUM = T.let(:medium, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1347
1383
  HIGH = T.let(:high, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1384
+ XHIGH = T.let(:xhigh, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1385
+ MAX = T.let(:max, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1348
1386
  AUTO = T.let(:auto, OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol)
1349
1387
 
1350
1388
  sig { override.returns(T::Array[OpenAI::Responses::Tool::ImageGeneration::Quality::TaggedSymbol]) }
@@ -1352,17 +1390,18 @@ module OpenAI
1352
1390
  end
1353
1391
  end
1354
1392
 
1355
- # The size of the generated images. For `gpt-image-2` and
1356
- # `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
1357
- # strings, for example `1536x864`. Width and height must both be divisible by 16
1358
- # and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
1359
- # `2560x1440` are experimental, and the maximum supported resolution is
1360
- # `3840x2160`. The requested size must also satisfy the model's current pixel and
1361
- # edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
1362
- # supported by the GPT image models; `auto` is supported for models that allow
1363
- # automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
1364
- # `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
1365
- # `1024x1792`.
1393
+ # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
1394
+ # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
1395
+ # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
1396
+ # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
1397
+ # Width and height must both be divisible by 16 and the requested aspect ratio
1398
+ # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
1399
+ # the maximum supported resolution is `3840x2160`. The requested size must also
1400
+ # satisfy the model's current pixel and edge limits. The standard sizes
1401
+ # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1402
+ # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1403
+ # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1404
+ # `1024x1024`, `1792x1024`, or `1024x1792`.
1366
1405
  module Size
1367
1406
  extend OpenAI::Internal::Type::Union
1368
1407
 
@@ -100,8 +100,8 @@ module OpenAI
100
100
  )
101
101
  end
102
102
 
103
- # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
104
- # as `call_id` in `realtime.call.incoming`.
103
+ # The `live_...` ID of the pending SIP session. Forward this value unchanged when
104
+ # accepting or rejecting the call through the Live API.
105
105
  sig { returns(String) }
106
106
  attr_accessor :session_id
107
107
 
@@ -121,8 +121,8 @@ module OpenAI
121
121
  end
122
122
  def self.new(
123
123
 
124
- # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
125
- # as `call_id` in `realtime.call.incoming`.
124
+ # The `live_...` ID of the pending SIP session. Forward this value unchanged when
125
+ # accepting or rejecting the call through the Live API.
126
126
  session_id:,
127
127
 
128
128
  # Headers from the SIP Invite.
@@ -100,8 +100,10 @@ module OpenAI
100
100
  )
101
101
  end
102
102
 
103
- # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
104
- # as `session_id` in `live.call.incoming`.
103
+ # The Transceiver `rtc_...` ID of the pending SIP session. The paired
104
+ # `live.call.incoming` event derives its `session_id` by replacing the `rtc_`
105
+ # prefix with `live_`. Use the ID returned by the event with the corresponding
106
+ # Realtime or Live API.
105
107
  sig { returns(String) }
106
108
  attr_accessor :call_id
107
109
 
@@ -121,8 +123,10 @@ module OpenAI
121
123
  end
122
124
  def self.new(
123
125
 
124
- # The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
125
- # as `session_id` in `live.call.incoming`.
126
+ # The Transceiver `rtc_...` ID of the pending SIP session. The paired
127
+ # `live.call.incoming` event derives its `session_id` by replacing the `rtc_`
128
+ # prefix with `live_`. Use the ID returned by the event with the corresponding
129
+ # Realtime or Live API.
126
130
  call_id:,
127
131
 
128
132
  # Headers from the SIP Invite.
@@ -247,7 +247,9 @@ module OpenAI
247
247
  # parameter.
248
248
  service_tier: nil,
249
249
  # Body param: Whether to store the generated model response for later retrieval
250
- # via API.
250
+ # via API. Defaults to true when omitted. If set to true, response data will be
251
+ # stored for at least 30 days, subject to the
252
+ # [data retention exceptions](/api/docs/guides/your-data#v1responses).
251
253
  store: nil,
252
254
  # Body param: Options for streaming responses. Only set this when you set
253
255
  # `stream: true`.
@@ -561,7 +563,9 @@ module OpenAI
561
563
  # parameter.
562
564
  service_tier: nil,
563
565
  # Body param: Whether to store the generated model response for later retrieval
564
- # via API.
566
+ # via API. Defaults to true when omitted. If set to true, response data will be
567
+ # stored for at least 30 days, subject to the
568
+ # [data retention exceptions](/api/docs/guides/your-data#v1responses).
565
569
  store: nil,
566
570
  # Body param: Options for streaming responses. Only set this when you set
567
571
  # `stream: true`.