openai 0.98.0 → 0.100.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 +26 -0
- data/README.md +1 -1
- data/bedrock.md +17 -1
- data/lib/openai/client.rb +9 -0
- data/lib/openai/helpers/agents/session_stream.rb +11 -36
- data/lib/openai/helpers/agents/tools.rb +34 -4
- data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
- data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
- data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_images_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +140 -5
- 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/environments/template_create_params.rb +6 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
- 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/turns/item_list_params.rb +79 -0
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_error.rb +12 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +15 -18
- data/lib/openai/models/beta/environment_param.rb +6 -6
- 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 +9 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- data/lib/openai/models/chat_model.rb +178 -0
- data/lib/openai/models/error_object.rb +12 -1
- data/lib/openai/models/eval_create_params.rb +1 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
- data/lib/openai/models/graders/score_model_grader.rb +2 -2
- 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 +88 -96
- data/lib/openai/models/image_generate_params.rb +51 -62
- data/lib/openai/models/image_model.rb +5 -3
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
- data/lib/openai/models/realtime/session_update_event.rb +16 -0
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/responses/response_error.rb +12 -1
- data/lib/openai/models/responses/responses_server_event.rb +12 -1
- data/lib/openai/models/responses/tool.rb +15 -18
- data/lib/openai/models/responses_model.rb +42 -0
- data/lib/openai/models/video_create_error.rb +12 -1
- 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/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- 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/templates.rb +3 -4
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -2
- data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
- data/lib/openai/resources/images.rb +79 -109
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +10 -0
- data/rbi/openai/helpers/agents.rbi +2 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
- data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
- data/rbi/openai/helpers/beta/agents.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +213 -3
- 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/environments/template_create_params.rbi +6 -6
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
- 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/turns/item_list_params.rbi +139 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
- data/rbi/openai/models/beta/beta_tool.rbi +15 -18
- data/rbi/openai/models/beta/environment_param.rbi +6 -6
- data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
- data/rbi/openai/models/error_object.rbi +12 -0
- data/rbi/openai/models/eval_create_params.rbi +1 -1
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
- 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 +73 -91
- data/rbi/openai/models/image_generate_params.rbi +30 -61
- data/rbi/openai/models/image_model.rbi +3 -3
- 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/session_update_event.rbi +16 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/responses/response_error.rbi +12 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +15 -18
- data/rbi/openai/models/video_create_error.rbi +12 -0
- 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/admin/organization/usage.rbi +15 -6
- 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/templates.rbi +3 -4
- data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
- data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
- data/rbi/openai/resources/images.rbi +77 -109
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/helpers/agents.rbs +3 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
- data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
- data/sig/openai/helpers/beta/agents.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_images_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +107 -5
- 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/environments/template_create_params.rbs +4 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
- 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/turns/item_list_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +10 -0
- data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
- data/sig/openai/models/beta/beta_tool.rbs +11 -15
- data/sig/openai/models/beta/environment_param.rbs +4 -4
- data/sig/openai/models/beta/session_turn_error.rbs +12 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
- data/sig/openai/models/error_object.rbs +10 -0
- data/sig/openai/models/eval_create_params.rbs +1 -1
- data/sig/openai/models/eval_create_response.rbs +1 -1
- data/sig/openai/models/eval_list_response.rbs +1 -1
- data/sig/openai/models/eval_retrieve_response.rbs +1 -1
- data/sig/openai/models/eval_update_response.rbs +1 -1
- data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
- data/sig/openai/models/graders/score_model_grader.rbs +3 -3
- 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 +54 -66
- data/sig/openai/models/image_generate_params.rbs +23 -45
- data/sig/openai/models/image_model.rbs +6 -6
- 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/responses/response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +10 -0
- data/sig/openai/models/responses/responses_server_event.rbs +10 -0
- data/sig/openai/models/responses/tool.rbs +11 -15
- data/sig/openai/models/video_create_error.rbs +10 -0
- 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/sessions/turns/items.rbs +24 -0
- data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
- data/sig/openai/resources/webhooks.rbs +6 -1
- metadata +35 -1
|
@@ -27,10 +27,10 @@ module OpenAI
|
|
|
27
27
|
# The object type, which is always `score_model`.
|
|
28
28
|
attr_accessor type: :score_model
|
|
29
29
|
|
|
30
|
-
# The
|
|
30
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
31
31
|
attr_reader range: ::Array[Float]?
|
|
32
32
|
|
|
33
|
-
# The
|
|
33
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
34
34
|
def range=: (::Array[Float]) -> ::Array[Float]
|
|
35
35
|
|
|
36
36
|
# The sampling parameters for the model.
|
|
@@ -49,7 +49,7 @@ module OpenAI
|
|
|
49
49
|
# @param name
|
|
50
50
|
# The name of the grader.
|
|
51
51
|
# @param range
|
|
52
|
-
# The
|
|
52
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
53
53
|
# @param sampling_params
|
|
54
54
|
# The sampling parameters for the model.
|
|
55
55
|
# @param type
|
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
|
|
@@ -55,9 +52,10 @@ module OpenAI
|
|
|
55
52
|
# set the output format to `png` or `webp`.
|
|
56
53
|
attr_accessor background: OpenAI::Models::ImageEditParams::background?
|
|
57
54
|
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
# `gpt-image-
|
|
55
|
+
# Control how much effort the model will exert to match the style and features,
|
|
56
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
57
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
58
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
61
59
|
attr_accessor input_fidelity: OpenAI::Models::ImageEditParams::input_fidelity?
|
|
62
60
|
|
|
63
61
|
# An additional image whose fully transparent areas (e.g. where alpha is zero)
|
|
@@ -80,12 +78,11 @@ module OpenAI
|
|
|
80
78
|
# content type.
|
|
81
79
|
def mask=: (OpenAI::Internal::file_input) -> OpenAI::Internal::file_input
|
|
82
80
|
|
|
83
|
-
# The model to use for image
|
|
84
|
-
#
|
|
85
|
-
# `gpt-image-2-
|
|
86
|
-
# `gpt-image-2.5-
|
|
87
|
-
# `
|
|
88
|
-
# `gpt-image-1.5`.
|
|
81
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
82
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
83
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
84
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
85
|
+
# `chatgpt-image-latest`).
|
|
89
86
|
attr_accessor model: OpenAI::Models::ImageEditParams::model?
|
|
90
87
|
|
|
91
88
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -115,24 +112,21 @@ module OpenAI
|
|
|
115
112
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
116
113
|
attr_accessor quality: OpenAI::Models::ImageEditParams::quality?
|
|
117
114
|
|
|
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.
|
|
115
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
116
|
+
# image models, which always return base64-encoded images.
|
|
122
117
|
attr_accessor response_format: OpenAI::Models::ImageEditParams::response_format?
|
|
123
118
|
|
|
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`.
|
|
119
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
120
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
121
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
122
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
123
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
124
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
125
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
126
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
127
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
128
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
129
|
+
# models that allow automatic sizing.
|
|
136
130
|
attr_accessor size: OpenAI::Models::ImageEditParams::size?
|
|
137
131
|
|
|
138
132
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -155,15 +149,12 @@ module OpenAI
|
|
|
155
149
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
156
150
|
# images.
|
|
157
151
|
#
|
|
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
152
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
162
153
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
163
154
|
# content type.
|
|
164
155
|
# @param prompt
|
|
165
|
-
# A text description of the desired image(s). The maximum length is
|
|
166
|
-
# characters for
|
|
156
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
157
|
+
# characters for the GPT image models.
|
|
167
158
|
# @param background
|
|
168
159
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
169
160
|
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
@@ -175,9 +166,10 @@ module OpenAI
|
|
|
175
166
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
176
167
|
# set the output format to `png` or `webp`.
|
|
177
168
|
# @param input_fidelity
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
# `gpt-image-
|
|
169
|
+
# Control how much effort the model will exert to match the style and features,
|
|
170
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
171
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
172
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
181
173
|
# @param mask
|
|
182
174
|
# An additional image whose fully transparent areas (e.g. where alpha is zero)
|
|
183
175
|
# indicate where `image` should be edited. If there are multiple images provided,
|
|
@@ -188,12 +180,11 @@ module OpenAI
|
|
|
188
180
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
189
181
|
# content type.
|
|
190
182
|
# @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`.
|
|
183
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
184
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
185
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
186
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
187
|
+
# `chatgpt-image-latest`).
|
|
197
188
|
# @param n
|
|
198
189
|
# The number of images to generate. Must be between 1 and 10.
|
|
199
190
|
# @param output_compression
|
|
@@ -217,23 +208,20 @@ module OpenAI
|
|
|
217
208
|
# `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
|
|
218
209
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
219
210
|
# @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.
|
|
211
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
212
|
+
# image models, which always return base64-encoded images.
|
|
224
213
|
# @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`.
|
|
214
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
215
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
216
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
217
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
218
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
219
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
220
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
221
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
222
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
223
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
224
|
+
# models that allow automatic sizing.
|
|
237
225
|
# @param user
|
|
238
226
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
239
227
|
# and detect abuse.
|
|
@@ -328,18 +316,18 @@ module OpenAI
|
|
|
328
316
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::output_format]
|
|
329
317
|
end
|
|
330
318
|
|
|
331
|
-
type quality = :
|
|
319
|
+
type quality = :low | :medium | :high | :xhigh | :max | :auto | :standard
|
|
332
320
|
|
|
333
321
|
module Quality
|
|
334
322
|
extend OpenAI::Internal::Type::Enum
|
|
335
323
|
|
|
336
|
-
STANDARD: :standard
|
|
337
324
|
LOW: :low
|
|
338
325
|
MEDIUM: :medium
|
|
339
326
|
HIGH: :high
|
|
340
327
|
XHIGH: :xhigh
|
|
341
328
|
MAX: :max
|
|
342
329
|
AUTO: :auto
|
|
330
|
+
STANDARD: :standard
|
|
343
331
|
|
|
344
332
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::quality]
|
|
345
333
|
end
|
|
@@ -357,24 +345,24 @@ module OpenAI
|
|
|
357
345
|
|
|
358
346
|
type size =
|
|
359
347
|
String
|
|
360
|
-
| :"256x256"
|
|
361
|
-
| :"512x512"
|
|
362
348
|
| :"1024x1024"
|
|
363
349
|
| :"1536x1024"
|
|
364
350
|
| :"1024x1536"
|
|
365
351
|
| :auto
|
|
352
|
+
| :"256x256"
|
|
353
|
+
| :"512x512"
|
|
366
354
|
|
|
367
355
|
module Size
|
|
368
356
|
extend OpenAI::Internal::Type::Union
|
|
369
357
|
|
|
370
358
|
def self?.variants: -> ::Array[OpenAI::Models::ImageEditParams::size]
|
|
371
359
|
|
|
372
|
-
SIZE_256X256: :"256x256"
|
|
373
|
-
SIZE_512X512: :"512x512"
|
|
374
360
|
SIZE_1024X1024: :"1024x1024"
|
|
375
361
|
SIZE_1536X1024: :"1536x1024"
|
|
376
362
|
SIZE_1024X1536: :"1024x1536"
|
|
377
363
|
AUTO: :auto
|
|
364
|
+
SIZE_256X256: :"256x256"
|
|
365
|
+
SIZE_512X512: :"512x512"
|
|
378
366
|
end
|
|
379
367
|
end
|
|
380
368
|
end
|
|
@@ -23,8 +23,7 @@ module OpenAI
|
|
|
23
23
|
include OpenAI::Internal::Type::RequestParameters
|
|
24
24
|
|
|
25
25
|
# A text description of the desired image(s). The maximum length is 32000
|
|
26
|
-
# characters
|
|
27
|
-
# characters for `dall-e-3`.
|
|
26
|
+
# characters.
|
|
28
27
|
attr_accessor prompt: String
|
|
29
28
|
|
|
30
29
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
@@ -38,12 +37,11 @@ module OpenAI
|
|
|
38
37
|
# set the output format to `png` or `webp`.
|
|
39
38
|
attr_accessor background: OpenAI::Models::ImageGenerateParams::background?
|
|
40
39
|
|
|
41
|
-
# The model to use for image generation.
|
|
42
|
-
#
|
|
43
|
-
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
40
|
+
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
41
|
+
# Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
42
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
44
43
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
45
|
-
# `gpt-image-2.5-flare-2026-09-08
|
|
46
|
-
# specific to the GPT image models is used.
|
|
44
|
+
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
47
45
|
attr_accessor model: OpenAI::Models::ImageGenerateParams::model?
|
|
48
46
|
|
|
49
47
|
# Control the content-moderation level for images generated by the GPT image
|
|
@@ -51,8 +49,7 @@ module OpenAI
|
|
|
51
49
|
# value).
|
|
52
50
|
attr_accessor moderation: OpenAI::Models::ImageGenerateParams::moderation?
|
|
53
51
|
|
|
54
|
-
# The number of images to generate. Must be between 1 and 10.
|
|
55
|
-
# `n=1` is supported.
|
|
52
|
+
# The number of images to generate. Must be between 1 and 10.
|
|
56
53
|
attr_accessor n: Integer?
|
|
57
54
|
|
|
58
55
|
# The compression level (0-100%) for the generated images. This parameter is only
|
|
@@ -79,13 +76,9 @@ module OpenAI
|
|
|
79
76
|
# - `high`, `medium` and `low` are supported for the GPT image models.
|
|
80
77
|
# - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
81
78
|
# `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
82
|
-
# - `hd` and `standard` are supported for `dall-e-3`.
|
|
83
|
-
# - `standard` is the only option for `dall-e-2`.
|
|
84
79
|
attr_accessor quality: OpenAI::Models::ImageGenerateParams::quality?
|
|
85
80
|
|
|
86
|
-
#
|
|
87
|
-
# returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
|
|
88
|
-
# after the image has been generated. This parameter isn't supported for the GPT
|
|
81
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
89
82
|
# image models, which always return base64-encoded images.
|
|
90
83
|
attr_accessor response_format: OpenAI::Models::ImageGenerateParams::response_format?
|
|
91
84
|
|
|
@@ -98,15 +91,11 @@ module OpenAI
|
|
|
98
91
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
99
92
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
100
93
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
101
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
102
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
103
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
94
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
104
95
|
attr_accessor size: OpenAI::Models::ImageGenerateParams::size?
|
|
105
96
|
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
# towards generating hyper-real and dramatic images. Natural causes the model to
|
|
109
|
-
# produce more natural, less hyper-real looking images.
|
|
97
|
+
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
98
|
+
# models; describe the desired style in the prompt instead.
|
|
110
99
|
attr_accessor style: OpenAI::Models::ImageGenerateParams::style?
|
|
111
100
|
|
|
112
101
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -121,8 +110,7 @@ module OpenAI
|
|
|
121
110
|
|
|
122
111
|
# @param prompt
|
|
123
112
|
# A text description of the desired image(s). The maximum length is 32000
|
|
124
|
-
# characters
|
|
125
|
-
# characters for `dall-e-3`.
|
|
113
|
+
# characters.
|
|
126
114
|
# @param background
|
|
127
115
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
128
116
|
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
@@ -134,19 +122,17 @@ module OpenAI
|
|
|
134
122
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
135
123
|
# set the output format to `png` or `webp`.
|
|
136
124
|
# @param model
|
|
137
|
-
# The model to use for image generation.
|
|
138
|
-
#
|
|
139
|
-
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
125
|
+
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
126
|
+
# Supported models include `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
127
|
+
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
140
128
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
141
|
-
# `gpt-image-2.5-flare-2026-09-08
|
|
142
|
-
# specific to the GPT image models is used.
|
|
129
|
+
# `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`.
|
|
143
130
|
# @param moderation
|
|
144
131
|
# Control the content-moderation level for images generated by the GPT image
|
|
145
132
|
# models. Must be either `low` for less restrictive filtering or `auto` (default
|
|
146
133
|
# value).
|
|
147
134
|
# @param n
|
|
148
|
-
# The number of images to generate. Must be between 1 and 10.
|
|
149
|
-
# `n=1` is supported.
|
|
135
|
+
# The number of images to generate. Must be between 1 and 10.
|
|
150
136
|
# @param output_compression
|
|
151
137
|
# The compression level (0-100%) for the generated images. This parameter is only
|
|
152
138
|
# supported for the GPT image models with the `webp` or `jpeg` output formats, and
|
|
@@ -169,12 +155,8 @@ module OpenAI
|
|
|
169
155
|
# - `high`, `medium` and `low` are supported for the GPT image models.
|
|
170
156
|
# - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
171
157
|
# `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
172
|
-
# - `hd` and `standard` are supported for `dall-e-3`.
|
|
173
|
-
# - `standard` is the only option for `dall-e-2`.
|
|
174
158
|
# @param response_format
|
|
175
|
-
#
|
|
176
|
-
# returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
|
|
177
|
-
# after the image has been generated. This parameter isn't supported for the GPT
|
|
159
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
178
160
|
# image models, which always return base64-encoded images.
|
|
179
161
|
# @param size
|
|
180
162
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
@@ -186,14 +168,10 @@ module OpenAI
|
|
|
186
168
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
187
169
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
188
170
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
189
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
190
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
191
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
171
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
192
172
|
# @param style
|
|
193
|
-
#
|
|
194
|
-
#
|
|
195
|
-
# towards generating hyper-real and dramatic images. Natural causes the model to
|
|
196
|
-
# produce more natural, less hyper-real looking images.
|
|
173
|
+
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
174
|
+
# models; describe the desired style in the prompt instead.
|
|
197
175
|
# @param user
|
|
198
176
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
199
177
|
# and detect abuse.
|
|
@@ -276,19 +254,19 @@ module OpenAI
|
|
|
276
254
|
end
|
|
277
255
|
|
|
278
256
|
type quality =
|
|
279
|
-
:
|
|
257
|
+
:low | :medium | :high | :xhigh | :max | :auto | :standard | :hd
|
|
280
258
|
|
|
281
259
|
module Quality
|
|
282
260
|
extend OpenAI::Internal::Type::Enum
|
|
283
261
|
|
|
284
|
-
STANDARD: :standard
|
|
285
|
-
HD: :hd
|
|
286
262
|
LOW: :low
|
|
287
263
|
MEDIUM: :medium
|
|
288
264
|
HIGH: :high
|
|
289
265
|
XHIGH: :xhigh
|
|
290
266
|
MAX: :max
|
|
291
267
|
AUTO: :auto
|
|
268
|
+
STANDARD: :standard
|
|
269
|
+
HD: :hd
|
|
292
270
|
|
|
293
271
|
def self?.values: -> ::Array[OpenAI::Models::ImageGenerateParams::quality]
|
|
294
272
|
end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
module OpenAI
|
|
2
2
|
module Models
|
|
3
3
|
type image_model =
|
|
4
|
-
:"gpt-image-1"
|
|
5
|
-
| :"gpt-image-1-mini"
|
|
4
|
+
:"gpt-image-1.5"
|
|
6
5
|
| :"gpt-image-2"
|
|
7
6
|
| :"gpt-image-2-2026-04-21"
|
|
8
7
|
| :"gpt-image-2.5-sunburst"
|
|
9
8
|
| :"gpt-image-2.5-sunburst-2026-09-08"
|
|
10
9
|
| :"gpt-image-2.5-flare"
|
|
11
10
|
| :"gpt-image-2.5-flare-2026-09-08"
|
|
12
|
-
| :"gpt-image-1
|
|
11
|
+
| :"gpt-image-1"
|
|
12
|
+
| :"gpt-image-1-mini"
|
|
13
13
|
| :"chatgpt-image-latest"
|
|
14
14
|
| :"dall-e-2"
|
|
15
15
|
| :"dall-e-3"
|
|
@@ -17,15 +17,15 @@ module OpenAI
|
|
|
17
17
|
module ImageModel
|
|
18
18
|
extend OpenAI::Internal::Type::Enum
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
GPT_IMAGE_1_MINI: :"gpt-image-1-mini"
|
|
20
|
+
GPT_IMAGE_1_5: :"gpt-image-1.5"
|
|
22
21
|
GPT_IMAGE_2: :"gpt-image-2"
|
|
23
22
|
GPT_IMAGE_2_2026_04_21: :"gpt-image-2-2026-04-21"
|
|
24
23
|
GPT_IMAGE_2_5_SUNBURST: :"gpt-image-2.5-sunburst"
|
|
25
24
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08: :"gpt-image-2.5-sunburst-2026-09-08"
|
|
26
25
|
GPT_IMAGE_2_5_FLARE: :"gpt-image-2.5-flare"
|
|
27
26
|
GPT_IMAGE_2_5_FLARE_2026_09_08: :"gpt-image-2.5-flare-2026-09-08"
|
|
28
|
-
|
|
27
|
+
GPT_IMAGE_1: :"gpt-image-1"
|
|
28
|
+
GPT_IMAGE_1_MINI: :"gpt-image-1-mini"
|
|
29
29
|
CHATGPT_IMAGE_LATEST: :"chatgpt-image-latest"
|
|
30
30
|
DALL_E_2: :"dall-e-2"
|
|
31
31
|
DALL_E_3: :"dall-e-3"
|
|
@@ -39,16 +39,18 @@ module OpenAI
|
|
|
39
39
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
40
40
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
41
41
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
42
|
-
# model has responded with audio at least once.
|
|
43
|
-
#
|
|
42
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
43
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
44
|
+
# recommend `marin` and `cedar` for best quality.
|
|
44
45
|
attr_reader voice: OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice?
|
|
45
46
|
|
|
46
47
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
47
48
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
48
49
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
49
50
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
50
|
-
# model has responded with audio at least once.
|
|
51
|
-
#
|
|
51
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
52
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
53
|
+
# recommend `marin` and `cedar` for best quality.
|
|
52
54
|
def voice=: (
|
|
53
55
|
OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
|
|
54
56
|
) -> OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
|
|
@@ -68,8 +70,9 @@ module OpenAI
|
|
|
68
70
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
69
71
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
70
72
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
71
|
-
# model has responded with audio at least once.
|
|
72
|
-
#
|
|
73
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
74
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
75
|
+
# recommend `marin` and `cedar` for best quality.
|
|
73
76
|
def initialize: (
|
|
74
77
|
?format_: OpenAI::Models::Realtime::realtime_audio_formats,
|
|
75
78
|
?speed: Float,
|
|
@@ -38,16 +38,18 @@ module OpenAI
|
|
|
38
38
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
39
39
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
40
40
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
41
|
-
# model has responded with audio at least once.
|
|
42
|
-
#
|
|
41
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
42
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
43
|
+
# recommend `marin` and `cedar` for best quality.
|
|
43
44
|
attr_reader voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice?
|
|
44
45
|
|
|
45
46
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
46
47
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
47
48
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
48
49
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
49
|
-
# model has responded with audio at least once.
|
|
50
|
-
#
|
|
50
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
51
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
52
|
+
# recommend `marin` and `cedar` for best quality.
|
|
51
53
|
def voice=: (
|
|
52
54
|
OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
53
55
|
) -> OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
@@ -59,8 +61,9 @@ module OpenAI
|
|
|
59
61
|
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
60
62
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
61
63
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
62
|
-
# model has responded with audio at least once.
|
|
63
|
-
#
|
|
64
|
+
# model has responded with audio at least once. Custom voices must be created from
|
|
65
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
66
|
+
# recommend `marin` and `cedar` for best quality.
|
|
64
67
|
def initialize: (
|
|
65
68
|
?format_: OpenAI::Models::Realtime::realtime_audio_formats,
|
|
66
69
|
?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
@@ -13,7 +13,7 @@ module OpenAI
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
class ResponseComputerToolCallOutputItem < OpenAI::Internal::Type::BaseModel
|
|
16
|
-
# The
|
|
16
|
+
# The ID of the computer tool call output.
|
|
17
17
|
attr_accessor id: String
|
|
18
18
|
|
|
19
19
|
# The ID of the computer tool call that produced the output.
|
|
@@ -46,7 +46,7 @@ module OpenAI
|
|
|
46
46
|
def created_by=: (String) -> String
|
|
47
47
|
|
|
48
48
|
# @param id
|
|
49
|
-
# The
|
|
49
|
+
# The ID of the computer tool call output.
|
|
50
50
|
# @param call_id
|
|
51
51
|
# The ID of the computer tool call that produced the output.
|
|
52
52
|
# @param output
|