openai 0.97.0 → 0.99.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 +31 -0
- data/README.md +76 -1
- data/lib/openai/helpers/agents/session_stream.rb +60 -3
- data/lib/openai/helpers/beta/agents/artifacts.rb +72 -0
- data/lib/openai/helpers/beta/agents/creation_stream.rb +69 -0
- data/lib/openai/helpers/beta/agents/files.rb +236 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +65 -0
- data/lib/openai/helpers/beta/agents/model_adapter.rb +27 -0
- data/lib/openai/helpers/beta/agents/result.rb +170 -0
- data/lib/openai/helpers/beta/agents/typed_output.rb +191 -0
- data/lib/openai/helpers/live/websocket.rb +7 -1
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +1 -1
- data/lib/openai/helpers/responses_websocket/connection.rb +7 -1
- data/lib/openai/helpers/responses_websocket/session.rb +5 -1
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +12 -2
- data/lib/openai/internal/transport/base_client.rb +18 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/base_model.rb +6 -3
- data/lib/openai/internal/type/converter.rb +50 -3
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/union.rb +6 -6
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_completions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_costs_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +16 -3
- data/lib/openai/models/all_models.rb +42 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -0
- data/lib/openai/models/audio/voice.rb +75 -0
- data/lib/openai/models/audio/voice_create_params.rb +217 -0
- data/lib/openai/models/beta/agent_create_params.rb +0 -3
- data/lib/openai/models/beta/agent_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/sessions/session_trace.rb +64 -0
- data/lib/openai/models/beta/agents/sessions/trace_list_params.rb +68 -0
- data/lib/openai/models/beta/agents/vaults/credential.rb +8 -4
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_response_output_text.rb +2 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_tool.rb +3 -9
- data/lib/openai/models/beta/environment.rb +33 -1
- data/lib/openai/models/beta/environment_param.rb +24 -1
- data/lib/openai/models/beta/response_compact_params.rb +220 -0
- data/lib/openai/models/beta/response_create_params.rb +220 -0
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +1 -0
- data/lib/openai/models/chat_model.rb +178 -0
- data/lib/openai/models/image.rb +14 -14
- data/lib/openai/models/image_create_variation_params.rb +7 -7
- data/lib/openai/models/image_edit_params.rb +76 -87
- data/lib/openai/models/image_generate_params.rb +51 -62
- data/lib/openai/models/image_model.rb +5 -3
- data/lib/openai/models/live/fork_server_event.rb +14 -3
- data/lib/openai/models/live/server_event.rb +14 -3
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
- data/lib/openai/models/realtime/translations/client_secret_create_params.rb +28 -0
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/response_output_text.rb +2 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/models/responses/tool.rb +3 -9
- data/lib/openai/models/responses_model.rb +42 -0
- data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
- data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
- data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
- data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
- data/lib/openai/resources/audio/speech.rb +2 -0
- data/lib/openai/resources/audio/voices.rb +53 -0
- data/lib/openai/resources/audio.rb +5 -0
- data/lib/openai/resources/beta/agents/environments/files.rb +31 -0
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +6 -5
- data/lib/openai/resources/beta/agents/sessions/traces.rb +58 -0
- data/lib/openai/resources/beta/agents/sessions.rb +18 -5
- data/lib/openai/resources/evals/runs.rb +1 -1
- data/lib/openai/resources/images.rb +71 -103
- data/lib/openai/resources/realtime/translations/client_secrets.rb +58 -0
- data/lib/openai/resources/realtime/translations.rb +20 -0
- data/lib/openai/resources/realtime.rb +4 -0
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +17 -1
- data/rbi/openai/helpers/agents.rbi +20 -1
- data/rbi/openai/helpers/beta/agents/artifacts.rbi +29 -0
- data/rbi/openai/helpers/beta/agents/files.rbi +65 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +40 -0
- data/rbi/openai/helpers/beta/agents/model_adapter.rbi +22 -0
- data/rbi/openai/helpers/beta/agents.rbi +146 -0
- data/rbi/openai/internal/transport/base_client.rbi +12 -0
- data/rbi/openai/internal/type/base_model.rbi +2 -2
- data/rbi/openai/internal/type/converter.rbi +21 -3
- data/rbi/openai/internal/type/union.rbi +6 -2
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +19 -2
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
- data/rbi/openai/models/audio/voice.rbi +111 -0
- data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/sessions/session_trace.rbi +97 -0
- data/rbi/openai/models/beta/agents/sessions/trace_list_params.rbi +121 -0
- data/rbi/openai/models/beta/agents/vaults/credential.rbi +5 -5
- data/rbi/openai/models/beta/beta_response_output_text.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/models/beta/beta_tool.rbi +3 -9
- data/rbi/openai/models/beta/environment.rbi +29 -0
- data/rbi/openai/models/beta/environment_param.rbi +31 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +1 -0
- data/rbi/openai/models/image.rbi +14 -14
- data/rbi/openai/models/image_create_variation_params.rbi +6 -6
- data/rbi/openai/models/image_edit_params.rbi +61 -82
- data/rbi/openai/models/image_generate_params.rbi +30 -61
- data/rbi/openai/models/image_model.rbi +3 -3
- data/rbi/openai/models/live/fork_server_event.rbi +14 -2
- data/rbi/openai/models/live/server_event.rbi +14 -2
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
- data/rbi/openai/models/realtime/translations/client_secret_create_params.rbi +68 -0
- data/rbi/openai/models/responses/response_output_text.rbi +2 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/models/responses/tool.rbi +3 -9
- data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
- data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
- data/rbi/openai/resources/audio/speech.rbi +2 -0
- data/rbi/openai/resources/audio/voices.rbi +49 -0
- data/rbi/openai/resources/audio.rbi +4 -0
- data/rbi/openai/resources/beta/agents/environments/files.rbi +31 -0
- data/rbi/openai/resources/beta/agents/sessions/artifacts.rbi +8 -0
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +6 -5
- data/rbi/openai/resources/beta/agents/sessions/traces.rbi +54 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +6 -1
- data/rbi/openai/resources/images.rbi +69 -103
- data/rbi/openai/resources/realtime/translations/client_secrets.rbi +54 -0
- data/rbi/openai/resources/realtime/translations.rbi +22 -0
- data/rbi/openai/resources/realtime.rbi +3 -0
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/helpers/agents.rbs +7 -0
- data/sig/openai/helpers/beta/agents/artifacts.rbs +20 -0
- data/sig/openai/helpers/beta/agents/files.rbs +41 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +24 -0
- data/sig/openai/helpers/beta/agents/model_adapter.rbs +16 -0
- data/sig/openai/helpers/beta/agents.rbs +71 -0
- data/sig/openai/helpers/structured_output.rbs +12 -0
- data/sig/openai/internal/transport/base_client.rbs +8 -0
- data/sig/openai/internal/type/base_model.rbs +3 -1
- data/sig/openai/internal/type/converter.rbs +16 -2
- data/sig/openai/internal/type/union.rbs +2 -1
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_images_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +20 -3
- data/sig/openai/models/audio/speech_create_params.rbs +4 -0
- data/sig/openai/models/audio/voice.rbs +70 -0
- data/sig/openai/models/audio/voice_create_params.rbs +203 -0
- data/sig/openai/models/beta/agent_create_params.rbs +1 -5
- data/sig/openai/models/beta/agent_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/sessions/session_trace.rbs +65 -0
- data/sig/openai/models/beta/agents/sessions/trace_list_params.rbs +81 -0
- data/sig/openai/models/beta/agents/vaults/credential.rbs +5 -5
- data/sig/openai/models/beta/beta_response_output_text.rbs +2 -2
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/models/beta/beta_tool.rbs +3 -9
- data/sig/openai/models/beta/environment.rbs +22 -0
- data/sig/openai/models/beta/environment_param.rbs +25 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +2 -1
- data/sig/openai/models/image.rbs +21 -21
- data/sig/openai/models/image_create_variation_params.rbs +4 -4
- data/sig/openai/models/image_edit_params.rbs +46 -60
- data/sig/openai/models/image_generate_params.rbs +23 -45
- data/sig/openai/models/image_model.rbs +6 -6
- data/sig/openai/models/live/fork_server_event.rbs +17 -2
- data/sig/openai/models/live/server_event.rbs +17 -2
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
- data/sig/openai/models/realtime/translations/client_secret_create_params.rbs +39 -0
- data/sig/openai/models/responses/response_output_text.rbs +2 -2
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/models/responses/tool.rbs +3 -9
- data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
- data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
- data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
- data/sig/openai/resources/audio/voices.rbs +14 -0
- data/sig/openai/resources/audio.rbs +2 -0
- data/sig/openai/resources/beta/agents/environments/files.rbs +17 -0
- data/sig/openai/resources/beta/agents/sessions/artifacts.rbs +4 -0
- data/sig/openai/resources/beta/agents/sessions/traces.rbs +21 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -1
- data/sig/openai/resources/realtime/translations/client_secrets.rbs +17 -0
- data/sig/openai/resources/realtime/translations.rbs +11 -0
- data/sig/openai/resources/realtime.rbs +2 -0
- data/sig/openai/resources/webhooks.rbs +6 -1
- metadata +61 -1
|
@@ -8,7 +8,7 @@ module OpenAI
|
|
|
8
8
|
id: String,
|
|
9
9
|
auth: OpenAI::Models::Beta::Agents::Vaults::credential_auth,
|
|
10
10
|
created_at: Integer,
|
|
11
|
-
metadata: ::Hash[Symbol, String],
|
|
11
|
+
?metadata: ::Hash[Symbol, String],
|
|
12
12
|
name: String,
|
|
13
13
|
?object: :"vault.credential",
|
|
14
14
|
updated_at: Integer,
|
|
@@ -46,24 +46,24 @@ module OpenAI
|
|
|
46
46
|
# The authentication method and non-secret configuration of the credential.
|
|
47
47
|
# @param created_at
|
|
48
48
|
# The Unix timestamp, in seconds, when the credential was created.
|
|
49
|
-
# @param metadata
|
|
50
|
-
# Application-defined key-value pairs associated with this credential.
|
|
51
49
|
# @param name
|
|
52
50
|
# The human-readable name of the credential.
|
|
53
51
|
# @param updated_at
|
|
54
52
|
# The Unix timestamp, in seconds, when the credential was last updated.
|
|
55
53
|
# @param vault_id
|
|
56
54
|
# The ID of the vault containing this credential.
|
|
55
|
+
# @param metadata
|
|
56
|
+
# Application-defined key-value pairs associated with this credential.
|
|
57
57
|
# @param object
|
|
58
58
|
# The object type. Always `vault.credential`.
|
|
59
59
|
def initialize: (
|
|
60
60
|
id: String,
|
|
61
61
|
auth: OpenAI::Models::Beta::Agents::Vaults::credential_auth,
|
|
62
62
|
created_at: Integer,
|
|
63
|
-
metadata: ::Hash[Symbol, String],
|
|
64
63
|
name: String,
|
|
65
64
|
updated_at: Integer,
|
|
66
65
|
vault_id: String,
|
|
66
|
+
?metadata: ::Hash[Symbol, String],
|
|
67
67
|
?object: :"vault.credential"
|
|
68
68
|
) -> void
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ module OpenAI
|
|
|
71
71
|
id: String,
|
|
72
72
|
auth: OpenAI::Models::Beta::Agents::Vaults::credential_auth,
|
|
73
73
|
created_at: Integer,
|
|
74
|
-
metadata: ::Hash[Symbol, String],
|
|
74
|
+
?metadata: ::Hash[Symbol, String],
|
|
75
75
|
name: String,
|
|
76
76
|
?object: :"vault.credential",
|
|
77
77
|
updated_at: Integer,
|
|
@@ -71,7 +71,7 @@ module OpenAI
|
|
|
71
71
|
# The filename of the file cited.
|
|
72
72
|
attr_accessor filename: String
|
|
73
73
|
|
|
74
|
-
# The index
|
|
74
|
+
# The index in the output text at which to insert the file citation.
|
|
75
75
|
attr_accessor index: Integer
|
|
76
76
|
|
|
77
77
|
# The type of the file citation. Always `file_citation`.
|
|
@@ -82,7 +82,7 @@ module OpenAI
|
|
|
82
82
|
# @param filename
|
|
83
83
|
# The filename of the file cited.
|
|
84
84
|
# @param index
|
|
85
|
-
# The index
|
|
85
|
+
# The index in the output text at which to insert the file citation.
|
|
86
86
|
# @param type
|
|
87
87
|
# The type of the file citation. Always `file_citation`.
|
|
88
88
|
def initialize: (
|
|
@@ -102,7 +102,7 @@ module OpenAI
|
|
|
102
102
|
# The filename of the file cited.
|
|
103
103
|
attr_accessor filename: String
|
|
104
104
|
|
|
105
|
-
# The index
|
|
105
|
+
# The index in the output text at which to insert the file citation.
|
|
106
106
|
attr_accessor index: Integer
|
|
107
107
|
|
|
108
108
|
# The type of the file citation. Always `file_citation`.
|
|
@@ -113,7 +113,7 @@ module OpenAI
|
|
|
113
113
|
# @param filename
|
|
114
114
|
# The filename of the file cited.
|
|
115
115
|
# @param index
|
|
116
|
-
# The index
|
|
116
|
+
# The index in the output text at which to insert the file citation.
|
|
117
117
|
# @param type
|
|
118
118
|
# The type of the file citation. Always `file_citation`.
|
|
119
119
|
def initialize: (
|
|
@@ -729,9 +729,7 @@ module OpenAI
|
|
|
729
729
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
730
730
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
731
731
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
732
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
733
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
734
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
732
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
735
733
|
attr_reader size: OpenAI::Models::Beta::BetaTool::ImageGeneration::size?
|
|
736
734
|
|
|
737
735
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
@@ -743,9 +741,7 @@ module OpenAI
|
|
|
743
741
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
744
742
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
745
743
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
746
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
747
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
748
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
744
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
749
745
|
def size=: (
|
|
750
746
|
OpenAI::Models::Beta::BetaTool::ImageGeneration::size
|
|
751
747
|
) -> OpenAI::Models::Beta::BetaTool::ImageGeneration::size
|
|
@@ -800,9 +796,7 @@ module OpenAI
|
|
|
800
796
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
801
797
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
802
798
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
803
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
804
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
805
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
799
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
806
800
|
# @param type
|
|
807
801
|
# The type of the image generation tool. Always `image_generation`.
|
|
808
802
|
def initialize: (
|
|
@@ -32,6 +32,7 @@ module OpenAI
|
|
|
32
32
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
33
33
|
skills: ::Array[OpenAI::Models::Beta::hosted_skill],
|
|
34
34
|
?type: :openai_hosted,
|
|
35
|
+
?container_size: OpenAI::Models::Beta::Environment::OpenAIHosted::container_size?,
|
|
35
36
|
?desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -60,6 +61,10 @@ module OpenAI
|
|
|
60
61
|
# The type of the object. Always `openai_hosted`.
|
|
61
62
|
attr_accessor type: :openai_hosted
|
|
62
63
|
|
|
64
|
+
# The effective CPU and memory tier, or null when unknown or outside the public
|
|
65
|
+
# tiers.
|
|
66
|
+
attr_accessor container_size: OpenAI::Models::Beta::Environment::OpenAIHosted::container_size?
|
|
67
|
+
|
|
63
68
|
# The effective desktop configuration.
|
|
64
69
|
attr_reader desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop?
|
|
65
70
|
|
|
@@ -82,6 +87,9 @@ module OpenAI
|
|
|
82
87
|
# Plugins installed in the environment, excluding their archive contents.
|
|
83
88
|
# @param skills
|
|
84
89
|
# Skills installed in the environment, excluding their archive contents.
|
|
90
|
+
# @param container_size
|
|
91
|
+
# The effective CPU and memory tier, or null when unknown or outside the public
|
|
92
|
+
# tiers.
|
|
85
93
|
# @param desktop
|
|
86
94
|
# The effective desktop configuration.
|
|
87
95
|
# @param type
|
|
@@ -94,6 +102,7 @@ module OpenAI
|
|
|
94
102
|
packages: OpenAI::Beta::Environment::OpenAIHosted::Packages,
|
|
95
103
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
96
104
|
skills: ::Array[OpenAI::Models::Beta::hosted_skill],
|
|
105
|
+
?container_size: OpenAI::Models::Beta::Environment::OpenAIHosted::container_size?,
|
|
97
106
|
?desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop,
|
|
98
107
|
?type: :openai_hosted
|
|
99
108
|
) -> void
|
|
@@ -107,6 +116,7 @@ module OpenAI
|
|
|
107
116
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
108
117
|
skills: ::Array[OpenAI::Models::Beta::hosted_skill],
|
|
109
118
|
?type: :openai_hosted,
|
|
119
|
+
?container_size: OpenAI::Models::Beta::Environment::OpenAIHosted::container_size?,
|
|
110
120
|
?desktop: OpenAI::Beta::Environment::OpenAIHosted::Desktop
|
|
111
121
|
}
|
|
112
122
|
|
|
@@ -191,6 +201,18 @@ module OpenAI
|
|
|
191
201
|
}
|
|
192
202
|
end
|
|
193
203
|
|
|
204
|
+
type container_size = :small | :medium | :large
|
|
205
|
+
|
|
206
|
+
module ContainerSize
|
|
207
|
+
extend OpenAI::Internal::Type::Enum
|
|
208
|
+
|
|
209
|
+
SMALL: :small
|
|
210
|
+
MEDIUM: :medium
|
|
211
|
+
LARGE: :large
|
|
212
|
+
|
|
213
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Environment::OpenAIHosted::container_size]
|
|
214
|
+
end
|
|
215
|
+
|
|
194
216
|
type desktop = { enabled: bool }
|
|
195
217
|
|
|
196
218
|
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
@@ -26,6 +26,7 @@ module OpenAI
|
|
|
26
26
|
{
|
|
27
27
|
?type: :openai_hosted,
|
|
28
28
|
?capability_directories: ::Array[String]?,
|
|
29
|
+
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
29
30
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
30
31
|
?env: ::Hash[Symbol, String]?,
|
|
31
32
|
?environment_template_id: String,
|
|
@@ -45,6 +46,14 @@ module OpenAI
|
|
|
45
46
|
# list.
|
|
46
47
|
attr_accessor capability_directories: ::Array[String]?
|
|
47
48
|
|
|
49
|
+
# The hosted container size. Omission selects the medium tier.
|
|
50
|
+
attr_reader container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size?
|
|
51
|
+
|
|
52
|
+
# The hosted container size. Omission selects the medium tier.
|
|
53
|
+
def container_size=: (
|
|
54
|
+
OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size
|
|
55
|
+
) -> OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size
|
|
56
|
+
|
|
48
57
|
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
49
58
|
# defaults to disabled.
|
|
50
59
|
attr_accessor desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?
|
|
@@ -83,6 +92,8 @@ module OpenAI
|
|
|
83
92
|
# @param capability_directories
|
|
84
93
|
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
85
94
|
# list.
|
|
95
|
+
# @param container_size
|
|
96
|
+
# The hosted container size. Omission selects the medium tier.
|
|
86
97
|
# @param desktop
|
|
87
98
|
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
88
99
|
# defaults to disabled.
|
|
@@ -109,6 +120,7 @@ module OpenAI
|
|
|
109
120
|
# The type of the object. Always `openai_hosted`.
|
|
110
121
|
def initialize: (
|
|
111
122
|
?capability_directories: ::Array[String]?,
|
|
123
|
+
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
112
124
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
113
125
|
?env: ::Hash[Symbol, String]?,
|
|
114
126
|
?environment_template_id: String,
|
|
@@ -124,6 +136,7 @@ module OpenAI
|
|
|
124
136
|
def to_hash: -> {
|
|
125
137
|
?type: :openai_hosted,
|
|
126
138
|
?capability_directories: ::Array[String]?,
|
|
139
|
+
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
127
140
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
128
141
|
?env: ::Hash[Symbol, String]?,
|
|
129
142
|
?environment_template_id: String,
|
|
@@ -135,6 +148,18 @@ module OpenAI
|
|
|
135
148
|
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
136
149
|
}
|
|
137
150
|
|
|
151
|
+
type container_size = :small | :medium | :large
|
|
152
|
+
|
|
153
|
+
module ContainerSize
|
|
154
|
+
extend OpenAI::Internal::Type::Enum
|
|
155
|
+
|
|
156
|
+
SMALL: :small
|
|
157
|
+
MEDIUM: :medium
|
|
158
|
+
LARGE: :large
|
|
159
|
+
|
|
160
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size]
|
|
161
|
+
end
|
|
162
|
+
|
|
138
163
|
type desktop = { enabled: bool }
|
|
139
164
|
|
|
140
165
|
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
@@ -31,6 +31,7 @@ module OpenAI
|
|
|
31
31
|
| :usage_limit_exceeded
|
|
32
32
|
| :credit_balance_exhausted
|
|
33
33
|
| :rate_limit_exceeded
|
|
34
|
+
| :flex_unavailable
|
|
34
35
|
| :server_overloaded
|
|
35
36
|
| :cyber_policy
|
|
36
37
|
| :misalignment_policy_violation
|
|
@@ -63,6 +64,9 @@ module OpenAI
|
|
|
63
64
|
# The request exceeds the available rate limit.
|
|
64
65
|
RATE_LIMIT_EXCEEDED: :rate_limit_exceeded
|
|
65
66
|
|
|
67
|
+
# Flex processing is temporarily unavailable.
|
|
68
|
+
FLEX_UNAVAILABLE: :flex_unavailable
|
|
69
|
+
|
|
66
70
|
# The model service is temporarily overloaded.
|
|
67
71
|
SERVER_OVERLOADED: :server_overloaded
|
|
68
72
|
|
|
@@ -17,7 +17,8 @@ module OpenAI
|
|
|
17
17
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
18
18
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
19
19
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
20
|
-
# for example `{ "id": "voice_1234" }`.
|
|
20
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
21
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
21
22
|
attr_accessor voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
|
|
22
23
|
|
|
23
24
|
# @param format_
|
|
@@ -27,7 +28,8 @@ module OpenAI
|
|
|
27
28
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
28
29
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
29
30
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
30
|
-
# for example `{ "id": "voice_1234" }`.
|
|
31
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
32
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
31
33
|
def initialize: (
|
|
32
34
|
format_: OpenAI::Models::Chat::ChatCompletionAudioParam::format_,
|
|
33
35
|
voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
|
|
@@ -81,7 +81,7 @@ module OpenAI
|
|
|
81
81
|
?detail: OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL::detail
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
type detail = :auto | :low | :high
|
|
84
|
+
type detail = :auto | :low | :high | :original
|
|
85
85
|
|
|
86
86
|
module Detail
|
|
87
87
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
AUTO: :auto
|
|
90
90
|
LOW: :low
|
|
91
91
|
HIGH: :high
|
|
92
|
+
ORIGINAL: :original
|
|
92
93
|
|
|
93
94
|
def self?.values: -> ::Array[OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL::detail]
|
|
94
95
|
end
|
data/sig/openai/models/image.rbs
CHANGED
|
@@ -3,42 +3,42 @@ module OpenAI
|
|
|
3
3
|
type image = { ?:b64_json => String, ?revised_prompt: String, ?url: String }
|
|
4
4
|
|
|
5
5
|
class Image < OpenAI::Internal::Type::BaseModel
|
|
6
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
7
|
-
# image models,
|
|
8
|
-
#
|
|
6
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
7
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
8
|
+
# support that parameter.
|
|
9
9
|
attr_reader b64_json: String?
|
|
10
10
|
|
|
11
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
12
|
-
# image models,
|
|
13
|
-
#
|
|
11
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
12
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
13
|
+
# support that parameter.
|
|
14
14
|
def b64_json=: (String) -> String
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
17
|
+
# revision. Not returned by GPT image models.
|
|
17
18
|
attr_reader revised_prompt: String?
|
|
18
19
|
|
|
19
|
-
#
|
|
20
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
21
|
+
# revision. Not returned by GPT image models.
|
|
20
22
|
def revised_prompt=: (String) -> String
|
|
21
23
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# models.
|
|
24
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
25
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
25
26
|
attr_reader url: String?
|
|
26
27
|
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# models.
|
|
28
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
29
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
30
30
|
def url=: (String) -> String
|
|
31
31
|
|
|
32
32
|
# @param b64_json
|
|
33
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
34
|
-
# image models,
|
|
35
|
-
#
|
|
33
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
34
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
35
|
+
# support that parameter.
|
|
36
36
|
# @param revised_prompt
|
|
37
|
-
#
|
|
37
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
38
|
+
# revision. Not returned by GPT image models.
|
|
38
39
|
# @param url
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# models.
|
|
40
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
41
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
42
42
|
def initialize: (
|
|
43
43
|
?b64_json: String,
|
|
44
44
|
?revised_prompt: String,
|
|
@@ -23,8 +23,8 @@ module OpenAI
|
|
|
23
23
|
# content type.
|
|
24
24
|
attr_accessor image: OpenAI::Internal::file_input
|
|
25
25
|
|
|
26
|
-
# The model
|
|
27
|
-
#
|
|
26
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
27
|
+
# longer accepts requests.
|
|
28
28
|
attr_accessor model: OpenAI::Models::ImageCreateVariationParams::model?
|
|
29
29
|
|
|
30
30
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -57,8 +57,8 @@ module OpenAI
|
|
|
57
57
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
58
58
|
# content type.
|
|
59
59
|
# @param model
|
|
60
|
-
# The model
|
|
61
|
-
#
|
|
60
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
61
|
+
# longer accepts requests.
|
|
62
62
|
# @param n
|
|
63
63
|
# The number of images to generate. Must be between 1 and 10.
|
|
64
64
|
# @param response_format
|
|
@@ -32,16 +32,13 @@ module OpenAI
|
|
|
32
32
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
33
33
|
# images.
|
|
34
34
|
#
|
|
35
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
36
|
-
# file less than 4MB.
|
|
37
|
-
#
|
|
38
35
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
39
36
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
40
37
|
# content type.
|
|
41
38
|
attr_accessor image: OpenAI::Models::ImageEditParams::image
|
|
42
39
|
|
|
43
|
-
# A text description of the desired image(s). The maximum length is
|
|
44
|
-
# characters for
|
|
40
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
41
|
+
# characters for the GPT image models.
|
|
45
42
|
attr_accessor prompt: String
|
|
46
43
|
|
|
47
44
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
@@ -80,12 +77,11 @@ module OpenAI
|
|
|
80
77
|
# content type.
|
|
81
78
|
def mask=: (OpenAI::Internal::file_input) -> OpenAI::Internal::file_input
|
|
82
79
|
|
|
83
|
-
# The model to use for image
|
|
84
|
-
#
|
|
85
|
-
# `gpt-image-2-
|
|
86
|
-
# `gpt-image-2.5-
|
|
87
|
-
# `
|
|
88
|
-
# `gpt-image-1.5`.
|
|
80
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
81
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
82
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
83
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
84
|
+
# `chatgpt-image-latest`).
|
|
89
85
|
attr_accessor model: OpenAI::Models::ImageEditParams::model?
|
|
90
86
|
|
|
91
87
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -115,24 +111,21 @@ module OpenAI
|
|
|
115
111
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
116
112
|
attr_accessor quality: OpenAI::Models::ImageEditParams::quality?
|
|
117
113
|
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
121
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
114
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
115
|
+
# image models, which always return base64-encoded images.
|
|
122
116
|
attr_accessor response_format: OpenAI::Models::ImageEditParams::response_format?
|
|
123
117
|
|
|
124
|
-
# The size of the generated images.
|
|
125
|
-
# `gpt-image-2
|
|
126
|
-
# `gpt-image-2.5-
|
|
127
|
-
# resolutions are supported as
|
|
128
|
-
# Width and height must both be
|
|
129
|
-
# must be between 1:3 and 3:1.
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
# `
|
|
134
|
-
#
|
|
135
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
118
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
119
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
120
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
121
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
122
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
123
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
124
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
125
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
126
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
127
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
128
|
+
# models that allow automatic sizing.
|
|
136
129
|
attr_accessor size: OpenAI::Models::ImageEditParams::size?
|
|
137
130
|
|
|
138
131
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -155,15 +148,12 @@ module OpenAI
|
|
|
155
148
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
156
149
|
# images.
|
|
157
150
|
#
|
|
158
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
159
|
-
# file less than 4MB.
|
|
160
|
-
#
|
|
161
151
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
162
152
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
163
153
|
# content type.
|
|
164
154
|
# @param prompt
|
|
165
|
-
# A text description of the desired image(s). The maximum length is
|
|
166
|
-
# characters for
|
|
155
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
156
|
+
# characters for the GPT image models.
|
|
167
157
|
# @param background
|
|
168
158
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
169
159
|
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
@@ -188,12 +178,11 @@ module OpenAI
|
|
|
188
178
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
189
179
|
# content type.
|
|
190
180
|
# @param model
|
|
191
|
-
# The model to use for image
|
|
192
|
-
#
|
|
193
|
-
# `gpt-image-2-
|
|
194
|
-
# `gpt-image-2.5-
|
|
195
|
-
# `
|
|
196
|
-
# `gpt-image-1.5`.
|
|
181
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
182
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
183
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
184
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
185
|
+
# `chatgpt-image-latest`).
|
|
197
186
|
# @param n
|
|
198
187
|
# The number of images to generate. Must be between 1 and 10.
|
|
199
188
|
# @param output_compression
|
|
@@ -217,23 +206,20 @@ module OpenAI
|
|
|
217
206
|
# `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
|
|
218
207
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
219
208
|
# @param response_format
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
223
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
209
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
210
|
+
# image models, which always return base64-encoded images.
|
|
224
211
|
# @param size
|
|
225
|
-
# The size of the generated images.
|
|
226
|
-
# `gpt-image-2
|
|
227
|
-
# `gpt-image-2.5-
|
|
228
|
-
# resolutions are supported as
|
|
229
|
-
# Width and height must both be
|
|
230
|
-
# must be between 1:3 and 3:1.
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
# `
|
|
235
|
-
#
|
|
236
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
212
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
213
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
214
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
215
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
216
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
217
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
218
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
219
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
220
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
221
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
222
|
+
# models that allow automatic sizing.
|
|
237
223
|
# @param user
|
|
238
224
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
239
225
|
# and detect abuse.
|
|
@@ -328,18 +314,18 @@ module OpenAI
|
|
|
328
314
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::output_format]
|
|
329
315
|
end
|
|
330
316
|
|
|
331
|
-
type quality = :
|
|
317
|
+
type quality = :low | :medium | :high | :xhigh | :max | :auto | :standard
|
|
332
318
|
|
|
333
319
|
module Quality
|
|
334
320
|
extend OpenAI::Internal::Type::Enum
|
|
335
321
|
|
|
336
|
-
STANDARD: :standard
|
|
337
322
|
LOW: :low
|
|
338
323
|
MEDIUM: :medium
|
|
339
324
|
HIGH: :high
|
|
340
325
|
XHIGH: :xhigh
|
|
341
326
|
MAX: :max
|
|
342
327
|
AUTO: :auto
|
|
328
|
+
STANDARD: :standard
|
|
343
329
|
|
|
344
330
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::quality]
|
|
345
331
|
end
|
|
@@ -357,24 +343,24 @@ module OpenAI
|
|
|
357
343
|
|
|
358
344
|
type size =
|
|
359
345
|
String
|
|
360
|
-
| :"256x256"
|
|
361
|
-
| :"512x512"
|
|
362
346
|
| :"1024x1024"
|
|
363
347
|
| :"1536x1024"
|
|
364
348
|
| :"1024x1536"
|
|
365
349
|
| :auto
|
|
350
|
+
| :"256x256"
|
|
351
|
+
| :"512x512"
|
|
366
352
|
|
|
367
353
|
module Size
|
|
368
354
|
extend OpenAI::Internal::Type::Union
|
|
369
355
|
|
|
370
356
|
def self?.variants: -> ::Array[OpenAI::Models::ImageEditParams::size]
|
|
371
357
|
|
|
372
|
-
SIZE_256X256: :"256x256"
|
|
373
|
-
SIZE_512X512: :"512x512"
|
|
374
358
|
SIZE_1024X1024: :"1024x1024"
|
|
375
359
|
SIZE_1536X1024: :"1536x1024"
|
|
376
360
|
SIZE_1024X1536: :"1024x1536"
|
|
377
361
|
AUTO: :auto
|
|
362
|
+
SIZE_256X256: :"256x256"
|
|
363
|
+
SIZE_512X512: :"512x512"
|
|
378
364
|
end
|
|
379
365
|
end
|
|
380
366
|
end
|