openai 0.61.0 → 0.62.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_completions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_costs_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_images_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +10 -1
- data/lib/openai/models/chat/chat_completion_token_logprob.rb +1 -2
- data/lib/openai/models/chat/completion_create_params.rb +4 -3
- data/lib/openai/models/image_edit_params.rb +85 -31
- data/lib/openai/models/image_generate_params.rb +78 -26
- data/lib/openai/models/image_model.rb +5 -2
- data/lib/openai/models/realtime/audio_transcription.rb +37 -5
- data/lib/openai/models/realtime/client_secret_create_response.rb +1 -2
- data/lib/openai/models/realtime/realtime_audio_config_input.rb +3 -0
- data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +3 -0
- data/lib/openai/models/realtime/realtime_reasoning.rb +24 -0
- data/lib/openai/models/realtime/realtime_reasoning_effort.rb +22 -0
- data/lib/openai/models/realtime/realtime_response_create_params.rb +18 -1
- data/lib/openai/models/realtime/realtime_session.rb +6 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +21 -1
- data/lib/openai/models/realtime/realtime_session_create_response.rb +41 -17
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +3 -0
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +3 -0
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +9 -5
- data/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +2 -1
- data/lib/openai/models/realtime/realtime_translation_client_event.rb +45 -0
- data/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb +85 -0
- data/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb +42 -0
- data/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb +51 -0
- data/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb +55 -0
- data/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb +89 -0
- data/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb +54 -0
- data/lib/openai/models/realtime/realtime_translation_server_event.rb +53 -0
- data/lib/openai/models/realtime/realtime_translation_session.rb +158 -0
- data/lib/openai/models/realtime/realtime_translation_session_close_event.rb +30 -0
- data/lib/openai/models/realtime/realtime_translation_session_closed_event.rb +28 -0
- data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +138 -0
- data/lib/openai/models/realtime/realtime_translation_session_created_event.rb +38 -0
- data/lib/openai/models/realtime/realtime_translation_session_update_event.rb +43 -0
- data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +129 -0
- data/lib/openai/models/realtime/realtime_translation_session_updated_event.rb +37 -0
- data/lib/openai/models/realtime/transcription_session_updated_event.rb +1 -2
- data/lib/openai/models/responses/response.rb +4 -3
- data/lib/openai/models/responses/response_create_params.rb +4 -3
- data/lib/openai/models/responses/response_includable.rb +2 -0
- data/lib/openai/models/responses/response_text_delta_event.rb +2 -2
- data/lib/openai/models/responses/response_text_done_event.rb +2 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -3
- data/lib/openai/models/responses/tool.rb +81 -16
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/images.rb +6 -6
- data/lib/openai/resources/realtime/calls.rb +5 -1
- data/lib/openai/resources/responses.rb +2 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +18 -1
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +11 -1
- data/rbi/openai/models/chat/chat_completion_token_logprob.rbi +2 -4
- data/rbi/openai/models/chat/completion_create_params.rbi +6 -4
- data/rbi/openai/models/image_edit_params.rbi +102 -45
- data/rbi/openai/models/image_generate_params.rbi +93 -39
- data/rbi/openai/models/image_model.rbi +8 -3
- data/rbi/openai/models/realtime/audio_transcription.rbi +85 -6
- data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +6 -0
- data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +3 -0
- data/rbi/openai/models/realtime/realtime_reasoning.rbi +54 -0
- data/rbi/openai/models/realtime/realtime_reasoning_effort.rbi +44 -0
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +26 -0
- data/rbi/openai/models/realtime/realtime_session.rbi +9 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +31 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +53 -32
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +6 -0
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +3 -0
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +13 -7
- data/rbi/openai/models/realtime/realtime_transcription_session_turn_detection.rbi +2 -1
- data/rbi/openai/models/realtime/realtime_translation_client_event.rbi +29 -0
- data/rbi/openai/models/realtime/realtime_translation_client_secret_create_request.rbi +193 -0
- data/rbi/openai/models/realtime/realtime_translation_client_secret_create_response.rbi +69 -0
- data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +69 -0
- data/rbi/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbi +77 -0
- data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +148 -0
- data/rbi/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbi +76 -0
- data/rbi/openai/models/realtime/realtime_translation_server_event.rbi +33 -0
- data/rbi/openai/models/realtime/realtime_translation_session.rbi +339 -0
- data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +44 -0
- data/rbi/openai/models/realtime/realtime_translation_session_closed_event.rbi +39 -0
- data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +322 -0
- data/rbi/openai/models/realtime/realtime_translation_session_created_event.rbi +68 -0
- data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +78 -0
- data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +313 -0
- data/rbi/openai/models/realtime/realtime_translation_session_updated_event.rbi +67 -0
- data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +0 -2
- data/rbi/openai/models/responses/response.rbi +6 -4
- data/rbi/openai/models/responses/response_create_params.rbi +6 -4
- data/rbi/openai/models/responses/response_includable.rbi +2 -0
- data/rbi/openai/models/responses/response_text_delta_event.rbi +2 -2
- data/rbi/openai/models/responses/response_text_done_event.rbi +2 -2
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -4
- data/rbi/openai/models/responses/tool.rbi +122 -27
- data/rbi/openai/resources/chat/completions.rbi +6 -4
- data/rbi/openai/resources/images.rbi +110 -44
- data/rbi/openai/resources/realtime/calls.rbi +7 -0
- data/rbi/openai/resources/responses.rbi +6 -4
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_images_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +7 -2
- data/sig/openai/models/image_edit_params.rbs +5 -4
- data/sig/openai/models/image_generate_params.rbs +5 -4
- data/sig/openai/models/image_model.rbs +11 -5
- data/sig/openai/models/realtime/audio_transcription.rbs +25 -0
- data/sig/openai/models/realtime/realtime_reasoning.rbs +24 -0
- data/sig/openai/models/realtime/realtime_reasoning_effort.rbs +20 -0
- data/sig/openai/models/realtime/realtime_response_create_params.rbs +16 -0
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +18 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +27 -4
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +4 -8
- data/sig/openai/models/realtime/realtime_translation_client_event.rbs +16 -0
- data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +69 -0
- data/sig/openai/models/realtime/realtime_translation_client_secret_create_response.rbs +32 -0
- data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +34 -0
- data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +37 -0
- data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +70 -0
- data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +37 -0
- data/sig/openai/models/realtime/realtime_translation_server_event.rbs +20 -0
- data/sig/openai/models/realtime/realtime_translation_session.rbs +131 -0
- data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +20 -0
- data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +18 -0
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +120 -0
- data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +32 -0
- data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +34 -0
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +115 -0
- data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +32 -0
- data/sig/openai/models/responses/tool.rbs +15 -5
- data/sig/openai/resources/realtime/calls.rbs +2 -0
- metadata +56 -5
- data/lib/openai/models/realtime/realtime_session_client_secret.rb +0 -36
- data/rbi/openai/models/realtime/realtime_session_client_secret.rbi +0 -49
- data/sig/openai/models/realtime/realtime_session_client_secret.rbs +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b8ba7d86e2a095f264f3249f65a5b7023ed92f5d72b254537d2131343d008d1
|
|
4
|
+
data.tar.gz: b2473fbb12916be311368b3ce12ec183118c94fecba86145f0765ddb261d34be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c6c2cdd0fb69bcf6df1bedab9f82904812aedcca80e43dc378eb36c213b1975b439040c26432ab29ddac79c938c361000f7de2508255632eea04dc220593bfa
|
|
7
|
+
data.tar.gz: 99dba44fb87261cefba089bfea34b90d09848e85e4be6e682f277c1a8f9a6cbfb9d7a51b9f99b918e0fe5ebc80f3321180af4ebde21268d920ed9e09cf103321
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.62.0 (2026-05-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.61.0...v0.62.0](https://github.com/openai/openai-ruby/compare/v0.61.0...v0.62.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add quantity field to organization usage costs results ([2085700](https://github.com/openai/openai-ruby/commit/2085700725c2325e880a715ce3b13b4efce7b5d4))
|
|
10
|
+
* **api:** add web_search_call.results includable option ([b486412](https://github.com/openai/openai-ruby/commit/b4864127789424527497aa6097d93ea06e9aa4f7))
|
|
11
|
+
* **api:** launch realtime translate + update image 2 ([0e642fb](https://github.com/openai/openai-ruby/commit/0e642fbf02845ff94b8eda0fca7e8348adc3ac37))
|
|
12
|
+
* **api:** manual updates ([4baf155](https://github.com/openai/openai-ruby/commit/4baf155ef74ffdf533dfba330e15f7accf1e5351))
|
|
13
|
+
* **api:** manual updates ([20c8209](https://github.com/openai/openai-ruby/commit/20c82091b6c24668e90ed895dfc7e88b0aafd977))
|
|
14
|
+
* **api:** realtime 2 ([1718781](https://github.com/openai/openai-ruby/commit/17187817c580b642d61ea754aa63782a16af94bc))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **api:** fix imagegen `size` enum regression ([51548cd](https://github.com/openai/openai-ruby/commit/51548cd04ab8f3a16e980bd2318ddb42ee75ce6c))
|
|
20
|
+
|
|
3
21
|
## 0.61.0 (2026-05-01)
|
|
4
22
|
|
|
5
23
|
Full Changelog: [v0.60.0...v0.61.0](https://github.com/openai/openai-ruby/compare/v0.60.0...v0.61.0)
|
data/README.md
CHANGED
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -684,7 +684,14 @@ module OpenAI
|
|
|
684
684
|
# @return [String, nil]
|
|
685
685
|
optional :project_id, String, nil?: true
|
|
686
686
|
|
|
687
|
-
# @!
|
|
687
|
+
# @!attribute quantity
|
|
688
|
+
# When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
689
|
+
# result.
|
|
690
|
+
#
|
|
691
|
+
# @return [Float, nil]
|
|
692
|
+
optional :quantity, Float, nil?: true
|
|
693
|
+
|
|
694
|
+
# @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, object: :"organization.costs.result")
|
|
688
695
|
# Some parameter documentations has been truncated, see
|
|
689
696
|
# {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult}
|
|
690
697
|
# for more details.
|
|
@@ -699,6 +706,8 @@ module OpenAI
|
|
|
699
706
|
#
|
|
700
707
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co
|
|
701
708
|
#
|
|
709
|
+
# @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs
|
|
710
|
+
#
|
|
702
711
|
# @param object [Symbol, :"organization.costs.result"]
|
|
703
712
|
|
|
704
713
|
# @see OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -29,8 +29,7 @@ module OpenAI
|
|
|
29
29
|
|
|
30
30
|
# @!attribute top_logprobs
|
|
31
31
|
# List of the most likely tokens and their log probability, at this token
|
|
32
|
-
# position.
|
|
33
|
-
# `top_logprobs` returned.
|
|
32
|
+
# position. The number of entries may be fewer than the requested `top_logprobs`.
|
|
34
33
|
#
|
|
35
34
|
# @return [Array<OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob>]
|
|
36
35
|
required :top_logprobs,
|
|
@@ -340,8 +340,9 @@ module OpenAI
|
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
# @!attribute top_logprobs
|
|
343
|
-
# An integer between 0 and 20 specifying the number of most likely tokens
|
|
344
|
-
# return at each token position, each with an associated log probability.
|
|
343
|
+
# An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
344
|
+
# to return at each token position, each with an associated log probability. In
|
|
345
|
+
# some cases, the number of returned tokens may be fewer than requested.
|
|
345
346
|
# `logprobs` must be set to `true` if this parameter is used.
|
|
346
347
|
#
|
|
347
348
|
# @return [Integer, nil]
|
|
@@ -447,7 +448,7 @@ module OpenAI
|
|
|
447
448
|
#
|
|
448
449
|
# @param tools [Array<OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::Chat::ChatCompletionFunctionTool, OpenAI::Models::Chat::ChatCompletionCustomTool>] A list of tools the model may call. You can provide either
|
|
449
450
|
#
|
|
450
|
-
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely
|
|
451
|
+
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely
|
|
451
452
|
#
|
|
452
453
|
# @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling,
|
|
453
454
|
#
|
|
@@ -12,10 +12,10 @@ module OpenAI
|
|
|
12
12
|
# @!attribute image
|
|
13
13
|
# The image(s) to edit. Must be a supported image file or an array of images.
|
|
14
14
|
#
|
|
15
|
-
# For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`,
|
|
16
|
-
# `gpt-image-
|
|
17
|
-
# 50MB. You can provide up to
|
|
18
|
-
#
|
|
15
|
+
# For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
16
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
|
|
17
|
+
# should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
|
|
18
|
+
# 16 images.
|
|
19
19
|
#
|
|
20
20
|
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
21
21
|
# file less than 4MB.
|
|
@@ -32,9 +32,14 @@ module OpenAI
|
|
|
32
32
|
|
|
33
33
|
# @!attribute background
|
|
34
34
|
# Allows to set transparency for the background of the generated image(s). This
|
|
35
|
-
# parameter is only supported for
|
|
36
|
-
# `transparent`, `opaque
|
|
37
|
-
# model will automatically determine the best background
|
|
35
|
+
# parameter is only supported for GPT image models that support transparent
|
|
36
|
+
# backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
37
|
+
# When `auto` is used, the model will automatically determine the best background
|
|
38
|
+
# for the image.
|
|
39
|
+
#
|
|
40
|
+
# `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
41
|
+
# backgrounds. Requests with `background` set to `transparent` will return an
|
|
42
|
+
# error for these models; use `opaque` or `auto` instead.
|
|
38
43
|
#
|
|
39
44
|
# If `transparent`, the output format needs to support transparency, so it should
|
|
40
45
|
# be set to either `png` (default value) or `webp`.
|
|
@@ -61,7 +66,10 @@ module OpenAI
|
|
|
61
66
|
optional :mask, OpenAI::Internal::Type::FileInput
|
|
62
67
|
|
|
63
68
|
# @!attribute model
|
|
64
|
-
# The model to use for image generation.
|
|
69
|
+
# The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
70
|
+
# (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
71
|
+
# `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
|
|
72
|
+
# `gpt-image-1.5`.
|
|
65
73
|
#
|
|
66
74
|
# @return [String, Symbol, OpenAI::Models::ImageModel, nil]
|
|
67
75
|
optional :model, union: -> { OpenAI::ImageEditParams::Model }, nil?: true
|
|
@@ -116,12 +124,20 @@ module OpenAI
|
|
|
116
124
|
optional :response_format, enum: -> { OpenAI::ImageEditParams::ResponseFormat }, nil?: true
|
|
117
125
|
|
|
118
126
|
# @!attribute size
|
|
119
|
-
# The size of the generated images.
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
|
|
127
|
+
# The size of the generated images. For `gpt-image-2` and
|
|
128
|
+
# `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
129
|
+
# strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
130
|
+
# and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
131
|
+
# `2560x1440` are experimental, and the maximum supported resolution is
|
|
132
|
+
# `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
133
|
+
# edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
134
|
+
# supported by the GPT image models; `auto` is supported for models that allow
|
|
135
|
+
# automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
136
|
+
# `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
137
|
+
# `1024x1792`.
|
|
138
|
+
#
|
|
139
|
+
# @return [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil]
|
|
140
|
+
optional :size, union: -> { OpenAI::ImageEditParams::Size }, nil?: true
|
|
125
141
|
|
|
126
142
|
# @!attribute user
|
|
127
143
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -145,7 +161,7 @@ module OpenAI
|
|
|
145
161
|
#
|
|
146
162
|
# @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] An additional image whose fully transparent areas (e.g. where alpha is zero) ind
|
|
147
163
|
#
|
|
148
|
-
# @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation.
|
|
164
|
+
# @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2` or a GPT image model (`
|
|
149
165
|
#
|
|
150
166
|
# @param n [Integer, nil] The number of images to generate. Must be between 1 and 10.
|
|
151
167
|
#
|
|
@@ -159,7 +175,7 @@ module OpenAI
|
|
|
159
175
|
#
|
|
160
176
|
# @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or `
|
|
161
177
|
#
|
|
162
|
-
# @param size [Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images.
|
|
178
|
+
# @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`
|
|
163
179
|
#
|
|
164
180
|
# @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
165
181
|
#
|
|
@@ -167,10 +183,10 @@ module OpenAI
|
|
|
167
183
|
|
|
168
184
|
# The image(s) to edit. Must be a supported image file or an array of images.
|
|
169
185
|
#
|
|
170
|
-
# For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`,
|
|
171
|
-
# `gpt-image-
|
|
172
|
-
# 50MB. You can provide up to
|
|
173
|
-
#
|
|
186
|
+
# For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
187
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
|
|
188
|
+
# should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
|
|
189
|
+
# 16 images.
|
|
174
190
|
#
|
|
175
191
|
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
176
192
|
# file less than 4MB.
|
|
@@ -189,9 +205,14 @@ module OpenAI
|
|
|
189
205
|
end
|
|
190
206
|
|
|
191
207
|
# Allows to set transparency for the background of the generated image(s). This
|
|
192
|
-
# parameter is only supported for
|
|
193
|
-
# `transparent`, `opaque
|
|
194
|
-
# model will automatically determine the best background
|
|
208
|
+
# parameter is only supported for GPT image models that support transparent
|
|
209
|
+
# backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
210
|
+
# When `auto` is used, the model will automatically determine the best background
|
|
211
|
+
# for the image.
|
|
212
|
+
#
|
|
213
|
+
# `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
214
|
+
# backgrounds. Requests with `background` set to `transparent` will return an
|
|
215
|
+
# error for these models; use `opaque` or `auto` instead.
|
|
195
216
|
#
|
|
196
217
|
# If `transparent`, the output format needs to support transparency, so it should
|
|
197
218
|
# be set to either `png` (default value) or `webp`.
|
|
@@ -220,13 +241,16 @@ module OpenAI
|
|
|
220
241
|
# @return [Array<Symbol>]
|
|
221
242
|
end
|
|
222
243
|
|
|
223
|
-
# The model to use for image generation.
|
|
244
|
+
# The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
245
|
+
# (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
246
|
+
# `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
|
|
247
|
+
# `gpt-image-1.5`.
|
|
224
248
|
module Model
|
|
225
249
|
extend OpenAI::Internal::Type::Union
|
|
226
250
|
|
|
227
251
|
variant String
|
|
228
252
|
|
|
229
|
-
# The model to use for image generation. Defaults to `gpt-image-1.5`.
|
|
253
|
+
# The model to use for image generation. One of `dall-e-2` or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to `gpt-image-1.5`.
|
|
230
254
|
variant enum: -> { OpenAI::ImageModel }
|
|
231
255
|
|
|
232
256
|
# @!method self.variants
|
|
@@ -276,11 +300,42 @@ module OpenAI
|
|
|
276
300
|
# @return [Array<Symbol>]
|
|
277
301
|
end
|
|
278
302
|
|
|
279
|
-
# The size of the generated images.
|
|
280
|
-
#
|
|
281
|
-
#
|
|
303
|
+
# The size of the generated images. For `gpt-image-2` and
|
|
304
|
+
# `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
305
|
+
# strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
306
|
+
# and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
307
|
+
# `2560x1440` are experimental, and the maximum supported resolution is
|
|
308
|
+
# `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
309
|
+
# edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
310
|
+
# supported by the GPT image models; `auto` is supported for models that allow
|
|
311
|
+
# automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
312
|
+
# `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
313
|
+
# `1024x1792`.
|
|
282
314
|
module Size
|
|
283
|
-
extend OpenAI::Internal::Type::
|
|
315
|
+
extend OpenAI::Internal::Type::Union
|
|
316
|
+
|
|
317
|
+
variant String
|
|
318
|
+
|
|
319
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_256X256 }
|
|
320
|
+
|
|
321
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_512X512 }
|
|
322
|
+
|
|
323
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1024X1024 }
|
|
324
|
+
|
|
325
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1536X1024 }
|
|
326
|
+
|
|
327
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::SIZE_1024X1536 }
|
|
328
|
+
|
|
329
|
+
variant const: -> { OpenAI::Models::ImageEditParams::Size::AUTO }
|
|
330
|
+
|
|
331
|
+
# @!method self.variants
|
|
332
|
+
# @return [Array(String, Symbol)]
|
|
333
|
+
|
|
334
|
+
define_sorbet_constant!(:Variants) do
|
|
335
|
+
T.type_alias { T.any(String, OpenAI::ImageEditParams::Size::TaggedSymbol) }
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# @!group
|
|
284
339
|
|
|
285
340
|
SIZE_256X256 = :"256x256"
|
|
286
341
|
SIZE_512X512 = :"512x512"
|
|
@@ -289,8 +344,7 @@ module OpenAI
|
|
|
289
344
|
SIZE_1024X1536 = :"1024x1536"
|
|
290
345
|
AUTO = :auto
|
|
291
346
|
|
|
292
|
-
# @!
|
|
293
|
-
# @return [Array<Symbol>]
|
|
347
|
+
# @!endgroup
|
|
294
348
|
end
|
|
295
349
|
end
|
|
296
350
|
end
|