From 2ddc679c56a22fb10c3b2f163daad483d9edcfcc Mon Sep 17 00:00:00 2001 From: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com> Date: Tue, 8 Sep 2026 21:02:55 -0700 Subject: [PATCH] feat(api): expose image tool call metadata Castiron-Internal-PR: https://github.com/openai/openai-python-internal/pull/92 Castiron-Source-SHA: fdee0afe5445a2fa9587c4a89791ba78beae306a Castiron-Public-Base-SHA: 8011140bbeb771d56425602950875bf87beae39e --- .castiron.stats.yml | 14 +- api_reference/openapi.transformed.yml | 1020 ++++++++++------- .../admin/organization/audit_logs.py | 4 +- .../admin/organization/projects/projects.py | 8 +- .../service_accounts/service_accounts.py | 16 + src/openai/resources/audio/speech.py | 10 +- src/openai/resources/audio/transcriptions.py | 24 +- src/openai/resources/audio/translations.py | 4 +- src/openai/resources/batches.py | 10 +- src/openai/resources/beta/assistants.py | 72 +- .../resources/beta/responses/input_tokens.py | 24 +- .../resources/beta/responses/responses.py | 618 +++++----- .../resources/beta/threads/runs/runs.py | 186 +-- .../resources/beta/threads/runs/steps.py | 8 +- src/openai/resources/beta/threads/threads.py | 148 +-- .../resources/chat/completions/completions.py | 540 ++++----- src/openai/resources/completions.py | 174 +-- .../resources/content_provenance_checks.py | 4 +- src/openai/resources/conversations/items.py | 8 +- src/openai/resources/embeddings.py | 20 +- src/openai/resources/evals/evals.py | 4 +- src/openai/resources/files.py | 20 +- .../resources/fine_tuning/alpha/graders.py | 18 +- .../fine_tuning/checkpoints/permissions.py | 24 +- src/openai/resources/fine_tuning/jobs/jobs.py | 38 +- src/openai/resources/images.py | 64 +- src/openai/resources/moderations.py | 12 +- src/openai/resources/realtime/calls.py | 4 +- .../resources/realtime/client_secrets.py | 4 +- src/openai/resources/realtime/realtime.py | 4 +- .../resources/responses/input_tokens.py | 24 +- src/openai/resources/responses/responses.py | 618 +++++----- src/openai/resources/uploads/parts.py | 18 +- src/openai/resources/uploads/uploads.py | 40 +- .../resources/vector_stores/file_batches.py | 24 +- src/openai/resources/vector_stores/files.py | 24 +- .../resources/vector_stores/vector_stores.py | 12 +- .../organization/audit_log_list_params.py | 2 +- .../organization/project_create_params.py | 4 +- .../organization/projects/project_api_key.py | 6 + .../projects/service_account_create_params.py | 9 + .../service_account_create_response.py | 6 + .../types/audio/speech_create_params.py | 5 +- .../audio/transcription_create_params.py | 7 +- .../audio/transcription_text_delta_event.py | 4 +- .../audio/transcription_text_done_event.py | 4 +- .../audio/transcription_text_segment_event.py | 2 +- .../types/audio/translation_create_params.py | 3 +- src/openai/types/batch.py | 4 +- src/openai/types/batch_create_params.py | 5 +- src/openai/types/batch_usage.py | 2 +- src/openai/types/beta/assistant.py | 24 +- .../types/beta/assistant_create_params.py | 36 +- .../types/beta/assistant_stream_event.py | 78 +- .../types/beta/assistant_update_params.py | 26 +- src/openai/types/beta/beta_computer_tool.py | 2 +- .../types/beta/beta_computer_tool_param.py | 2 +- .../beta/beta_computer_use_preview_tool.py | 2 +- .../beta_computer_use_preview_tool_param.py | 2 +- src/openai/types/beta/beta_custom_tool.py | 2 +- .../types/beta/beta_custom_tool_param.py | 2 +- .../types/beta/beta_file_search_tool.py | 2 +- .../types/beta/beta_file_search_tool_param.py | 2 +- src/openai/types/beta/beta_function_tool.py | 2 +- .../types/beta/beta_function_tool_param.py | 2 +- src/openai/types/beta/beta_response.py | 57 +- .../beta/beta_response_compaction_item.py | 2 +- .../beta_response_compaction_item_param.py | 2 +- ...ta_response_compaction_item_param_param.py | 2 +- .../beta/beta_response_computer_tool_call.py | 2 +- .../beta_response_computer_tool_call_param.py | 2 +- .../beta_response_file_search_tool_call.py | 2 +- ...ta_response_file_search_tool_call_param.py | 2 +- ...response_format_text_json_schema_config.py | 4 +- ...se_format_text_json_schema_config_param.py | 4 +- .../beta/beta_response_function_tool_call.py | 2 +- .../beta_response_function_tool_call_item.py | 2 +- .../beta_response_function_tool_call_param.py | 2 +- .../beta/beta_response_function_web_search.py | 2 +- ...beta_response_function_web_search_param.py | 2 +- .../types/beta/beta_response_input_image.py | 2 +- .../beta/beta_response_input_image_content.py | 2 +- ...beta_response_input_image_content_param.py | 2 +- .../beta/beta_response_input_image_param.py | 2 +- .../types/beta/beta_response_input_item.py | 12 + .../beta/beta_response_input_item_param.py | 12 + .../types/beta/beta_response_input_param.py | 12 + src/openai/types/beta/beta_response_item.py | 12 + .../types/beta/beta_response_output_item.py | 12 + src/openai/types/beta/beta_response_prompt.py | 2 +- .../types/beta/beta_response_prompt_param.py | 2 +- .../beta/beta_response_reasoning_item.py | 2 +- .../beta_response_reasoning_item_param.py | 2 +- .../types/beta/beta_response_text_config.py | 6 +- .../beta/beta_response_text_config_param.py | 6 +- src/openai/types/beta/beta_response_usage.py | 6 +- .../types/beta/beta_responses_client_event.py | 75 +- .../beta/beta_responses_client_event_param.py | 75 +- src/openai/types/beta/beta_tool.py | 4 +- .../types/beta/beta_tool_choice_types.py | 4 +- .../beta/beta_tool_choice_types_param.py | 4 +- src/openai/types/beta/beta_tool_param.py | 4 +- .../beta/beta_web_search_preview_tool.py | 2 +- .../beta_web_search_preview_tool_param.py | 2 +- src/openai/types/beta/beta_web_search_tool.py | 2 +- .../types/beta/beta_web_search_tool_param.py | 2 +- src/openai/types/beta/file_search_tool.py | 6 +- .../types/beta/file_search_tool_param.py | 6 +- .../types/beta/response_compact_params.py | 21 +- .../types/beta/response_create_params.py | 77 +- .../types/beta/response_retrieve_params.py | 4 +- .../responses/input_token_count_params.py | 22 +- src/openai/types/beta/thread.py | 10 +- .../beta/thread_create_and_run_params.py | 54 +- src/openai/types/beta/thread_create_params.py | 23 +- src/openai/types/beta/thread_update_params.py | 8 +- src/openai/types/beta/threads/image_file.py | 6 +- .../beta/threads/image_file_content_block.py | 2 +- .../threads/image_file_content_block_param.py | 2 +- .../types/beta/threads/image_file_delta.py | 6 +- .../beta/threads/image_file_delta_block.py | 2 +- .../types/beta/threads/image_file_param.py | 6 +- src/openai/types/beta/threads/message.py | 10 +- .../required_action_function_tool_call.py | 2 +- src/openai/types/beta/threads/run.py | 33 +- .../types/beta/threads/run_create_params.py | 31 +- .../runs/code_interpreter_output_image.py | 4 +- .../runs/code_interpreter_tool_call.py | 4 +- .../beta/threads/runs/function_tool_call.py | 3 +- .../threads/runs/function_tool_call_delta.py | 3 +- .../types/beta/threads/runs/run_step.py | 11 +- .../beta/threads/runs/step_list_params.py | 2 +- .../beta/threads/runs/step_retrieve_params.py | 2 +- src/openai/types/chat/chat_completion.py | 16 +- ...chat_completion_assistant_message_param.py | 4 +- .../types/chat/chat_completion_audio.py | 2 +- .../types/chat/chat_completion_audio_param.py | 2 +- .../types/chat/chat_completion_chunk.py | 18 +- .../chat_completion_content_part_image.py | 6 +- ...hat_completion_content_part_image_param.py | 6 +- ...mpletion_content_part_input_audio_param.py | 4 +- .../chat_completion_content_part_param.py | 2 +- .../chat/chat_completion_content_part_text.py | 4 +- ...chat_completion_content_part_text_param.py | 4 +- .../types/chat/chat_completion_message.py | 4 +- .../types/chat/completion_create_params.py | 86 +- src/openai/types/completion_create_params.py | 29 +- .../types/conversations/conversation_item.py | 12 + .../types/conversations/item_create_params.py | 2 +- .../conversations/item_retrieve_params.py | 2 +- src/openai/types/embedding.py | 2 +- src/openai/types/embedding_create_params.py | 10 +- ...create_eval_completions_run_data_source.py | 4 +- ..._eval_completions_run_data_source_param.py | 4 +- src/openai/types/evals/run_cancel_response.py | 23 +- src/openai/types/evals/run_create_params.py | 23 +- src/openai/types/evals/run_create_response.py | 23 +- src/openai/types/evals/run_list_response.py | 23 +- .../types/evals/run_retrieve_response.py | 23 +- .../fine_tuning/alpha/grader_run_params.py | 9 +- .../types/fine_tuning/fine_tuning_job.py | 6 +- .../types/fine_tuning/job_create_params.py | 15 +- .../types/graders/score_model_grader.py | 2 +- .../types/graders/score_model_grader_param.py | 2 +- .../types/image_create_variation_params.py | 2 +- src/openai/types/image_edit_params.py | 6 +- src/openai/types/image_generate_params.py | 6 +- src/openai/types/moderation_create_params.py | 4 +- .../types/realtime/audio_transcription.py | 2 +- .../realtime/audio_transcription_param.py | 2 +- .../types/realtime/call_accept_params.py | 2 +- .../output_audio_buffer_clear_event.py | 2 +- .../output_audio_buffer_clear_event_param.py | 2 +- .../realtime/realtime_audio_config_input.py | 2 +- .../realtime_audio_config_input_param.py | 2 +- .../realtime_response_create_mcp_tool.py | 4 +- ...realtime_response_create_mcp_tool_param.py | 4 +- .../realtime_response_create_params.py | 2 +- .../realtime_response_create_params_param.py | 2 +- .../types/realtime/realtime_server_event.py | 6 +- .../realtime_session_create_request.py | 2 +- .../realtime_session_create_request_param.py | 2 +- .../realtime_session_create_response.py | 6 +- .../realtime/realtime_tools_config_param.py | 4 +- .../realtime/realtime_tools_config_union.py | 4 +- .../realtime_tools_config_union_param.py | 4 +- ...ltime_transcription_session_audio_input.py | 2 +- ...transcription_session_audio_input_param.py | 2 +- src/openai/types/responses/computer_tool.py | 2 +- .../types/responses/computer_tool_param.py | 2 +- .../responses/computer_use_preview_tool.py | 2 +- .../computer_use_preview_tool_param.py | 2 +- src/openai/types/responses/custom_tool.py | 2 +- .../types/responses/custom_tool_param.py | 2 +- .../types/responses/file_search_tool.py | 2 +- .../types/responses/file_search_tool_param.py | 2 +- src/openai/types/responses/function_tool.py | 2 +- .../types/responses/function_tool_param.py | 2 +- .../responses/input_token_count_params.py | 18 +- src/openai/types/responses/response.py | 53 +- .../responses/response_compact_params.py | 21 +- .../responses/response_compaction_item.py | 2 +- .../response_compaction_item_param.py | 2 +- .../response_compaction_item_param_param.py | 2 +- .../responses/response_computer_tool_call.py | 2 +- .../response_computer_tool_call_param.py | 2 +- .../types/responses/response_create_params.py | 73 +- .../response_file_search_tool_call.py | 2 +- .../response_file_search_tool_call_param.py | 2 +- ...response_format_text_json_schema_config.py | 4 +- ...se_format_text_json_schema_config_param.py | 4 +- .../responses/response_function_tool_call.py | 2 +- .../response_function_tool_call_item.py | 2 +- .../response_function_tool_call_param.py | 2 +- .../responses/response_function_web_search.py | 2 +- .../response_function_web_search_param.py | 2 +- .../types/responses/response_input_image.py | 2 +- .../responses/response_input_image_content.py | 2 +- .../response_input_image_content_param.py | 2 +- .../responses/response_input_image_param.py | 2 +- .../types/responses/response_input_item.py | 12 + .../responses/response_input_item_param.py | 12 + .../types/responses/response_input_param.py | 12 + src/openai/types/responses/response_item.py | 12 + .../types/responses/response_output_item.py | 12 + src/openai/types/responses/response_prompt.py | 2 +- .../types/responses/response_prompt_param.py | 2 +- .../responses/response_reasoning_item.py | 2 +- .../response_reasoning_item_param.py | 2 +- .../responses/response_retrieve_params.py | 4 +- .../types/responses/response_text_config.py | 6 +- .../responses/response_text_config_param.py | 6 +- src/openai/types/responses/response_usage.py | 6 +- .../types/responses/responses_client_event.py | 71 +- .../responses/responses_client_event_param.py | 71 +- src/openai/types/responses/tool.py | 4 +- .../types/responses/tool_choice_types.py | 4 +- .../responses/tool_choice_types_param.py | 4 +- src/openai/types/responses/tool_param.py | 4 +- .../responses/web_search_preview_tool.py | 2 +- .../web_search_preview_tool_param.py | 2 +- src/openai/types/responses/web_search_tool.py | 2 +- .../types/responses/web_search_tool_param.py | 2 +- .../types/shared/function_definition.py | 6 +- src/openai/types/shared/reasoning.py | 4 +- .../shared/response_format_json_schema.py | 4 +- .../shared/response_format_text_grammar.py | 2 +- .../shared/response_format_text_python.py | 2 +- .../shared_params/function_definition.py | 6 +- src/openai/types/shared_params/reasoning.py | 4 +- .../response_format_json_schema.py | 4 +- src/openai/types/upload.py | 2 +- src/openai/types/upload_create_params.py | 2 +- .../types/vector_store_create_params.py | 6 +- .../vector_stores/file_batch_create_params.py | 18 +- .../types/vector_stores/file_create_params.py | 6 +- .../types/vector_stores/vector_store_file.py | 4 +- .../vector_stores/vector_store_file_batch.py | 4 +- .../live_call_incoming_webhook_event.py | 6 +- .../realtime_call_incoming_webhook_event.py | 6 +- .../projects/test_service_accounts.py | 6 +- 261 files changed, 3174 insertions(+), 2675 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 7ecbbca4e2..ba6e773864 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: c48dfb66-88a5-4465-96d1-0585b9ab8215 -openapi_spec_hash: 0ac5ea4ab2546a188a36a0d370367637 -openapi_transformed_spec_hash: 6be6c39576ec27111cab26c251d2ab65 -config_hash: d92ec885ac2a08b6a4c1ff90420f0327 -codegen_sha: 9a9f8502cf7f372b0bc13c052819b78d02991ca5 -codegen_hash: 82d1c3235b99cb90187912ae7dd653fba230efd59dbf3c947b6c522a1a801d85 -public_codegen_sha: db47bcd202616d35b583b2433270b565be76233a +generation_id: 1670408c-d420-4fc4-a01f-8029bcfddd8f +openapi_spec_hash: 0cb51423f74235e850a5f1961f31c167 +openapi_transformed_spec_hash: 70d190d2b54dd216f7280d9fd94363f0 +config_hash: d7b82262337a543ff59106e4a32ead4e +codegen_sha: 59cbf1b4a77048cf3aa292025babbbce62d21906 +codegen_hash: 4733330f060c261cc079b28b2044c0ef7c7d0adeaa5333a33a121c9c1b2b8b27 +public_codegen_sha: 2600257f8c5960d6d1c52ebed8ac8e878ea62e49 diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 1cc46fbb40..2e688d6e60 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -2817,21 +2817,21 @@ paths: "system_fingerprint": null } description: | - **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses) + **Starting a new project?** We recommend trying [Responses](https://developers.openai.com/api/reference/resources/responses) to take advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision), - and [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), [vision](https://developers.openai.com/api/docs/guides/images-vision), + and [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. @@ -3752,7 +3752,7 @@ paths: $ref: '#/components/schemas/IncludeEnum' description: | Additional fields to include in the response. See the `include` - parameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. + parameter for [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. requestBody: required: true content: @@ -4057,7 +4057,7 @@ paths: $ref: '#/components/schemas/IncludeEnum' description: | Additional fields to include in the response. See the `include` - parameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. + parameter for [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. responses: '200': description: OK @@ -4620,7 +4620,7 @@ paths: description: | Create the structure of an evaluation that can be used to test a model's performance. An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. - For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + For more information, see the [Evals guide](https://developers.openai.com/api/docs/guides/evals). /evals/{eval_id}: get: operationId: getEval @@ -6210,18 +6210,18 @@ paths: user. - The Assistants API supports files up to 2 million tokens and of specific - file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + file types. See the [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for details. - The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models. + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models. - The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required - [format](https://platform.openai.com/docs/api-reference/batch/request-input). + [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). - For Retrieval or `file_search` ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use - [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) instead of attaching them one by one. Vector store attachment has separate limits from file upload, including 2,000 attached files per minute per organization. @@ -6746,7 +6746,7 @@ paths: "has_more": false } description: | - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. post: @@ -6801,7 +6801,7 @@ paths: "has_more": false } description: | - **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** Calling this endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). This enables organization owners to share fine-tuned models with other projects in their organization. /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}: @@ -6849,7 +6849,7 @@ paths: "deleted": true } description: | - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. /fine_tuning/jobs: @@ -7256,7 +7256,7 @@ paths: Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) get: operationId: listPaginatedFineTuningJobs tags: @@ -7432,7 +7432,7 @@ paths: description: | Get info about a fine-tuning job. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) /fine_tuning/jobs/{fine_tuning_job_id}/cancel: post: operationId: cancelFineTuningJob @@ -8105,7 +8105,7 @@ paths: event: image_generation.completed data: {"type":"image_generation.completed","b64_json":"...","usage":{"total_tokens":100,"input_tokens":50,"output_tokens":50,"input_tokens_details":{"text_tokens":10,"image_tokens":40}}} description: | - Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + Creates an image given a prompt. [Learn more](https://developers.openai.com/api/docs/guides/images-vision). /images/variations: post: operationId: createImageVariation @@ -8635,7 +8635,7 @@ paths: } description: | Classifies if text and/or image inputs are potentially harmful. Learn - more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + more in [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). /organization/admin_api_keys: get: security: @@ -8910,7 +8910,7 @@ paths: type: string - name: event_types[] in: query - description: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + description: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). required: false schema: type: array @@ -16103,7 +16103,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: true @@ -16149,10 +16149,10 @@ paths: type: string description: |- The identifier for the call. For SIP calls, use the value provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. For WebRTC sessions, reuse the call ID returned in the `Location` header when creating the call with - [`POST /v1/realtime/calls`](https://platform.openai.com/docs/api-reference/realtime/create-call). + [`POST /v1/realtime/calls`](https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create). responses: '200': description: Call hangup initiated successfully. @@ -16182,7 +16182,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: true @@ -16220,7 +16220,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: false @@ -16341,7 +16341,7 @@ paths: applied to any sessions created using that client secret, but these can also be overridden by the client connection. - [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. /realtime/sessions: @@ -17727,12 +17727,12 @@ paths: "metadata": {} } description: | - Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) - or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call - your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in - [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data + Creates a model response. Provide [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to generate [text](https://developers.openai.com/api/docs/guides/text) + or [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) outputs. Have the model call + your own [custom code](https://developers.openai.com/api/docs/guides/function-calling) or use built-in + [tools](https://developers.openai.com/api/docs/guides/tools) like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search) to use your own data as input for the model's response. /responses/{response_id}: get: @@ -17764,7 +17764,7 @@ paths: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. - in: query name: starting_after @@ -18027,7 +18027,10 @@ paths: "user": null, "metadata": {} } - description: "Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled. \n[Learn more](https://platform.openai.com/docs/guides/background).\n" + description: | + Cancels a model response with the given ID. Only responses created with + the `background` parameter set to `true` can be cancelled. + [Learn more](https://developers.openai.com/api/docs/guides/background). /responses/{response_id}/input_items: get: operationId: listInputItems @@ -18844,7 +18847,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong to. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) the messages belong to. - name: limit in: query description: | @@ -18982,7 +18985,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message for. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to create a message for. requestBody: required: true content: @@ -19072,7 +19075,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to which this message belongs. - in: path name: message_id required: true @@ -19523,7 +19526,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -19872,7 +19875,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. - in: path name: run_id required: true @@ -19975,7 +19978,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. - in: path name: run_id required: true @@ -20248,7 +20251,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -20364,7 +20367,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -20455,7 +20458,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to which this run belongs. - in: path name: run_id required: true @@ -20748,7 +20751,26 @@ paths: "status": "pending", "expires_at": 1719127296 } - description: "Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object\nthat you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.\nCurrently, an Upload can accept at most 8 GB in total and expires after an\nhour after you create it.\n\nOnce you complete the Upload, we will create a\n[File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts\nyou uploaded. This File is usable in the rest of our platform as a regular\nFile object.\n\nFor certain `purpose` values, the correct `mime_type` must be specified. \nPlease refer to documentation for the \n[supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).\n\nFor guidance on the proper filename extensions for each purpose, please\nfollow the documentation on [creating a\nFile](https://platform.openai.com/docs/api-reference/files/create).\n\nReturns the Upload object with status `pending`.\n" + description: | + Creates an intermediate [Upload](https://developers.openai.com/api/reference/resources/uploads) object + that you can add [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) to. + Currently, an Upload can accept at most 8 GB in total and expires after an + hour after you create it. + + Once you complete the Upload, we will create a + [File](https://developers.openai.com/api/reference/resources/files) object that contains all the parts + you uploaded. This File is usable in the rest of our platform as a regular + File object. + + For certain `purpose` values, the correct `mime_type` must be specified. + Please refer to documentation for the + [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). + + For guidance on the proper filename extensions for each purpose, please + follow the documentation on [creating a + File](https://developers.openai.com/api/reference/resources/files/methods/create). + + Returns the Upload object with status `pending`. /uploads/{upload_id}/cancel: post: operationId: cancelUpload @@ -20851,7 +20873,15 @@ paths: "purpose": "fine-tune", } } - description: "Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.\nReturns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.\n" + description: | + Completes the [Upload](https://developers.openai.com/api/reference/resources/uploads). + + Within the returned Upload object, there is a nested [File](https://developers.openai.com/api/reference/resources/files) object that is ready to use in the rest of the platform. + + You can specify the order of the Parts by passing in an ordered list of the Part IDs. + + The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. /uploads/{upload_id}/parts: post: operationId: addUploadPart @@ -20895,7 +20925,12 @@ paths: "created_at": 1719185911, "upload_id": "upload_abc123" } - description: "Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).\n" + description: | + Adds a [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) to an [Upload](https://developers.openai.com/api/reference/resources/uploads) object. A Part represents a chunk of bytes from the file you are trying to upload. + + Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. + + It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). /vector_stores: get: operationId: listVectorStores @@ -21797,7 +21832,7 @@ paths: tags: - Vector stores summary: Create vector store file - description: Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + description: Create a vector store file by attaching a [File](https://developers.openai.com/api/reference/resources/files) to a [vector store](https://developers.openai.com/api/reference/resources/vector_stores). parameters: - in: path name: vector_store_id @@ -22009,7 +22044,7 @@ paths: object: "vector_store.file.deleted", deleted: true } - description: Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://platform.openai.com/docs/api-reference/files/delete) endpoint. + description: Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) endpoint. post: operationId: updateVectorStoreFileAttributes tags: @@ -22860,7 +22895,7 @@ paths: name: Create content provenance check group: content_provenance_checks description: |- - Check whether an image or audio file contains known OpenAI provenance signals. [Learn more about content provenance](/api/docs/guides/content-provenance). + Check whether an image or audio file contains known OpenAI provenance signals. [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). If `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the metadata was stripped or has evidence of tampering, the watermark was degraded, it comes from a legacy generation model, or it was created before provenance signals were available. Content could also still be AI-generated by another company's model, which the tool currently does not detect. /videos: @@ -23882,7 +23917,7 @@ paths: description: |- Compact a conversation. Returns a compacted response object. - Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + Learn when and how to compact long-running conversations in the [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). /skills: post: tags: @@ -26192,12 +26227,12 @@ paths: enum: - responses_multi_agent=v1 description: | - Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) - or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call - your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in - [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data + Creates a model response. Provide [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to generate [text](https://developers.openai.com/api/docs/guides/text) + or [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) outputs. Have the model call + your own [custom code](https://developers.openai.com/api/docs/guides/function-calling) or use built-in + [tools](https://developers.openai.com/api/docs/guides/tools) like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search) to use your own data as input for the model's response. /responses/{response_id}?beta=true: get: @@ -26229,7 +26264,7 @@ paths: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. - in: query name: starting_after @@ -26531,7 +26566,10 @@ paths: "user": null, "metadata": {} } - description: "Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled. \n[Learn more](https://platform.openai.com/docs/guides/background).\n" + description: | + Cancels a model response with the given ID. Only responses created with + the `background` parameter set to `true` can be cancelled. + [Learn more](https://developers.openai.com/api/docs/guides/background). /responses/compact?beta=true: post: summary: Compact a response @@ -26702,7 +26740,7 @@ paths: description: |- Compact a conversation. Returns a compacted response object. - Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + Learn when and how to compact long-running conversations in the [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). /responses/{response_id}/input_items?beta=true: get: operationId: beta_listInputItems @@ -27414,7 +27452,7 @@ components: - type: 'null' model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. type: string instructions: anyOf: @@ -27443,7 +27481,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -27454,7 +27492,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -27538,7 +27576,7 @@ components: `thread.message.completed` event. We may add additional events over time, so we recommend handling unknown events gracefully - in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to + in your code. See the [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn how to integrate the Assistants API with streaming. x-oaiMeta: name: Assistant stream events @@ -27630,7 +27668,7 @@ components: description: | The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive. - Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. ranking_options: $ref: '#/components/schemas/FileSearchRankingOptions' required: @@ -27664,9 +27702,9 @@ components: - function AssistantsApiResponseFormatOption: description: | - Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Specifies the format that the model must output. Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. - Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -27773,7 +27811,7 @@ components: description: | An optional text to guide the model's style or continue a previous audio segment. - For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + For `whisper-1`, the [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. delay: @@ -28883,7 +28921,7 @@ components: Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model - guide](https://platform.openai.com/docs/models) to browse and compare available models. + guide](https://developers.openai.com/api/docs/models) to browse and compare available models. errors: type: object properties: @@ -28974,7 +29012,7 @@ components: type: integer description: | The number of tokens that were retrieved from the cache. [More on - prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). required: - cached_tokens output_tokens: @@ -29543,7 +29581,7 @@ components: `["text"]` - The `gpt-4o-audio-preview` model can also be used to [generate audio](https://platform.openai.com/docs/guides/audio). To + The `gpt-4o-audio-preview` model can also be used to [generate audio](https://developers.openai.com/api/docs/guides/audio). To request that this model generate both text and audio responses, you can use: @@ -29701,7 +29739,7 @@ components: - type: object description: | Data about a previous audio response from the model. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - id properties: @@ -29810,7 +29848,7 @@ components: type: object title: Audio content part description: | - Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). properties: type: type: string @@ -29846,7 +29884,7 @@ components: type: object title: File content part description: | - Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation. properties: type: type: string @@ -29859,10 +29897,14 @@ components: properties: filename: type: string - description: "The name of the file, used when passing the file to the model as a \nstring.\n" + description: | + The name of the file, used when passing the file to the model as a + string. file_data: type: string - description: "The base64 encoded file data, used when passing the file to the model \nas a string.\n" + description: | + The base64 encoded file data, used when passing the file to the model + as a string. file_id: type: string description: | @@ -29884,7 +29926,7 @@ components: type: object title: Image content part description: | - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). properties: type: type: string @@ -29901,7 +29943,7 @@ components: format: uri detail: type: string - description: Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + description: Specifies the detail level of the image. Learn more in the [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). enum: - auto - low @@ -29937,7 +29979,7 @@ components: type: object title: Text content part description: | - Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). properties: type: type: string @@ -30044,7 +30086,7 @@ components: description: The text contents of the message. title: Text content - type: array - description: An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs. + description: An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs. title: Array of content parts items: $ref: '#/components/schemas/ChatCompletionRequestUserMessageContentPart' @@ -30092,7 +30134,7 @@ components: type: array description: | Annotations for the message, when applicable, as when using the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). items: type: object description: | @@ -30154,7 +30196,7 @@ components: - type: object description: | If the audio output modality is requested, this object contains data - about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). + about the audio response from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - id - expires_at @@ -30706,7 +30748,7 @@ components: title: Computer tool call description: | A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. properties: type: type: string @@ -31010,7 +31052,7 @@ components: $ref: '#/components/schemas/OutputContent' ConversationItem: title: Conversation item - description: A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output). + description: A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output). discriminator: propertyName: type anyOf: @@ -31161,7 +31203,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. example: gpt-5 anyOf: - type: string @@ -31210,7 +31252,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -31221,14 +31263,14 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string vector_stores: type: array description: | - A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. + A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: object @@ -31236,7 +31278,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. maxItems: 100000000 items: type: string @@ -31340,9 +31382,9 @@ components: description: | The ID of an uploaded file that contains requests for the new batch. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. + See [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. - Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + Your input file must be formatted as a [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. endpoint: type: string enum: @@ -31372,9 +31414,9 @@ components: messages: description: | A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are - supported, like [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are + supported, like [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and [audio](https://developers.openai.com/api/docs/guides/audio). type: array minItems: 1 items: @@ -31383,7 +31425,7 @@ components: description: | Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/ModelIdsShared' service_tier: @@ -31396,7 +31438,7 @@ components: $ref: '#/components/schemas/ReasoningEffort' max_completion_tokens: description: | - An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer nullable: true frequency_penalty: @@ -31424,7 +31466,7 @@ components: title: Web search description: | This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: user_location: type: object @@ -31464,7 +31506,7 @@ components: Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` @@ -31480,7 +31522,7 @@ components: nullable: true description: | Parameters for audio output. Required when audio output is requested with - `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + `modalities: ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - voice - format @@ -31510,8 +31552,8 @@ components: nullable: true description: | Whether or not to store the output of this chat completion request for - use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or - [evals](https://platform.openai.com/docs/guides/evals) products. + use in our [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) or + [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. moderation: @@ -31524,8 +31566,8 @@ components: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) - for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) + for more information, along with the [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. type: boolean nullable: true @@ -31558,12 +31600,12 @@ components: nullable: true max_tokens: description: | - The maximum number of [tokens](/tokenizer) that can be generated in the + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is - not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning). + not compatible with [o-series models](https://developers.openai.com/api/docs/guides/reasoning). type: integer nullable: true deprecated: true @@ -31578,7 +31620,7 @@ components: prediction: nullable: true description: | - Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs), + Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs), which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. @@ -31604,8 +31646,8 @@ components: type: array description: | A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or - [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). items: anyOf: - $ref: '#/components/schemas/ChatCompletionTool' @@ -31804,7 +31846,10 @@ components: } CreateChatCompletionStreamResponse: type: object - description: "Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n[Learn more](https://platform.openai.com/docs/guides/streaming-responses).\n" + description: | + Represents a streamed chunk of a chat completion response returned + by the model, based on the provided input. + [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). properties: id: type: string @@ -31928,7 +31973,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. anyOf: - type: string - type: string @@ -31994,7 +32039,7 @@ components: description: | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: type: object x-oaiTypeLabel: map @@ -32005,7 +32050,7 @@ components: description: | Modify the likelihood of specified tokens appearing in the completion. - Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. logprobs: @@ -32025,7 +32070,7 @@ components: example: 16 nullable: true description: | - The maximum number of [tokens](/tokenizer) that can be generated in the completion. + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. n: @@ -32048,7 +32093,7 @@ components: description: | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: type: integer format: int64 @@ -32102,7 +32147,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - model - prompt @@ -32281,7 +32326,7 @@ components: properties: input: description: | - Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. + Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. example: The quick brown fox jumped over the lazy dog anyOf: - type: string @@ -32317,7 +32362,7 @@ components: type: integer model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. example: text-embedding-3-small anyOf: - type: string @@ -32345,7 +32390,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - model - input @@ -32460,7 +32505,7 @@ components: Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` @@ -32818,12 +32863,12 @@ components: The two categories of tools you can provide the model are: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). items: $ref: '#/components/schemas/Tool' text: @@ -32831,8 +32876,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/TextResponseFormatConfiguration' @@ -32960,7 +33005,7 @@ components: model: description: | The name of the model to fine-tune. You can select one of the - [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). example: gpt-4o-mini anyOf: - type: string @@ -32976,13 +33021,13 @@ components: description: | The ID of an uploaded file that contains training data. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. + See [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. - The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format. + The contents of the file should differ depending on if the model uses the [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. - See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. + See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. type: string example: file-abc123 hyperparameters: @@ -33054,7 +33099,7 @@ components: Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. - See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. + See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. type: string nullable: true example: file-abc123 @@ -33287,7 +33332,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). input_fidelity: anyOf: - $ref: '#/components/schemas/InputFidelity' @@ -33300,7 +33345,7 @@ components: nullable: true description: | Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. partial_images: $ref: '#/components/schemas/PartialImages' quality: @@ -33414,7 +33459,7 @@ components: nullable: true description: | Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. partial_images: $ref: '#/components/schemas/PartialImages' @@ -33475,7 +33520,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - prompt CreateImageVariationRequest: @@ -33528,7 +33573,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - image CreateMessageRequest: @@ -33553,7 +33598,7 @@ components: description: The text contents of the message. title: Text content - type: array - description: An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + description: An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). title: Array of content parts items: anyOf: @@ -33636,8 +33681,7 @@ components: model: description: | The content moderation model you would like to use. Learn more in - [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about - available models [here](https://platform.openai.com/docs/models#moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). nullable: false x-oaiTypeLabel: string anyOf: @@ -34069,7 +34113,7 @@ components: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. - If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](/api/docs/guides/your-data#v1responses). + If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). default: true - type: 'null' instructions: @@ -34093,7 +34137,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. type: boolean default: false @@ -34116,7 +34160,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer minimum: 16 - type: 'null' @@ -34125,10 +34169,10 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -34137,7 +34181,7 @@ components: reasoning_effort: $ref: '#/components/schemas/ReasoningEffort' instructions: - description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. + description: Overrides the [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true additional_instructions: @@ -34217,7 +34261,7 @@ components: properties: model: description: | - One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. anyOf: - type: string - type: string @@ -34237,7 +34281,7 @@ components: description: Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. maxLength: 4096 voice: - description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).' + description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).' $ref: '#/components/schemas/VoiceIdsOrCustomVoice' response_format: description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. @@ -34303,12 +34347,12 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string thread: $ref: '#/components/schemas/CreateThreadRequest' model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -34375,7 +34419,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -34386,7 +34430,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -34453,7 +34497,7 @@ components: additionalProperties: false properties: messages: - description: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. + description: A list of [messages](https://developers.openai.com/api/docs/assistants/migration) to start the thread with. type: array items: $ref: '#/components/schemas/CreateMessageRequest' @@ -34469,7 +34513,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -34480,14 +34524,14 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string vector_stores: type: array description: | - A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. + A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: object @@ -34495,7 +34539,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. maxItems: 100000000 items: type: string @@ -34608,7 +34652,7 @@ components: type: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. type: string response_format: $ref: '#/components/schemas/AudioResponseFormat' @@ -34644,7 +34688,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + See the [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -34893,7 +34937,7 @@ components: x-oaiTypeLabel: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English. type: string response_format: description: | @@ -34956,7 +35000,7 @@ components: The intended purpose of the uploaded file. See the [documentation on File - purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). type: string enum: - assistants @@ -34987,7 +35031,7 @@ components: additionalProperties: false properties: file_ids: - description: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`. + description: A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`. type: array minItems: 1 maxItems: 2000 @@ -35009,7 +35053,7 @@ components: additionalProperties: false properties: file_id: - description: A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) to minimize per-vector-store write requests. + description: A [File](https://developers.openai.com/api/reference/resources/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. type: string chunking_strategy: $ref: '#/components/schemas/ChunkingStrategyRequestParam' @@ -35022,7 +35066,7 @@ components: additionalProperties: false properties: file_ids: - description: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + description: A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. type: array maxItems: 500 items: @@ -35693,7 +35737,7 @@ components: embedding: type: array description: | - The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). + The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). items: type: number format: float @@ -35755,9 +35799,9 @@ components: required: - event - data - description: Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. + description: Occurs when an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. x-oaiMeta: - dataDescription: '`data` is an [error](/docs/guides/error-codes#api-errors)' + dataDescription: '`data` is an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors)' ErrorResponse: type: object properties: @@ -37232,7 +37276,7 @@ components: description: | The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. properties: ranker: $ref: '#/components/schemas/FileSearchRanker' @@ -37248,7 +37292,7 @@ components: title: File search tool call description: | The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. properties: id: type: string @@ -37738,7 +37782,7 @@ components: description: The organization that owns the fine-tuning job. result_files: type: array - description: The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). items: type: string example: file-abc123 @@ -37759,11 +37803,11 @@ components: - type: 'null' training_file: type: string - description: The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The file ID used for training. You can retrieve the training data with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). validation_file: anyOf: - type: string - description: The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The file ID used for validation. You can retrieve the validation results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). - type: 'null' integrations: anyOf: @@ -37995,18 +38039,23 @@ components: anyOf: - type: boolean default: false - description: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling). + description: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). - type: 'null' required: - name FunctionParameters: type: object - description: "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list." + description: |- + The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://developers.openai.com/api/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. + + Omitting `parameters` defines a function with an empty parameter list. additionalProperties: true FunctionToolCall: type: object title: Function tool call - description: "A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n" + description: | + A tool call to run a function. See the + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. properties: id: type: string @@ -39475,6 +39524,26 @@ components: - auto - type: 'null' description: The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. + action: + anyOf: + - $ref: '#/components/schemas/ImageGenActionEnum' + - type: 'null' + description: The action used for image generation. + background: + anyOf: + - $ref: '#/components/schemas/ImageBackground' + - type: 'null' + description: The background setting used for generation. + output_format: + anyOf: + - $ref: '#/components/schemas/ImageOutputFormat' + - type: 'null' + description: The output format used for generation. + revised_prompt: + anyOf: + - type: string + - type: 'null' + description: The prompt that was used after any model prompt rewriting. required: - type - id @@ -39730,11 +39799,11 @@ components: Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) anyOf: - type: string title: Text input @@ -40729,7 +40798,7 @@ components: title: MCP tool description: | Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). properties: type: type: string @@ -40761,7 +40830,7 @@ components: description: | Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: @@ -40939,7 +41008,7 @@ components: MessageContentImageFileObject: title: Image file type: object - description: References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + description: References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. properties: type: description: Always `image_file`. @@ -40951,7 +41020,7 @@ components: type: object properties: file_id: - description: The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + description: The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. type: string detail: type: string @@ -41111,7 +41180,7 @@ components: MessageDeltaContentImageFileObject: title: Image file type: object - description: References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + description: References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. properties: index: type: integer @@ -41126,7 +41195,7 @@ components: type: object properties: file_id: - description: The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + description: The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. type: string detail: type: string @@ -41338,7 +41407,7 @@ components: MessageObject: type: object title: The message object - description: Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + description: Represents a message within a [thread](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -41354,7 +41423,7 @@ components: type: integer format: unixtime thread_id: - description: The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. + description: The [thread](https://developers.openai.com/api/docs/assistants/migration) ID that this message belongs to. type: string status: description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. @@ -41405,12 +41474,12 @@ components: $ref: '#/components/schemas/MessageContent' assistant_id: anyOf: - - description: If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. + - description: If applicable, the ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored this message. type: string - type: 'null' run_id: anyOf: - - description: The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. + - description: The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. type: string - type: 'null' attachments: @@ -41512,9 +41581,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41527,9 +41596,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41542,9 +41611,9 @@ components: required: - event - data - description: Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + description: Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed. x-oaiMeta: - dataDescription: '`data` is a [message delta](/docs/api-reference/assistants-streaming/message-delta-object)' + dataDescription: '`data` is a [message delta](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41557,9 +41626,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41572,9 +41641,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event Metadata: @@ -41641,7 +41710,7 @@ components: - $ref: '#/components/schemas/ModelIdsResponses' - type: string - type: 'null' - description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. ModelIdsResponses: example: gpt-6-astra anyOf: @@ -41722,7 +41791,7 @@ components: description: | This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: anyOf: - type: string @@ -41730,14 +41799,14 @@ components: example: safety-identifier-1234 description: | A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). - type: 'null' prompt_cache_key: anyOf: - type: string example: prompt-cache-key-1234 description: | - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). - type: 'null' prompt_cache_retention: deprecated: true @@ -41749,7 +41818,7 @@ components: description: | Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -41765,7 +41834,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. anyOf: - type: string - $ref: '#/components/schemas/AssistantSupportedModels' @@ -41812,7 +41881,7 @@ components: file_ids: type: array description: | - Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + Overrides the list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -41823,7 +41892,7 @@ components: vector_store_ids: type: array description: | - Overrides the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + Overrides the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -41890,7 +41959,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -41901,7 +41970,7 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string @@ -42403,7 +42472,7 @@ components: - $ref: '#/components/schemas/OutputTextContent' - $ref: '#/components/schemas/RefusalContent' ParallelToolCalls: - description: Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + description: Whether to enable [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. type: boolean default: true PartialImages: @@ -42451,7 +42520,7 @@ components: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array - description: An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs. + description: An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text inputs. title: Array of content parts items: $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' @@ -42533,6 +42602,12 @@ components: type: integer format: unixtime description: The Unix timestamp (in seconds) of when the API key was created + expires_at: + anyOf: + - type: integer + format: unixtime + - type: 'null' + description: The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. last_used_at: anyOf: - type: integer @@ -42578,6 +42653,7 @@ components: "redacted_value": "sk-abc...def", "name": "My API Key", "created_at": 1711471533, + "expires_at": 1714063533, "last_used_at": 1711471534, "id": "key_abc", "owner_project_access": "active", @@ -42694,13 +42770,13 @@ components: - type: 'null' deprecated: true description: |- - Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. Deprecated: use `residency` instead. Do not provide both `geography` and `residency`. residency: anyOf: - $ref: '#/components/schemas/PublicProjectResidency' - type: 'null' - description: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + description: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. external_key_id: anyOf: - type: string @@ -43180,6 +43256,12 @@ components: created_at: type: integer format: unixtime + expires_at: + anyOf: + - type: integer + format: unixtime + - type: 'null' + description: The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. id: type: string required: @@ -43198,7 +43280,15 @@ components: anyOf: - type: boolean description: Create the service account without default roles or an API key. + example: false + - type: 'null' + expires_in_seconds: + anyOf: + - type: integer + minimum: 1 + maximum: 31536000 - type: 'null' + description: Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when `create_service_account_only` is true. required: - name ProjectServiceAccountCreateResponse: @@ -43517,7 +43607,7 @@ components: - type: object description: | Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). required: - id properties: @@ -43894,7 +43984,7 @@ components: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -46219,7 +46309,7 @@ components: - $ref: '#/components/schemas/RealtimeSessionCreateRequestGA' description: |- Optional session configuration to apply before the realtime session is - created. Use the same parameters you would send in a [`create client secret`](https://platform.openai.com/docs/api-reference/realtime-sessions/create-realtime-client-secret) + created. Use the same parameters you would send in a [`create client secret`](https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/methods/create) request. additionalProperties: false RealtimeCallReferRequest: @@ -46481,7 +46571,7 @@ components: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -47065,7 +47155,7 @@ components: description: | Create a session and client secret for the Realtime API. The request can specify either a realtime or a transcription session configuration. - [Learn more about the Realtime API](https://platform.openai.com/docs/guides/realtime). + [Learn more about the Realtime API](https://developers.openai.com/api/docs/guides/realtime). properties: expires_after: type: object @@ -48621,7 +48711,7 @@ components: mode when the user has interrupted (`input_audio_buffer.speech_started`), or when the client has emitted the `output_audio_buffer.clear` event to manually cut off the current audio response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -48652,7 +48742,7 @@ components: **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added (`response.content_part.added`) to the response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -48683,7 +48773,7 @@ components: **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client (`response.done`). - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -50018,7 +50108,7 @@ components: - allOf: - $ref: '#/components/schemas/AudioTranscription' description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. - type: 'null' turn_detection: $ref: '#/components/schemas/RealtimeTurnDetection' @@ -50418,7 +50508,7 @@ components: description: The format of the input audio. transcription: description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. $ref: '#/components/schemas/AudioTranscription' noise_reduction: type: object @@ -51070,7 +51160,7 @@ components: $ref: '#/components/schemas/RealtimeAudioFormats' transcription: description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. $ref: '#/components/schemas/AudioTranscription' noise_reduction: type: object @@ -52128,7 +52218,7 @@ components: type: object description: | Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). title: Reasoning properties: mode: @@ -52202,7 +52292,7 @@ components: Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. - type: 'null' ReasoningItem: @@ -52211,7 +52301,7 @@ components: A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). title: Reasoning properties: type: @@ -52419,7 +52509,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer - type: 'null' required: @@ -53414,7 +53504,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -53449,7 +53539,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - name @@ -53482,7 +53572,7 @@ components: title: Text grammar description: | A custom grammar for the model to follow when generating text. - Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + Learn more in the [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars). properties: type: type: string @@ -53501,7 +53591,7 @@ components: title: Python grammar description: | Configure the model to generate valid Python code. See the - [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details. + [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars) for more details. properties: type: type: string @@ -54275,7 +54365,7 @@ components: `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate + [generate audio](https://developers.openai.com/api/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -54468,13 +54558,13 @@ components: description: | The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - type: 'null' model: description: | Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/ModelIdsResponses' background: @@ -54482,7 +54572,7 @@ components: - type: boolean description: | Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). default: false - type: 'null' max_tool_calls: @@ -55686,8 +55776,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/TextResponseFormatConfiguration' @@ -55708,7 +55798,9 @@ components: properties: cached_tokens: type: integer - description: "The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n" + description: | + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cache_write_tokens: type: integer description: The number of input tokens that were written to the cache. @@ -56909,10 +57001,16 @@ components: propertyName: type item: type: object - description: "The dataset item provided to the grader. This will be used to populate \nthe `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. \n" + description: | + The dataset item provided to the grader. This will be used to populate + the `item` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details. model_sample: type: string - description: "The model sample to be evaluated. This value will be used to populate \nthe `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.\nThe `output_json` variable will be populated if the model sample is a \nvalid JSON string.\n \n" + description: | + The model sample to be evaluated. This value will be used to populate + the `sample` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details. + The `output_json` variable will be populated if the model sample is a + valid JSON string. required: - grader - model_sample @@ -57015,7 +57113,7 @@ components: RunObject: type: object title: A run on a thread - description: Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + description: Represents an execution run on a [thread](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -57031,10 +57129,10 @@ components: type: integer format: unixtime thread_id: - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was executed on as a part of this run. type: string assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for execution of this run. type: string status: $ref: '#/components/schemas/RunStatus' @@ -57119,13 +57217,13 @@ components: - max_completion_tokens - max_prompt_tokens model: - description: The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The model that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. type: string instructions: - description: The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The instructions that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. type: string tools: - description: The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The list of tools that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. default: [] type: array maxItems: 20 @@ -57367,7 +57465,7 @@ components: type: object properties: file_id: - description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + description: The [file](https://developers.openai.com/api/reference/resources/files) ID of the image. type: string required: - index @@ -57445,7 +57543,7 @@ components: output: anyOf: - type: string - description: The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + description: The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. - type: 'null' required: - index @@ -57543,7 +57641,7 @@ components: type: object properties: file_id: - description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + description: The [file](https://developers.openai.com/api/reference/resources/files) ID of the image. type: string required: - file_id @@ -57683,7 +57781,7 @@ components: output: anyOf: - type: string - description: The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + description: The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. - type: 'null' required: - name @@ -57733,13 +57831,13 @@ components: type: integer format: unixtime assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) associated with the run step. type: string thread_id: - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. type: string run_id: - description: The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. + description: The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) that this run step is a part of. type: string type: description: The type of run step, which can be either `message_creation` or `tool_calls`. @@ -57871,9 +57969,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57886,9 +57984,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57901,9 +57999,9 @@ components: required: - event - data - description: Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + description: Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed. x-oaiMeta: - dataDescription: '`data` is a [run step delta](/docs/api-reference/assistants-streaming/run-step-delta-object)' + dataDescription: '`data` is a [run step delta](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57916,9 +58014,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57931,9 +58029,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57946,9 +58044,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57961,9 +58059,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event RunStreamEvent: @@ -57980,9 +58078,9 @@ components: required: - event - data - description: Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + description: Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57995,9 +58093,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58010,9 +58108,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58025,9 +58123,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58040,9 +58138,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58055,9 +58153,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58070,9 +58168,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58085,9 +58183,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58100,9 +58198,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58115,9 +58213,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event RunToolCallObject: @@ -58126,7 +58224,7 @@ components: properties: id: type: string - description: The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. + description: The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) endpoint. type: type: string description: The type of tool call the output is required for. For now, this is always `function`. @@ -58157,8 +58255,8 @@ components: Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. @@ -58178,8 +58276,8 @@ components: Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`. - When not set, the default behavior is 'auto'. @@ -58382,7 +58480,20 @@ components: required: - tool_outputs TextResponseFormatConfiguration: - description: "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n" + description: | + An object specifying the format that the model must output. + + Configuring `{ "type": "json_schema" }` enables Structured Outputs, + which ensures the model will match your supplied JSON schema. Learn more in the + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + + The default format is `{ "type": "text" }` with no additional options. + + **Not recommended for gpt-4o and newer models:** + + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. anyOf: - $ref: '#/components/schemas/ResponseFormatText' - $ref: '#/components/schemas/TextResponseFormatJsonSchema' @@ -58394,7 +58505,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -58423,7 +58534,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - type @@ -58432,7 +58543,7 @@ components: ThreadObject: type: object title: Thread - description: Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). + description: Represents a thread that contains [messages](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -58459,7 +58570,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -58470,7 +58581,7 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string @@ -58510,9 +58621,9 @@ components: required: - event - data - description: Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + description: Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [thread](/docs/api-reference/threads/object)' + dataDescription: '`data` is a [thread](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event ToggleCertificatesRequest: @@ -58695,13 +58806,13 @@ components: title: Hosted tool description: | Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). properties: type: type: string description: | The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: - `file_search` @@ -58730,22 +58841,22 @@ components: We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. items: $ref: '#/components/schemas/Tool' TranscriptTextDeltaEvent: type: object - description: Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + description: Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. properties: type: type: string @@ -58761,7 +58872,7 @@ components: logprobs: type: array description: | - The log probabilities of the delta. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + The log probabilities of the delta. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. items: type: object properties: @@ -58796,7 +58907,7 @@ components: } TranscriptTextDoneEvent: type: object - description: Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + description: Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. properties: type: type: string @@ -58818,7 +58929,7 @@ components: logprobs: type: array description: | - The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. items: type: object properties: @@ -58862,7 +58973,7 @@ components: TranscriptTextSegmentEvent: type: object description: | - Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`. properties: type: type: string @@ -59224,7 +59335,7 @@ components: description: The intended number of bytes to be uploaded. purpose: type: string - description: The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values. + description: The intended purpose of the file. [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values. status: type: string description: The status of the Upload. @@ -60338,7 +60449,7 @@ components: type: integer format: unixtime vector_store_id: - description: The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + description: The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. type: string status: description: The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. @@ -60454,7 +60565,7 @@ components: type: integer format: unixtime vector_store_id: - description: The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + description: The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. type: string status: description: The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. @@ -61117,7 +61228,7 @@ components: title: Web search description: | Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: type: type: string @@ -61168,7 +61279,7 @@ components: title: Web search tool call description: | The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. properties: id: type: string @@ -61761,7 +61872,9 @@ components: sip_headers: type: array description: | - Headers from the SIP Invite. + Headers from the SIP INVITE, excluding SIP authorization headers. + Retained names, values, repeated entries, and order are preserved. + Treat these values as untrusted call metadata. items: type: object description: | @@ -61803,9 +61916,9 @@ components: "data": { "session_id": "live_u0_479a275623b54bdb9b6fbae2f7cbd408", "sip_headers": [ - {"name": "Max-Forwards", "value": "63"}, - {"name": "CSeq", "value": "851287 INVITE"}, - {"name": "Content-Type", "value": "application/sdp"}, + {"name": "From", "value": ";tag=abc123"}, + {"name": "To", "value": ""}, + {"name": "Call-ID", "value": "call-123@example.com"} ] } } @@ -61849,7 +61962,9 @@ components: sip_headers: type: array description: | - Headers from the SIP Invite. + Headers from the SIP INVITE, excluding SIP authorization headers. + Retained names, values, repeated entries, and order are preserved. + Treat these values as untrusted call metadata. items: type: object description: | @@ -61893,7 +62008,7 @@ components: "sip_headers": [ {"name": "Max-Forwards", "value": "63"}, {"name": "CSeq", "value": "851287 INVITE"}, - {"name": "Content-Type", "value": "application/sdp"}, + {"name": "Content-Type", "value": "application/sdp"} ] } } @@ -62297,7 +62412,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. PromptCacheBreakpointParam: properties: mode: @@ -62829,7 +62944,7 @@ components: - type - detail title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). ComputerScreenshotContent: properties: type: @@ -63048,6 +63163,24 @@ components: - completed - failed - incomplete + ImageGenActionEnum: + type: string + enum: + - generate + - edit + - auto + ImageBackground: + type: string + enum: + - transparent + - opaque + - auto + ImageOutputFormat: + type: string + enum: + - png + - webp + - jpeg ClickButtonType: type: string enum: @@ -63426,7 +63559,7 @@ components: - strict - parameters title: Function - description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). RankerVersionType: type: string enum: @@ -63491,7 +63624,7 @@ components: - type - vector_store_ids title: File search - description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). ComputerTool: properties: type: @@ -63505,7 +63638,7 @@ components: required: - type title: Computer - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). ComputerEnvironment: type: string enum: @@ -63539,7 +63672,7 @@ components: - display_width - display_height title: Computer use preview - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). ContainerMemoryLimit: type: string enum: @@ -63577,12 +63710,6 @@ components: - high - low description: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. - ImageGenActionEnum: - type: string - enum: - - generate - - edit - - auto LocalShellToolParam: properties: type: @@ -63802,7 +63929,7 @@ components: - type - name title: Custom tool - description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) EmptyModelParam: properties: {} type: object @@ -63989,7 +64116,7 @@ components: required: - type title: Web search preview - description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). ApplyPatchToolParam: properties: type: @@ -64162,7 +64289,7 @@ components: - id - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). CodeInterpreterOutputLogs: properties: type: @@ -64782,7 +64909,7 @@ components: required: - type title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) FileDetailEnum: type: string enum: @@ -65127,7 +65254,7 @@ components: - type - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). FunctionShellActionParam: properties: commands: @@ -65766,7 +65893,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. ReasoningModeEnum: anyOf: - type: string @@ -66963,7 +67090,7 @@ components: model: anyOf: - type: string - description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. - type: 'null' input: anyOf: @@ -66981,7 +67108,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' tools: @@ -66998,7 +67125,7 @@ components: reasoning: anyOf: - $ref: '#/components/schemas/Reasoning' - description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).' + description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).' - type: 'null' truncation: $ref: '#/components/schemas/TruncationEnum' @@ -67081,7 +67208,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' instructions: @@ -67111,7 +67238,7 @@ components: anyOf: - $ref: '#/components/schemas/ServiceTierEnum' description: |- - Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. + Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - type: 'null' type: object @@ -68565,7 +68692,7 @@ components: model: anyOf: - type: string - description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. - type: 'null' input: anyOf: @@ -68583,7 +68710,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' tools: @@ -68600,7 +68727,7 @@ components: reasoning: anyOf: - $ref: '#/components/schemas/BetaReasoning' - description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).' + description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).' - type: 'null' truncation: $ref: '#/components/schemas/BetaTruncationEnum' @@ -68753,13 +68880,13 @@ components: title: Hosted tool description: | Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). properties: type: type: string description: | The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: - `file_search` @@ -68880,7 +69007,7 @@ components: type: object description: | Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). title: Reasoning properties: mode: @@ -68954,7 +69081,7 @@ components: Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. - type: 'null' BetaReasoningModeEnum: @@ -68969,8 +69096,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/BetaTextResponseFormatConfiguration' @@ -68991,7 +69118,20 @@ components: `medium`. - type: 'null' BetaTextResponseFormatConfiguration: - description: "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n" + description: | + An object specifying the format that the model must output. + + Configuring `{ "type": "json_schema" }` enables Structured Outputs, + which ensures the model will match your supplied JSON schema. Learn more in the + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + + The default format is `{ "type": "text" }` with no additional options. + + **Not recommended for gpt-4o and newer models:** + + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. anyOf: - $ref: '#/components/schemas/BetaResponseFormatText' - $ref: '#/components/schemas/BetaTextResponseFormatJsonSchema' @@ -69020,7 +69160,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -69049,7 +69189,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - type @@ -69151,7 +69291,7 @@ components: required: - type title: Web search preview - description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). BetaSearchContentType: type: string enum: @@ -69307,7 +69447,7 @@ components: - type - name title: Custom tool - description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) BetaCustomGrammarFormatParam: properties: type: @@ -69907,7 +70047,7 @@ components: title: MCP tool description: | Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). properties: type: type: string @@ -69939,7 +70079,7 @@ components: description: | Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: @@ -70055,7 +70195,7 @@ components: title: Web search description: | Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: type: type: string @@ -70161,7 +70301,7 @@ components: - display_width - display_height title: Computer use preview - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). BetaComputerEnvironment: type: string enum: @@ -70183,7 +70323,7 @@ components: required: - type title: Computer - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). BetaFileSearchTool: properties: type: @@ -70214,7 +70354,7 @@ components: - type - vector_store_ids title: File search - description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). BetaFilters: anyOf: - $ref: '#/components/schemas/BetaComparisonFilter' @@ -70378,7 +70518,7 @@ components: - strict - parameters title: Function - description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). BetaInputItem: discriminator: propertyName: type @@ -70800,7 +70940,7 @@ components: - type - detail title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). BetaImageDetail: type: string enum: @@ -71806,11 +71946,43 @@ components: - auto - type: 'null' description: The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. + action: + anyOf: + - $ref: '#/components/schemas/BetaImageGenActionEnum' + - type: 'null' + description: The action used for image generation. + background: + anyOf: + - $ref: '#/components/schemas/BetaImageBackground' + - type: 'null' + description: The background setting used for generation. + output_format: + anyOf: + - $ref: '#/components/schemas/BetaImageOutputFormat' + - type: 'null' + description: The output format used for generation. + revised_prompt: + anyOf: + - type: string + - type: 'null' + description: The prompt that was used after any model prompt rewriting. required: - type - id - status - result + BetaImageOutputFormat: + type: string + enum: + - png + - webp + - jpeg + BetaImageBackground: + type: string + enum: + - transparent + - opaque + - auto BetaCompactionSummaryItemParam: properties: agent: @@ -71840,14 +72012,14 @@ components: - type - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). BetaReasoningItem: type: object description: | A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). title: Reasoning properties: agent: @@ -72414,7 +72586,7 @@ components: required: - type title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) BetaPromptCacheBreakpointParam: properties: mode: @@ -72586,7 +72758,9 @@ components: BetaFunctionToolCall: type: object title: Function tool call - description: "A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n" + description: | + A tool call to run a function. See the + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. properties: agent: anyOf: @@ -72647,7 +72821,7 @@ components: title: Web search tool call description: | The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. properties: agent: anyOf: @@ -72887,7 +73061,7 @@ components: title: Computer tool call description: | A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. properties: agent: anyOf: @@ -73210,7 +73384,7 @@ components: title: File search tool call description: | The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. properties: agent: anyOf: @@ -73698,7 +73872,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' instructions: @@ -73728,7 +73902,7 @@ components: anyOf: - $ref: '#/components/schemas/BetaServiceTierEnum' description: |- - Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. + Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter. - type: 'null' type: object @@ -73753,7 +73927,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. BetaPromptCacheModeEnum: type: string enum: @@ -73773,7 +73947,7 @@ components: - $ref: '#/components/schemas/BetaModelIdsResponses' - type: string - type: 'null' - description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. BetaModelIdsResponses: example: gpt-6-astra anyOf: @@ -74457,7 +74631,7 @@ components: - id - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). BetaProgramOutput: properties: agent: @@ -75111,7 +75285,9 @@ components: properties: cached_tokens: type: integer - description: "The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n" + description: | + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cache_write_tokens: type: integer description: The number of input tokens that were written to the cache. @@ -75527,7 +75703,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer - type: 'null' required: @@ -75830,8 +76006,8 @@ components: Specifies the processing type used for serving the request. - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`. - When not set, the default behavior is 'auto'. @@ -75855,13 +76031,13 @@ components: description: | The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - type: 'null' model: description: | Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/BetaModelIdsResponses' background: @@ -75869,7 +76045,7 @@ components: - type: boolean description: | Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). default: false - type: 'null' max_tool_calls: @@ -75891,7 +76067,7 @@ components: - type: object description: | Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). required: - id properties: @@ -75933,16 +76109,16 @@ components: We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. items: $ref: '#/components/schemas/BetaTool' @@ -75995,7 +76171,7 @@ components: description: | This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: anyOf: - type: string @@ -76003,14 +76179,14 @@ components: example: safety-identifier-1234 description: | A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). - type: 'null' prompt_cache_key: anyOf: - type: string example: prompt-cache-key-1234 description: | - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). - type: 'null' prompt_cache_retention: deprecated: true @@ -76022,7 +76198,7 @@ components: description: | Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -79408,11 +79584,11 @@ components: Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) anyOf: - type: string title: Text input @@ -80591,7 +80767,7 @@ components: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. - If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](/api/docs/guides/your-data#v1responses). + If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). default: true - type: 'null' instructions: @@ -80615,7 +80791,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. type: boolean default: false @@ -80638,7 +80814,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer minimum: 16 - type: 'null' @@ -80753,7 +80929,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. BetaCreateModelResponseProperties: allOf: - $ref: '#/components/schemas/BetaModelResponseProperties' @@ -81094,12 +81270,12 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string thread: $ref: '#/components/schemas/CreateThreadRequest' model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -81166,7 +81342,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -81177,7 +81353,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -81236,10 +81412,10 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -81248,7 +81424,7 @@ components: reasoning_effort: $ref: '#/components/schemas/ReasoningEffort' instructions: - description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. + description: Overrides the [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true additional_instructions: @@ -81489,12 +81665,12 @@ x-oaiMeta: - id: responses-streaming title: Streaming events description: | - When you [create a Response](https://platform.openai.com/docs/api-reference/responses/create) with + When you [create a Response](https://developers.openai.com/api/reference/resources/responses/methods/create) with `stream` set to `true`, the server will emit server-sent events to the client as the Response is generated. This section contains the events that are emitted by the server. - [Learn more about streaming responses](https://platform.openai.com/docs/guides/streaming-responses?api-mode=responses). + [Learn more about streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses). navigationGroup: responses sections: - type: object @@ -81675,7 +81851,7 @@ x-oaiMeta: title: Server events description: | These events use the same payloads over WebSocket and - [HTTP streaming](./streaming-events). + [HTTP streaming](https://developers.openai.com/api/reference/resources/responses/streaming-events). navigationGroup: responses sections: - type: object @@ -81844,7 +82020,7 @@ x-oaiMeta: Webhooks are HTTP requests sent by OpenAI to a URL you specify when certain events happen during the course of API usage. - [Learn more about webhooks](https://platform.openai.com/docs/guides/webhooks). + [Learn more about webhooks](https://developers.openai.com/api/docs/guides/webhooks). navigationGroup: webhooks sections: - type: object @@ -81905,7 +82081,7 @@ x-oaiMeta: title: Image Streaming description: | Stream image generation and editing in real time with server-sent events. - [Learn more about image streaming](https://platform.openai.com/docs/guides/image-generation). + [Learn more about image streaming](https://developers.openai.com/api/docs/guides/image-generation). navigationGroup: endpoints sections: - type: object @@ -82144,7 +82320,7 @@ x-oaiMeta: description: | Stream Chat Completions in real time. Receive chunks of completions returned from the model using server-sent events. - [Learn more](https://platform.openai.com/docs/guides/streaming-responses?api-mode=chat). + [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). navigationGroup: chat sections: - type: object @@ -82155,11 +82331,11 @@ x-oaiMeta: beta: true description: | Stream the result of executing a Run or resuming a Run after submitting tool outputs. - You can stream events from the [Create Thread and Run](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun), - [Create Run](https://platform.openai.com/docs/api-reference/runs/createRun), and [Submit Tool Outputs](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + You can stream events from the [Create Thread and Run](https://developers.openai.com/api/docs/assistants/migration), + [Create Run](https://developers.openai.com/api/docs/assistants/migration), and [Submit Tool Outputs](https://developers.openai.com/api/docs/assistants/migration) endpoints by passing `"stream": true`. The response will be a [Server-Sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) stream. Our Node and Python SDKs provide helpful utilities to make streaming easy. Reference the - [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn more. + [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn more. navigationGroup: assistants sections: - type: object diff --git a/src/openai/resources/admin/organization/audit_logs.py b/src/openai/resources/admin/organization/audit_logs.py index 51f4bed101..a5c243c883 100644 --- a/src/openai/resources/admin/organization/audit_logs.py +++ b/src/openai/resources/admin/organization/audit_logs.py @@ -237,7 +237,7 @@ def list( event_types: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the - [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. @@ -506,7 +506,7 @@ def list( event_types: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the - [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. diff --git a/src/openai/resources/admin/organization/projects/projects.py b/src/openai/resources/admin/organization/projects/projects.py index 3e6ae223b5..f85e73c30d 100644 --- a/src/openai/resources/admin/organization/projects/projects.py +++ b/src/openai/resources/admin/organization/projects/projects.py @@ -216,14 +216,14 @@ def create( geography: Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. Deprecated: use `residency` instead. Do not provide both `geography` and `residency`. residency: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. extra_headers: Send extra headers @@ -539,14 +539,14 @@ async def create( geography: Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. Deprecated: use `residency` instead. Do not provide both `geography` and `residency`. residency: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. extra_headers: Send extra headers diff --git a/src/openai/resources/admin/organization/projects/service_accounts/service_accounts.py b/src/openai/resources/admin/organization/projects/service_accounts/service_accounts.py index c1618d4ae6..be653b3f2c 100644 --- a/src/openai/resources/admin/organization/projects/service_accounts/service_accounts.py +++ b/src/openai/resources/admin/organization/projects/service_accounts/service_accounts.py @@ -65,6 +65,7 @@ def create( *, name: str, create_service_account_only: Optional[bool] | Omit = omit, + expires_in_seconds: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -82,6 +83,12 @@ def create( create_service_account_only: Create the service account without default roles or an API key. + expires_in_seconds: Number of seconds until the initial API key expires. If omitted or null, the key + does not expire unless the effective organization or project policy requires an + expiration. When a policy sets a maximum lifetime, this value must be provided + and must not exceed that limit. A non-null value cannot be used when + `create_service_account_only` is true. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -98,6 +105,7 @@ def create( { "name": name, "create_service_account_only": create_service_account_only, + "expires_in_seconds": expires_in_seconds, }, service_account_create_params.ServiceAccountCreateParams, ), @@ -345,6 +353,7 @@ async def create( *, name: str, create_service_account_only: Optional[bool] | Omit = omit, + expires_in_seconds: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -362,6 +371,12 @@ async def create( create_service_account_only: Create the service account without default roles or an API key. + expires_in_seconds: Number of seconds until the initial API key expires. If omitted or null, the key + does not expire unless the effective organization or project policy requires an + expiration. When a policy sets a maximum lifetime, this value must be provided + and must not exceed that limit. A non-null value cannot be used when + `create_service_account_only` is true. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -378,6 +393,7 @@ async def create( { "name": name, "create_service_account_only": create_service_account_only, + "expires_in_seconds": expires_in_seconds, }, service_account_create_params.ServiceAccountCreateParams, ), diff --git a/src/openai/resources/audio/speech.py b/src/openai/resources/audio/speech.py index d0b255b4fb..fc698e2655 100644 --- a/src/openai/resources/audio/speech.py +++ b/src/openai/resources/audio/speech.py @@ -73,7 +73,8 @@ def create( input: The text to generate audio for. The maximum length is 4096 characters. model: - One of the available [TTS models](https://platform.openai.com/docs/models#tts): + One of the available + [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. voice: The voice to use when generating the audio. Supported built-in voices are @@ -81,7 +82,7 @@ def create( `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the - [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). instructions: Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. @@ -177,7 +178,8 @@ async def create( input: The text to generate audio for. The maximum length is 4096 characters. model: - One of the available [TTS models](https://platform.openai.com/docs/models#tts): + One of the available + [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. voice: The voice to use when generating the audio. Supported built-in voices are @@ -185,7 +187,7 @@ async def create( `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the - [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). instructions: Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. diff --git a/src/openai/resources/audio/transcriptions.py b/src/openai/resources/audio/transcriptions.py index 7dd54f9f02..10540f1315 100644 --- a/src/openai/resources/audio/transcriptions.py +++ b/src/openai/resources/audio/transcriptions.py @@ -128,7 +128,7 @@ def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. response_format: The format of the output, in one of these options: `json`, `text`, `srt`, @@ -139,7 +139,7 @@ def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -276,7 +276,7 @@ def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -318,7 +318,7 @@ def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. @@ -397,7 +397,7 @@ def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -439,7 +439,7 @@ def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. @@ -644,7 +644,7 @@ async def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. @@ -658,7 +658,7 @@ async def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -773,7 +773,7 @@ async def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -815,7 +815,7 @@ async def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. @@ -894,7 +894,7 @@ async def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -936,7 +936,7 @@ async def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. diff --git a/src/openai/resources/audio/translations.py b/src/openai/resources/audio/translations.py index c41ef1fd97..492b02d7bc 100644 --- a/src/openai/resources/audio/translations.py +++ b/src/openai/resources/audio/translations.py @@ -130,7 +130,7 @@ def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English. response_format: The format of the output, in one of these options: `json`, `text`, `srt`, @@ -282,7 +282,7 @@ async def create( prompt: An optional text to guide the model's style or continue a previous audio segment. The - [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English. response_format: The format of the output, in one of these options: `json`, `text`, `srt`, diff --git a/src/openai/resources/batches.py b/src/openai/resources/batches.py index 9e7381a30f..855ad86ff4 100644 --- a/src/openai/resources/batches.py +++ b/src/openai/resources/batches.py @@ -84,11 +84,12 @@ def create( input_file_id: The ID of an uploaded file that contains requests for the new batch. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your input file must be formatted as a - [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. @@ -325,11 +326,12 @@ async def create( input_file_id: The ID of an uploaded file that contains requests for the new batch. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your input file must be formatted as a - [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. diff --git a/src/openai/resources/beta/assistants.py b/src/openai/resources/beta/assistants.py index 6c67501a07..a5c616b554 100644 --- a/src/openai/resources/beta/assistants.py +++ b/src/openai/resources/beta/assistants.py @@ -81,10 +81,10 @@ def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. description: The description of the assistant. The maximum length is 512 characters. @@ -104,18 +104,18 @@ def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -311,10 +311,10 @@ def update( a maximum length of 512 characters. model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. name: The name of the assistant. The maximum length is 256 characters. @@ -322,18 +322,18 @@ def update( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -560,10 +560,10 @@ async def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. description: The description of the assistant. The maximum length is 512 characters. @@ -583,18 +583,18 @@ async def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -790,10 +790,10 @@ async def update( a maximum length of 512 characters. model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. name: The name of the assistant. The maximum length is 256 characters. @@ -801,18 +801,18 @@ async def update( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. diff --git a/src/openai/resources/beta/responses/input_tokens.py b/src/openai/resources/beta/responses/input_tokens.py index cac50b1629..9047a6b328 100644 --- a/src/openai/resources/beta/responses/input_tokens.py +++ b/src/openai/resources/beta/responses/input_tokens.py @@ -87,8 +87,8 @@ def count( model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. parallel_tool_calls: Whether to allow the model to run tool calls in parallel. @@ -98,17 +98,17 @@ def count( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. reasoning: **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: Controls which tool the model should use, if any. @@ -228,8 +228,8 @@ async def count( model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. parallel_tool_calls: Whether to allow the model to run tool calls in parallel. @@ -239,17 +239,17 @@ async def count( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. reasoning: **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: Controls which tool the model should use, if any. diff --git a/src/openai/resources/beta/responses/responses.py b/src/openai/resources/beta/responses/responses.py index 8f45bfdba7..c8824c242b 100644 --- a/src/openai/resources/beta/responses/responses.py +++ b/src/openai/resources/beta/responses/responses.py @@ -259,20 +259,20 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -304,11 +304,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -318,7 +318,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -335,8 +335,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -346,15 +346,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -363,7 +363,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -371,7 +371,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -385,14 +385,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -401,13 +401,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -422,13 +424,13 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -441,8 +443,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -455,17 +457,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -490,7 +493,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -657,27 +660,27 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -709,11 +712,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -723,7 +726,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -740,8 +743,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -751,15 +754,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -768,7 +771,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -776,7 +779,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -790,14 +793,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -806,13 +809,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -827,7 +832,7 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -839,8 +844,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -853,17 +858,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -888,7 +894,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1055,27 +1061,27 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -1107,11 +1113,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -1121,7 +1127,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -1138,8 +1144,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -1149,15 +1155,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -1166,7 +1172,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -1174,7 +1180,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1188,14 +1194,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -1204,13 +1210,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -1225,7 +1233,7 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -1237,8 +1245,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -1251,17 +1259,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -1286,7 +1295,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1543,7 +1552,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. extra_headers: Send extra headers @@ -1581,7 +1590,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -1631,7 +1640,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -1760,7 +1769,7 @@ def cancel( Only responses created with the `background` parameter set to `true` can be cancelled. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). Args: extra_headers: Send extra headers @@ -1921,16 +1930,16 @@ def compact( Returns a compacted response object. Learn when and how to compact long-running conversations in the - [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see - [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. input: Text, image, or file inputs to the model, used to generate a response @@ -1941,7 +1950,7 @@ def compact( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt_cache_key: A key to use when reading from or writing to the prompt cache. @@ -1953,7 +1962,7 @@ def compact( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: How long to retain a prompt cache entry created by this request. @@ -1963,17 +1972,17 @@ def compact( Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in to - [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to - `service_tier=fast`; for other models, either value resolves to - `service_tier=priority`. - When not set, the default behavior is 'auto'. When - the `service_tier` parameter is set, the response body will include the - `service_tier` value based on the processing mode actually used to serve the - request. This response value may be different from the value set in the - parameter. + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To opt-in + to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. For models with a dedicated Fast + tier, either value resolves to `service_tier=fast`; for other models, either + value resolves to `service_tier=priority`. - When not set, the default behavior + is 'auto'. When the `service_tier` parameter is set, the response body will + include the `service_tier` value based on the processing mode actually used to + serve the request. This response value may be different from the value set in + the parameter. extra_headers: Send extra headers @@ -2223,20 +2232,20 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -2268,11 +2277,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -2282,7 +2291,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -2299,8 +2308,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -2310,15 +2319,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2327,7 +2336,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2335,7 +2344,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2349,14 +2358,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -2365,13 +2374,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -2386,13 +2397,13 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -2405,8 +2416,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -2419,17 +2430,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -2454,7 +2466,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -2621,27 +2633,27 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -2673,11 +2685,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -2687,7 +2699,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -2704,8 +2716,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -2715,15 +2727,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2732,7 +2744,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2740,7 +2752,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2754,14 +2766,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -2770,13 +2782,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -2791,7 +2805,7 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -2803,8 +2817,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -2817,17 +2831,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -2852,7 +2867,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -3019,27 +3034,27 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -3071,11 +3086,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -3085,7 +3100,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -3102,8 +3117,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -3113,15 +3128,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -3130,7 +3145,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -3138,7 +3153,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -3152,14 +3167,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -3168,13 +3183,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -3189,7 +3206,7 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -3201,8 +3218,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -3215,17 +3232,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -3250,7 +3268,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -3507,7 +3525,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. extra_headers: Send extra headers @@ -3545,7 +3563,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -3595,7 +3613,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -3724,7 +3742,7 @@ async def cancel( Only responses created with the `background` parameter set to `true` can be cancelled. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). Args: extra_headers: Send extra headers @@ -3885,16 +3903,16 @@ async def compact( Returns a compacted response object. Learn when and how to compact long-running conversations in the - [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see - [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. input: Text, image, or file inputs to the model, used to generate a response @@ -3905,7 +3923,7 @@ async def compact( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt_cache_key: A key to use when reading from or writing to the prompt cache. @@ -3917,7 +3935,7 @@ async def compact( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: How long to retain a prompt cache entry created by this request. @@ -3927,17 +3945,17 @@ async def compact( Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in to - [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to - `service_tier=fast`; for other models, either value resolves to - `service_tier=priority`. - When not set, the default behavior is 'auto'. When - the `service_tier` parameter is set, the response body will include the - `service_tier` value based on the processing mode actually used to serve the - request. This response value may be different from the value set in the - parameter. + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To opt-in + to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. For models with a dedicated Fast + tier, either value resolves to `service_tier=fast`; for other models, either + value resolves to `service_tier=priority`. - When not set, the default behavior + is 'auto'. When the `service_tier` parameter is set, the response body will + include the `service_tier` value based on the processing mode actually used to + serve the request. This response value may be different from the value set in + the parameter. extra_headers: Send extra headers diff --git a/src/openai/resources/beta/threads/runs/runs.py b/src/openai/resources/beta/threads/runs/runs.py index 5321b02c5a..5f2ece0375 100644 --- a/src/openai/resources/beta/threads/runs/runs.py +++ b/src/openai/resources/beta/threads/runs/runs.py @@ -122,15 +122,15 @@ def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. include: A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -140,8 +140,8 @@ def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -162,31 +162,32 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -273,8 +274,8 @@ def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -285,7 +286,7 @@ def create( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -295,8 +296,8 @@ def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -317,31 +318,32 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -424,8 +426,8 @@ def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -436,7 +438,7 @@ def create( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -446,8 +448,8 @@ def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -468,31 +470,32 @@ def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -1587,15 +1590,15 @@ async def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. include: A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -1605,8 +1608,8 @@ async def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -1627,31 +1630,32 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -1738,8 +1742,8 @@ async def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -1750,7 +1754,7 @@ async def create( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -1760,8 +1764,8 @@ async def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -1782,31 +1786,32 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -1889,8 +1894,8 @@ async def create( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -1901,7 +1906,7 @@ async def create( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. additional_instructions: Appends additional instructions at the end of the instructions for the run. This @@ -1911,8 +1916,8 @@ async def create( additional_messages: Adds additional messages to the thread before creating the run. instructions: Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. max_completion_tokens: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens @@ -1933,31 +1938,32 @@ async def create( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. reasoning_effort: Constrains effort on reasoning for reasoning models. Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. diff --git a/src/openai/resources/beta/threads/runs/steps.py b/src/openai/resources/beta/threads/runs/steps.py index 784c7f49b8..13f6856765 100644 --- a/src/openai/resources/beta/threads/runs/steps.py +++ b/src/openai/resources/beta/threads/runs/steps.py @@ -69,7 +69,7 @@ def retrieve( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. extra_headers: Send extra headers @@ -142,7 +142,7 @@ def list( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. limit: A limit on the number of objects to be returned. Limit can range between 1 and @@ -234,7 +234,7 @@ async def retrieve( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. extra_headers: Send extra headers @@ -307,7 +307,7 @@ def list( to fetch the file search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. limit: A limit on the number of objects to be returned. Limit can range between 1 and diff --git a/src/openai/resources/beta/threads/threads.py b/src/openai/resources/beta/threads/threads.py index 8c568b19b4..09ecb75f4c 100644 --- a/src/openai/resources/beta/threads/threads.py +++ b/src/openai/resources/beta/threads/threads.py @@ -109,8 +109,9 @@ def create( Create a thread. Args: - messages: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - start the thread with. + messages: A list of + [messages](https://developers.openai.com/api/docs/assistants/migration) to start + the thread with. metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -324,8 +325,8 @@ def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. instructions: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. @@ -349,24 +350,25 @@ def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -458,8 +460,8 @@ def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -487,24 +489,25 @@ def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -592,8 +595,8 @@ def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -621,24 +624,25 @@ def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -996,8 +1000,9 @@ async def create( Create a thread. Args: - messages: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - start the thread with. + messages: A list of + [messages](https://developers.openai.com/api/docs/assistants/migration) to start + the thread with. metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -1211,8 +1216,8 @@ async def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. instructions: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. @@ -1236,24 +1241,25 @@ async def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -1345,8 +1351,8 @@ async def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -1374,24 +1380,25 @@ async def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -1479,8 +1486,8 @@ async def create_and_run( Args: assistant_id: The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. stream: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` @@ -1508,24 +1515,25 @@ async def create_and_run( Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. - model: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + model: The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with - [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. diff --git a/src/openai/resources/chat/completions/completions.py b/src/openai/resources/chat/completions/completions.py index abef2bf7c9..78b0cb9d33 100644 --- a/src/openai/resources/chat/completions/completions.py +++ b/src/openai/resources/chat/completions/completions.py @@ -298,43 +298,43 @@ def create( ) -> ChatCompletion: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -374,15 +374,15 @@ def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -397,8 +397,8 @@ def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -409,7 +409,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -421,7 +421,7 @@ def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -430,7 +430,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -438,7 +438,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -455,7 +455,7 @@ def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -463,7 +463,7 @@ def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -474,7 +474,7 @@ def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -489,13 +489,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -509,8 +511,9 @@ def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -518,9 +521,9 @@ def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. stream_options: Options for streaming response. Only set this when you set `stream: true`. @@ -541,8 +544,9 @@ def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -559,7 +563,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -568,7 +572,7 @@ def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers @@ -630,52 +634,52 @@ def create( ) -> Stream[ChatCompletionChunk]: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -715,15 +719,15 @@ def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -738,8 +742,8 @@ def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -750,7 +754,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -762,7 +766,7 @@ def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -771,7 +775,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -779,7 +783,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -796,7 +800,7 @@ def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -804,7 +808,7 @@ def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -815,7 +819,7 @@ def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -830,13 +834,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -850,8 +856,9 @@ def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -873,8 +880,9 @@ def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -891,7 +899,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -900,7 +908,7 @@ def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers @@ -962,52 +970,52 @@ def create( ) -> ChatCompletion | Stream[ChatCompletionChunk]: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -1047,15 +1055,15 @@ def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -1070,8 +1078,8 @@ def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -1082,7 +1090,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -1094,7 +1102,7 @@ def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -1103,7 +1111,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -1111,7 +1119,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1128,7 +1136,7 @@ def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -1136,7 +1144,7 @@ def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -1147,7 +1155,7 @@ def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -1162,13 +1170,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -1182,8 +1192,9 @@ def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -1205,8 +1216,9 @@ def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -1223,7 +1235,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -1232,7 +1244,7 @@ def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers @@ -1909,43 +1921,43 @@ async def create( ) -> ChatCompletion: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -1985,15 +1997,15 @@ async def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -2008,8 +2020,8 @@ async def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -2020,7 +2032,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -2032,7 +2044,7 @@ async def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2041,7 +2053,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2049,7 +2061,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2066,7 +2078,7 @@ async def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -2074,7 +2086,7 @@ async def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -2085,7 +2097,7 @@ async def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -2100,13 +2112,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -2120,8 +2134,9 @@ async def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -2129,9 +2144,9 @@ async def create( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. stream_options: Options for streaming response. Only set this when you set `stream: true`. @@ -2152,8 +2167,9 @@ async def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -2170,7 +2186,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -2179,7 +2195,7 @@ async def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers @@ -2241,52 +2257,52 @@ async def create( ) -> AsyncStream[ChatCompletionChunk]: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -2326,15 +2342,15 @@ async def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -2349,8 +2365,8 @@ async def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -2361,7 +2377,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -2373,7 +2389,7 @@ async def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2382,7 +2398,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2390,7 +2406,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2407,7 +2423,7 @@ async def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -2415,7 +2431,7 @@ async def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -2426,7 +2442,7 @@ async def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -2441,13 +2457,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -2461,8 +2479,9 @@ async def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -2484,8 +2503,9 @@ async def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -2502,7 +2522,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -2511,7 +2531,7 @@ async def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers @@ -2573,52 +2593,52 @@ async def create( ) -> ChatCompletion | AsyncStream[ChatCompletionChunk]: """ **Starting a new project?** We recommend trying - [Responses](https://platform.openai.com/docs/api-reference/responses) to take - advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Responses](https://developers.openai.com/api/reference/resources/responses) to + take advantage of the latest OpenAI platform features. Compare + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), - [vision](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), + [vision](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. Args: messages: A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message - types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different + message types (modalities) are supported, like + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). model: Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. audio: Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to @@ -2658,15 +2678,15 @@ async def create( max_completion_tokens: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -2681,8 +2701,8 @@ async def create( `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -2693,7 +2713,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. prediction: Static predicted output content, such as the content of a text file that is @@ -2705,7 +2725,7 @@ async def create( prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2714,7 +2734,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2722,7 +2742,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2739,7 +2759,7 @@ async def create( are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. response_format: An object specifying the format that the model must output. @@ -2747,7 +2767,7 @@ async def create( Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -2758,7 +2778,7 @@ async def create( identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). seed: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and @@ -2773,13 +2793,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -2793,8 +2815,9 @@ async def create( returned text will not contain the stop sequence. store: Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. @@ -2816,8 +2839,9 @@ async def create( are present. tools: A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In @@ -2834,7 +2858,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). verbosity: Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose @@ -2843,7 +2867,7 @@ async def create( web_search_options: This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). extra_headers: Send extra headers diff --git a/src/openai/resources/completions.py b/src/openai/resources/completions.py index d43c3854b2..f15bde2d2c 100644 --- a/src/openai/resources/completions.py +++ b/src/openai/resources/completions.py @@ -83,10 +83,10 @@ def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -111,17 +111,18 @@ def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -133,8 +134,8 @@ def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -151,7 +152,7 @@ def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -192,7 +193,7 @@ def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -241,10 +242,10 @@ def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -276,17 +277,18 @@ def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -298,8 +300,8 @@ def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -316,7 +318,7 @@ def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -350,7 +352,7 @@ def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -399,10 +401,10 @@ def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -434,17 +436,18 @@ def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -456,8 +459,8 @@ def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -474,7 +477,7 @@ def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -508,7 +511,7 @@ def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -650,10 +653,10 @@ async def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -678,17 +681,18 @@ async def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -700,8 +704,8 @@ async def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -718,7 +722,7 @@ async def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -759,7 +763,7 @@ async def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -808,10 +812,10 @@ async def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -843,17 +847,18 @@ async def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -865,8 +870,8 @@ async def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -883,7 +888,7 @@ async def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -917,7 +922,7 @@ async def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -966,10 +971,10 @@ async def create( Args: model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. @@ -1001,17 +1006,18 @@ async def create( existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -1023,8 +1029,8 @@ async def create( The maximum value for `logprobs` is 5. - max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + max_tokens: The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -1041,7 +1047,7 @@ async def create( whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return @@ -1075,7 +1081,7 @@ async def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers diff --git a/src/openai/resources/content_provenance_checks.py b/src/openai/resources/content_provenance_checks.py index dbdc7d5b2f..93c35c17ae 100644 --- a/src/openai/resources/content_provenance_checks.py +++ b/src/openai/resources/content_provenance_checks.py @@ -53,7 +53,7 @@ def create( ) -> ContentProvenanceCheck: """ Check whether an image or audio file contains known OpenAI provenance signals. - [Learn more about content provenance](/api/docs/guides/content-provenance). + [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). If `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the @@ -127,7 +127,7 @@ async def create( ) -> ContentProvenanceCheck: """ Check whether an image or audio file contains known OpenAI provenance signals. - [Learn more about content provenance](/api/docs/guides/content-provenance). + [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). If `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the diff --git a/src/openai/resources/conversations/items.py b/src/openai/resources/conversations/items.py index 9ae0d2a30b..f73161d941 100644 --- a/src/openai/resources/conversations/items.py +++ b/src/openai/resources/conversations/items.py @@ -67,7 +67,7 @@ def create( items: The items to add to the conversation. You may add up to 20 items at a time. include: Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. extra_headers: Send extra headers @@ -112,7 +112,7 @@ def retrieve( Args: include: Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. extra_headers: Send extra headers @@ -310,7 +310,7 @@ async def create( items: The items to add to the conversation. You may add up to 20 items at a time. include: Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. extra_headers: Send extra headers @@ -355,7 +355,7 @@ async def retrieve( Args: include: Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. extra_headers: Send extra headers diff --git a/src/openai/resources/embeddings.py b/src/openai/resources/embeddings.py index 1868381372..75bf9b49f4 100644 --- a/src/openai/resources/embeddings.py +++ b/src/openai/resources/embeddings.py @@ -77,10 +77,10 @@ def create( request. model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. dimensions: The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. @@ -90,7 +90,7 @@ def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -179,10 +179,10 @@ async def create( request. model: ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. dimensions: The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. @@ -192,7 +192,7 @@ async def create( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers diff --git a/src/openai/resources/evals/evals.py b/src/openai/resources/evals/evals.py index 9ebed4a1b6..a6aa916aae 100644 --- a/src/openai/resources/evals/evals.py +++ b/src/openai/resources/evals/evals.py @@ -81,7 +81,7 @@ def create( data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see - the [Evals guide](https://platform.openai.com/docs/guides/evals). + the [Evals guide](https://developers.openai.com/api/docs/guides/evals). Args: data_source_config: The configuration for the data source used for the evaluation runs. Dictates the @@ -365,7 +365,7 @@ async def create( data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see - the [Evals guide](https://platform.openai.com/docs/guides/evals). + the [Evals guide](https://developers.openai.com/api/docs/guides/evals). Args: data_source_config: The configuration for the data source used for the evaluation runs. Dictates the diff --git a/src/openai/resources/files.py b/src/openai/resources/files.py index 820866685c..db2e77c2fc 100644 --- a/src/openai/resources/files.py +++ b/src/openai/resources/files.py @@ -82,20 +82,20 @@ def create( - The Assistants API supports files up to 2 million tokens and of specific file types. See the - [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) + [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for details. - The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models. - The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required - [format](https://platform.openai.com/docs/api-reference/batch/request-input). + [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). - For Retrieval or `file_search` ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use - [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) instead of attaching them one by one. Vector store attachment has separate limits from file upload, including 2,000 attached files per minute per organization. @@ -423,20 +423,20 @@ async def create( - The Assistants API supports files up to 2 million tokens and of specific file types. See the - [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) + [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for details. - The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models. - The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required - [format](https://platform.openai.com/docs/api-reference/batch/request-input). + [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). - For Retrieval or `file_search` ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use - [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) instead of attaching them one by one. Vector store attachment has separate limits from file upload, including 2,000 attached files per minute per organization. diff --git a/src/openai/resources/fine_tuning/alpha/graders.py b/src/openai/resources/fine_tuning/alpha/graders.py index d7fa11ec50..cf70c5fad4 100644 --- a/src/openai/resources/fine_tuning/alpha/graders.py +++ b/src/openai/resources/fine_tuning/alpha/graders.py @@ -61,13 +61,14 @@ def run( model_sample: The model sample to be evaluated. This value will be used to populate the `sample` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. - The `output_json` variable will be populated if the model sample is a valid JSON - string. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. The `output_json` variable will be populated if the model sample is a + valid JSON string. item: The dataset item provided to the grader. This will be used to populate the `item` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. extra_headers: Send extra headers @@ -179,13 +180,14 @@ async def run( model_sample: The model sample to be evaluated. This value will be used to populate the `sample` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. - The `output_json` variable will be populated if the model sample is a valid JSON - string. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. The `output_json` variable will be populated if the model sample is a + valid JSON string. item: The dataset item provided to the grader. This will be used to populate the `item` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. extra_headers: Send extra headers diff --git a/src/openai/resources/fine_tuning/checkpoints/permissions.py b/src/openai/resources/fine_tuning/checkpoints/permissions.py index 7ac669da31..7d2136f4db 100644 --- a/src/openai/resources/fine_tuning/checkpoints/permissions.py +++ b/src/openai/resources/fine_tuning/checkpoints/permissions.py @@ -63,7 +63,8 @@ def create( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> SyncPage[PermissionCreateResponse]: """ - **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** Calling this endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). This enables organization owners to share fine-tuned models with other projects in their organization. @@ -118,7 +119,8 @@ def retrieve( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> PermissionRetrieveResponse: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. @@ -184,7 +186,8 @@ def list( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> SyncConversationCursorPage[PermissionListResponse]: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. @@ -248,7 +251,8 @@ def delete( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> PermissionDeleteResponse: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. @@ -320,7 +324,8 @@ def create( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[PermissionCreateResponse, AsyncPage[PermissionCreateResponse]]: """ - **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** Calling this endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). This enables organization owners to share fine-tuned models with other projects in their organization. @@ -375,7 +380,8 @@ async def retrieve( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> PermissionRetrieveResponse: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. @@ -441,7 +447,8 @@ def list( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[PermissionListResponse, AsyncConversationCursorPage[PermissionListResponse]]: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. @@ -505,7 +512,8 @@ async def delete( timeout: float | httpx2.Timeout | None | NotGiven = not_given, ) -> PermissionDeleteResponse: """ - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an + [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. diff --git a/src/openai/resources/fine_tuning/jobs/jobs.py b/src/openai/resources/fine_tuning/jobs/jobs.py index b5fdd0b0de..2f708a64b9 100644 --- a/src/openai/resources/fine_tuning/jobs/jobs.py +++ b/src/openai/resources/fine_tuning/jobs/jobs.py @@ -84,29 +84,30 @@ def create( Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) Args: model: The name of the model to fine-tune. You can select one of the - [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). training_file: The ID of an uploaded file that contains training data. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. The contents of the file should differ depending on if the model uses the - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the - [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. hyperparameters: The hyperparameters used for the fine-tuning job. This value is now deprecated @@ -144,7 +145,7 @@ def create( the purpose `fine-tune`. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. extra_headers: Send extra headers @@ -195,7 +196,7 @@ def retrieve( """ Get info about a fine-tuning job. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) Args: extra_headers: Send extra headers @@ -489,29 +490,30 @@ async def create( Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) Args: model: The name of the model to fine-tune. You can select one of the - [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). training_file: The ID of an uploaded file that contains training data. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. The contents of the file should differ depending on if the model uses the - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the - [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. hyperparameters: The hyperparameters used for the fine-tuning job. This value is now deprecated @@ -549,7 +551,7 @@ async def create( the purpose `fine-tune`. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. extra_headers: Send extra headers @@ -600,7 +602,7 @@ async def retrieve( """ Get info about a fine-tuning job. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) Args: extra_headers: Send extra headers diff --git a/src/openai/resources/images.py b/src/openai/resources/images.py index 62d00ef07b..a888332bae 100644 --- a/src/openai/resources/images.py +++ b/src/openai/resources/images.py @@ -85,7 +85,7 @@ def create_variation( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -241,12 +241,12 @@ def edit( `1024x1024`, `1792x1024`, or `1024x1792`. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -307,7 +307,7 @@ def edit( characters for `dall-e-2`, and 32000 characters for the GPT image models. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. background: Allows to set transparency for the background of the generated image(s). Must be @@ -379,7 +379,7 @@ def edit( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -440,7 +440,7 @@ def edit( characters for `dall-e-2`, and 32000 characters for the GPT image models. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. background: Allows to set transparency for the background of the generated image(s). Must be @@ -512,7 +512,7 @@ def edit( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -627,7 +627,7 @@ def generate( ) -> ImagesResponse: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -701,7 +701,7 @@ def generate( `1024x1024`, `1792x1024`, or `1024x1792`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. style: The style of the generated images. This parameter is only supported for @@ -711,7 +711,7 @@ def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -755,7 +755,7 @@ def generate( ) -> Stream[ImageGenStreamEvent]: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -763,7 +763,7 @@ def generate( characters for `dall-e-3`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. background: Allows to set transparency for the background of the generated image(s). Must be @@ -839,7 +839,7 @@ def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -883,7 +883,7 @@ def generate( ) -> ImagesResponse | Stream[ImageGenStreamEvent]: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -891,7 +891,7 @@ def generate( characters for `dall-e-3`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. background: Allows to set transparency for the background of the generated image(s). Must be @@ -967,7 +967,7 @@ def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1105,7 +1105,7 @@ async def create_variation( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1261,12 +1261,12 @@ async def edit( `1024x1024`, `1792x1024`, or `1024x1792`. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1327,7 +1327,7 @@ async def edit( characters for `dall-e-2`, and 32000 characters for the GPT image models. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. background: Allows to set transparency for the background of the generated image(s). Must be @@ -1399,7 +1399,7 @@ async def edit( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1460,7 +1460,7 @@ async def edit( characters for `dall-e-2`, and 32000 characters for the GPT image models. stream: Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. background: Allows to set transparency for the background of the generated image(s). Must be @@ -1532,7 +1532,7 @@ async def edit( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1647,7 +1647,7 @@ async def generate( ) -> ImagesResponse: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -1721,7 +1721,7 @@ async def generate( `1024x1024`, `1792x1024`, or `1024x1792`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. style: The style of the generated images. This parameter is only supported for @@ -1731,7 +1731,7 @@ async def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1775,7 +1775,7 @@ async def generate( ) -> AsyncStream[ImageGenStreamEvent]: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -1783,7 +1783,7 @@ async def generate( characters for `dall-e-3`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. background: Allows to set transparency for the background of the generated image(s). Must be @@ -1859,7 +1859,7 @@ async def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1903,7 +1903,7 @@ async def generate( ) -> ImagesResponse | AsyncStream[ImageGenStreamEvent]: """ Creates an image given a prompt. - [Learn more](https://platform.openai.com/docs/guides/images). + [Learn more](https://developers.openai.com/api/docs/guides/images-vision). Args: prompt: A text description of the desired image(s). The maximum length is 32000 @@ -1911,7 +1911,7 @@ async def generate( characters for `dall-e-3`. stream: Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. background: Allows to set transparency for the background of the generated image(s). Must be @@ -1987,7 +1987,7 @@ async def generate( user: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers diff --git a/src/openai/resources/moderations.py b/src/openai/resources/moderations.py index b29de575f2..f22bce4497 100644 --- a/src/openai/resources/moderations.py +++ b/src/openai/resources/moderations.py @@ -60,16 +60,14 @@ def create( """Classifies if text and/or image inputs are potentially harmful. Learn more in - the [moderation guide](https://platform.openai.com/docs/guides/moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). Args: input: Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models. model: The content moderation model you would like to use. Learn more in - [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - learn about available models - [here](https://platform.openai.com/docs/models#moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). extra_headers: Send extra headers @@ -138,16 +136,14 @@ async def create( """Classifies if text and/or image inputs are potentially harmful. Learn more in - the [moderation guide](https://platform.openai.com/docs/guides/moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). Args: input: Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models. model: The content moderation model you would like to use. Learn more in - [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - learn about available models - [here](https://platform.openai.com/docs/models#moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). extra_headers: Send extra headers diff --git a/src/openai/resources/realtime/calls.py b/src/openai/resources/realtime/calls.py index 09b81af264..b008491507 100644 --- a/src/openai/resources/realtime/calls.py +++ b/src/openai/resources/realtime/calls.py @@ -217,7 +217,7 @@ def accept( reasoning Realtime models such as `gpt-realtime-2`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). reasoning: Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. @@ -597,7 +597,7 @@ async def accept( reasoning Realtime models such as `gpt-realtime-2`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). reasoning: Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. diff --git a/src/openai/resources/realtime/client_secrets.py b/src/openai/resources/realtime/client_secrets.py index 77c2753cdd..cca15b128c 100644 --- a/src/openai/resources/realtime/client_secrets.py +++ b/src/openai/resources/realtime/client_secrets.py @@ -61,7 +61,7 @@ def create( will be applied to any sessions created using that client secret, but these can also be overridden by the client connection. - [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. @@ -147,7 +147,7 @@ async def create( will be applied to any sessions created using that client secret, but these can also be overridden by the client connection. - [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. diff --git a/src/openai/resources/realtime/realtime.py b/src/openai/resources/realtime/realtime.py index f94000c978..f82044055e 100644 --- a/src/openai/resources/realtime/realtime.py +++ b/src/openai/resources/realtime/realtime.py @@ -1476,7 +1476,7 @@ def clear(self, *, event_id: str | Omit = omit) -> None: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ self._connection.send( cast(RealtimeClientEventParam, strip_not_given({"type": "output_audio_buffer.clear", "event_id": event_id})) @@ -1713,7 +1713,7 @@ async def clear(self, *, event_id: str | Omit = omit) -> None: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ await self._connection.send( cast(RealtimeClientEventParam, strip_not_given({"type": "output_audio_buffer.clear", "event_id": event_id})) diff --git a/src/openai/resources/responses/input_tokens.py b/src/openai/resources/responses/input_tokens.py index d9f0cca458..7487014393 100644 --- a/src/openai/resources/responses/input_tokens.py +++ b/src/openai/resources/responses/input_tokens.py @@ -87,8 +87,8 @@ def count( model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. parallel_tool_calls: Whether to allow the model to run tool calls in parallel. @@ -98,17 +98,17 @@ def count( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. reasoning: **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: Controls which tool the model should use, if any. @@ -223,8 +223,8 @@ async def count( model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. parallel_tool_calls: Whether to allow the model to run tool calls in parallel. @@ -234,17 +234,17 @@ async def count( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. reasoning: **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: Controls which tool the model should use, if any. diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index 1cb35e2371..022d1f7985 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -175,20 +175,20 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -220,11 +220,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -234,7 +234,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -251,8 +251,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -260,15 +260,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -277,7 +277,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -285,7 +285,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -299,14 +299,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -315,13 +315,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -336,13 +338,13 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -355,8 +357,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -369,17 +371,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -404,7 +407,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -461,27 +464,27 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -513,11 +516,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -527,7 +530,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -544,8 +547,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -553,15 +556,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -570,7 +573,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -578,7 +581,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -592,14 +595,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -608,13 +611,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -629,7 +634,7 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -641,8 +646,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -655,17 +660,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -690,7 +696,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -747,27 +753,27 @@ def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -799,11 +805,11 @@ def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -813,7 +819,7 @@ def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -830,8 +836,8 @@ def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -839,15 +845,15 @@ def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -856,7 +862,7 @@ def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -864,7 +870,7 @@ def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -878,14 +884,14 @@ def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -894,13 +900,15 @@ def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -915,7 +923,7 @@ def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -927,8 +935,8 @@ def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -941,17 +949,18 @@ def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -976,7 +985,7 @@ def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -1500,7 +1509,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. extra_headers: Send extra headers @@ -1537,7 +1546,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -1586,7 +1595,7 @@ def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -1704,7 +1713,7 @@ def cancel( Only responses created with the `background` parameter set to `true` can be cancelled. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). Args: extra_headers: Send extra headers @@ -1860,16 +1869,16 @@ def compact( Returns a compacted response object. Learn when and how to compact long-running conversations in the - [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see - [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. input: Text, image, or file inputs to the model, used to generate a response @@ -1880,7 +1889,7 @@ def compact( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt_cache_key: A key to use when reading from or writing to the prompt cache. @@ -1892,7 +1901,7 @@ def compact( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: How long to retain a prompt cache entry created by this request. @@ -1902,17 +1911,17 @@ def compact( Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in to - [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to - `service_tier=fast`; for other models, either value resolves to - `service_tier=priority`. - When not set, the default behavior is 'auto'. When - the `service_tier` parameter is set, the response body will include the - `service_tier` value based on the processing mode actually used to serve the - request. This response value may be different from the value set in the - parameter. + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To opt-in + to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. For models with a dedicated Fast + tier, either value resolves to `service_tier=fast`; for other models, either + value resolves to `service_tier=priority`. - When not set, the default behavior + is 'auto'. When the `service_tier` parameter is set, the response body will + include the `service_tier` value based on the processing mode actually used to + serve the request. This response value may be different from the value set in + the parameter. extra_headers: Send extra headers @@ -2048,20 +2057,20 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -2093,11 +2102,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -2107,7 +2116,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -2124,8 +2133,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -2133,15 +2142,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2150,7 +2159,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2158,7 +2167,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2172,14 +2181,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -2188,13 +2197,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -2209,13 +2220,13 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -2228,8 +2239,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -2242,17 +2253,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -2277,7 +2289,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -2334,27 +2346,27 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -2386,11 +2398,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -2400,7 +2412,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -2417,8 +2429,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -2426,15 +2438,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2443,7 +2455,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2451,7 +2463,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2465,14 +2477,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -2481,13 +2493,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -2502,7 +2516,7 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -2514,8 +2528,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -2528,17 +2542,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -2563,7 +2578,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -2620,27 +2635,27 @@ async def create( """Creates a model response. Provide - [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate - [text](https://platform.openai.com/docs/guides/text) or - [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - the model call your own - [custom code](https://platform.openai.com/docs/guides/function-calling) or use - built-in [tools](https://platform.openai.com/docs/guides/tools) like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - your own data as input for the model's response. + [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + generate [text](https://developers.openai.com/api/docs/guides/text) or + [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + outputs. Have the model call your own + [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + to use your own data as input for the model's response. Args: stream: If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. background: Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). context_management: Context management configuration for this request. @@ -2672,11 +2687,11 @@ async def create( Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) instructions: A system (or developer) message inserted into the model's context. @@ -2686,7 +2701,7 @@ async def create( max_output_tokens: An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_tool_calls: The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per @@ -2703,8 +2718,8 @@ async def create( model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. moderation: Configuration for running moderation on the input and output of this response. @@ -2712,15 +2727,15 @@ async def create( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt: Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -2729,7 +2744,7 @@ async def create( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -2737,7 +2752,7 @@ async def create( The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -2751,14 +2766,14 @@ async def create( `prompt_cache_retention` is not specified. reasoning: Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). safety_identifier: A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). service_tier: Specifies the processing type used for serving the request. @@ -2767,13 +2782,15 @@ async def create( will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -2788,7 +2805,7 @@ async def create( store: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). stream_options: Options for streaming responses. Only set this when you set `stream: true`. @@ -2800,8 +2817,8 @@ async def create( text: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) tool_choice: How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model @@ -2814,17 +2831,18 @@ async def create( - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. top_logprobs: An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -2849,7 +2867,7 @@ async def create( `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). extra_headers: Send extra headers @@ -3372,7 +3390,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. extra_headers: Send extra headers @@ -3409,7 +3427,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -3458,7 +3476,7 @@ async def retrieve( generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. include: Additional fields to include in the response. See the `include` parameter for @@ -3576,7 +3594,7 @@ async def cancel( Only responses created with the `background` parameter set to `true` can be cancelled. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). Args: extra_headers: Send extra headers @@ -3732,16 +3750,16 @@ async def compact( Returns a compacted response object. Learn when and how to compact long-running conversations in the - [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see - [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). Args: model: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. input: Text, image, or file inputs to the model, used to generate a response @@ -3752,7 +3770,7 @@ async def compact( previous_response_id: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. prompt_cache_key: A key to use when reading from or writing to the prompt cache. @@ -3764,7 +3782,7 @@ async def compact( up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. prompt_cache_retention: How long to retain a prompt cache entry created by this request. @@ -3774,17 +3792,17 @@ async def compact( Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in to - [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to - `service_tier=fast`; for other models, either value resolves to - `service_tier=priority`. - When not set, the default behavior is 'auto'. When - the `service_tier` parameter is set, the response body will include the - `service_tier` value based on the processing mode actually used to serve the - request. This response value may be different from the value set in the - parameter. + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To opt-in + to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. For models with a dedicated Fast + tier, either value resolves to `service_tier=fast`; for other models, either + value resolves to `service_tier=priority`. - When not set, the default behavior + is 'auto'. When the `service_tier` parameter is set, the response body will + include the `service_tier` value based on the processing mode actually used to + serve the request. This response value may be different from the value set in + the parameter. extra_headers: Send extra headers diff --git a/src/openai/resources/uploads/parts.py b/src/openai/resources/uploads/parts.py index f9c88c1cc5..5dbfcdd401 100644 --- a/src/openai/resources/uploads/parts.py +++ b/src/openai/resources/uploads/parts.py @@ -56,16 +56,17 @@ def create( ) -> UploadPart: """ Adds a - [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an - [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. - A Part represents a chunk of bytes from the file you are trying to upload. + [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + to an [Upload](https://developers.openai.com/api/reference/resources/uploads) + object. A Part represents a chunk of bytes from the file you are trying to + upload. Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you - [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). Args: data: The chunk of bytes for this Part. @@ -137,16 +138,17 @@ async def create( ) -> UploadPart: """ Adds a - [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an - [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. - A Part represents a chunk of bytes from the file you are trying to upload. + [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + to an [Upload](https://developers.openai.com/api/reference/resources/uploads) + object. A Part represents a chunk of bytes from the file you are trying to + upload. Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you - [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). Args: data: The chunk of bytes for this Part. diff --git a/src/openai/resources/uploads/uploads.py b/src/openai/resources/uploads/uploads.py index 1ab8d8b8c6..6715388d0d 100644 --- a/src/openai/resources/uploads/uploads.py +++ b/src/openai/resources/uploads/uploads.py @@ -182,24 +182,24 @@ def create( ) -> Upload: """ Creates an intermediate - [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object + [Upload](https://developers.openai.com/api/reference/resources/uploads) object that you can add - [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to. - Currently, an Upload can accept at most 8 GB in total and expires after an hour - after you create it. + [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + to. Currently, an Upload can accept at most 8 GB in total and expires after an + hour after you create it. Once you complete the Upload, we will create a - [File](https://platform.openai.com/docs/api-reference/files/object) object that + [File](https://developers.openai.com/api/reference/resources/files) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object. For certain `purpose` values, the correct `mime_type` must be specified. Please refer to documentation for the - [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files). + [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). For guidance on the proper filename extensions for each purpose, please follow the documentation on - [creating a File](https://platform.openai.com/docs/api-reference/files/create). + [creating a File](https://developers.openai.com/api/reference/resources/files/methods/create). Returns the Upload object with status `pending`. @@ -216,7 +216,7 @@ def create( purpose: The intended purpose of the uploaded file. See the - [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). expires_after: The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. @@ -306,10 +306,10 @@ def complete( ) -> Upload: """ Completes the - [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + [Upload](https://developers.openai.com/api/reference/resources/uploads). Within the returned Upload object, there is a nested - [File](https://platform.openai.com/docs/api-reference/files/object) object that + [File](https://developers.openai.com/api/reference/resources/files) object that is ready to use in the rest of the platform. You can specify the order of the Parts by passing in an ordered list of the Part @@ -510,24 +510,24 @@ async def create( ) -> Upload: """ Creates an intermediate - [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object + [Upload](https://developers.openai.com/api/reference/resources/uploads) object that you can add - [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to. - Currently, an Upload can accept at most 8 GB in total and expires after an hour - after you create it. + [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + to. Currently, an Upload can accept at most 8 GB in total and expires after an + hour after you create it. Once you complete the Upload, we will create a - [File](https://platform.openai.com/docs/api-reference/files/object) object that + [File](https://developers.openai.com/api/reference/resources/files) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object. For certain `purpose` values, the correct `mime_type` must be specified. Please refer to documentation for the - [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files). + [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). For guidance on the proper filename extensions for each purpose, please follow the documentation on - [creating a File](https://platform.openai.com/docs/api-reference/files/create). + [creating a File](https://developers.openai.com/api/reference/resources/files/methods/create). Returns the Upload object with status `pending`. @@ -544,7 +544,7 @@ async def create( purpose: The intended purpose of the uploaded file. See the - [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). expires_after: The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. @@ -634,10 +634,10 @@ async def complete( ) -> Upload: """ Completes the - [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + [Upload](https://developers.openai.com/api/reference/resources/uploads). Within the returned Upload object, there is a nested - [File](https://platform.openai.com/docs/api-reference/files/object) object that + [File](https://developers.openai.com/api/reference/resources/files) object that is ready to use in the rest of the platform. You can specify the order of the Parts by passing in an ordered list of the Part diff --git a/src/openai/resources/vector_stores/file_batches.py b/src/openai/resources/vector_stores/file_batches.py index 853ba3a565..8ba0201d35 100644 --- a/src/openai/resources/vector_stores/file_batches.py +++ b/src/openai/resources/vector_stores/file_batches.py @@ -80,12 +80,12 @@ def create( chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. - file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. If `attributes` or `chunking_strategy` are provided, they will be applied - to all files in the batch. The maximum batch size is 2000 files. This endpoint - is recommended for multi-file ingestion and helps reduce per-vector-store write - request pressure. Mutually exclusive with `files`. + file_ids: A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. If `attributes` or `chunking_strategy` are provided, they will + be applied to all files in the batch. The maximum batch size is 2000 files. This + endpoint is recommended for multi-file ingestion and helps reduce + per-vector-store write request pressure. Mutually exclusive with `files`. files: A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific @@ -450,12 +450,12 @@ async def create( chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty. - file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. If `attributes` or `chunking_strategy` are provided, they will be applied - to all files in the batch. The maximum batch size is 2000 files. This endpoint - is recommended for multi-file ingestion and helps reduce per-vector-store write - request pressure. Mutually exclusive with `files`. + file_ids: A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. If `attributes` or `chunking_strategy` are provided, they will + be applied to all files in the batch. The maximum batch size is 2000 files. This + endpoint is recommended for multi-file ingestion and helps reduce + per-vector-store write request pressure. Mutually exclusive with `files`. files: A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific diff --git a/src/openai/resources/vector_stores/files.py b/src/openai/resources/vector_stores/files.py index 02b6ef2143..9ce285f4ba 100644 --- a/src/openai/resources/vector_stores/files.py +++ b/src/openai/resources/vector_stores/files.py @@ -65,14 +65,14 @@ def create( ) -> VectorStoreFile: """ Create a vector store file by attaching a - [File](https://platform.openai.com/docs/api-reference/files) to a - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + [File](https://developers.openai.com/api/reference/resources/files) to a + [vector store](https://developers.openai.com/api/reference/resources/vector_stores). Args: - file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID that the - vector store should use. Useful for tools like `file_search` that can access + file_id: A [File](https://developers.openai.com/api/reference/resources/files) ID that + the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend - [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. attributes: Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -297,7 +297,7 @@ def delete( This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the - [delete file](https://platform.openai.com/docs/api-reference/files/delete) + [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) endpoint. Args: @@ -497,14 +497,14 @@ async def create( ) -> VectorStoreFile: """ Create a vector store file by attaching a - [File](https://platform.openai.com/docs/api-reference/files) to a - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + [File](https://developers.openai.com/api/reference/resources/files) to a + [vector store](https://developers.openai.com/api/reference/resources/vector_stores). Args: - file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID that the - vector store should use. Useful for tools like `file_search` that can access + file_id: A [File](https://developers.openai.com/api/reference/resources/files) ID that + the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend - [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. attributes: Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -729,7 +729,7 @@ async def delete( This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the - [delete file](https://platform.openai.com/docs/api-reference/files/delete) + [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) endpoint. Args: diff --git a/src/openai/resources/vector_stores/vector_stores.py b/src/openai/resources/vector_stores/vector_stores.py index a177c368c1..8408af7b77 100644 --- a/src/openai/resources/vector_stores/vector_stores.py +++ b/src/openai/resources/vector_stores/vector_stores.py @@ -103,9 +103,9 @@ def create( expires_after: The expiration policy for a vector store. - file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. + file_ids: A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and @@ -474,9 +474,9 @@ async def create( expires_after: The expiration policy for a vector store. - file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. + file_ids: A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and diff --git a/src/openai/types/admin/organization/audit_log_list_params.py b/src/openai/types/admin/organization/audit_log_list_params.py index 528eb9d9d8..2e36fd4423 100644 --- a/src/openai/types/admin/organization/audit_log_list_params.py +++ b/src/openai/types/admin/organization/audit_log_list_params.py @@ -195,7 +195,7 @@ class AuditLogListParams(TypedDict, total=False): """Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the - [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). """ limit: int diff --git a/src/openai/types/admin/organization/project_create_params.py b/src/openai/types/admin/organization/project_create_params.py index a6adc120bc..4893a8e98f 100644 --- a/src/openai/types/admin/organization/project_create_params.py +++ b/src/openai/types/admin/organization/project_create_params.py @@ -22,7 +22,7 @@ class ProjectCreateParams(TypedDict, total=False): Your organization must have access to Data residency functionality in order to use. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. Deprecated: use `residency` instead. Do not provide both `geography` and `residency`. """ @@ -32,6 +32,6 @@ class ProjectCreateParams(TypedDict, total=False): Your organization must have access to the requested residency configuration in order to use it. See - [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. """ diff --git a/src/openai/types/admin/organization/projects/project_api_key.py b/src/openai/types/admin/organization/projects/project_api_key.py index 88df839d52..15f85449c1 100644 --- a/src/openai/types/admin/organization/projects/project_api_key.py +++ b/src/openai/types/admin/organization/projects/project_api_key.py @@ -79,3 +79,9 @@ class ProjectAPIKey(BaseModel): redacted_value: str """The redacted value of the API key""" + + expires_at: Optional[int] = None + """ + The Unix timestamp (in seconds) when the API key expires, or null if it does not + expire. + """ diff --git a/src/openai/types/admin/organization/projects/service_account_create_params.py b/src/openai/types/admin/organization/projects/service_account_create_params.py index a156f70f51..795a2eef10 100644 --- a/src/openai/types/admin/organization/projects/service_account_create_params.py +++ b/src/openai/types/admin/organization/projects/service_account_create_params.py @@ -14,3 +14,12 @@ class ServiceAccountCreateParams(TypedDict, total=False): create_service_account_only: Optional[bool] """Create the service account without default roles or an API key.""" + + expires_in_seconds: Optional[int] + """Number of seconds until the initial API key expires. + + If omitted or null, the key does not expire unless the effective organization or + project policy requires an expiration. When a policy sets a maximum lifetime, + this value must be provided and must not exceed that limit. A non-null value + cannot be used when `create_service_account_only` is true. + """ diff --git a/src/openai/types/admin/organization/projects/service_account_create_response.py b/src/openai/types/admin/organization/projects/service_account_create_response.py index eadfadebf3..8a3fb3634f 100644 --- a/src/openai/types/admin/organization/projects/service_account_create_response.py +++ b/src/openai/types/admin/organization/projects/service_account_create_response.py @@ -20,6 +20,12 @@ class APIKey(BaseModel): value: str + expires_at: Optional[int] = None + """ + The Unix timestamp (in seconds) when the API key expires, or null if it does not + expire. + """ + class ServiceAccountCreateResponse(BaseModel): id: str diff --git a/src/openai/types/audio/speech_create_params.py b/src/openai/types/audio/speech_create_params.py index b5e55f68d5..29016840fe 100644 --- a/src/openai/types/audio/speech_create_params.py +++ b/src/openai/types/audio/speech_create_params.py @@ -16,7 +16,8 @@ class SpeechCreateParams(TypedDict, total=False): model: Required[Union[str, SpeechModel]] """ - One of the available [TTS models](https://platform.openai.com/docs/models#tts): + One of the available + [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. """ @@ -27,7 +28,7 @@ class SpeechCreateParams(TypedDict, total=False): `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the - [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). """ instructions: str diff --git a/src/openai/types/audio/transcription_create_params.py b/src/openai/types/audio/transcription_create_params.py index 5e88a1fbcd..e1c29e5a3c 100644 --- a/src/openai/types/audio/transcription_create_params.py +++ b/src/openai/types/audio/transcription_create_params.py @@ -97,7 +97,8 @@ class TranscriptionCreateParamsBase(TypedDict, total=False): """An optional text to guide the model's style or continue a previous audio segment. - The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + The + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. """ @@ -163,7 +164,7 @@ class TranscriptionCreateParamsNonStreaming(TranscriptionCreateParamsBase, total generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -177,7 +178,7 @@ class TranscriptionCreateParamsStreaming(TranscriptionCreateParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. diff --git a/src/openai/types/audio/transcription_text_delta_event.py b/src/openai/types/audio/transcription_text_delta_event.py index f9f95c8ef5..dd7827cd27 100644 --- a/src/openai/types/audio/transcription_text_delta_event.py +++ b/src/openai/types/audio/transcription_text_delta_event.py @@ -22,7 +22,7 @@ class Logprob(BaseModel): class TranscriptionTextDeltaEvent(BaseModel): """Emitted when there is an additional text delta. - This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. """ delta: str @@ -35,7 +35,7 @@ class TranscriptionTextDeltaEvent(BaseModel): """The log probabilities of the delta. Only included if you - [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. """ diff --git a/src/openai/types/audio/transcription_text_done_event.py b/src/openai/types/audio/transcription_text_done_event.py index f56914079e..86a4910d54 100644 --- a/src/openai/types/audio/transcription_text_done_event.py +++ b/src/openai/types/audio/transcription_text_done_event.py @@ -52,7 +52,7 @@ class Usage(BaseModel): class TranscriptionTextDoneEvent(BaseModel): """Emitted when the transcription is complete. - Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. """ text: str @@ -72,7 +72,7 @@ class TranscriptionTextDoneEvent(BaseModel): """The log probabilities of the individual tokens in the transcription. Only included if you - [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. """ diff --git a/src/openai/types/audio/transcription_text_segment_event.py b/src/openai/types/audio/transcription_text_segment_event.py index 70ebd36559..badeb503c0 100644 --- a/src/openai/types/audio/transcription_text_segment_event.py +++ b/src/openai/types/audio/transcription_text_segment_event.py @@ -9,7 +9,7 @@ class TranscriptionTextSegmentEvent(BaseModel): """ - Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`. """ id: str diff --git a/src/openai/types/audio/translation_create_params.py b/src/openai/types/audio/translation_create_params.py index 200826a144..c06c9abf5c 100644 --- a/src/openai/types/audio/translation_create_params.py +++ b/src/openai/types/audio/translation_create_params.py @@ -31,7 +31,8 @@ class TranslationCreateParams(TypedDict, total=False): """An optional text to guide the model's style or continue a previous audio segment. - The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + The + [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English. """ diff --git a/src/openai/types/batch.py b/src/openai/types/batch.py index b869674f3d..9c7ad2f6fc 100644 --- a/src/openai/types/batch.py +++ b/src/openai/types/batch.py @@ -86,8 +86,8 @@ class Batch(BaseModel): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ output_file_id: Optional[str] = None diff --git a/src/openai/types/batch_create_params.py b/src/openai/types/batch_create_params.py index 526637ace5..ed55c0dfe5 100644 --- a/src/openai/types/batch_create_params.py +++ b/src/openai/types/batch_create_params.py @@ -41,11 +41,12 @@ class BatchCreateParams(TypedDict, total=False): input_file_id: Required[str] """The ID of an uploaded file that contains requests for the new batch. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your input file must be formatted as a - [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. """ diff --git a/src/openai/types/batch_usage.py b/src/openai/types/batch_usage.py index e233ee1f83..e484522fb1 100644 --- a/src/openai/types/batch_usage.py +++ b/src/openai/types/batch_usage.py @@ -11,7 +11,7 @@ class InputTokensDetails(BaseModel): cached_tokens: int """The number of tokens that were retrieved from the cache. - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). """ diff --git a/src/openai/types/beta/assistant.py b/src/openai/types/beta/assistant.py index d7f769ec9b..de28df1ab5 100644 --- a/src/openai/types/beta/assistant.py +++ b/src/openai/types/beta/assistant.py @@ -14,9 +14,9 @@ class ToolResourcesCodeInterpreter(BaseModel): file_ids: Optional[List[str]] = None """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter`` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -24,7 +24,7 @@ class ToolResourcesFileSearch(BaseModel): vector_store_ids: Optional[List[str]] = None """ The ID of the - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. """ @@ -73,10 +73,10 @@ class Assistant(BaseModel): """ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. """ name: Optional[str] = None @@ -95,14 +95,14 @@ class Assistant(BaseModel): response_format: Optional[AssistantResponseFormatOption] = None """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. diff --git a/src/openai/types/beta/assistant_create_params.py b/src/openai/types/beta/assistant_create_params.py index 5ac2ee20c9..7e863575f8 100644 --- a/src/openai/types/beta/assistant_create_params.py +++ b/src/openai/types/beta/assistant_create_params.py @@ -30,10 +30,10 @@ class AssistantCreateParams(TypedDict, total=False): """ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. """ description: Optional[str] @@ -65,21 +65,21 @@ class AssistantCreateParams(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ response_format: Optional[AssistantResponseFormatOptionParam] """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -128,9 +128,9 @@ class AssistantCreateParams(TypedDict, total=False): class ToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -180,10 +180,10 @@ class ToolResourcesFileSearchVectorStore(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - add to the vector store. For vector stores created before Nov 2025, there can be - a maximum of 10,000 files in a vector store. For vector stores created starting - in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs to add to the vector store. For vector stores created before Nov 2025, there + can be a maximum of 10,000 files in a vector store. For vector stores created + starting in Nov 2025, the limit is 100,000,000 files. """ metadata: Optional[Metadata] @@ -201,7 +201,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ The - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. """ @@ -209,7 +209,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_stores: Iterable[ToolResourcesFileSearchVectorStore] """ A helper to create a - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. """ diff --git a/src/openai/types/beta/assistant_stream_event.py b/src/openai/types/beta/assistant_stream_event.py index e1f2284934..94a8a15ecb 100644 --- a/src/openai/types/beta/assistant_stream_event.py +++ b/src/openai/types/beta/assistant_stream_event.py @@ -44,13 +44,13 @@ class ThreadCreated(BaseModel): """ - Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is created. """ data: Thread """ Represents a thread that contains - [messages](https://platform.openai.com/docs/api-reference/messages). + [messages](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.created"] @@ -61,13 +61,13 @@ class ThreadCreated(BaseModel): class ThreadRunCreated(BaseModel): """ - Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.created"] @@ -75,13 +75,13 @@ class ThreadRunCreated(BaseModel): class ThreadRunQueued(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.queued"] @@ -89,13 +89,13 @@ class ThreadRunQueued(BaseModel): class ThreadRunInProgress(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.in_progress"] @@ -103,13 +103,13 @@ class ThreadRunInProgress(BaseModel): class ThreadRunRequiresAction(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.requires_action"] @@ -117,13 +117,13 @@ class ThreadRunRequiresAction(BaseModel): class ThreadRunCompleted(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.completed"] @@ -131,13 +131,13 @@ class ThreadRunCompleted(BaseModel): class ThreadRunIncomplete(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.incomplete"] @@ -145,13 +145,13 @@ class ThreadRunIncomplete(BaseModel): class ThreadRunFailed(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.failed"] @@ -159,13 +159,13 @@ class ThreadRunFailed(BaseModel): class ThreadRunCancelling(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.cancelling"] @@ -173,13 +173,13 @@ class ThreadRunCancelling(BaseModel): class ThreadRunCancelled(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.cancelled"] @@ -187,13 +187,13 @@ class ThreadRunCancelled(BaseModel): class ThreadRunExpired(BaseModel): """ - Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires. """ data: Run """ Represents an execution run on a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.run.expired"] @@ -201,7 +201,7 @@ class ThreadRunExpired(BaseModel): class ThreadRunStepCreated(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created. """ data: RunStep @@ -212,7 +212,7 @@ class ThreadRunStepCreated(BaseModel): class ThreadRunStepInProgress(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. """ data: RunStep @@ -223,7 +223,7 @@ class ThreadRunStepInProgress(BaseModel): class ThreadRunStepDelta(BaseModel): """ - Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed. """ data: RunStepDeltaEvent @@ -237,7 +237,7 @@ class ThreadRunStepDelta(BaseModel): class ThreadRunStepCompleted(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed. """ data: RunStep @@ -248,7 +248,7 @@ class ThreadRunStepCompleted(BaseModel): class ThreadRunStepFailed(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails. """ data: RunStep @@ -259,7 +259,7 @@ class ThreadRunStepFailed(BaseModel): class ThreadRunStepCancelled(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled. """ data: RunStep @@ -270,7 +270,7 @@ class ThreadRunStepCancelled(BaseModel): class ThreadRunStepExpired(BaseModel): """ - Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires. """ data: RunStep @@ -281,13 +281,13 @@ class ThreadRunStepExpired(BaseModel): class ThreadMessageCreated(BaseModel): """ - Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created. """ data: Message """ Represents a message within a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.message.created"] @@ -295,13 +295,13 @@ class ThreadMessageCreated(BaseModel): class ThreadMessageInProgress(BaseModel): """ - Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. """ data: Message """ Represents a message within a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.message.in_progress"] @@ -309,7 +309,7 @@ class ThreadMessageInProgress(BaseModel): class ThreadMessageDelta(BaseModel): """ - Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed. """ data: MessageDeltaEvent @@ -323,13 +323,13 @@ class ThreadMessageDelta(BaseModel): class ThreadMessageCompleted(BaseModel): """ - Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed. """ data: Message """ Represents a message within a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.message.completed"] @@ -337,13 +337,13 @@ class ThreadMessageCompleted(BaseModel): class ThreadMessageIncomplete(BaseModel): """ - Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed. """ data: Message """ Represents a message within a - [thread](https://platform.openai.com/docs/api-reference/threads). + [thread](https://developers.openai.com/api/docs/assistants/migration). """ event: Literal["thread.message.incomplete"] @@ -351,7 +351,7 @@ class ThreadMessageIncomplete(BaseModel): class ErrorEvent(BaseModel): """ - Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. + Occurs when an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. """ data: ErrorObject diff --git a/src/openai/types/beta/assistant_update_params.py b/src/openai/types/beta/assistant_update_params.py index 30c07a3569..2b28c10627 100644 --- a/src/openai/types/beta/assistant_update_params.py +++ b/src/openai/types/beta/assistant_update_params.py @@ -84,10 +84,10 @@ class AssistantUpdateParams(TypedDict, total=False): """ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. """ name: Optional[str] @@ -100,21 +100,21 @@ class AssistantUpdateParams(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ response_format: Optional[AssistantResponseFormatOptionParam] """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -164,9 +164,9 @@ class ToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ Overrides the list of - [file](https://platform.openai.com/docs/api-reference/files) IDs made available - to the `code_interpreter` tool. There can be a maximum of 20 files associated - with the tool. + [file](https://developers.openai.com/api/reference/resources/files) IDs made + available to the `code_interpreter` tool. There can be a maximum of 20 files + associated with the tool. """ @@ -174,7 +174,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ Overrides the - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. """ diff --git a/src/openai/types/beta/beta_computer_tool.py b/src/openai/types/beta/beta_computer_tool.py index 0509718f52..b8566fc571 100644 --- a/src/openai/types/beta/beta_computer_tool.py +++ b/src/openai/types/beta/beta_computer_tool.py @@ -10,7 +10,7 @@ class BetaComputerTool(BaseModel): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ type: Literal["computer"] diff --git a/src/openai/types/beta/beta_computer_tool_param.py b/src/openai/types/beta/beta_computer_tool_param.py index 72f9194880..2ae661f6cb 100644 --- a/src/openai/types/beta/beta_computer_tool_param.py +++ b/src/openai/types/beta/beta_computer_tool_param.py @@ -10,7 +10,7 @@ class BetaComputerToolParam(TypedDict, total=False): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ type: Required[Literal["computer"]] diff --git a/src/openai/types/beta/beta_computer_use_preview_tool.py b/src/openai/types/beta/beta_computer_use_preview_tool.py index af4870df80..5ea08d2abd 100644 --- a/src/openai/types/beta/beta_computer_use_preview_tool.py +++ b/src/openai/types/beta/beta_computer_use_preview_tool.py @@ -10,7 +10,7 @@ class BetaComputerUsePreviewTool(BaseModel): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ display_height: int diff --git a/src/openai/types/beta/beta_computer_use_preview_tool_param.py b/src/openai/types/beta/beta_computer_use_preview_tool_param.py index b36adc0fe6..f99ac13ce2 100644 --- a/src/openai/types/beta/beta_computer_use_preview_tool_param.py +++ b/src/openai/types/beta/beta_computer_use_preview_tool_param.py @@ -10,7 +10,7 @@ class BetaComputerUsePreviewToolParam(TypedDict, total=False): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ display_height: Required[int] diff --git a/src/openai/types/beta/beta_custom_tool.py b/src/openai/types/beta/beta_custom_tool.py index 9457e9bce8..5521d24116 100644 --- a/src/openai/types/beta/beta_custom_tool.py +++ b/src/openai/types/beta/beta_custom_tool.py @@ -37,7 +37,7 @@ class FormatGrammar(BaseModel): class BetaCustomTool(BaseModel): """A custom tool that processes input using a specified format. - Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) """ name: str diff --git a/src/openai/types/beta/beta_custom_tool_param.py b/src/openai/types/beta/beta_custom_tool_param.py index 251e79dadc..e375511569 100644 --- a/src/openai/types/beta/beta_custom_tool_param.py +++ b/src/openai/types/beta/beta_custom_tool_param.py @@ -43,7 +43,7 @@ class FormatGrammar(TypedDict, total=False): class BetaCustomToolParam(_BetaCustomToolParamReservedKeywords, total=False): """A custom tool that processes input using a specified format. - Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) """ name: Required[str] diff --git a/src/openai/types/beta/beta_file_search_tool.py b/src/openai/types/beta/beta_file_search_tool.py index a84e284d6c..fe3ccd517b 100644 --- a/src/openai/types/beta/beta_file_search_tool.py +++ b/src/openai/types/beta/beta_file_search_tool.py @@ -131,7 +131,7 @@ class RankingOptions(BaseModel): class BetaFileSearchTool(BaseModel): """A tool that searches for relevant content from uploaded files. - Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). """ type: Literal["file_search"] diff --git a/src/openai/types/beta/beta_file_search_tool_param.py b/src/openai/types/beta/beta_file_search_tool_param.py index 95b2a955db..8aa63b1456 100644 --- a/src/openai/types/beta/beta_file_search_tool_param.py +++ b/src/openai/types/beta/beta_file_search_tool_param.py @@ -133,7 +133,7 @@ class RankingOptions(TypedDict, total=False): class BetaFileSearchToolParam(TypedDict, total=False): """A tool that searches for relevant content from uploaded files. - Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). """ type: Required[Literal["file_search"]] diff --git a/src/openai/types/beta/beta_function_tool.py b/src/openai/types/beta/beta_function_tool.py index 9f501664df..8238e31073 100644 --- a/src/openai/types/beta/beta_function_tool.py +++ b/src/openai/types/beta/beta_function_tool.py @@ -13,7 +13,7 @@ class BetaFunctionTool(BaseModel): """Defines a function in your own code the model can choose to call. - Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ name: str diff --git a/src/openai/types/beta/beta_function_tool_param.py b/src/openai/types/beta/beta_function_tool_param.py index 70f44d43c5..7853575036 100644 --- a/src/openai/types/beta/beta_function_tool_param.py +++ b/src/openai/types/beta/beta_function_tool_param.py @@ -19,7 +19,7 @@ class BetaFunctionToolParam(_BetaFunctionToolParamReservedKeywords, total=False): """Defines a function in your own code the model can choose to call. - Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ name: Required[str] diff --git a/src/openai/types/beta/beta_response.py b/src/openai/types/beta/beta_response.py index e12433639e..8e2307bc48 100644 --- a/src/openai/types/beta/beta_response.py +++ b/src/openai/types/beta/beta_response.py @@ -258,7 +258,7 @@ class PromptCacheOptions(BaseModel): class Reasoning(BaseModel): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] = None @@ -278,7 +278,7 @@ class Reasoning(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -450,8 +450,8 @@ class BetaResponse(BaseModel): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ object: Literal["response"] @@ -494,17 +494,18 @@ class BetaResponse(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -520,7 +521,7 @@ class BetaResponse(BaseModel): background: Optional[bool] = None """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ completed_at: Optional[float] = None @@ -540,7 +541,7 @@ class BetaResponse(BaseModel): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] = None @@ -561,14 +562,14 @@ class BetaResponse(BaseModel): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[BetaResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_diagnostics: Optional[PromptCacheDiagnostics] = None @@ -578,7 +579,7 @@ class BetaResponse(BaseModel): """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: Optional[PromptCacheOptions] = None @@ -593,7 +594,7 @@ class BetaResponse(BaseModel): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -610,7 +611,7 @@ class BetaResponse(BaseModel): reasoning: Optional[Reasoning] = None """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] = None @@ -620,7 +621,7 @@ class BetaResponse(BaseModel): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[BetaServiceTier] = None @@ -631,13 +632,15 @@ class BetaResponse(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -662,8 +665,8 @@ class BetaResponse(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ top_logprobs: Optional[int] = None @@ -695,5 +698,5 @@ class BetaResponse(BaseModel): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/beta/beta_response_compaction_item.py b/src/openai/types/beta/beta_response_compaction_item.py index 3395aca704..d6772a8511 100644 --- a/src/openai/types/beta/beta_response_compaction_item.py +++ b/src/openai/types/beta/beta_response_compaction_item.py @@ -17,7 +17,7 @@ class Agent(BaseModel): class BetaResponseCompactionItem(BaseModel): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ id: str diff --git a/src/openai/types/beta/beta_response_compaction_item_param.py b/src/openai/types/beta/beta_response_compaction_item_param.py index 607c94ff99..6c1237612a 100644 --- a/src/openai/types/beta/beta_response_compaction_item_param.py +++ b/src/openai/types/beta/beta_response_compaction_item_param.py @@ -17,7 +17,7 @@ class Agent(BaseModel): class BetaResponseCompactionItemParam(BaseModel): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ encrypted_content: str diff --git a/src/openai/types/beta/beta_response_compaction_item_param_param.py b/src/openai/types/beta/beta_response_compaction_item_param_param.py index 2e8364ed1f..beb9d64607 100644 --- a/src/openai/types/beta/beta_response_compaction_item_param_param.py +++ b/src/openai/types/beta/beta_response_compaction_item_param_param.py @@ -17,7 +17,7 @@ class Agent(TypedDict, total=False): class BetaResponseCompactionItemParamParam(TypedDict, total=False): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ encrypted_content: Required[str] diff --git a/src/openai/types/beta/beta_response_computer_tool_call.py b/src/openai/types/beta/beta_response_computer_tool_call.py index 03650c6472..fefce55113 100644 --- a/src/openai/types/beta/beta_response_computer_tool_call.py +++ b/src/openai/types/beta/beta_response_computer_tool_call.py @@ -34,7 +34,7 @@ class BetaResponseComputerToolCall(BaseModel): """A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. """ id: str diff --git a/src/openai/types/beta/beta_response_computer_tool_call_param.py b/src/openai/types/beta/beta_response_computer_tool_call_param.py index 9fcb19c4b8..d46b234469 100644 --- a/src/openai/types/beta/beta_response_computer_tool_call_param.py +++ b/src/openai/types/beta/beta_response_computer_tool_call_param.py @@ -35,7 +35,7 @@ class BetaResponseComputerToolCallParam(TypedDict, total=False): """A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. """ id: Required[str] diff --git a/src/openai/types/beta/beta_response_file_search_tool_call.py b/src/openai/types/beta/beta_response_file_search_tool_call.py index 3ad9ef0421..baf576c520 100644 --- a/src/openai/types/beta/beta_response_file_search_tool_call.py +++ b/src/openai/types/beta/beta_response_file_search_tool_call.py @@ -42,7 +42,7 @@ class BetaResponseFileSearchToolCall(BaseModel): """The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. """ id: str diff --git a/src/openai/types/beta/beta_response_file_search_tool_call_param.py b/src/openai/types/beta/beta_response_file_search_tool_call_param.py index 6b48569ac2..0c30e63b4b 100644 --- a/src/openai/types/beta/beta_response_file_search_tool_call_param.py +++ b/src/openai/types/beta/beta_response_file_search_tool_call_param.py @@ -44,7 +44,7 @@ class BetaResponseFileSearchToolCallParam(TypedDict, total=False): """The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. """ id: Required[str] diff --git a/src/openai/types/beta/beta_response_format_text_json_schema_config.py b/src/openai/types/beta/beta_response_format_text_json_schema_config.py index 53f0cbc7d8..d4c141f11e 100644 --- a/src/openai/types/beta/beta_response_format_text_json_schema_config.py +++ b/src/openai/types/beta/beta_response_format_text_json_schema_config.py @@ -14,7 +14,7 @@ class BetaResponseFormatTextJSONSchemaConfig(BaseModel): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ name: str @@ -45,5 +45,5 @@ class BetaResponseFormatTextJSONSchemaConfig(BaseModel): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ diff --git a/src/openai/types/beta/beta_response_format_text_json_schema_config_param.py b/src/openai/types/beta/beta_response_format_text_json_schema_config_param.py index 89ff99be76..6fc894cd4c 100644 --- a/src/openai/types/beta/beta_response_format_text_json_schema_config_param.py +++ b/src/openai/types/beta/beta_response_format_text_json_schema_config_param.py @@ -12,7 +12,7 @@ class BetaResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ name: Required[str] @@ -43,5 +43,5 @@ class BetaResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ diff --git a/src/openai/types/beta/beta_response_function_tool_call.py b/src/openai/types/beta/beta_response_function_tool_call.py index cc16016287..a71c81214c 100644 --- a/src/openai/types/beta/beta_response_function_tool_call.py +++ b/src/openai/types/beta/beta_response_function_tool_call.py @@ -36,7 +36,7 @@ class BetaResponseFunctionToolCall(BaseModel): """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ arguments: str diff --git a/src/openai/types/beta/beta_response_function_tool_call_item.py b/src/openai/types/beta/beta_response_function_tool_call_item.py index 33936ad0a5..0c1658325e 100644 --- a/src/openai/types/beta/beta_response_function_tool_call_item.py +++ b/src/openai/types/beta/beta_response_function_tool_call_item.py @@ -12,7 +12,7 @@ class BetaResponseFunctionToolCallItem(BetaResponseFunctionToolCall): """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ id: str # type: ignore diff --git a/src/openai/types/beta/beta_response_function_tool_call_param.py b/src/openai/types/beta/beta_response_function_tool_call_param.py index 84968ea35e..775f563cae 100644 --- a/src/openai/types/beta/beta_response_function_tool_call_param.py +++ b/src/openai/types/beta/beta_response_function_tool_call_param.py @@ -42,7 +42,7 @@ class BetaResponseFunctionToolCallParam(_BetaResponseFunctionToolCallParamReserv """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ arguments: Required[str] diff --git a/src/openai/types/beta/beta_response_function_web_search.py b/src/openai/types/beta/beta_response_function_web_search.py index 5f7ccdbe77..9da960e1a1 100644 --- a/src/openai/types/beta/beta_response_function_web_search.py +++ b/src/openai/types/beta/beta_response_function_web_search.py @@ -80,7 +80,7 @@ class BetaResponseFunctionWebSearch(BaseModel): """The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. """ id: str diff --git a/src/openai/types/beta/beta_response_function_web_search_param.py b/src/openai/types/beta/beta_response_function_web_search_param.py index 88ece7bcc9..04a920ef88 100644 --- a/src/openai/types/beta/beta_response_function_web_search_param.py +++ b/src/openai/types/beta/beta_response_function_web_search_param.py @@ -81,7 +81,7 @@ class BetaResponseFunctionWebSearchParam(TypedDict, total=False): """The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. """ id: Required[str] diff --git a/src/openai/types/beta/beta_response_input_image.py b/src/openai/types/beta/beta_response_input_image.py index 7924aded41..81da7d63f4 100644 --- a/src/openai/types/beta/beta_response_input_image.py +++ b/src/openai/types/beta/beta_response_input_image.py @@ -22,7 +22,7 @@ class PromptCacheBreakpoint(BaseModel): class BetaResponseInputImage(BaseModel): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). """ detail: BetaImageDetail diff --git a/src/openai/types/beta/beta_response_input_image_content.py b/src/openai/types/beta/beta_response_input_image_content.py index 0e4dbe6af5..532c65d14f 100644 --- a/src/openai/types/beta/beta_response_input_image_content.py +++ b/src/openai/types/beta/beta_response_input_image_content.py @@ -22,7 +22,7 @@ class PromptCacheBreakpoint(BaseModel): class BetaResponseInputImageContent(BaseModel): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) """ type: Literal["input_image"] diff --git a/src/openai/types/beta/beta_response_input_image_content_param.py b/src/openai/types/beta/beta_response_input_image_content_param.py index e0caff4b04..03e343c788 100644 --- a/src/openai/types/beta/beta_response_input_image_content_param.py +++ b/src/openai/types/beta/beta_response_input_image_content_param.py @@ -23,7 +23,7 @@ class PromptCacheBreakpoint(TypedDict, total=False): class BetaResponseInputImageContentParam(TypedDict, total=False): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) """ type: Required[Literal["input_image"]] diff --git a/src/openai/types/beta/beta_response_input_image_param.py b/src/openai/types/beta/beta_response_input_image_param.py index c5631d2733..cabe60f743 100644 --- a/src/openai/types/beta/beta_response_input_image_param.py +++ b/src/openai/types/beta/beta_response_input_image_param.py @@ -23,7 +23,7 @@ class PromptCacheBreakpoint(TypedDict, total=False): class BetaResponseInputImageParam(TypedDict, total=False): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). """ detail: Required[BetaImageDetail] diff --git a/src/openai/types/beta/beta_response_input_item.py b/src/openai/types/beta/beta_response_input_item.py index ae776df388..51d12ff5ec 100644 --- a/src/openai/types/beta/beta_response_input_item.py +++ b/src/openai/types/beta/beta_response_input_item.py @@ -512,15 +512,27 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + agent: Optional[ImageGenerationCallAgent] = None """The agent that produced this item.""" + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/beta/beta_response_input_item_param.py b/src/openai/types/beta/beta_response_input_item_param.py index fe114e9ed9..f72706323d 100644 --- a/src/openai/types/beta/beta_response_input_item_param.py +++ b/src/openai/types/beta/beta_response_input_item_param.py @@ -511,15 +511,27 @@ class ImageGenerationCall(TypedDict, total=False): type: Required[Literal["image_generation_call"]] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] + """The action used for image generation.""" + agent: Optional[ImageGenerationCallAgent] """The agent that produced this item.""" + background: Optional[Literal["transparent", "opaque", "auto"]] + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/beta/beta_response_input_param.py b/src/openai/types/beta/beta_response_input_param.py index 471ce35136..2f640b77aa 100644 --- a/src/openai/types/beta/beta_response_input_param.py +++ b/src/openai/types/beta/beta_response_input_param.py @@ -512,15 +512,27 @@ class ImageGenerationCall(TypedDict, total=False): type: Required[Literal["image_generation_call"]] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] + """The action used for image generation.""" + agent: Optional[ImageGenerationCallAgent] """The agent that produced this item.""" + background: Optional[Literal["transparent", "opaque", "auto"]] + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/beta/beta_response_item.py b/src/openai/types/beta/beta_response_item.py index 35da9e3e5f..875a51ea31 100644 --- a/src/openai/types/beta/beta_response_item.py +++ b/src/openai/types/beta/beta_response_item.py @@ -351,15 +351,27 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + agent: Optional[ImageGenerationCallAgent] = None """The agent that produced this item.""" + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/beta/beta_response_output_item.py b/src/openai/types/beta/beta_response_output_item.py index 4f41ed3423..7c2a74ca39 100644 --- a/src/openai/types/beta/beta_response_output_item.py +++ b/src/openai/types/beta/beta_response_output_item.py @@ -349,15 +349,27 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + agent: Optional[ImageGenerationCallAgent] = None """The agent that produced this item.""" + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/beta/beta_response_prompt.py b/src/openai/types/beta/beta_response_prompt.py index d034313d9b..c8fb425512 100644 --- a/src/openai/types/beta/beta_response_prompt.py +++ b/src/openai/types/beta/beta_response_prompt.py @@ -16,7 +16,7 @@ class BetaResponsePrompt(BaseModel): """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ id: str diff --git a/src/openai/types/beta/beta_response_prompt_param.py b/src/openai/types/beta/beta_response_prompt_param.py index 8e661bb6ec..e024eb95d2 100644 --- a/src/openai/types/beta/beta_response_prompt_param.py +++ b/src/openai/types/beta/beta_response_prompt_param.py @@ -17,7 +17,7 @@ class BetaResponsePromptParam(TypedDict, total=False): """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ id: Required[str] diff --git a/src/openai/types/beta/beta_response_reasoning_item.py b/src/openai/types/beta/beta_response_reasoning_item.py index 36adc14def..c7b1e0fce7 100644 --- a/src/openai/types/beta/beta_response_reasoning_item.py +++ b/src/openai/types/beta/beta_response_reasoning_item.py @@ -40,7 +40,7 @@ class BetaResponseReasoningItem(BaseModel): A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). """ id: str diff --git a/src/openai/types/beta/beta_response_reasoning_item_param.py b/src/openai/types/beta/beta_response_reasoning_item_param.py index d1f90c0f27..c67348e326 100644 --- a/src/openai/types/beta/beta_response_reasoning_item_param.py +++ b/src/openai/types/beta/beta_response_reasoning_item_param.py @@ -40,7 +40,7 @@ class BetaResponseReasoningItemParam(TypedDict, total=False): A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). """ id: Required[str] diff --git a/src/openai/types/beta/beta_response_text_config.py b/src/openai/types/beta/beta_response_text_config.py index 23abe7695a..d0a471a670 100644 --- a/src/openai/types/beta/beta_response_text_config.py +++ b/src/openai/types/beta/beta_response_text_config.py @@ -14,8 +14,8 @@ class BetaResponseTextConfig(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[BetaResponseFormatTextConfig] = None @@ -23,7 +23,7 @@ class BetaResponseTextConfig(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/beta/beta_response_text_config_param.py b/src/openai/types/beta/beta_response_text_config_param.py index 328e28c580..8372c9e9ae 100644 --- a/src/openai/types/beta/beta_response_text_config_param.py +++ b/src/openai/types/beta/beta_response_text_config_param.py @@ -15,8 +15,8 @@ class BetaResponseTextConfigParam(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: BetaResponseFormatTextConfigParam @@ -24,7 +24,7 @@ class BetaResponseTextConfigParam(TypedDict, total=False): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/beta/beta_response_usage.py b/src/openai/types/beta/beta_response_usage.py index b96bde525d..56182da6c2 100644 --- a/src/openai/types/beta/beta_response_usage.py +++ b/src/openai/types/beta/beta_response_usage.py @@ -12,9 +12,9 @@ class InputTokensDetails(BaseModel): """The number of input tokens that were written to the cache.""" cached_tokens: int - """The number of tokens that were retrieved from the cache. - - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + """ + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). """ diff --git a/src/openai/types/beta/beta_responses_client_event.py b/src/openai/types/beta/beta_responses_client_event.py index 091bd015c3..ce1eec6150 100644 --- a/src/openai/types/beta/beta_responses_client_event.py +++ b/src/openai/types/beta/beta_responses_client_event.py @@ -107,7 +107,7 @@ class ResponseCreateMultiAgent(BaseModel): class ResponseCreatePromptCacheOptions(BaseModel): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] = None @@ -138,7 +138,7 @@ class ResponseCreatePromptCacheOptions(BaseModel): class ResponseCreateReasoning(BaseModel): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] = None @@ -158,7 +158,7 @@ class ResponseCreateReasoning(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,7 +238,7 @@ class ResponseCreate(BaseModel): background: Optional[bool] = None """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[List[ResponseCreateContextManagement]] = None @@ -279,11 +279,11 @@ class ResponseCreate(BaseModel): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] = None @@ -298,7 +298,7 @@ class ResponseCreate(BaseModel): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] = None @@ -432,8 +432,8 @@ class ResponseCreate(BaseModel): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[ResponseCreateModeration] = None @@ -449,21 +449,21 @@ class ResponseCreate(BaseModel): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[BetaResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] = None """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: Optional[ResponseCreatePromptCacheOptions] = None @@ -476,7 +476,7 @@ class ResponseCreate(BaseModel): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -486,7 +486,7 @@ class ResponseCreate(BaseModel): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -503,7 +503,7 @@ class ResponseCreate(BaseModel): reasoning: Optional[ResponseCreateReasoning] = None """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] = None @@ -513,7 +513,7 @@ class ResponseCreate(BaseModel): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[BetaServiceTier] = None @@ -524,13 +524,15 @@ class ResponseCreate(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -548,7 +550,7 @@ class ResponseCreate(BaseModel): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream: Optional[bool] = None @@ -557,7 +559,7 @@ class ResponseCreate(BaseModel): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -587,8 +589,8 @@ class ResponseCreate(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: Optional[ResponseCreateToolChoice] = None @@ -607,17 +609,18 @@ class ResponseCreate(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -653,7 +656,7 @@ class ResponseCreate(BaseModel): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/beta/beta_responses_client_event_param.py b/src/openai/types/beta/beta_responses_client_event_param.py index 576ca59bb8..48c47d4b5b 100644 --- a/src/openai/types/beta/beta_responses_client_event_param.py +++ b/src/openai/types/beta/beta_responses_client_event_param.py @@ -107,7 +107,7 @@ class ResponseCreateMultiAgent(TypedDict, total=False): class ResponseCreatePromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] @@ -138,7 +138,7 @@ class ResponseCreatePromptCacheOptions(TypedDict, total=False): class ResponseCreateReasoning(TypedDict, total=False): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] @@ -158,7 +158,7 @@ class ResponseCreateReasoning(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,7 +238,7 @@ class ResponseCreate(TypedDict, total=False): background: Optional[bool] """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[Iterable[ResponseCreateContextManagement]] @@ -279,11 +279,11 @@ class ResponseCreate(TypedDict, total=False): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] @@ -298,7 +298,7 @@ class ResponseCreate(TypedDict, total=False): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] @@ -431,8 +431,8 @@ class ResponseCreate(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[ResponseCreateModeration] @@ -448,21 +448,21 @@ class ResponseCreate(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[BetaResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: ResponseCreatePromptCacheOptions @@ -475,7 +475,7 @@ class ResponseCreate(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -485,7 +485,7 @@ class ResponseCreate(TypedDict, total=False): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -502,7 +502,7 @@ class ResponseCreate(TypedDict, total=False): reasoning: Optional[ResponseCreateReasoning] """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] @@ -512,7 +512,7 @@ class ResponseCreate(TypedDict, total=False): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[BetaServiceTier] @@ -523,13 +523,15 @@ class ResponseCreate(TypedDict, total=False): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -547,7 +549,7 @@ class ResponseCreate(TypedDict, total=False): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream: Optional[bool] @@ -556,7 +558,7 @@ class ResponseCreate(TypedDict, total=False): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -586,8 +588,8 @@ class ResponseCreate(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: ResponseCreateToolChoice @@ -606,17 +608,18 @@ class ResponseCreate(TypedDict, total=False): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -652,7 +655,7 @@ class ResponseCreate(TypedDict, total=False): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/beta/beta_tool.py b/src/openai/types/beta/beta_tool.py index 68f79d83a1..6bf6807f7b 100644 --- a/src/openai/types/beta/beta_tool.py +++ b/src/openai/types/beta/beta_tool.py @@ -108,7 +108,7 @@ class McpRequireApprovalMcpToolApprovalFilter(BaseModel): class Mcp(BaseModel): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: str @@ -146,7 +146,7 @@ class Mcp(BaseModel): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/beta/beta_tool_choice_types.py b/src/openai/types/beta/beta_tool_choice_types.py index f427782b16..82d9d17203 100644 --- a/src/openai/types/beta/beta_tool_choice_types.py +++ b/src/openai/types/beta/beta_tool_choice_types.py @@ -10,7 +10,7 @@ class BetaToolChoiceTypes(BaseModel): """ Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). """ type: Literal[ @@ -26,7 +26,7 @@ class BetaToolChoiceTypes(BaseModel): """The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: diff --git a/src/openai/types/beta/beta_tool_choice_types_param.py b/src/openai/types/beta/beta_tool_choice_types_param.py index 4b14b55cb0..e0eeff4948 100644 --- a/src/openai/types/beta/beta_tool_choice_types_param.py +++ b/src/openai/types/beta/beta_tool_choice_types_param.py @@ -10,7 +10,7 @@ class BetaToolChoiceTypesParam(TypedDict, total=False): """ Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). """ type: Required[ @@ -28,7 +28,7 @@ class BetaToolChoiceTypesParam(TypedDict, total=False): """The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: diff --git a/src/openai/types/beta/beta_tool_param.py b/src/openai/types/beta/beta_tool_param.py index 9590d1aa92..0ea63e62ed 100644 --- a/src/openai/types/beta/beta_tool_param.py +++ b/src/openai/types/beta/beta_tool_param.py @@ -109,7 +109,7 @@ class McpRequireApprovalMcpToolApprovalFilter(TypedDict, total=False): class Mcp(TypedDict, total=False): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: Required[str] @@ -145,7 +145,7 @@ class Mcp(TypedDict, total=False): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/beta/beta_web_search_preview_tool.py b/src/openai/types/beta/beta_web_search_preview_tool.py index 51e384045c..968e480885 100644 --- a/src/openai/types/beta/beta_web_search_preview_tool.py +++ b/src/openai/types/beta/beta_web_search_preview_tool.py @@ -36,7 +36,7 @@ class UserLocation(BaseModel): class BetaWebSearchPreviewTool(BaseModel): """This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Literal["web_search_preview", "web_search_preview_2025_03_11"] diff --git a/src/openai/types/beta/beta_web_search_preview_tool_param.py b/src/openai/types/beta/beta_web_search_preview_tool_param.py index 085befa3d6..40b245d566 100644 --- a/src/openai/types/beta/beta_web_search_preview_tool_param.py +++ b/src/openai/types/beta/beta_web_search_preview_tool_param.py @@ -36,7 +36,7 @@ class UserLocation(TypedDict, total=False): class BetaWebSearchPreviewToolParam(TypedDict, total=False): """This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Required[Literal["web_search_preview", "web_search_preview_2025_03_11"]] diff --git a/src/openai/types/beta/beta_web_search_tool.py b/src/openai/types/beta/beta_web_search_tool.py index 25e1ce761f..bdf61e6d90 100644 --- a/src/openai/types/beta/beta_web_search_tool.py +++ b/src/openai/types/beta/beta_web_search_tool.py @@ -50,7 +50,7 @@ class BetaWebSearchTool(BaseModel): """Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Literal["web_search", "web_search_2025_08_26"] diff --git a/src/openai/types/beta/beta_web_search_tool_param.py b/src/openai/types/beta/beta_web_search_tool_param.py index 852fce6754..e3a3ae5621 100644 --- a/src/openai/types/beta/beta_web_search_tool_param.py +++ b/src/openai/types/beta/beta_web_search_tool_param.py @@ -52,7 +52,7 @@ class BetaWebSearchToolParam(TypedDict, total=False): """Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Required[Literal["web_search", "web_search_2025_08_26"]] diff --git a/src/openai/types/beta/file_search_tool.py b/src/openai/types/beta/file_search_tool.py index 24ddeeeb32..c431b75258 100644 --- a/src/openai/types/beta/file_search_tool.py +++ b/src/openai/types/beta/file_search_tool.py @@ -13,7 +13,7 @@ class FileSearchRankingOptions(BaseModel): If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ score_threshold: float @@ -40,7 +40,7 @@ class FileSearch(BaseModel): Note that the file search tool may output fewer than `max_num_results` results. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ @@ -51,7 +51,7 @@ class FileSearch(BaseModel): score_threshold of 0. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ diff --git a/src/openai/types/beta/file_search_tool_param.py b/src/openai/types/beta/file_search_tool_param.py index 6aaa7eb5a8..f74c004195 100644 --- a/src/openai/types/beta/file_search_tool_param.py +++ b/src/openai/types/beta/file_search_tool_param.py @@ -12,7 +12,7 @@ class FileSearchRankingOptions(TypedDict, total=False): If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ score_threshold: Required[float] @@ -39,7 +39,7 @@ class FileSearch(TypedDict, total=False): Note that the file search tool may output fewer than `max_num_results` results. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ @@ -50,7 +50,7 @@ class FileSearch(TypedDict, total=False): score_threshold of 0. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ diff --git a/src/openai/types/beta/response_compact_params.py b/src/openai/types/beta/response_compact_params.py index e57bfce737..50ec8e5de4 100644 --- a/src/openai/types/beta/response_compact_params.py +++ b/src/openai/types/beta/response_compact_params.py @@ -127,8 +127,8 @@ class ResponseCompactParams(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ input: Union[str, Iterable[BetaResponseInputItemParam], None] @@ -146,7 +146,7 @@ class ResponseCompactParams(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ @@ -163,7 +163,7 @@ class ResponseCompactParams(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -177,11 +177,12 @@ class ResponseCompactParams(TypedDict, total=False): configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in - to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To + opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) + at the request level, include the `service_tier=fast` or + `service_tier=priority` parameter for Responses or Chat Completions. For + models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -196,7 +197,7 @@ class ResponseCompactParams(TypedDict, total=False): class PromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ mode: Literal["implicit", "explicit"] diff --git a/src/openai/types/beta/response_create_params.py b/src/openai/types/beta/response_create_params.py index cddb7cd966..d7cbc258b7 100644 --- a/src/openai/types/beta/response_create_params.py +++ b/src/openai/types/beta/response_create_params.py @@ -45,7 +45,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): background: Optional[bool] """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[Iterable[ContextManagement]] @@ -86,11 +86,11 @@ class ResponseCreateParamsBase(TypedDict, total=False): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] @@ -105,7 +105,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] @@ -238,8 +238,8 @@ class ResponseCreateParamsBase(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[Moderation] @@ -255,21 +255,21 @@ class ResponseCreateParamsBase(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[BetaResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: PromptCacheOptions @@ -282,7 +282,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -292,7 +292,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -309,7 +309,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): reasoning: Optional[Reasoning] """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] @@ -319,7 +319,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[BetaServiceTier] @@ -330,13 +330,15 @@ class ResponseCreateParamsBase(TypedDict, total=False): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -354,7 +356,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream_options: Optional[StreamOptions] @@ -373,8 +375,8 @@ class ResponseCreateParamsBase(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: ToolChoice @@ -393,17 +395,18 @@ class ResponseCreateParamsBase(TypedDict, total=False): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -439,7 +442,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ betas: Annotated[List[Literal["responses_multi_agent=v1"]], PropertyInfo(alias="openai-beta")] @@ -511,7 +514,7 @@ class MultiAgent(TypedDict, total=False): class PromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] @@ -542,7 +545,7 @@ class PromptCacheOptions(TypedDict, total=False): class Reasoning(TypedDict, total=False): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] @@ -562,7 +565,7 @@ class Reasoning(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -631,7 +634,7 @@ class ResponseCreateParamsNonStreaming(ResponseCreateParamsBase, total=False): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -643,7 +646,7 @@ class ResponseCreateParamsStreaming(ResponseCreateParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ diff --git a/src/openai/types/beta/response_retrieve_params.py b/src/openai/types/beta/response_retrieve_params.py index 6213605a70..bddae0f355 100644 --- a/src/openai/types/beta/response_retrieve_params.py +++ b/src/openai/types/beta/response_retrieve_params.py @@ -42,7 +42,7 @@ class ResponseRetrieveParamsNonStreaming(ResponseRetrieveParamsBase, total=False generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -54,7 +54,7 @@ class ResponseRetrieveParamsStreaming(ResponseRetrieveParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ diff --git a/src/openai/types/beta/responses/input_token_count_params.py b/src/openai/types/beta/responses/input_token_count_params.py index ce3532ab4c..e4c2d3f32a 100644 --- a/src/openai/types/beta/responses/input_token_count_params.py +++ b/src/openai/types/beta/responses/input_token_count_params.py @@ -54,8 +54,8 @@ class InputTokenCountParams(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ parallel_tool_calls: Optional[bool] @@ -72,14 +72,14 @@ class InputTokenCountParams(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ reasoning: Optional[Reasoning] """ **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ text: Optional[Text] @@ -87,8 +87,8 @@ class InputTokenCountParams(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: Optional[ToolChoice] @@ -118,7 +118,7 @@ class InputTokenCountParams(TypedDict, total=False): class Reasoning(TypedDict, total=False): """ - **gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning). + **gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] @@ -138,7 +138,7 @@ class Reasoning(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -172,8 +172,8 @@ class Text(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: BetaResponseFormatTextConfigParam @@ -181,7 +181,7 @@ class Text(TypedDict, total=False): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/beta/thread.py b/src/openai/types/beta/thread.py index e0069c618d..9a0bbc8f2c 100644 --- a/src/openai/types/beta/thread.py +++ b/src/openai/types/beta/thread.py @@ -12,9 +12,9 @@ class ToolResourcesCodeInterpreter(BaseModel): file_ids: Optional[List[str]] = None """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -22,7 +22,7 @@ class ToolResourcesFileSearch(BaseModel): vector_store_ids: Optional[List[str]] = None """ The - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. """ @@ -40,7 +40,7 @@ class ToolResources(BaseModel): class Thread(BaseModel): """ - Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). + Represents a thread that contains [messages](https://developers.openai.com/api/docs/assistants/migration). """ id: str diff --git a/src/openai/types/beta/thread_create_and_run_params.py b/src/openai/types/beta/thread_create_and_run_params.py index 2e0d616ac9..dbdc17ed9d 100644 --- a/src/openai/types/beta/thread_create_and_run_params.py +++ b/src/openai/types/beta/thread_create_and_run_params.py @@ -42,8 +42,8 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False): assistant_id: Required[str] """ The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. """ instructions: Optional[str] @@ -82,30 +82,31 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False): model: Union[str, ChatModel, None] """ - The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. """ parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. """ response_format: Optional[AssistantResponseFormatOptionParam] """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -220,9 +221,9 @@ class ThreadMessage(TypedDict, total=False): class ThreadToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -273,10 +274,10 @@ class ThreadToolResourcesFileSearchVectorStore(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - add to the vector store. For vector stores created before Nov 2025, there can be - a maximum of 10,000 files in a vector store. For vector stores created starting - in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs to add to the vector store. For vector stores created before Nov 2025, there + can be a maximum of 10,000 files in a vector store. For vector stores created + starting in Nov 2025, the limit is 100,000,000 files. """ metadata: Optional[Metadata] @@ -294,7 +295,7 @@ class ThreadToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ The - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. """ @@ -302,7 +303,7 @@ class ThreadToolResourcesFileSearch(TypedDict, total=False): vector_stores: Iterable[ThreadToolResourcesFileSearchVectorStore] """ A helper to create a - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. """ @@ -327,8 +328,9 @@ class Thread(TypedDict, total=False): messages: Iterable[ThreadMessage] """ - A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - start the thread with. + A list of + [messages](https://developers.openai.com/api/docs/assistants/migration) to start + the thread with. """ metadata: Optional[Metadata] @@ -353,9 +355,9 @@ class Thread(TypedDict, total=False): class ToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -363,7 +365,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ The ID of the - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. """ diff --git a/src/openai/types/beta/thread_create_params.py b/src/openai/types/beta/thread_create_params.py index 3e66b71b7b..4524d3ac77 100644 --- a/src/openai/types/beta/thread_create_params.py +++ b/src/openai/types/beta/thread_create_params.py @@ -30,8 +30,9 @@ class ThreadCreateParams(TypedDict, total=False): messages: Iterable[Message] """ - A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - start the thread with. + A list of + [messages](https://developers.openai.com/api/docs/assistants/migration) to start + the thread with. """ metadata: Optional[Metadata] @@ -99,9 +100,9 @@ class Message(TypedDict, total=False): class ToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -151,10 +152,10 @@ class ToolResourcesFileSearchVectorStore(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - add to the vector store. For vector stores created before Nov 2025, there can be - a maximum of 10,000 files in a vector store. For vector stores created starting - in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs to add to the vector store. For vector stores created before Nov 2025, there + can be a maximum of 10,000 files in a vector store. For vector stores created + starting in Nov 2025, the limit is 100,000,000 files. """ metadata: Optional[Metadata] @@ -172,7 +173,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ The - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. """ @@ -180,7 +181,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_stores: Iterable[ToolResourcesFileSearchVectorStore] """ A helper to create a - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. """ diff --git a/src/openai/types/beta/thread_update_params.py b/src/openai/types/beta/thread_update_params.py index e0855a22ac..d4db589684 100644 --- a/src/openai/types/beta/thread_update_params.py +++ b/src/openai/types/beta/thread_update_params.py @@ -34,9 +34,9 @@ class ThreadUpdateParams(TypedDict, total=False): class ToolResourcesCodeInterpreter(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - available to the `code_interpreter` tool. There can be a maximum of 20 files - associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) + IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + files associated with the tool. """ @@ -44,7 +44,7 @@ class ToolResourcesFileSearch(TypedDict, total=False): vector_store_ids: SequenceNotStr[str] """ The - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. """ diff --git a/src/openai/types/beta/threads/image_file.py b/src/openai/types/beta/threads/image_file.py index f28be3d7cb..87c9969f1b 100644 --- a/src/openai/types/beta/threads/image_file.py +++ b/src/openai/types/beta/threads/image_file.py @@ -11,9 +11,9 @@ class ImageFile(BaseModel): file_id: str """ - The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - in the message content. Set `purpose="vision"` when uploading the File if you - need to later display the file content. + The [File](https://developers.openai.com/api/reference/resources/files) ID of + the image in the message content. Set `purpose="vision"` when uploading the File + if you need to later display the file content. """ detail: Optional[Literal["auto", "low", "high"]] = None diff --git a/src/openai/types/beta/threads/image_file_content_block.py b/src/openai/types/beta/threads/image_file_content_block.py index 63b0cc936d..8739286a9c 100644 --- a/src/openai/types/beta/threads/image_file_content_block.py +++ b/src/openai/types/beta/threads/image_file_content_block.py @@ -10,7 +10,7 @@ class ImageFileContentBlock(BaseModel): """ - References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. """ image_file: ImageFile diff --git a/src/openai/types/beta/threads/image_file_content_block_param.py b/src/openai/types/beta/threads/image_file_content_block_param.py index 59ad825d74..1eaa6d96a0 100644 --- a/src/openai/types/beta/threads/image_file_content_block_param.py +++ b/src/openai/types/beta/threads/image_file_content_block_param.py @@ -11,7 +11,7 @@ class ImageFileContentBlockParam(TypedDict, total=False): """ - References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. """ image_file: Required[ImageFileParam] diff --git a/src/openai/types/beta/threads/image_file_delta.py b/src/openai/types/beta/threads/image_file_delta.py index 270c275fad..63cb685434 100644 --- a/src/openai/types/beta/threads/image_file_delta.py +++ b/src/openai/types/beta/threads/image_file_delta.py @@ -17,7 +17,7 @@ class ImageFileDelta(BaseModel): file_id: Optional[str] = None """ - The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - in the message content. Set `purpose="vision"` when uploading the File if you - need to later display the file content. + The [File](https://developers.openai.com/api/reference/resources/files) ID of + the image in the message content. Set `purpose="vision"` when uploading the File + if you need to later display the file content. """ diff --git a/src/openai/types/beta/threads/image_file_delta_block.py b/src/openai/types/beta/threads/image_file_delta_block.py index 3ffd3fadca..01a72c5247 100644 --- a/src/openai/types/beta/threads/image_file_delta_block.py +++ b/src/openai/types/beta/threads/image_file_delta_block.py @@ -11,7 +11,7 @@ class ImageFileDeltaBlock(BaseModel): """ - References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. """ index: int diff --git a/src/openai/types/beta/threads/image_file_param.py b/src/openai/types/beta/threads/image_file_param.py index 6fd4342332..ac3c7ddaed 100644 --- a/src/openai/types/beta/threads/image_file_param.py +++ b/src/openai/types/beta/threads/image_file_param.py @@ -10,9 +10,9 @@ class ImageFileParam(TypedDict, total=False): file_id: Required[str] """ - The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - in the message content. Set `purpose="vision"` when uploading the File if you - need to later display the file content. + The [File](https://developers.openai.com/api/reference/resources/files) ID of + the image in the message content. Set `purpose="vision"` when uploading the File + if you need to later display the file content. """ detail: Literal["auto", "low", "high"] diff --git a/src/openai/types/beta/threads/message.py b/src/openai/types/beta/threads/message.py index 1a684f301c..5aa80d9b48 100644 --- a/src/openai/types/beta/threads/message.py +++ b/src/openai/types/beta/threads/message.py @@ -42,7 +42,7 @@ class IncompleteDetails(BaseModel): class Message(BaseModel): """ - Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + Represents a message within a [thread](https://developers.openai.com/api/docs/assistants/migration). """ id: str @@ -51,7 +51,7 @@ class Message(BaseModel): assistant_id: Optional[str] = None """ If applicable, the ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) that + [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored this message. """ @@ -91,7 +91,7 @@ class Message(BaseModel): run_id: Optional[str] = None """ - The ID of the [run](https://platform.openai.com/docs/api-reference/runs) + The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. """ @@ -104,6 +104,6 @@ class Message(BaseModel): thread_id: str """ - The [thread](https://platform.openai.com/docs/api-reference/threads) ID that - this message belongs to. + The [thread](https://developers.openai.com/api/docs/assistants/migration) ID + that this message belongs to. """ diff --git a/src/openai/types/beta/threads/required_action_function_tool_call.py b/src/openai/types/beta/threads/required_action_function_tool_call.py index b8bf858e22..def92306ae 100644 --- a/src/openai/types/beta/threads/required_action_function_tool_call.py +++ b/src/openai/types/beta/threads/required_action_function_tool_call.py @@ -24,7 +24,7 @@ class RequiredActionFunctionToolCall(BaseModel): """The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the - [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) endpoint. """ diff --git a/src/openai/types/beta/threads/run.py b/src/openai/types/beta/threads/run.py index 5eb5b9de82..e1ba8be330 100644 --- a/src/openai/types/beta/threads/run.py +++ b/src/openai/types/beta/threads/run.py @@ -106,7 +106,7 @@ class Usage(BaseModel): class Run(BaseModel): """ - Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + Represents an execution run on a [thread](https://developers.openai.com/api/docs/assistants/migration). """ id: str @@ -115,8 +115,8 @@ class Run(BaseModel): assistant_id: str """ The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - execution of this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) used + for execution of this run. """ cancelled_at: Optional[int] = None @@ -143,8 +143,8 @@ class Run(BaseModel): instructions: str """ The instructions that the - [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) used + for this run. """ last_error: Optional[LastError] = None @@ -175,8 +175,8 @@ class Run(BaseModel): model: str """ The model that the - [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) used + for this run. """ object: Literal["thread.run"] @@ -185,7 +185,7 @@ class Run(BaseModel): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. """ @@ -198,14 +198,14 @@ class Run(BaseModel): response_format: Optional[AssistantResponseFormatOption] = None """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -231,8 +231,9 @@ class Run(BaseModel): thread_id: str """ - The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - that was executed on as a part of this run. + The ID of the + [thread](https://developers.openai.com/api/docs/assistants/migration) that was + executed on as a part of this run. """ tool_choice: Optional[AssistantToolChoiceOption] = None @@ -249,8 +250,8 @@ class Run(BaseModel): tools: List[AssistantTool] """ The list of tools that the - [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) used + for this run. """ truncation_strategy: Optional[TruncationStrategy] = None diff --git a/src/openai/types/beta/threads/run_create_params.py b/src/openai/types/beta/threads/run_create_params.py index 2ddfd26267..d2be422b0f 100644 --- a/src/openai/types/beta/threads/run_create_params.py +++ b/src/openai/types/beta/threads/run_create_params.py @@ -31,8 +31,8 @@ class RunCreateParamsBase(TypedDict, total=False): assistant_id: Required[str] """ The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - execute this run. + [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + to execute this run. """ include: List[RunStepInclude] @@ -43,7 +43,7 @@ class RunCreateParamsBase(TypedDict, total=False): search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ @@ -60,8 +60,8 @@ class RunCreateParamsBase(TypedDict, total=False): instructions: Optional[str] """ Overrides the - [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - of the assistant. This is useful for modifying the behavior on a per-run basis. + [instructions](https://developers.openai.com/api/docs/assistants/migration) of + the assistant. This is useful for modifying the behavior on a per-run basis. """ max_completion_tokens: Optional[int] @@ -94,16 +94,17 @@ class RunCreateParamsBase(TypedDict, total=False): model: Union[str, ChatModel, None] """ - The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - be used to execute this run. If a value is provided here, it will override the - model associated with the assistant. If not, the model associated with the - assistant will be used. + The ID of the + [Model](https://developers.openai.com/api/reference/resources/models) to be used + to execute this run. If a value is provided here, it will override the model + associated with the assistant. If not, the model associated with the assistant + will be used. """ parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. """ @@ -114,21 +115,21 @@ class RunCreateParamsBase(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ response_format: Optional[AssistantResponseFormatOptionParam] """Specifies the format that the model must output. - Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. diff --git a/src/openai/types/beta/threads/runs/code_interpreter_output_image.py b/src/openai/types/beta/threads/runs/code_interpreter_output_image.py index 833ae125fa..5a3694ffcb 100644 --- a/src/openai/types/beta/threads/runs/code_interpreter_output_image.py +++ b/src/openai/types/beta/threads/runs/code_interpreter_output_image.py @@ -11,8 +11,8 @@ class Image(BaseModel): file_id: Optional[str] = None """ - The [file](https://platform.openai.com/docs/api-reference/files) ID of the - image. + The [file](https://developers.openai.com/api/reference/resources/files) ID of + the image. """ diff --git a/src/openai/types/beta/threads/runs/code_interpreter_tool_call.py b/src/openai/types/beta/threads/runs/code_interpreter_tool_call.py index c9b92bc8e1..d67947f84f 100644 --- a/src/openai/types/beta/threads/runs/code_interpreter_tool_call.py +++ b/src/openai/types/beta/threads/runs/code_interpreter_tool_call.py @@ -29,8 +29,8 @@ class CodeInterpreterOutputLogs(BaseModel): class CodeInterpreterOutputImageImage(BaseModel): file_id: str """ - The [file](https://platform.openai.com/docs/api-reference/files) ID of the - image. + The [file](https://developers.openai.com/api/reference/resources/files) ID of + the image. """ diff --git a/src/openai/types/beta/threads/runs/function_tool_call.py b/src/openai/types/beta/threads/runs/function_tool_call.py index b87516e775..b5d4e3e7a3 100644 --- a/src/openai/types/beta/threads/runs/function_tool_call.py +++ b/src/openai/types/beta/threads/runs/function_tool_call.py @@ -21,8 +21,7 @@ class Function(BaseModel): """The output of the function. This will be `null` if the outputs have not been - [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - yet. + [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. """ diff --git a/src/openai/types/beta/threads/runs/function_tool_call_delta.py b/src/openai/types/beta/threads/runs/function_tool_call_delta.py index 212d574893..59ceeb140c 100644 --- a/src/openai/types/beta/threads/runs/function_tool_call_delta.py +++ b/src/openai/types/beta/threads/runs/function_tool_call_delta.py @@ -21,8 +21,7 @@ class Function(BaseModel): """The output of the function. This will be `null` if the outputs have not been - [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - yet. + [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. """ diff --git a/src/openai/types/beta/threads/runs/run_step.py b/src/openai/types/beta/threads/runs/run_step.py index 6b0a06c133..594d40e345 100644 --- a/src/openai/types/beta/threads/runs/run_step.py +++ b/src/openai/types/beta/threads/runs/run_step.py @@ -55,7 +55,7 @@ class RunStep(BaseModel): assistant_id: str """ The ID of the - [assistant](https://platform.openai.com/docs/api-reference/assistants) + [assistant](https://developers.openai.com/api/docs/assistants/migration) associated with the run step. """ @@ -98,8 +98,8 @@ class RunStep(BaseModel): run_id: str """ - The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that - this run step is a part of. + The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + that this run step is a part of. """ status: Literal["in_progress", "cancelled", "failed", "completed", "expired"] @@ -113,8 +113,9 @@ class RunStep(BaseModel): thread_id: str """ - The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - that was run. + The ID of the + [thread](https://developers.openai.com/api/docs/assistants/migration) that was + run. """ type: Literal["message_creation", "tool_calls"] diff --git a/src/openai/types/beta/threads/runs/step_list_params.py b/src/openai/types/beta/threads/runs/step_list_params.py index 3b5a582e3f..e073ed71f3 100644 --- a/src/openai/types/beta/threads/runs/step_list_params.py +++ b/src/openai/types/beta/threads/runs/step_list_params.py @@ -39,7 +39,7 @@ class StepListParams(TypedDict, total=False): search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ diff --git a/src/openai/types/beta/threads/runs/step_retrieve_params.py b/src/openai/types/beta/threads/runs/step_retrieve_params.py index bdb0093746..6e7f58ae0e 100644 --- a/src/openai/types/beta/threads/runs/step_retrieve_params.py +++ b/src/openai/types/beta/threads/runs/step_retrieve_params.py @@ -23,6 +23,6 @@ class StepRetrieveParams(TypedDict, total=False): search result content. See the - [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. """ diff --git a/src/openai/types/chat/chat_completion.py b/src/openai/types/chat/chat_completion.py index c031989751..9372c4a68c 100644 --- a/src/openai/types/chat/chat_completion.py +++ b/src/openai/types/chat/chat_completion.py @@ -236,13 +236,15 @@ class ChatCompletion(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the diff --git a/src/openai/types/chat/chat_completion_assistant_message_param.py b/src/openai/types/chat/chat_completion_assistant_message_param.py index b7b4ca299e..0bf29fd77a 100644 --- a/src/openai/types/chat/chat_completion_assistant_message_param.py +++ b/src/openai/types/chat/chat_completion_assistant_message_param.py @@ -15,7 +15,7 @@ class Audio(TypedDict, total=False): """ Data about a previous audio response from the model. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). """ id: Required[str] @@ -52,7 +52,7 @@ class ChatCompletionAssistantMessageParam(TypedDict, total=False): audio: Optional[Audio] """ Data about a previous audio response from the model. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). """ content: Union[str, Iterable[ContentArrayOfContentPart], None] diff --git a/src/openai/types/chat/chat_completion_audio.py b/src/openai/types/chat/chat_completion_audio.py index 5b974313f4..f15fdbc758 100644 --- a/src/openai/types/chat/chat_completion_audio.py +++ b/src/openai/types/chat/chat_completion_audio.py @@ -8,7 +8,7 @@ class ChatCompletionAudio(BaseModel): """ If the audio output modality is requested, this object contains data - about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). + about the audio response from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). """ id: str diff --git a/src/openai/types/chat/chat_completion_audio_param.py b/src/openai/types/chat/chat_completion_audio_param.py index 362230d468..078e6012fd 100644 --- a/src/openai/types/chat/chat_completion_audio_param.py +++ b/src/openai/types/chat/chat_completion_audio_param.py @@ -24,7 +24,7 @@ class ChatCompletionAudioParam(TypedDict, total=False): """Parameters for audio output. Required when audio output is requested with - `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + `modalities: ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). """ format: Required[Literal["wav", "aac", "mp3", "flac", "opus", "pcm16"]] diff --git a/src/openai/types/chat/chat_completion_chunk.py b/src/openai/types/chat/chat_completion_chunk.py index a88c0c1919..fd23828cdd 100644 --- a/src/openai/types/chat/chat_completion_chunk.py +++ b/src/openai/types/chat/chat_completion_chunk.py @@ -260,7 +260,7 @@ class ChatCompletionChunk(BaseModel): """ Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. - [Learn more](https://platform.openai.com/docs/guides/streaming-responses). + [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). """ id: str @@ -306,13 +306,15 @@ class ChatCompletionChunk(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the diff --git a/src/openai/types/chat/chat_completion_content_part_image.py b/src/openai/types/chat/chat_completion_content_part_image.py index 7287a6f4da..3560848617 100644 --- a/src/openai/types/chat/chat_completion_content_part_image.py +++ b/src/openai/types/chat/chat_completion_content_part_image.py @@ -16,7 +16,7 @@ class ImageURL(BaseModel): """Specifies the detail level of the image. Learn more in the - [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). """ @@ -31,7 +31,9 @@ class PromptCacheBreakpoint(BaseModel): class ChatCompletionContentPartImage(BaseModel): - """Learn about [image inputs](https://platform.openai.com/docs/guides/vision).""" + """ + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). + """ image_url: ImageURL diff --git a/src/openai/types/chat/chat_completion_content_part_image_param.py b/src/openai/types/chat/chat_completion_content_part_image_param.py index cd439bae67..8baace4eda 100644 --- a/src/openai/types/chat/chat_completion_content_part_image_param.py +++ b/src/openai/types/chat/chat_completion_content_part_image_param.py @@ -15,7 +15,7 @@ class ImageURL(TypedDict, total=False): """Specifies the detail level of the image. Learn more in the - [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). """ @@ -30,7 +30,9 @@ class PromptCacheBreakpoint(TypedDict, total=False): class ChatCompletionContentPartImageParam(TypedDict, total=False): - """Learn about [image inputs](https://platform.openai.com/docs/guides/vision).""" + """ + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). + """ image_url: Required[ImageURL] diff --git a/src/openai/types/chat/chat_completion_content_part_input_audio_param.py b/src/openai/types/chat/chat_completion_content_part_input_audio_param.py index 54d4f62564..e14bf35115 100644 --- a/src/openai/types/chat/chat_completion_content_part_input_audio_param.py +++ b/src/openai/types/chat/chat_completion_content_part_input_audio_param.py @@ -26,7 +26,9 @@ class PromptCacheBreakpoint(TypedDict, total=False): class ChatCompletionContentPartInputAudioParam(TypedDict, total=False): - """Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).""" + """ + Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). + """ input_audio: Required[InputAudio] diff --git a/src/openai/types/chat/chat_completion_content_part_param.py b/src/openai/types/chat/chat_completion_content_part_param.py index 7bff9044f4..cc34b7cb5e 100644 --- a/src/openai/types/chat/chat_completion_content_part_param.py +++ b/src/openai/types/chat/chat_completion_content_part_param.py @@ -38,7 +38,7 @@ class FilePromptCacheBreakpoint(TypedDict, total=False): class File(TypedDict, total=False): """ - Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation. """ file: Required[FileFile] diff --git a/src/openai/types/chat/chat_completion_content_part_text.py b/src/openai/types/chat/chat_completion_content_part_text.py index df9a70402d..590b95aea1 100644 --- a/src/openai/types/chat/chat_completion_content_part_text.py +++ b/src/openai/types/chat/chat_completion_content_part_text.py @@ -19,9 +19,7 @@ class PromptCacheBreakpoint(BaseModel): class ChatCompletionContentPartText(BaseModel): - """ - Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - """ + """Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).""" text: str """The text content.""" diff --git a/src/openai/types/chat/chat_completion_content_part_text_param.py b/src/openai/types/chat/chat_completion_content_part_text_param.py index f17920897e..adee12ec16 100644 --- a/src/openai/types/chat/chat_completion_content_part_text_param.py +++ b/src/openai/types/chat/chat_completion_content_part_text_param.py @@ -18,9 +18,7 @@ class PromptCacheBreakpoint(TypedDict, total=False): class ChatCompletionContentPartTextParam(TypedDict, total=False): - """ - Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - """ + """Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).""" text: Required[str] """The text content.""" diff --git a/src/openai/types/chat/chat_completion_message.py b/src/openai/types/chat/chat_completion_message.py index 0066447642..a3064da854 100644 --- a/src/openai/types/chat/chat_completion_message.py +++ b/src/openai/types/chat/chat_completion_message.py @@ -69,14 +69,14 @@ class ChatCompletionMessage(BaseModel): annotations: Optional[List[Annotation]] = None """ Annotations for the message, when applicable, as when using the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ audio: Optional[ChatCompletionAudio] = None """ If the audio output modality is requested, this object contains data about the audio response from the model. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). """ function_call: Optional[FunctionCall] = None diff --git a/src/openai/types/chat/completion_create_params.py b/src/openai/types/chat/completion_create_params.py index 4967572a3b..49170b76e2 100644 --- a/src/openai/types/chat/completion_create_params.py +++ b/src/openai/types/chat/completion_create_params.py @@ -43,11 +43,11 @@ class CompletionCreateParamsBase(TypedDict, total=False): messages: Required[Iterable[ChatCompletionMessageParam]] """A list of messages comprising the conversation so far. - Depending on the [model](https://platform.openai.com/docs/models) you use, + Depending on the [model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are supported, like - [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and - [audio](https://platform.openai.com/docs/guides/audio). + [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and + [audio](https://developers.openai.com/api/docs/guides/audio). """ model: Required[Union[str, ChatModel]] @@ -55,15 +55,15 @@ class CompletionCreateParamsBase(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ audio: Optional[ChatCompletionAudioParam] """Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). """ frequency_penalty: Optional[float] @@ -118,18 +118,18 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tokens: Optional[int] """ - The maximum number of [tokens](/tokenizer) that can be generated in the chat - completion. This value can be used to control + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with - [o-series models](https://platform.openai.com/docs/guides/reasoning). + [o-series models](https://developers.openai.com/api/docs/guides/reasoning). """ metadata: Optional[Metadata] @@ -150,8 +150,8 @@ class CompletionCreateParamsBase(TypedDict, total=False): `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that - this model generate both text and audio responses, you can use: + [generate audio](https://developers.openai.com/api/docs/guides/audio). To + request that this model generate both text and audio responses, you can use: `["text", "audio"]` """ @@ -169,7 +169,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. """ @@ -190,7 +190,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: PromptCacheOptions @@ -203,7 +203,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -213,7 +213,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -234,7 +234,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -244,7 +244,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is @@ -258,7 +258,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ seed: Optional[int] @@ -278,13 +278,15 @@ class CompletionCreateParamsBase(TypedDict, total=False): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -303,8 +305,9 @@ class CompletionCreateParamsBase(TypedDict, total=False): store: Optional[bool] """ Whether or not to store the output of this chat completion request for use in - our [model distillation](https://platform.openai.com/docs/guides/distillation) - or [evals](https://platform.openai.com/docs/guides/evals) products. + our + [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + or [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. """ @@ -337,8 +340,9 @@ class CompletionCreateParamsBase(TypedDict, total=False): """A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - or [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). """ top_logprobs: Optional[int] @@ -364,7 +368,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ verbosity: Optional[Literal["low", "medium", "high"]] @@ -379,7 +383,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ This tool searches the web for relevant results to use in a response. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ @@ -403,8 +407,8 @@ class Function(TypedDict, total=False): parameters: FunctionParameters """The parameters the functions accepts, described as a JSON Schema object. - See the [guide](https://platform.openai.com/docs/guides/function-calling) for - examples, and the + See the [guide](https://developers.openai.com/api/docs/guides/function-calling) + for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. @@ -450,7 +454,7 @@ class Moderation(TypedDict, total=False): class PromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ mode: Literal["implicit", "explicit"] @@ -509,7 +513,7 @@ class WebSearchOptionsUserLocation(TypedDict, total=False): class WebSearchOptions(TypedDict, total=False): """ This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ search_context_size: Literal["low", "medium", "high"] @@ -529,9 +533,9 @@ class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase, total=False generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. """ @@ -543,9 +547,9 @@ class CompletionCreateParamsStreaming(CompletionCreateParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) for more information, along with the - [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. """ diff --git a/src/openai/types/completion_create_params.py b/src/openai/types/completion_create_params.py index c528c0089e..72ba4265d2 100644 --- a/src/openai/types/completion_create_params.py +++ b/src/openai/types/completion_create_params.py @@ -16,10 +16,10 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. """ prompt: Required[Union[str, SequenceNotStr[str], Iterable[int], Iterable[Iterable[int]], None]] @@ -54,7 +54,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) """ logit_bias: Optional[Dict[str, int]] @@ -62,11 +62,12 @@ class CompletionCreateParamsBase(TypedDict, total=False): Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this - [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - Mathematically, the bias is added to the logits generated by the model prior to - sampling. The exact effect will vary per model, but values between -1 and 1 - should decrease or increase likelihood of selection; values like -100 or 100 - should result in a ban or exclusive selection of the relevant token. + [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + to token IDs. Mathematically, the bias is added to the logits generated by the + model prior to sampling. The exact effect will vary per model, but values + between -1 and 1 should decrease or increase likelihood of selection; values + like -100 or 100 should result in a ban or exclusive selection of the relevant + token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. @@ -84,8 +85,8 @@ class CompletionCreateParamsBase(TypedDict, total=False): max_tokens: Optional[int] """ - The maximum number of [tokens](/tokenizer) that can be generated in the - completion. + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. @@ -107,7 +108,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) """ seed: Optional[int] @@ -158,7 +159,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): """ A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/conversations/conversation_item.py b/src/openai/types/conversations/conversation_item.py index f3e6eb7b0c..bb10ae15f8 100644 --- a/src/openai/types/conversations/conversation_item.py +++ b/src/openai/types/conversations/conversation_item.py @@ -59,12 +59,24 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/conversations/item_create_params.py b/src/openai/types/conversations/item_create_params.py index 07fd069e04..d61f46462a 100644 --- a/src/openai/types/conversations/item_create_params.py +++ b/src/openai/types/conversations/item_create_params.py @@ -19,6 +19,6 @@ class ItemCreateParams(TypedDict, total=False): """Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. """ diff --git a/src/openai/types/conversations/item_retrieve_params.py b/src/openai/types/conversations/item_retrieve_params.py index 4d4ef13939..21a3be9e4f 100644 --- a/src/openai/types/conversations/item_retrieve_params.py +++ b/src/openai/types/conversations/item_retrieve_params.py @@ -17,6 +17,6 @@ class ItemRetrieveParams(TypedDict, total=False): """Additional fields to include in the response. See the `include` parameter for - [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. """ diff --git a/src/openai/types/embedding.py b/src/openai/types/embedding.py index e3b8e9b3a1..f9aaa8527f 100644 --- a/src/openai/types/embedding.py +++ b/src/openai/types/embedding.py @@ -15,7 +15,7 @@ class Embedding(BaseModel): """The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the - [embedding guide](https://platform.openai.com/docs/guides/embeddings). + [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). """ index: int diff --git a/src/openai/types/embedding_create_params.py b/src/openai/types/embedding_create_params.py index 1eeb2b0e54..9444ab54f1 100644 --- a/src/openai/types/embedding_create_params.py +++ b/src/openai/types/embedding_create_params.py @@ -29,10 +29,10 @@ class EmbeddingCreateParams(TypedDict, total=False): """ID of the model to use. You can use the - [List models](https://platform.openai.com/docs/api-reference/models/list) API to - see all of your available models, or see our - [Model overview](https://platform.openai.com/docs/models) for descriptions of - them. + [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + API to see all of your available models, or see our + [Model overview](https://developers.openai.com/api/docs/models) for descriptions + of them. """ dimensions: int @@ -51,5 +51,5 @@ class EmbeddingCreateParams(TypedDict, total=False): """ A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/evals/create_eval_completions_run_data_source.py b/src/openai/types/evals/create_eval_completions_run_data_source.py index 9f5ab8e58d..3d23e4c403 100644 --- a/src/openai/types/evals/create_eval_completions_run_data_source.py +++ b/src/openai/types/evals/create_eval_completions_run_data_source.py @@ -194,7 +194,7 @@ class SamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -204,7 +204,7 @@ class SamplingParams(BaseModel): Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is diff --git a/src/openai/types/evals/create_eval_completions_run_data_source_param.py b/src/openai/types/evals/create_eval_completions_run_data_source_param.py index 27a31b2df6..bf636ef55f 100644 --- a/src/openai/types/evals/create_eval_completions_run_data_source_param.py +++ b/src/openai/types/evals/create_eval_completions_run_data_source_param.py @@ -190,7 +190,7 @@ class SamplingParams(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -200,7 +200,7 @@ class SamplingParams(TypedDict, total=False): Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` is diff --git a/src/openai/types/evals/run_cancel_response.py b/src/openai/types/evals/run_cancel_response.py index 7b53199fcc..cd6de0faa0 100644 --- a/src/openai/types/evals/run_cancel_response.py +++ b/src/openai/types/evals/run_cancel_response.py @@ -109,7 +109,7 @@ class DataSourceResponsesSourceResponses(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,8 +238,8 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[ResponseFormatTextConfig] = None @@ -247,7 +247,7 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -270,7 +270,7 @@ class DataSourceResponsesSamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -285,8 +285,8 @@ class DataSourceResponsesSamplingParams(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tools: Optional[List[Tool]] = None @@ -298,13 +298,14 @@ class DataSourceResponsesSamplingParams(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ top_p: Optional[float] = None diff --git a/src/openai/types/evals/run_create_params.py b/src/openai/types/evals/run_create_params.py index 332a921356..9e701d4c04 100644 --- a/src/openai/types/evals/run_create_params.py +++ b/src/openai/types/evals/run_create_params.py @@ -122,7 +122,7 @@ class DataSourceCreateEvalResponsesRunDataSourceSourceResponses(TypedDict, total `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -256,8 +256,8 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText(TypedDict, to Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: ResponseFormatTextConfigParam @@ -265,7 +265,7 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText(TypedDict, to Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -288,7 +288,7 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParams(TypedDict, total= `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -303,8 +303,8 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParams(TypedDict, total= Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tools: Iterable[ToolParam] @@ -316,13 +316,14 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParams(TypedDict, total= - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ top_p: float diff --git a/src/openai/types/evals/run_create_response.py b/src/openai/types/evals/run_create_response.py index 92ace4f019..1eb63489e0 100644 --- a/src/openai/types/evals/run_create_response.py +++ b/src/openai/types/evals/run_create_response.py @@ -109,7 +109,7 @@ class DataSourceResponsesSourceResponses(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,8 +238,8 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[ResponseFormatTextConfig] = None @@ -247,7 +247,7 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -270,7 +270,7 @@ class DataSourceResponsesSamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -285,8 +285,8 @@ class DataSourceResponsesSamplingParams(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tools: Optional[List[Tool]] = None @@ -298,13 +298,14 @@ class DataSourceResponsesSamplingParams(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ top_p: Optional[float] = None diff --git a/src/openai/types/evals/run_list_response.py b/src/openai/types/evals/run_list_response.py index acdc52d8c0..1185ab40d5 100644 --- a/src/openai/types/evals/run_list_response.py +++ b/src/openai/types/evals/run_list_response.py @@ -109,7 +109,7 @@ class DataSourceResponsesSourceResponses(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,8 +238,8 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[ResponseFormatTextConfig] = None @@ -247,7 +247,7 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -270,7 +270,7 @@ class DataSourceResponsesSamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -285,8 +285,8 @@ class DataSourceResponsesSamplingParams(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tools: Optional[List[Tool]] = None @@ -298,13 +298,14 @@ class DataSourceResponsesSamplingParams(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ top_p: Optional[float] = None diff --git a/src/openai/types/evals/run_retrieve_response.py b/src/openai/types/evals/run_retrieve_response.py index 1faf08d8db..c35695fe41 100644 --- a/src/openai/types/evals/run_retrieve_response.py +++ b/src/openai/types/evals/run_retrieve_response.py @@ -109,7 +109,7 @@ class DataSourceResponsesSourceResponses(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -238,8 +238,8 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[ResponseFormatTextConfig] = None @@ -247,7 +247,7 @@ class DataSourceResponsesSamplingParamsText(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. @@ -270,7 +270,7 @@ class DataSourceResponsesSamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ @@ -285,8 +285,8 @@ class DataSourceResponsesSamplingParams(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tools: Optional[List[Tool]] = None @@ -298,13 +298,14 @@ class DataSourceResponsesSamplingParams(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ top_p: Optional[float] = None diff --git a/src/openai/types/fine_tuning/alpha/grader_run_params.py b/src/openai/types/fine_tuning/alpha/grader_run_params.py index 35e7029d45..1919962444 100644 --- a/src/openai/types/fine_tuning/alpha/grader_run_params.py +++ b/src/openai/types/fine_tuning/alpha/grader_run_params.py @@ -22,16 +22,17 @@ class GraderRunParams(TypedDict, total=False): """The model sample to be evaluated. This value will be used to populate the `sample` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. - The `output_json` variable will be populated if the model sample is a valid JSON - string. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. The `output_json` variable will be populated if the model sample is a + valid JSON string. """ item: object """The dataset item provided to the grader. This will be used to populate the `item` namespace. See - [the guide](https://platform.openai.com/docs/guides/graders) for more details. + [the guide](https://developers.openai.com/api/docs/guides/graders) for more + details. """ diff --git a/src/openai/types/fine_tuning/fine_tuning_job.py b/src/openai/types/fine_tuning/fine_tuning_job.py index dae7e971bc..daf589049c 100644 --- a/src/openai/types/fine_tuning/fine_tuning_job.py +++ b/src/openai/types/fine_tuning/fine_tuning_job.py @@ -121,7 +121,7 @@ class FineTuningJob(BaseModel): """The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the - [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). """ seed: int @@ -143,14 +143,14 @@ class FineTuningJob(BaseModel): """The file ID used for training. You can retrieve the training data with the - [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). """ validation_file: Optional[str] = None """The file ID used for validation. You can retrieve the validation results with the - [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). """ estimated_finish: Optional[int] = None diff --git a/src/openai/types/fine_tuning/job_create_params.py b/src/openai/types/fine_tuning/job_create_params.py index 4987fe6796..d8e08560da 100644 --- a/src/openai/types/fine_tuning/job_create_params.py +++ b/src/openai/types/fine_tuning/job_create_params.py @@ -19,27 +19,28 @@ class JobCreateParams(TypedDict, total=False): """The name of the model to fine-tune. You can select one of the - [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). """ training_file: Required[str] """The ID of an uploaded file that contains training data. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) + See + [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. The contents of the file should differ depending on if the model uses the - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the - [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. """ @@ -94,7 +95,7 @@ class JobCreateParams(TypedDict, total=False): the purpose `fine-tune`. See the - [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. """ diff --git a/src/openai/types/graders/score_model_grader.py b/src/openai/types/graders/score_model_grader.py index b243fc644f..419427d8bd 100644 --- a/src/openai/types/graders/score_model_grader.py +++ b/src/openai/types/graders/score_model_grader.py @@ -89,7 +89,7 @@ class SamplingParams(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ diff --git a/src/openai/types/graders/score_model_grader_param.py b/src/openai/types/graders/score_model_grader_param.py index b325bd221e..78b797f69e 100644 --- a/src/openai/types/graders/score_model_grader_param.py +++ b/src/openai/types/graders/score_model_grader_param.py @@ -95,7 +95,7 @@ class SamplingParams(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ diff --git a/src/openai/types/image_create_variation_params.py b/src/openai/types/image_create_variation_params.py index c0634658a3..a33840d2c6 100644 --- a/src/openai/types/image_create_variation_params.py +++ b/src/openai/types/image_create_variation_params.py @@ -44,5 +44,5 @@ class ImageCreateVariationParams(TypedDict, total=False): """ A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/image_edit_params.py b/src/openai/types/image_edit_params.py index e8420fc590..ea8e318657 100644 --- a/src/openai/types/image_edit_params.py +++ b/src/openai/types/image_edit_params.py @@ -139,7 +139,7 @@ class ImageEditParamsBase(TypedDict, total=False): """ A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ @@ -148,7 +148,7 @@ class ImageEditParamsNonStreaming(ImageEditParamsBase, total=False): """Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. """ @@ -158,7 +158,7 @@ class ImageEditParamsStreaming(ImageEditParamsBase): """Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. """ diff --git a/src/openai/types/image_generate_params.py b/src/openai/types/image_generate_params.py index 9a87bc87da..339276d2c8 100644 --- a/src/openai/types/image_generate_params.py +++ b/src/openai/types/image_generate_params.py @@ -135,7 +135,7 @@ class ImageGenerateParamsBase(TypedDict, total=False): """ A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ @@ -144,7 +144,7 @@ class ImageGenerateParamsNonStreaming(ImageGenerateParamsBase, total=False): """Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. """ @@ -154,7 +154,7 @@ class ImageGenerateParamsStreaming(ImageGenerateParamsBase): """Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. """ diff --git a/src/openai/types/moderation_create_params.py b/src/openai/types/moderation_create_params.py index aecb004228..97e2033bdb 100644 --- a/src/openai/types/moderation_create_params.py +++ b/src/openai/types/moderation_create_params.py @@ -24,7 +24,5 @@ class ModerationCreateParams(TypedDict, total=False): """The content moderation model you would like to use. Learn more in - [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - learn about available models - [here](https://platform.openai.com/docs/models#moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). """ diff --git a/src/openai/types/realtime/audio_transcription.py b/src/openai/types/realtime/audio_transcription.py index 9eafc30113..65c789da80 100644 --- a/src/openai/types/realtime/audio_transcription.py +++ b/src/openai/types/realtime/audio_transcription.py @@ -63,7 +63,7 @@ class AudioTranscription(BaseModel): """ An optional text to guide the model's style or continue a previous audio segment. For `whisper-1`, the - [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. diff --git a/src/openai/types/realtime/audio_transcription_param.py b/src/openai/types/realtime/audio_transcription_param.py index a70ee134bd..d8b282fbee 100644 --- a/src/openai/types/realtime/audio_transcription_param.py +++ b/src/openai/types/realtime/audio_transcription_param.py @@ -64,7 +64,7 @@ class AudioTranscriptionParam(TypedDict, total=False): """ An optional text to guide the model's style or continue a previous audio segment. For `whisper-1`, the - [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. diff --git a/src/openai/types/realtime/call_accept_params.py b/src/openai/types/realtime/call_accept_params.py index d6b34fc3ce..3e681ac0d4 100644 --- a/src/openai/types/realtime/call_accept_params.py +++ b/src/openai/types/realtime/call_accept_params.py @@ -96,7 +96,7 @@ class CallAcceptParams(TypedDict, total=False): prompt: Optional[ResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: RealtimeReasoningParam diff --git a/src/openai/types/realtime/output_audio_buffer_clear_event.py b/src/openai/types/realtime/output_audio_buffer_clear_event.py index dcaf44d512..5190d1a46f 100644 --- a/src/openai/types/realtime/output_audio_buffer_clear_event.py +++ b/src/openai/types/realtime/output_audio_buffer_clear_event.py @@ -15,7 +15,7 @@ class OutputAudioBufferClearEvent(BaseModel): stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ type: Literal["output_audio_buffer.clear"] diff --git a/src/openai/types/realtime/output_audio_buffer_clear_event_param.py b/src/openai/types/realtime/output_audio_buffer_clear_event_param.py index 2d4ade99b0..5bad1df39d 100644 --- a/src/openai/types/realtime/output_audio_buffer_clear_event_param.py +++ b/src/openai/types/realtime/output_audio_buffer_clear_event_param.py @@ -14,7 +14,7 @@ class OutputAudioBufferClearEventParam(TypedDict, total=False): stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ type: Required[Literal["output_audio_buffer.clear"]] diff --git a/src/openai/types/realtime/realtime_audio_config_input.py b/src/openai/types/realtime/realtime_audio_config_input.py index 5d9ce958d1..1c11fef2b2 100644 --- a/src/openai/types/realtime/realtime_audio_config_input.py +++ b/src/openai/types/realtime/realtime_audio_config_input.py @@ -46,7 +46,7 @@ class RealtimeAudioConfigInput(BaseModel): `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through - [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. diff --git a/src/openai/types/realtime/realtime_audio_config_input_param.py b/src/openai/types/realtime/realtime_audio_config_input_param.py index 6f9e26caf6..36b911cf9a 100644 --- a/src/openai/types/realtime/realtime_audio_config_input_param.py +++ b/src/openai/types/realtime/realtime_audio_config_input_param.py @@ -48,7 +48,7 @@ class RealtimeAudioConfigInputParam(TypedDict, total=False): `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through - [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. diff --git a/src/openai/types/realtime/realtime_response_create_mcp_tool.py b/src/openai/types/realtime/realtime_response_create_mcp_tool.py index 694f598393..49ca282abc 100644 --- a/src/openai/types/realtime/realtime_response_create_mcp_tool.py +++ b/src/openai/types/realtime/realtime_response_create_mcp_tool.py @@ -85,7 +85,7 @@ class RequireApprovalMcpToolApprovalFilter(BaseModel): class RealtimeResponseCreateMcpTool(BaseModel): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: str @@ -123,7 +123,7 @@ class RealtimeResponseCreateMcpTool(BaseModel): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/realtime/realtime_response_create_mcp_tool_param.py b/src/openai/types/realtime/realtime_response_create_mcp_tool_param.py index 300e7c2fe1..4545e188ff 100644 --- a/src/openai/types/realtime/realtime_response_create_mcp_tool_param.py +++ b/src/openai/types/realtime/realtime_response_create_mcp_tool_param.py @@ -87,7 +87,7 @@ class RequireApprovalMcpToolApprovalFilter(TypedDict, total=False): class RealtimeResponseCreateMcpToolParam(TypedDict, total=False): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: Required[str] @@ -123,7 +123,7 @@ class RealtimeResponseCreateMcpToolParam(TypedDict, total=False): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/realtime/realtime_response_create_params.py b/src/openai/types/realtime/realtime_response_create_params.py index 6561f0d5a4..8991279349 100644 --- a/src/openai/types/realtime/realtime_response_create_params.py +++ b/src/openai/types/realtime/realtime_response_create_params.py @@ -94,7 +94,7 @@ class RealtimeResponseCreateParams(BaseModel): prompt: Optional[ResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: Optional[RealtimeReasoning] = None diff --git a/src/openai/types/realtime/realtime_response_create_params_param.py b/src/openai/types/realtime/realtime_response_create_params_param.py index 0ec84f5a40..1801019967 100644 --- a/src/openai/types/realtime/realtime_response_create_params_param.py +++ b/src/openai/types/realtime/realtime_response_create_params_param.py @@ -95,7 +95,7 @@ class RealtimeResponseCreateParamsParam(TypedDict, total=False): prompt: Optional[ResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: RealtimeReasoningParam diff --git a/src/openai/types/realtime/realtime_server_event.py b/src/openai/types/realtime/realtime_server_event.py index 8262c92a76..24416e6cdd 100644 --- a/src/openai/types/realtime/realtime_server_event.py +++ b/src/openai/types/realtime/realtime_server_event.py @@ -81,7 +81,7 @@ class OutputAudioBufferStarted(BaseModel): **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added (`response.content_part.added`) to the response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ event_id: str @@ -99,7 +99,7 @@ class OutputAudioBufferStopped(BaseModel): **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client (`response.done`). - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ event_id: str @@ -119,7 +119,7 @@ class OutputAudioBufferCleared(BaseModel): mode when the user has interrupted (`input_audio_buffer.speech_started`), or when the client has emitted the `output_audio_buffer.clear` event to manually cut off the current audio response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). """ event_id: str diff --git a/src/openai/types/realtime/realtime_session_create_request.py b/src/openai/types/realtime/realtime_session_create_request.py index 523568b174..3b15f995e0 100644 --- a/src/openai/types/realtime/realtime_session_create_request.py +++ b/src/openai/types/realtime/realtime_session_create_request.py @@ -98,7 +98,7 @@ class RealtimeSessionCreateRequest(BaseModel): prompt: Optional[ResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: Optional[RealtimeReasoning] = None diff --git a/src/openai/types/realtime/realtime_session_create_request_param.py b/src/openai/types/realtime/realtime_session_create_request_param.py index 721c05bb24..d1ce2f1d40 100644 --- a/src/openai/types/realtime/realtime_session_create_request_param.py +++ b/src/openai/types/realtime/realtime_session_create_request_param.py @@ -98,7 +98,7 @@ class RealtimeSessionCreateRequestParam(TypedDict, total=False): prompt: Optional[ResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: RealtimeReasoningParam diff --git a/src/openai/types/realtime/realtime_session_create_response.py b/src/openai/types/realtime/realtime_session_create_response.py index 707c7e803d..8d1b6dc4ec 100644 --- a/src/openai/types/realtime/realtime_session_create_response.py +++ b/src/openai/types/realtime/realtime_session_create_response.py @@ -307,7 +307,7 @@ class ToolMcpToolRequireApprovalMcpToolApprovalFilter(BaseModel): class ToolMcpTool(BaseModel): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: str @@ -345,7 +345,7 @@ class ToolMcpTool(BaseModel): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: @@ -501,7 +501,7 @@ class RealtimeSessionCreateResponse(BaseModel): prompt: Optional[ResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ reasoning: Optional[RealtimeReasoning] = None diff --git a/src/openai/types/realtime/realtime_tools_config_param.py b/src/openai/types/realtime/realtime_tools_config_param.py index a2212fe0cc..3904e0a068 100644 --- a/src/openai/types/realtime/realtime_tools_config_param.py +++ b/src/openai/types/realtime/realtime_tools_config_param.py @@ -90,7 +90,7 @@ class McpRequireApprovalMcpToolApprovalFilter(TypedDict, total=False): class Mcp(TypedDict, total=False): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: Required[str] @@ -126,7 +126,7 @@ class Mcp(TypedDict, total=False): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/realtime/realtime_tools_config_union.py b/src/openai/types/realtime/realtime_tools_config_union.py index 84b232edde..74981702f0 100644 --- a/src/openai/types/realtime/realtime_tools_config_union.py +++ b/src/openai/types/realtime/realtime_tools_config_union.py @@ -88,7 +88,7 @@ class McpRequireApprovalMcpToolApprovalFilter(BaseModel): class Mcp(BaseModel): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: str @@ -126,7 +126,7 @@ class Mcp(BaseModel): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/realtime/realtime_tools_config_union_param.py b/src/openai/types/realtime/realtime_tools_config_union_param.py index 84681137f1..9f9498c408 100644 --- a/src/openai/types/realtime/realtime_tools_config_union_param.py +++ b/src/openai/types/realtime/realtime_tools_config_union_param.py @@ -89,7 +89,7 @@ class McpRequireApprovalMcpToolApprovalFilter(TypedDict, total=False): class Mcp(TypedDict, total=False): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: Required[str] @@ -125,7 +125,7 @@ class Mcp(TypedDict, total=False): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/realtime/realtime_transcription_session_audio_input.py b/src/openai/types/realtime/realtime_transcription_session_audio_input.py index e204ff674c..a80aa808b6 100644 --- a/src/openai/types/realtime/realtime_transcription_session_audio_input.py +++ b/src/openai/types/realtime/realtime_transcription_session_audio_input.py @@ -48,7 +48,7 @@ class RealtimeTranscriptionSessionAudioInput(BaseModel): `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through - [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. diff --git a/src/openai/types/realtime/realtime_transcription_session_audio_input_param.py b/src/openai/types/realtime/realtime_transcription_session_audio_input_param.py index 5b00dc71ea..f58885c4cf 100644 --- a/src/openai/types/realtime/realtime_transcription_session_audio_input_param.py +++ b/src/openai/types/realtime/realtime_transcription_session_audio_input_param.py @@ -50,7 +50,7 @@ class RealtimeTranscriptionSessionAudioInputParam(TypedDict, total=False): `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through - [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. diff --git a/src/openai/types/responses/computer_tool.py b/src/openai/types/responses/computer_tool.py index 4788edd98f..151d71fe33 100644 --- a/src/openai/types/responses/computer_tool.py +++ b/src/openai/types/responses/computer_tool.py @@ -10,7 +10,7 @@ class ComputerTool(BaseModel): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ type: Literal["computer"] diff --git a/src/openai/types/responses/computer_tool_param.py b/src/openai/types/responses/computer_tool_param.py index c2f01e5140..5d8eed8568 100644 --- a/src/openai/types/responses/computer_tool_param.py +++ b/src/openai/types/responses/computer_tool_param.py @@ -10,7 +10,7 @@ class ComputerToolParam(TypedDict, total=False): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ type: Required[Literal["computer"]] diff --git a/src/openai/types/responses/computer_use_preview_tool.py b/src/openai/types/responses/computer_use_preview_tool.py index 98254d4a2c..548de391e9 100644 --- a/src/openai/types/responses/computer_use_preview_tool.py +++ b/src/openai/types/responses/computer_use_preview_tool.py @@ -10,7 +10,7 @@ class ComputerUsePreviewTool(BaseModel): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ display_height: int diff --git a/src/openai/types/responses/computer_use_preview_tool_param.py b/src/openai/types/responses/computer_use_preview_tool_param.py index e966b7e96b..39109a156d 100644 --- a/src/openai/types/responses/computer_use_preview_tool_param.py +++ b/src/openai/types/responses/computer_use_preview_tool_param.py @@ -10,7 +10,7 @@ class ComputerUsePreviewToolParam(TypedDict, total=False): """A tool that controls a virtual computer. - Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). """ display_height: Required[int] diff --git a/src/openai/types/responses/custom_tool.py b/src/openai/types/responses/custom_tool.py index c91aeba0c0..4a723b5cc3 100644 --- a/src/openai/types/responses/custom_tool.py +++ b/src/openai/types/responses/custom_tool.py @@ -14,7 +14,7 @@ class CustomTool(BaseModel): """A custom tool that processes input using a specified format. - Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) """ name: str diff --git a/src/openai/types/responses/custom_tool_param.py b/src/openai/types/responses/custom_tool_param.py index 32a295f9a0..8a6e7aaaff 100644 --- a/src/openai/types/responses/custom_tool_param.py +++ b/src/openai/types/responses/custom_tool_param.py @@ -21,7 +21,7 @@ class CustomToolParam(_CustomToolParamReservedKeywords, total=False): """A custom tool that processes input using a specified format. - Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) """ name: Required[str] diff --git a/src/openai/types/responses/file_search_tool.py b/src/openai/types/responses/file_search_tool.py index b44ccbd61a..d0c30e4d24 100644 --- a/src/openai/types/responses/file_search_tool.py +++ b/src/openai/types/responses/file_search_tool.py @@ -47,7 +47,7 @@ class RankingOptions(BaseModel): class FileSearchTool(BaseModel): """A tool that searches for relevant content from uploaded files. - Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). """ type: Literal["file_search"] diff --git a/src/openai/types/responses/file_search_tool_param.py b/src/openai/types/responses/file_search_tool_param.py index d75987b39a..802c75b5ad 100644 --- a/src/openai/types/responses/file_search_tool_param.py +++ b/src/openai/types/responses/file_search_tool_param.py @@ -49,7 +49,7 @@ class RankingOptions(TypedDict, total=False): class FileSearchToolParam(TypedDict, total=False): """A tool that searches for relevant content from uploaded files. - Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). """ type: Required[Literal["file_search"]] diff --git a/src/openai/types/responses/function_tool.py b/src/openai/types/responses/function_tool.py index ddec85b510..38d1005094 100644 --- a/src/openai/types/responses/function_tool.py +++ b/src/openai/types/responses/function_tool.py @@ -13,7 +13,7 @@ class FunctionTool(BaseModel): """Defines a function in your own code the model can choose to call. - Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ name: str diff --git a/src/openai/types/responses/function_tool_param.py b/src/openai/types/responses/function_tool_param.py index c84b42597f..5e4055e15e 100644 --- a/src/openai/types/responses/function_tool_param.py +++ b/src/openai/types/responses/function_tool_param.py @@ -19,7 +19,7 @@ class FunctionToolParam(_FunctionToolParamReservedKeywords, total=False): """Defines a function in your own code the model can choose to call. - Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). """ name: Required[str] diff --git a/src/openai/types/responses/input_token_count_params.py b/src/openai/types/responses/input_token_count_params.py index 886a370e02..a0f0963444 100644 --- a/src/openai/types/responses/input_token_count_params.py +++ b/src/openai/types/responses/input_token_count_params.py @@ -53,8 +53,8 @@ class InputTokenCountParams(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ parallel_tool_calls: Optional[bool] @@ -71,14 +71,14 @@ class InputTokenCountParams(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ reasoning: Optional[Reasoning] """ **gpt-5 and o-series models only** Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ text: Optional[Text] @@ -86,8 +86,8 @@ class InputTokenCountParams(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: Optional[ToolChoice] @@ -118,8 +118,8 @@ class Text(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: ResponseFormatTextConfigParam @@ -127,7 +127,7 @@ class Text(TypedDict, total=False): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/responses/response.py b/src/openai/types/responses/response.py index da3cd66a1f..92c02ce69f 100644 --- a/src/openai/types/responses/response.py +++ b/src/openai/types/responses/response.py @@ -293,8 +293,8 @@ class Response(BaseModel): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ object: Literal["response"] @@ -337,17 +337,18 @@ class Response(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -363,7 +364,7 @@ class Response(BaseModel): background: Optional[bool] = None """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ completed_at: Optional[float] = None @@ -383,7 +384,7 @@ class Response(BaseModel): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] = None @@ -404,14 +405,14 @@ class Response(BaseModel): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[ResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_diagnostics: Optional[PromptCacheDiagnostics] = None @@ -421,7 +422,7 @@ class Response(BaseModel): """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: Optional[PromptCacheOptions] = None @@ -436,7 +437,7 @@ class Response(BaseModel): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -453,7 +454,7 @@ class Response(BaseModel): reasoning: Optional[Reasoning] = None """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] = None @@ -463,7 +464,7 @@ class Response(BaseModel): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[ServiceTier] = None @@ -474,13 +475,15 @@ class Response(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -505,8 +508,8 @@ class Response(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ top_logprobs: Optional[int] = None @@ -538,7 +541,7 @@ class Response(BaseModel): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ @property diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index 99069f6504..ce540c15d2 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -126,8 +126,8 @@ class ResponseCompactParams(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ input: Union[str, Iterable[ResponseInputItemParam], None] @@ -145,7 +145,7 @@ class ResponseCompactParams(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ @@ -162,7 +162,7 @@ class ResponseCompactParams(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -176,11 +176,12 @@ class ResponseCompactParams(TypedDict, total=False): configured in the Project settings. Unless otherwise configured, the Project will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to - '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - request will be processed with the Flex Processing service tier. - To opt-in - to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - Completions. For models with a dedicated Fast tier, either value resolves to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. - To + opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) + at the request level, include the `service_tier=fast` or + `service_tier=priority` parameter for Responses or Chat Completions. For + models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. When the `service_tier` parameter is set, the response body will include the @@ -193,7 +194,7 @@ class ResponseCompactParams(TypedDict, total=False): class PromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ mode: Literal["implicit", "explicit"] diff --git a/src/openai/types/responses/response_compaction_item.py b/src/openai/types/responses/response_compaction_item.py index 16910b1431..c69f01b4b7 100644 --- a/src/openai/types/responses/response_compaction_item.py +++ b/src/openai/types/responses/response_compaction_item.py @@ -10,7 +10,7 @@ class ResponseCompactionItem(BaseModel): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ id: str diff --git a/src/openai/types/responses/response_compaction_item_param.py b/src/openai/types/responses/response_compaction_item_param.py index ab548b4236..9336d58617 100644 --- a/src/openai/types/responses/response_compaction_item_param.py +++ b/src/openai/types/responses/response_compaction_item_param.py @@ -10,7 +10,7 @@ class ResponseCompactionItemParam(BaseModel): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ encrypted_content: str diff --git a/src/openai/types/responses/response_compaction_item_param_param.py b/src/openai/types/responses/response_compaction_item_param_param.py index 6b4289f473..87cd0f7e6a 100644 --- a/src/openai/types/responses/response_compaction_item_param_param.py +++ b/src/openai/types/responses/response_compaction_item_param_param.py @@ -10,7 +10,7 @@ class ResponseCompactionItemParamParam(TypedDict, total=False): """ - A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). """ encrypted_content: Required[str] diff --git a/src/openai/types/responses/response_computer_tool_call.py b/src/openai/types/responses/response_computer_tool_call.py index 3e4667e2cf..d2e3d62865 100644 --- a/src/openai/types/responses/response_computer_tool_call.py +++ b/src/openai/types/responses/response_computer_tool_call.py @@ -227,7 +227,7 @@ class ResponseComputerToolCall(BaseModel): """A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. """ id: str diff --git a/src/openai/types/responses/response_computer_tool_call_param.py b/src/openai/types/responses/response_computer_tool_call_param.py index d9a445b5a1..e07da69ab7 100644 --- a/src/openai/types/responses/response_computer_tool_call_param.py +++ b/src/openai/types/responses/response_computer_tool_call_param.py @@ -225,7 +225,7 @@ class ResponseComputerToolCallParam(TypedDict, total=False): """A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. """ id: Required[str] diff --git a/src/openai/types/responses/response_create_params.py b/src/openai/types/responses/response_create_params.py index 11669bef05..079055864a 100644 --- a/src/openai/types/responses/response_create_params.py +++ b/src/openai/types/responses/response_create_params.py @@ -45,7 +45,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): background: Optional[bool] """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[Iterable[ContextManagement]] @@ -86,11 +86,11 @@ class ResponseCreateParamsBase(TypedDict, total=False): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] @@ -105,7 +105,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] @@ -131,8 +131,8 @@ class ResponseCreateParamsBase(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[Moderation] @@ -145,21 +145,21 @@ class ResponseCreateParamsBase(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[ResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: PromptCacheOptions @@ -172,7 +172,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -182,7 +182,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -199,7 +199,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): reasoning: Optional[Reasoning] """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] @@ -209,7 +209,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[ServiceTier] @@ -220,13 +220,15 @@ class ResponseCreateParamsBase(TypedDict, total=False): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -244,7 +246,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream_options: Optional[StreamOptions] @@ -263,8 +265,8 @@ class ResponseCreateParamsBase(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: ToolChoice @@ -283,17 +285,18 @@ class ResponseCreateParamsBase(TypedDict, total=False): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -329,7 +332,7 @@ class ResponseCreateParamsBase(TypedDict, total=False): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ @@ -382,7 +385,7 @@ class Moderation(TypedDict, total=False): class PromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] @@ -450,7 +453,7 @@ class ResponseCreateParamsNonStreaming(ResponseCreateParamsBase, total=False): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -462,7 +465,7 @@ class ResponseCreateParamsStreaming(ResponseCreateParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ diff --git a/src/openai/types/responses/response_file_search_tool_call.py b/src/openai/types/responses/response_file_search_tool_call.py index e10324025f..423d0ebeae 100644 --- a/src/openai/types/responses/response_file_search_tool_call.py +++ b/src/openai/types/responses/response_file_search_tool_call.py @@ -35,7 +35,7 @@ class ResponseFileSearchToolCall(BaseModel): """The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. """ id: str diff --git a/src/openai/types/responses/response_file_search_tool_call_param.py b/src/openai/types/responses/response_file_search_tool_call_param.py index 08bf2f563f..0b6a1db038 100644 --- a/src/openai/types/responses/response_file_search_tool_call_param.py +++ b/src/openai/types/responses/response_file_search_tool_call_param.py @@ -37,7 +37,7 @@ class ResponseFileSearchToolCallParam(TypedDict, total=False): """The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. """ id: Required[str] diff --git a/src/openai/types/responses/response_format_text_json_schema_config.py b/src/openai/types/responses/response_format_text_json_schema_config.py index 97179f0f82..2bceec64b1 100644 --- a/src/openai/types/responses/response_format_text_json_schema_config.py +++ b/src/openai/types/responses/response_format_text_json_schema_config.py @@ -14,7 +14,7 @@ class ResponseFormatTextJSONSchemaConfig(BaseModel): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ name: str @@ -45,5 +45,5 @@ class ResponseFormatTextJSONSchemaConfig(BaseModel): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ diff --git a/src/openai/types/responses/response_format_text_json_schema_config_param.py b/src/openai/types/responses/response_format_text_json_schema_config_param.py index 0954ea2d4c..6bfec36f90 100644 --- a/src/openai/types/responses/response_format_text_json_schema_config_param.py +++ b/src/openai/types/responses/response_format_text_json_schema_config_param.py @@ -12,7 +12,7 @@ class ResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ name: Required[str] @@ -43,5 +43,5 @@ class ResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ diff --git a/src/openai/types/responses/response_function_tool_call.py b/src/openai/types/responses/response_function_tool_call.py index 827f20173b..c51f680561 100644 --- a/src/openai/types/responses/response_function_tool_call.py +++ b/src/openai/types/responses/response_function_tool_call.py @@ -29,7 +29,7 @@ class ResponseFunctionToolCall(BaseModel): """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ arguments: str diff --git a/src/openai/types/responses/response_function_tool_call_item.py b/src/openai/types/responses/response_function_tool_call_item.py index ef153c02c3..fa0137666a 100644 --- a/src/openai/types/responses/response_function_tool_call_item.py +++ b/src/openai/types/responses/response_function_tool_call_item.py @@ -12,7 +12,7 @@ class ResponseFunctionToolCallItem(ResponseFunctionToolCall): """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ id: str # type: ignore diff --git a/src/openai/types/responses/response_function_tool_call_param.py b/src/openai/types/responses/response_function_tool_call_param.py index 00e3f87004..096a6391eb 100644 --- a/src/openai/types/responses/response_function_tool_call_param.py +++ b/src/openai/types/responses/response_function_tool_call_param.py @@ -35,7 +35,7 @@ class ResponseFunctionToolCallParam(_ResponseFunctionToolCallParamReservedKeywor """A tool call to run a function. See the - [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. """ arguments: Required[str] diff --git a/src/openai/types/responses/response_function_web_search.py b/src/openai/types/responses/response_function_web_search.py index 77992ebed4..a7581727bd 100644 --- a/src/openai/types/responses/response_function_web_search.py +++ b/src/openai/types/responses/response_function_web_search.py @@ -72,7 +72,7 @@ class ResponseFunctionWebSearch(BaseModel): """The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. """ id: str diff --git a/src/openai/types/responses/response_function_web_search_param.py b/src/openai/types/responses/response_function_web_search_param.py index e466dff41e..419b87ce34 100644 --- a/src/openai/types/responses/response_function_web_search_param.py +++ b/src/openai/types/responses/response_function_web_search_param.py @@ -73,7 +73,7 @@ class ResponseFunctionWebSearchParam(TypedDict, total=False): """The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. """ id: Required[str] diff --git a/src/openai/types/responses/response_input_image.py b/src/openai/types/responses/response_input_image.py index dc43953f09..8efb56f76f 100644 --- a/src/openai/types/responses/response_input_image.py +++ b/src/openai/types/responses/response_input_image.py @@ -22,7 +22,7 @@ class PromptCacheBreakpoint(BaseModel): class ResponseInputImage(BaseModel): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). """ detail: ImageDetail diff --git a/src/openai/types/responses/response_input_image_content.py b/src/openai/types/responses/response_input_image_content.py index 730d7dd1c9..999a9dfe9f 100644 --- a/src/openai/types/responses/response_input_image_content.py +++ b/src/openai/types/responses/response_input_image_content.py @@ -22,7 +22,7 @@ class PromptCacheBreakpoint(BaseModel): class ResponseInputImageContent(BaseModel): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) """ type: Literal["input_image"] diff --git a/src/openai/types/responses/response_input_image_content_param.py b/src/openai/types/responses/response_input_image_content_param.py index 96d24a92cb..a045fc579b 100644 --- a/src/openai/types/responses/response_input_image_content_param.py +++ b/src/openai/types/responses/response_input_image_content_param.py @@ -23,7 +23,7 @@ class PromptCacheBreakpoint(TypedDict, total=False): class ResponseInputImageContentParam(TypedDict, total=False): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) """ type: Required[Literal["input_image"]] diff --git a/src/openai/types/responses/response_input_image_param.py b/src/openai/types/responses/response_input_image_param.py index 35c728d5f0..dc99692124 100644 --- a/src/openai/types/responses/response_input_image_param.py +++ b/src/openai/types/responses/response_input_image_param.py @@ -23,7 +23,7 @@ class PromptCacheBreakpoint(TypedDict, total=False): class ResponseInputImageParam(TypedDict, total=False): """An image input to the model. - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). """ detail: Required[ImageDetail] diff --git a/src/openai/types/responses/response_input_item.py b/src/openai/types/responses/response_input_item.py index ddb4d3b8a0..e34682291d 100644 --- a/src/openai/types/responses/response_input_item.py +++ b/src/openai/types/responses/response_input_item.py @@ -247,12 +247,24 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/responses/response_input_item_param.py b/src/openai/types/responses/response_input_item_param.py index 47df7af7f2..f490ad3700 100644 --- a/src/openai/types/responses/response_input_item_param.py +++ b/src/openai/types/responses/response_input_item_param.py @@ -246,12 +246,24 @@ class ImageGenerationCall(TypedDict, total=False): type: Required[Literal["image_generation_call"]] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/responses/response_input_param.py b/src/openai/types/responses/response_input_param.py index 3aceb2c556..776f1dfafd 100644 --- a/src/openai/types/responses/response_input_param.py +++ b/src/openai/types/responses/response_input_param.py @@ -247,12 +247,24 @@ class ImageGenerationCall(TypedDict, total=False): type: Required[Literal["image_generation_call"]] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/responses/response_item.py b/src/openai/types/responses/response_item.py index df5bfc9885..4b14d4dbf0 100644 --- a/src/openai/types/responses/response_item.py +++ b/src/openai/types/responses/response_item.py @@ -108,12 +108,24 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/responses/response_output_item.py b/src/openai/types/responses/response_output_item.py index 402636062a..9492c2aa42 100644 --- a/src/openai/types/responses/response_output_item.py +++ b/src/openai/types/responses/response_output_item.py @@ -106,12 +106,24 @@ class ImageGenerationCall(BaseModel): type: Literal["image_generation_call"] """The type of the image generation call. Always `image_generation_call`.""" + action: Optional[Literal["generate", "edit", "auto"]] = None + """The action used for image generation.""" + + background: Optional[Literal["transparent", "opaque", "auto"]] = None + """The background setting used for generation.""" + + output_format: Optional[Literal["png", "webp", "jpeg"]] = None + """The output format used for generation.""" + quality: Optional[Literal["low", "medium", "high", "xhigh", "max", "auto"]] = None """The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. """ + revised_prompt: Optional[str] = None + """The prompt that was used after any model prompt rewriting.""" + size: Union[str, Literal["1024x1024", "1024x1536", "1536x1024"], None] = None """The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.""" diff --git a/src/openai/types/responses/response_prompt.py b/src/openai/types/responses/response_prompt.py index 37fd27d9d3..e5080af5d5 100644 --- a/src/openai/types/responses/response_prompt.py +++ b/src/openai/types/responses/response_prompt.py @@ -16,7 +16,7 @@ class ResponsePrompt(BaseModel): """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ id: str diff --git a/src/openai/types/responses/response_prompt_param.py b/src/openai/types/responses/response_prompt_param.py index c2147ea370..2db1bd1893 100644 --- a/src/openai/types/responses/response_prompt_param.py +++ b/src/openai/types/responses/response_prompt_param.py @@ -17,7 +17,7 @@ class ResponsePromptParam(TypedDict, total=False): """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ id: Required[str] diff --git a/src/openai/types/responses/response_reasoning_item.py b/src/openai/types/responses/response_reasoning_item.py index bc2e955295..8744204522 100644 --- a/src/openai/types/responses/response_reasoning_item.py +++ b/src/openai/types/responses/response_reasoning_item.py @@ -33,7 +33,7 @@ class ResponseReasoningItem(BaseModel): A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). """ id: str diff --git a/src/openai/types/responses/response_reasoning_item_param.py b/src/openai/types/responses/response_reasoning_item_param.py index d25b3a8f42..fb1196d30d 100644 --- a/src/openai/types/responses/response_reasoning_item_param.py +++ b/src/openai/types/responses/response_reasoning_item_param.py @@ -33,7 +33,7 @@ class ResponseReasoningItemParam(TypedDict, total=False): A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). """ id: Required[str] diff --git a/src/openai/types/responses/response_retrieve_params.py b/src/openai/types/responses/response_retrieve_params.py index 95269a8033..b6dae0f0ff 100644 --- a/src/openai/types/responses/response_retrieve_params.py +++ b/src/openai/types/responses/response_retrieve_params.py @@ -39,7 +39,7 @@ class ResponseRetrieveParamsNonStreaming(ResponseRetrieveParamsBase, total=False generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -51,7 +51,7 @@ class ResponseRetrieveParamsStreaming(ResponseRetrieveParamsBase): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ diff --git a/src/openai/types/responses/response_text_config.py b/src/openai/types/responses/response_text_config.py index 54d94e13d2..9e2eca238e 100644 --- a/src/openai/types/responses/response_text_config.py +++ b/src/openai/types/responses/response_text_config.py @@ -14,8 +14,8 @@ class ResponseTextConfig(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: Optional[ResponseFormatTextConfig] = None @@ -23,7 +23,7 @@ class ResponseTextConfig(BaseModel): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/responses/response_text_config_param.py b/src/openai/types/responses/response_text_config_param.py index 90bc04e460..69694973ef 100644 --- a/src/openai/types/responses/response_text_config_param.py +++ b/src/openai/types/responses/response_text_config_param.py @@ -15,8 +15,8 @@ class ResponseTextConfigParam(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ format: ResponseFormatTextConfigParam @@ -24,7 +24,7 @@ class ResponseTextConfigParam(TypedDict, total=False): Configuring `{ "type": "json_schema" }` enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). The default format is `{ "type": "text" }` with no additional options. diff --git a/src/openai/types/responses/response_usage.py b/src/openai/types/responses/response_usage.py index 355dd5d735..33e8ac299f 100644 --- a/src/openai/types/responses/response_usage.py +++ b/src/openai/types/responses/response_usage.py @@ -12,9 +12,9 @@ class InputTokensDetails(BaseModel): """The number of input tokens that were written to the cache.""" cached_tokens: int - """The number of tokens that were retrieved from the cache. - - [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + """ + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). """ diff --git a/src/openai/types/responses/responses_client_event.py b/src/openai/types/responses/responses_client_event.py index 2ba335a523..c7e3815afc 100644 --- a/src/openai/types/responses/responses_client_event.py +++ b/src/openai/types/responses/responses_client_event.py @@ -105,7 +105,7 @@ class ResponseCreateModeration(BaseModel): class ResponseCreatePromptCacheOptions(BaseModel): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] = None @@ -184,7 +184,7 @@ class ResponseCreate(BaseModel): background: Optional[bool] = None """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[List[ResponseCreateContextManagement]] = None @@ -225,11 +225,11 @@ class ResponseCreate(BaseModel): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] = None @@ -244,7 +244,7 @@ class ResponseCreate(BaseModel): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] = None @@ -270,8 +270,8 @@ class ResponseCreate(BaseModel): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[ResponseCreateModeration] = None @@ -284,21 +284,21 @@ class ResponseCreate(BaseModel): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[ResponsePrompt] = None """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] = None """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: Optional[ResponseCreatePromptCacheOptions] = None @@ -311,7 +311,7 @@ class ResponseCreate(BaseModel): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -321,7 +321,7 @@ class ResponseCreate(BaseModel): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -338,7 +338,7 @@ class ResponseCreate(BaseModel): reasoning: Optional[Reasoning] = None """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] = None @@ -348,7 +348,7 @@ class ResponseCreate(BaseModel): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[ServiceTier] = None @@ -359,13 +359,15 @@ class ResponseCreate(BaseModel): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -383,7 +385,7 @@ class ResponseCreate(BaseModel): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream: Optional[bool] = None @@ -392,7 +394,7 @@ class ResponseCreate(BaseModel): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -422,8 +424,8 @@ class ResponseCreate(BaseModel): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: Optional[ResponseCreateToolChoice] = None @@ -442,17 +444,18 @@ class ResponseCreate(BaseModel): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -488,7 +491,7 @@ class ResponseCreate(BaseModel): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/responses/responses_client_event_param.py b/src/openai/types/responses/responses_client_event_param.py index b0b68c50e5..ee7d344d3b 100644 --- a/src/openai/types/responses/responses_client_event_param.py +++ b/src/openai/types/responses/responses_client_event_param.py @@ -105,7 +105,7 @@ class ResponseCreateModeration(TypedDict, total=False): class ResponseCreatePromptCacheOptions(TypedDict, total=False): """Options for prompt caching. - Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ comparison_response_id: Optional[str] @@ -184,7 +184,7 @@ class ResponseCreate(TypedDict, total=False): background: Optional[bool] """ Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). """ context_management: Optional[Iterable[ResponseCreateContextManagement]] @@ -225,11 +225,11 @@ class ResponseCreate(TypedDict, total=False): Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) """ instructions: Optional[str] @@ -244,7 +244,7 @@ class ResponseCreate(TypedDict, total=False): """ An upper bound for the number of tokens that can be generated for a response, including visible output tokens and - [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). """ max_tool_calls: Optional[int] @@ -270,8 +270,8 @@ class ResponseCreate(TypedDict, total=False): OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the - [model guide](https://platform.openai.com/docs/models) to browse and compare - available models. + [model guide](https://developers.openai.com/api/docs/models) to browse and + compare available models. """ moderation: Optional[ResponseCreateModeration] @@ -284,21 +284,21 @@ class ResponseCreate(TypedDict, total=False): """The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ prompt: Optional[ResponsePromptParam] """ Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). """ prompt_cache_key: Optional[str] """ Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). """ prompt_cache_options: ResponseCreatePromptCacheOptions @@ -311,7 +311,7 @@ class ResponseCreate(TypedDict, total=False): breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the - [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. """ @@ -321,7 +321,7 @@ class ResponseCreate(TypedDict, total=False): The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. - [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -338,7 +338,7 @@ class ResponseCreate(TypedDict, total=False): reasoning: Optional[Reasoning] """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ safety_identifier: Optional[str] @@ -348,7 +348,7 @@ class ResponseCreate(TypedDict, total=False): identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ service_tier: Optional[ServiceTier] @@ -359,13 +359,15 @@ class ResponseCreate(TypedDict, total=False): will use 'default'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - include the `service_tier=fast` or `service_tier=priority` parameter for - Responses or Chat Completions. The response will show `service_tier=priority` - regardless of if you specify `service_tier=fast` or `priority` in your - request. + - If set to + '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + the request will be processed with the Flex Processing service tier. + - To opt-in to + [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + request level, include the `service_tier=fast` or `service_tier=priority` + parameter for Responses or Chat Completions. The response will show + `service_tier=priority` regardless of if you specify `service_tier=fast` or + `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show @@ -383,7 +385,7 @@ class ResponseCreate(TypedDict, total=False): Defaults to true when omitted. If set to true, response data will be stored for at least 30 days, subject to the - [data retention exceptions](/api/docs/guides/your-data#v1responses). + [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). """ stream: Optional[bool] @@ -392,7 +394,7 @@ class ResponseCreate(TypedDict, total=False): generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the - [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. """ @@ -422,8 +424,8 @@ class ResponseCreate(TypedDict, total=False): Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) """ tool_choice: ResponseCreateToolChoice @@ -442,17 +444,18 @@ class ResponseCreate(TypedDict, total=False): - **Built-in tools**: Tools that are provided by OpenAI that extend the model's capabilities, like - [web search](https://platform.openai.com/docs/guides/tools-web-search) or - [file search](https://platform.openai.com/docs/guides/tools-file-search). + [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or + [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. """ @@ -488,7 +491,7 @@ class ResponseCreate(TypedDict, total=False): Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. - [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). """ diff --git a/src/openai/types/responses/tool.py b/src/openai/types/responses/tool.py index 68e6d348ae..a01ae75018 100644 --- a/src/openai/types/responses/tool.py +++ b/src/openai/types/responses/tool.py @@ -113,7 +113,7 @@ class McpRequireApprovalMcpToolApprovalFilter(BaseModel): class Mcp(BaseModel): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: str @@ -151,7 +151,7 @@ class Mcp(BaseModel): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/responses/tool_choice_types.py b/src/openai/types/responses/tool_choice_types.py index 15bca1975a..1b545a4df1 100644 --- a/src/openai/types/responses/tool_choice_types.py +++ b/src/openai/types/responses/tool_choice_types.py @@ -10,7 +10,7 @@ class ToolChoiceTypes(BaseModel): """ Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). """ type: Literal[ @@ -26,7 +26,7 @@ class ToolChoiceTypes(BaseModel): """The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: diff --git a/src/openai/types/responses/tool_choice_types_param.py b/src/openai/types/responses/tool_choice_types_param.py index a3057ee608..4b56501416 100644 --- a/src/openai/types/responses/tool_choice_types_param.py +++ b/src/openai/types/responses/tool_choice_types_param.py @@ -10,7 +10,7 @@ class ToolChoiceTypesParam(TypedDict, total=False): """ Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). """ type: Required[ @@ -28,7 +28,7 @@ class ToolChoiceTypesParam(TypedDict, total=False): """The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: diff --git a/src/openai/types/responses/tool_param.py b/src/openai/types/responses/tool_param.py index 860a255bda..b529603428 100644 --- a/src/openai/types/responses/tool_param.py +++ b/src/openai/types/responses/tool_param.py @@ -115,7 +115,7 @@ class McpRequireApprovalMcpToolApprovalFilter(TypedDict, total=False): class Mcp(TypedDict, total=False): """ Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). """ server_label: Required[str] @@ -151,7 +151,7 @@ class Mcp(TypedDict, total=False): One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about service connectors - [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: diff --git a/src/openai/types/responses/web_search_preview_tool.py b/src/openai/types/responses/web_search_preview_tool.py index 05f96b6cdc..0de61b2821 100644 --- a/src/openai/types/responses/web_search_preview_tool.py +++ b/src/openai/types/responses/web_search_preview_tool.py @@ -36,7 +36,7 @@ class UserLocation(BaseModel): class WebSearchPreviewTool(BaseModel): """This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Literal["web_search_preview", "web_search_preview_2025_03_11"] diff --git a/src/openai/types/responses/web_search_preview_tool_param.py b/src/openai/types/responses/web_search_preview_tool_param.py index 849625921a..d18068586a 100644 --- a/src/openai/types/responses/web_search_preview_tool_param.py +++ b/src/openai/types/responses/web_search_preview_tool_param.py @@ -36,7 +36,7 @@ class UserLocation(TypedDict, total=False): class WebSearchPreviewToolParam(TypedDict, total=False): """This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Required[Literal["web_search_preview", "web_search_preview_2025_03_11"]] diff --git a/src/openai/types/responses/web_search_tool.py b/src/openai/types/responses/web_search_tool.py index 0fe2fb8f4f..f6323e6642 100644 --- a/src/openai/types/responses/web_search_tool.py +++ b/src/openai/types/responses/web_search_tool.py @@ -50,7 +50,7 @@ class WebSearchTool(BaseModel): """Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Literal["web_search", "web_search_2025_08_26"] diff --git a/src/openai/types/responses/web_search_tool_param.py b/src/openai/types/responses/web_search_tool_param.py index 4ecb7b86fa..1129babeab 100644 --- a/src/openai/types/responses/web_search_tool_param.py +++ b/src/openai/types/responses/web_search_tool_param.py @@ -52,7 +52,7 @@ class WebSearchToolParam(TypedDict, total=False): """Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). """ type: Required[Literal["web_search", "web_search_2025_08_26"]] diff --git a/src/openai/types/shared/function_definition.py b/src/openai/types/shared/function_definition.py index 55588d9942..b7bbc98eb9 100644 --- a/src/openai/types/shared/function_definition.py +++ b/src/openai/types/shared/function_definition.py @@ -25,8 +25,8 @@ class FunctionDefinition(BaseModel): parameters: Optional[FunctionParameters] = None """The parameters the functions accepts, described as a JSON Schema object. - See the [guide](https://platform.openai.com/docs/guides/function-calling) for - examples, and the + See the [guide](https://developers.openai.com/api/docs/guides/function-calling) + for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. @@ -39,5 +39,5 @@ class FunctionDefinition(BaseModel): If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the - [function calling guide](https://platform.openai.com/docs/guides/function-calling). + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). """ diff --git a/src/openai/types/shared/reasoning.py b/src/openai/types/shared/reasoning.py index a4c08902be..d3a642fad2 100644 --- a/src/openai/types/shared/reasoning.py +++ b/src/openai/types/shared/reasoning.py @@ -12,7 +12,7 @@ class Reasoning(BaseModel): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] = None @@ -32,7 +32,7 @@ class Reasoning(BaseModel): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ diff --git a/src/openai/types/shared/response_format_json_schema.py b/src/openai/types/shared/response_format_json_schema.py index d75ad8e560..2e9a924d97 100644 --- a/src/openai/types/shared/response_format_json_schema.py +++ b/src/openai/types/shared/response_format_json_schema.py @@ -38,7 +38,7 @@ class JSONSchema(BaseModel): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ @@ -46,7 +46,7 @@ class ResponseFormatJSONSchema(BaseModel): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ json_schema: JSONSchema diff --git a/src/openai/types/shared/response_format_text_grammar.py b/src/openai/types/shared/response_format_text_grammar.py index 0800eb119f..cfabbb5870 100644 --- a/src/openai/types/shared/response_format_text_grammar.py +++ b/src/openai/types/shared/response_format_text_grammar.py @@ -10,7 +10,7 @@ class ResponseFormatTextGrammar(BaseModel): """ A custom grammar for the model to follow when generating text. - Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + Learn more in the [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars). """ grammar: str diff --git a/src/openai/types/shared/response_format_text_python.py b/src/openai/types/shared/response_format_text_python.py index 49b7c11bfa..45b0288f8a 100644 --- a/src/openai/types/shared/response_format_text_python.py +++ b/src/openai/types/shared/response_format_text_python.py @@ -11,7 +11,7 @@ class ResponseFormatTextPython(BaseModel): """Configure the model to generate valid Python code. See the - [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details. + [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars) for more details. """ type: Literal["python"] diff --git a/src/openai/types/shared_params/function_definition.py b/src/openai/types/shared_params/function_definition.py index 86cfda2817..8837687028 100644 --- a/src/openai/types/shared_params/function_definition.py +++ b/src/openai/types/shared_params/function_definition.py @@ -27,8 +27,8 @@ class FunctionDefinition(TypedDict, total=False): parameters: FunctionParameters """The parameters the functions accepts, described as a JSON Schema object. - See the [guide](https://platform.openai.com/docs/guides/function-calling) for - examples, and the + See the [guide](https://developers.openai.com/api/docs/guides/function-calling) + for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. @@ -41,5 +41,5 @@ class FunctionDefinition(TypedDict, total=False): If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the - [function calling guide](https://platform.openai.com/docs/guides/function-calling). + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). """ diff --git a/src/openai/types/shared_params/reasoning.py b/src/openai/types/shared_params/reasoning.py index a69b5be752..e3bbf8d25d 100644 --- a/src/openai/types/shared_params/reasoning.py +++ b/src/openai/types/shared_params/reasoning.py @@ -13,7 +13,7 @@ class Reasoning(TypedDict, total=False): """ Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). """ context: Optional[Literal["auto", "current_turn", "all_turns"]] @@ -33,7 +33,7 @@ class Reasoning(TypedDict, total=False): `xhigh`, and `max`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. """ diff --git a/src/openai/types/shared_params/response_format_json_schema.py b/src/openai/types/shared_params/response_format_json_schema.py index c9e5a2bf5f..2b6bbdc3e6 100644 --- a/src/openai/types/shared_params/response_format_json_schema.py +++ b/src/openai/types/shared_params/response_format_json_schema.py @@ -36,7 +36,7 @@ class JSONSchema(TypedDict, total=False): true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the - [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). """ @@ -44,7 +44,7 @@ class ResponseFormatJSONSchema(TypedDict, total=False): """JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). """ json_schema: Required[JSONSchema] diff --git a/src/openai/types/upload.py b/src/openai/types/upload.py index 060fb09bb6..8b57923c6c 100644 --- a/src/openai/types/upload.py +++ b/src/openai/types/upload.py @@ -33,7 +33,7 @@ class Upload(BaseModel): purpose: str """The intended purpose of the file. - [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) + [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values. """ diff --git a/src/openai/types/upload_create_params.py b/src/openai/types/upload_create_params.py index d2c41688db..0a43068e5c 100644 --- a/src/openai/types/upload_create_params.py +++ b/src/openai/types/upload_create_params.py @@ -27,7 +27,7 @@ class UploadCreateParams(TypedDict, total=False): """The intended purpose of the uploaded file. See the - [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). """ expires_after: ExpiresAfter diff --git a/src/openai/types/vector_store_create_params.py b/src/openai/types/vector_store_create_params.py index 3421e7e52e..0f6e25826f 100644 --- a/src/openai/types/vector_store_create_params.py +++ b/src/openai/types/vector_store_create_params.py @@ -31,9 +31,9 @@ class VectorStoreCreateParams(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. + A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. """ metadata: Optional[Metadata] diff --git a/src/openai/types/vector_stores/file_batch_create_params.py b/src/openai/types/vector_stores/file_batch_create_params.py index dc3aad103c..0654588d93 100644 --- a/src/openai/types/vector_stores/file_batch_create_params.py +++ b/src/openai/types/vector_stores/file_batch_create_params.py @@ -30,12 +30,12 @@ class FileBatchCreateParams(TypedDict, total=False): file_ids: SequenceNotStr[str] """ - A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - the vector store should use. Useful for tools like `file_search` that can access - files. If `attributes` or `chunking_strategy` are provided, they will be applied - to all files in the batch. The maximum batch size is 2000 files. This endpoint - is recommended for multi-file ingestion and helps reduce per-vector-store write - request pressure. Mutually exclusive with `files`. + A list of [File](https://developers.openai.com/api/reference/resources/files) + IDs that the vector store should use. Useful for tools like `file_search` that + can access files. If `attributes` or `chunking_strategy` are provided, they will + be applied to all files in the batch. The maximum batch size is 2000 files. This + endpoint is recommended for multi-file ingestion and helps reduce + per-vector-store write request pressure. Mutually exclusive with `files`. """ files: Iterable[File] @@ -52,10 +52,10 @@ class FileBatchCreateParams(TypedDict, total=False): class File(TypedDict, total=False): file_id: Required[str] """ - A [File](https://platform.openai.com/docs/api-reference/files) ID that the - vector store should use. Useful for tools like `file_search` that can access + A [File](https://developers.openai.com/api/reference/resources/files) ID that + the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend - [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. """ diff --git a/src/openai/types/vector_stores/file_create_params.py b/src/openai/types/vector_stores/file_create_params.py index dccc899785..5836e3aa69 100644 --- a/src/openai/types/vector_stores/file_create_params.py +++ b/src/openai/types/vector_stores/file_create_params.py @@ -13,10 +13,10 @@ class FileCreateParams(TypedDict, total=False): file_id: Required[str] """ - A [File](https://platform.openai.com/docs/api-reference/files) ID that the - vector store should use. Useful for tools like `file_search` that can access + A [File](https://developers.openai.com/api/reference/resources/files) ID that + the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend - [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. """ diff --git a/src/openai/types/vector_stores/vector_store_file.py b/src/openai/types/vector_stores/vector_store_file.py index 1c14d6266d..d3a8ed1d70 100644 --- a/src/openai/types/vector_stores/vector_store_file.py +++ b/src/openai/types/vector_stores/vector_store_file.py @@ -56,8 +56,8 @@ class VectorStoreFile(BaseModel): vector_store_id: str """ The ID of the - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - that the [File](https://platform.openai.com/docs/api-reference/files) is + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. """ diff --git a/src/openai/types/vector_stores/vector_store_file_batch.py b/src/openai/types/vector_stores/vector_store_file_batch.py index 56c345a2a4..1cdc92b463 100644 --- a/src/openai/types/vector_stores/vector_store_file_batch.py +++ b/src/openai/types/vector_stores/vector_store_file_batch.py @@ -50,7 +50,7 @@ class VectorStoreFileBatch(BaseModel): vector_store_id: str """ The ID of the - [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - that the [File](https://platform.openai.com/docs/api-reference/files) is + [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. """ diff --git a/src/openai/types/webhooks/live_call_incoming_webhook_event.py b/src/openai/types/webhooks/live_call_incoming_webhook_event.py index 40514ddff1..1fac6dfd69 100644 --- a/src/openai/types/webhooks/live_call_incoming_webhook_event.py +++ b/src/openai/types/webhooks/live_call_incoming_webhook_event.py @@ -29,7 +29,11 @@ class Data(BaseModel): """ sip_headers: List[DataSipHeader] - """Headers from the SIP Invite.""" + """ + Headers from the SIP INVITE, excluding SIP authorization headers. Retained + names, values, repeated entries, and order are preserved. Treat these values as + untrusted call metadata. + """ class LiveCallIncomingWebhookEvent(BaseModel): diff --git a/src/openai/types/webhooks/realtime_call_incoming_webhook_event.py b/src/openai/types/webhooks/realtime_call_incoming_webhook_event.py index bbbdffd366..6b3526674f 100644 --- a/src/openai/types/webhooks/realtime_call_incoming_webhook_event.py +++ b/src/openai/types/webhooks/realtime_call_incoming_webhook_event.py @@ -30,7 +30,11 @@ class Data(BaseModel): """ sip_headers: List[DataSipHeader] - """Headers from the SIP Invite.""" + """ + Headers from the SIP INVITE, excluding SIP authorization headers. Retained + names, values, repeated entries, and order are preserved. Treat these values as + untrusted call metadata. + """ class RealtimeCallIncomingWebhookEvent(BaseModel): diff --git a/tests/api_resources/admin/organization/projects/test_service_accounts.py b/tests/api_resources/admin/organization/projects/test_service_accounts.py index 4e7bd62e3f..4f1c42aefb 100644 --- a/tests/api_resources/admin/organization/projects/test_service_accounts.py +++ b/tests/api_resources/admin/organization/projects/test_service_accounts.py @@ -35,7 +35,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: service_account = client.admin.organization.projects.service_accounts.create( project_id="project_id", name="name", - create_service_account_only=True, + create_service_account_only=False, + expires_in_seconds=1, ) assert_matches_type(ServiceAccountCreateResponse, service_account, path=["response"]) @@ -293,7 +294,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> service_account = await async_client.admin.organization.projects.service_accounts.create( project_id="project_id", name="name", - create_service_account_only=True, + create_service_account_only=False, + expires_in_seconds=1, ) assert_matches_type(ServiceAccountCreateResponse, service_account, path=["response"])