openai 7.12.1 → 7.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/resources/admin/organization/audit-logs.d.mts +1 -1
- package/resources/admin/organization/audit-logs.d.ts +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts +5 -0
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +5 -0
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts +2 -2
- package/resources/admin/organization/projects/projects.d.ts +2 -2
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/audio/speech.d.mts +3 -2
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +3 -2
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +10 -10
- package/resources/audio/transcriptions.d.ts +10 -10
- package/resources/audio/translations.d.mts +1 -1
- package/resources/audio/translations.d.ts +1 -1
- package/resources/batches.d.mts +6 -5
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +6 -5
- package/resources/batches.d.ts.map +1 -1
- package/resources/beta/assistants.d.mts +143 -147
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts +143 -147
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/responses/input-tokens.d.mts +11 -11
- package/resources/beta/responses/input-tokens.d.ts +11 -11
- package/resources/beta/responses/responses.d.mts +181 -170
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +181 -170
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +3 -3
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +3 -3
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +29 -23
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts +29 -23
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts +39 -35
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +39 -35
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.mts +14 -15
- package/resources/beta/threads/runs/steps.d.mts.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +14 -15
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/threads.d.mts +53 -50
- package/resources/beta/threads/threads.d.mts.map +1 -1
- package/resources/beta/threads/threads.d.ts +53 -50
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +89 -81
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +89 -81
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +15 -14
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +15 -14
- package/resources/completions.d.ts.map +1 -1
- package/resources/content-provenance-checks.d.mts +1 -1
- package/resources/content-provenance-checks.d.ts +1 -1
- package/resources/content-provenance-checks.js +1 -1
- package/resources/content-provenance-checks.mjs +1 -1
- package/resources/conversations/items.d.mts +3 -3
- package/resources/conversations/items.d.ts +3 -3
- package/resources/embeddings.d.mts +6 -6
- package/resources/embeddings.d.ts +6 -6
- package/resources/evals/evals.d.mts +1 -1
- package/resources/evals/evals.d.ts +1 -1
- package/resources/evals/evals.js +1 -1
- package/resources/evals/evals.mjs +1 -1
- package/resources/evals/runs/runs.d.mts +62 -57
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts +62 -57
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts +5 -5
- package/resources/files.d.ts +5 -5
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/fine-tuning/alpha/graders.d.mts +5 -4
- package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.ts +5 -4
- package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +8 -4
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +8 -4
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +2 -2
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +2 -2
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +10 -10
- package/resources/images.d.ts +10 -10
- package/resources/moderations.d.mts +5 -4
- package/resources/moderations.d.mts.map +1 -1
- package/resources/moderations.d.ts +5 -4
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +2 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +2 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/realtime/calls.d.mts +1 -1
- package/resources/realtime/calls.d.ts +1 -1
- package/resources/realtime/client-secrets.d.mts +4 -4
- package/resources/realtime/client-secrets.d.ts +4 -4
- package/resources/realtime/client-secrets.js +1 -1
- package/resources/realtime/client-secrets.mjs +1 -1
- package/resources/realtime/realtime.d.mts +16 -16
- package/resources/realtime/realtime.d.ts +16 -16
- package/resources/responses/input-tokens.d.mts +9 -9
- package/resources/responses/input-tokens.d.ts +9 -9
- package/resources/responses/responses.d.mts +175 -164
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +175 -164
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +3 -3
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +3 -3
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +12 -12
- package/resources/shared.d.ts +12 -12
- package/resources/uploads/parts.d.mts +5 -4
- package/resources/uploads/parts.d.mts.map +1 -1
- package/resources/uploads/parts.d.ts +5 -4
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +5 -4
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +5 -4
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.mts +11 -11
- package/resources/uploads/uploads.d.ts +11 -11
- package/resources/uploads/uploads.js +9 -9
- package/resources/uploads/uploads.mjs +9 -9
- package/resources/vector-stores/file-batches.d.mts +11 -11
- package/resources/vector-stores/file-batches.d.ts +11 -11
- package/resources/vector-stores/files.d.mts +8 -8
- package/resources/vector-stores/files.d.ts +8 -8
- package/resources/vector-stores/files.js +3 -3
- package/resources/vector-stores/files.mjs +3 -3
- package/resources/vector-stores/vector-stores.d.mts +3 -3
- package/resources/vector-stores/vector-stores.d.ts +3 -3
- package/resources/webhooks/webhooks.d.mts +6 -2
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +6 -2
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/resources/admin/organization/audit-logs.ts +1 -1
- package/src/resources/admin/organization/projects/api-keys.ts +6 -0
- package/src/resources/admin/organization/projects/projects.ts +2 -2
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +15 -0
- package/src/resources/audio/speech.ts +3 -2
- package/src/resources/audio/transcriptions.ts +10 -10
- package/src/resources/audio/translations.ts +1 -1
- package/src/resources/batches.ts +6 -5
- package/src/resources/beta/assistants.ts +143 -147
- package/src/resources/beta/responses/input-tokens.ts +11 -11
- package/src/resources/beta/responses/responses.ts +181 -170
- package/src/resources/beta/threads/messages.ts +29 -23
- package/src/resources/beta/threads/runs/runs.ts +39 -35
- package/src/resources/beta/threads/runs/steps.ts +14 -15
- package/src/resources/beta/threads/threads.ts +53 -50
- package/src/resources/chat/completions/completions.ts +89 -81
- package/src/resources/completions.ts +15 -14
- package/src/resources/content-provenance-checks.ts +1 -1
- package/src/resources/conversations/items.ts +3 -3
- package/src/resources/embeddings.ts +6 -6
- package/src/resources/evals/evals.ts +1 -1
- package/src/resources/evals/runs/runs.ts +62 -57
- package/src/resources/files.ts +5 -5
- package/src/resources/fine-tuning/alpha/graders.ts +5 -4
- package/src/resources/fine-tuning/checkpoints/permissions.ts +8 -4
- package/src/resources/fine-tuning/jobs/jobs.ts +13 -12
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +10 -10
- package/src/resources/moderations.ts +5 -4
- package/src/resources/realtime/calls.ts +1 -1
- package/src/resources/realtime/client-secrets.ts +4 -4
- package/src/resources/realtime/realtime.ts +16 -16
- package/src/resources/responses/input-tokens.ts +9 -9
- package/src/resources/responses/responses.ts +175 -164
- package/src/resources/shared.ts +12 -12
- package/src/resources/uploads/parts.ts +5 -4
- package/src/resources/uploads/uploads.ts +11 -11
- package/src/resources/vector-stores/file-batches.ts +11 -11
- package/src/resources/vector-stores/files.ts +8 -8
- package/src/resources/vector-stores/vector-stores.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +6 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -19,16 +19,16 @@ export class Responses extends APIResource {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a model response. Provide
|
|
22
|
-
* [text](https://
|
|
23
|
-
* [image](https://
|
|
24
|
-
* [text](https://
|
|
25
|
-
* [JSON](https://
|
|
26
|
-
* the model call your own
|
|
27
|
-
* [custom code](https://
|
|
28
|
-
* built-in [tools](https://
|
|
29
|
-
* [web search](https://
|
|
30
|
-
* [file search](https://
|
|
31
|
-
* your own data as input for the model's response.
|
|
22
|
+
* [text](https://developers.openai.com/api/docs/guides/text) or
|
|
23
|
+
* [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to
|
|
24
|
+
* generate [text](https://developers.openai.com/api/docs/guides/text) or
|
|
25
|
+
* [JSON](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
26
|
+
* outputs. Have the model call your own
|
|
27
|
+
* [custom code](https://developers.openai.com/api/docs/guides/function-calling) or
|
|
28
|
+
* use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like
|
|
29
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or
|
|
30
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
31
|
+
* to use your own data as input for the model's response.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```ts
|
|
@@ -133,7 +133,7 @@ export class Responses extends APIResource {
|
|
|
133
133
|
/**
|
|
134
134
|
* Cancels a model response with the given ID. Only responses created with the
|
|
135
135
|
* `background` parameter set to `true` can be cancelled.
|
|
136
|
-
* [Learn more](https://
|
|
136
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
137
137
|
*
|
|
138
138
|
* @example
|
|
139
139
|
* ```ts
|
|
@@ -162,9 +162,9 @@ export class Responses extends APIResource {
|
|
|
162
162
|
* Compact a conversation. Returns a compacted response object.
|
|
163
163
|
*
|
|
164
164
|
* Learn when and how to compact long-running conversations in the
|
|
165
|
-
* [conversation state guide](https://
|
|
165
|
+
* [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window).
|
|
166
166
|
* For ZDR-compatible compaction details, see
|
|
167
|
-
* [Compaction (advanced)](https://
|
|
167
|
+
* [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
|
|
168
168
|
*
|
|
169
169
|
* @example
|
|
170
170
|
* ```ts
|
|
@@ -478,7 +478,7 @@ export type BetaComputerActionList = Array<BetaComputerAction>;
|
|
|
478
478
|
|
|
479
479
|
/**
|
|
480
480
|
* A tool that controls a virtual computer. Learn more about the
|
|
481
|
-
* [computer tool](https://
|
|
481
|
+
* [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
|
|
482
482
|
*/
|
|
483
483
|
export interface BetaComputerTool {
|
|
484
484
|
/**
|
|
@@ -489,7 +489,7 @@ export interface BetaComputerTool {
|
|
|
489
489
|
|
|
490
490
|
/**
|
|
491
491
|
* A tool that controls a virtual computer. Learn more about the
|
|
492
|
-
* [computer tool](https://
|
|
492
|
+
* [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
|
|
493
493
|
*/
|
|
494
494
|
export interface BetaComputerUsePreviewTool {
|
|
495
495
|
/**
|
|
@@ -595,7 +595,7 @@ export interface BetaContainerReference {
|
|
|
595
595
|
|
|
596
596
|
/**
|
|
597
597
|
* A custom tool that processes input using a specified format. Learn more about
|
|
598
|
-
* [custom tools](https://
|
|
598
|
+
* [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)
|
|
599
599
|
*/
|
|
600
600
|
export interface BetaCustomTool {
|
|
601
601
|
/**
|
|
@@ -704,7 +704,7 @@ export interface BetaEasyInputMessage {
|
|
|
704
704
|
/**
|
|
705
705
|
* A tool that searches for relevant content from uploaded files. Learn more about
|
|
706
706
|
* the
|
|
707
|
-
* [file search tool](https://
|
|
707
|
+
* [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
708
708
|
*/
|
|
709
709
|
export interface BetaFileSearchTool {
|
|
710
710
|
/**
|
|
@@ -879,7 +879,7 @@ export interface BetaFunctionShellTool {
|
|
|
879
879
|
/**
|
|
880
880
|
* Defines a function in your own code the model can choose to call. Learn more
|
|
881
881
|
* about
|
|
882
|
-
* [function calling](https://
|
|
882
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
883
883
|
*/
|
|
884
884
|
export interface BetaFunctionTool {
|
|
885
885
|
/**
|
|
@@ -1139,8 +1139,8 @@ export interface BetaResponse {
|
|
|
1139
1139
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
1140
1140
|
* range of models with different capabilities, performance characteristics, and
|
|
1141
1141
|
* price points. Refer to the
|
|
1142
|
-
* [model guide](https://
|
|
1143
|
-
* available models.
|
|
1142
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
1143
|
+
* compare available models.
|
|
1144
1144
|
*/
|
|
1145
1145
|
model:
|
|
1146
1146
|
| 'gpt-6-astra'
|
|
@@ -1301,17 +1301,18 @@ export interface BetaResponse {
|
|
|
1301
1301
|
*
|
|
1302
1302
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
1303
1303
|
* capabilities, like
|
|
1304
|
-
* [web search](https://
|
|
1305
|
-
*
|
|
1304
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
1305
|
+
* or
|
|
1306
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
1306
1307
|
* Learn more about
|
|
1307
|
-
* [built-in tools](https://
|
|
1308
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
1308
1309
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
1309
1310
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
1310
|
-
* [MCP Tools](https://
|
|
1311
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
1311
1312
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
1312
1313
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
1313
1314
|
* Learn more about
|
|
1314
|
-
* [function calling](https://
|
|
1315
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
1315
1316
|
* You can also use custom tools to call your own code.
|
|
1316
1317
|
*/
|
|
1317
1318
|
tools: Array<BetaTool>;
|
|
@@ -1327,7 +1328,7 @@ export interface BetaResponse {
|
|
|
1327
1328
|
|
|
1328
1329
|
/**
|
|
1329
1330
|
* Whether to run the model response in the background.
|
|
1330
|
-
* [Learn more](https://
|
|
1331
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
1331
1332
|
*/
|
|
1332
1333
|
background?: boolean | null;
|
|
1333
1334
|
|
|
@@ -1346,7 +1347,7 @@ export interface BetaResponse {
|
|
|
1346
1347
|
/**
|
|
1347
1348
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
1348
1349
|
* including visible output tokens and
|
|
1349
|
-
* [reasoning tokens](https://
|
|
1350
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1350
1351
|
*/
|
|
1351
1352
|
max_output_tokens?: number | null;
|
|
1352
1353
|
|
|
@@ -1367,14 +1368,14 @@ export interface BetaResponse {
|
|
|
1367
1368
|
/**
|
|
1368
1369
|
* The unique ID of the previous response to the model. Use this to create
|
|
1369
1370
|
* multi-turn conversations. Learn more about
|
|
1370
|
-
* [conversation state](https://
|
|
1371
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
1371
1372
|
* Cannot be used in conjunction with `conversation`.
|
|
1372
1373
|
*/
|
|
1373
1374
|
previous_response_id?: string | null;
|
|
1374
1375
|
|
|
1375
1376
|
/**
|
|
1376
1377
|
* Reference to a prompt template and its variables.
|
|
1377
|
-
* [Learn more](https://
|
|
1378
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
1378
1379
|
*/
|
|
1379
1380
|
prompt?: BetaResponsePrompt | null;
|
|
1380
1381
|
|
|
@@ -1390,7 +1391,7 @@ export interface BetaResponse {
|
|
|
1390
1391
|
/**
|
|
1391
1392
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
1392
1393
|
* hit rates. Replaces the `user` field.
|
|
1393
|
-
* [Learn more](https://
|
|
1394
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
1394
1395
|
*/
|
|
1395
1396
|
prompt_cache_key?: string | null;
|
|
1396
1397
|
|
|
@@ -1406,7 +1407,7 @@ export interface BetaResponse {
|
|
|
1406
1407
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
1407
1408
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
1408
1409
|
* of 24 hours.
|
|
1409
|
-
* [Learn more](https://
|
|
1410
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
1410
1411
|
* This field expresses a maximum retention policy, while
|
|
1411
1412
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
1412
1413
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -1423,7 +1424,7 @@ export interface BetaResponse {
|
|
|
1423
1424
|
|
|
1424
1425
|
/**
|
|
1425
1426
|
* Configuration options for
|
|
1426
|
-
* [reasoning models](https://
|
|
1427
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1427
1428
|
*/
|
|
1428
1429
|
reasoning?: BetaResponse.Reasoning | null;
|
|
1429
1430
|
|
|
@@ -1433,7 +1434,7 @@ export interface BetaResponse {
|
|
|
1433
1434
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
1434
1435
|
* hashing their username or email address, in order to avoid sending us any
|
|
1435
1436
|
* identifying information.
|
|
1436
|
-
* [Learn more](https://
|
|
1437
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1437
1438
|
*/
|
|
1438
1439
|
safety_identifier?: string | null;
|
|
1439
1440
|
|
|
@@ -1445,13 +1446,15 @@ export interface BetaResponse {
|
|
|
1445
1446
|
* will use 'default'.
|
|
1446
1447
|
* - If set to 'default', then the request will be processed with the standard
|
|
1447
1448
|
* pricing and performance for the selected model.
|
|
1448
|
-
* - If set to
|
|
1449
|
-
* then
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1449
|
+
* - If set to
|
|
1450
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
1451
|
+
* the request will be processed with the Flex Processing service tier.
|
|
1452
|
+
* - To opt-in to
|
|
1453
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
1454
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
1455
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
1456
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
1457
|
+
* `priority` in your request.
|
|
1455
1458
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
1456
1459
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1457
1460
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -1475,8 +1478,8 @@ export interface BetaResponse {
|
|
|
1475
1478
|
* Configuration options for a text response from the model. Can be plain text or
|
|
1476
1479
|
* structured JSON data. Learn more:
|
|
1477
1480
|
*
|
|
1478
|
-
* - [Text inputs and outputs](https://
|
|
1479
|
-
* - [Structured Outputs](https://
|
|
1481
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
1482
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
1480
1483
|
*/
|
|
1481
1484
|
text?: BetaResponseTextConfig;
|
|
1482
1485
|
|
|
@@ -1510,7 +1513,7 @@ export interface BetaResponse {
|
|
|
1510
1513
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
1511
1514
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
1512
1515
|
* abuse.
|
|
1513
|
-
* [Learn more](https://
|
|
1516
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1514
1517
|
*/
|
|
1515
1518
|
user?: string;
|
|
1516
1519
|
}
|
|
@@ -1742,7 +1745,7 @@ export namespace BetaResponse {
|
|
|
1742
1745
|
|
|
1743
1746
|
/**
|
|
1744
1747
|
* Configuration options for
|
|
1745
|
-
* [reasoning models](https://
|
|
1748
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1746
1749
|
*/
|
|
1747
1750
|
export interface Reasoning {
|
|
1748
1751
|
/**
|
|
@@ -1760,7 +1763,7 @@ export namespace BetaResponse {
|
|
|
1760
1763
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
1761
1764
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
1762
1765
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
1763
|
-
* [reasoning guide](https://
|
|
1766
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
1764
1767
|
* model-specific support.
|
|
1765
1768
|
*/
|
|
1766
1769
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -2442,7 +2445,7 @@ export namespace BetaResponseCodeInterpreterToolCall {
|
|
|
2442
2445
|
|
|
2443
2446
|
/**
|
|
2444
2447
|
* A compaction item generated by the
|
|
2445
|
-
* [`v1/responses/compact` API](https://
|
|
2448
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
2446
2449
|
*/
|
|
2447
2450
|
export interface BetaResponseCompactionItem {
|
|
2448
2451
|
/**
|
|
@@ -2485,7 +2488,7 @@ export namespace BetaResponseCompactionItem {
|
|
|
2485
2488
|
|
|
2486
2489
|
/**
|
|
2487
2490
|
* A compaction item generated by the
|
|
2488
|
-
* [`v1/responses/compact` API](https://
|
|
2491
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
2489
2492
|
*/
|
|
2490
2493
|
export interface BetaResponseCompactionItemParam {
|
|
2491
2494
|
/**
|
|
@@ -2560,7 +2563,7 @@ export namespace BetaResponseCompletedEvent {
|
|
|
2560
2563
|
|
|
2561
2564
|
/**
|
|
2562
2565
|
* A tool call to a computer use tool. See the
|
|
2563
|
-
* [computer use guide](https://
|
|
2566
|
+
* [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use)
|
|
2564
2567
|
* for more information.
|
|
2565
2568
|
*/
|
|
2566
2569
|
export interface BetaResponseComputerToolCall {
|
|
@@ -3620,7 +3623,7 @@ export namespace BetaResponseFileSearchCallSearchingEvent {
|
|
|
3620
3623
|
|
|
3621
3624
|
/**
|
|
3622
3625
|
* The results of a file search tool call. See the
|
|
3623
|
-
* [file search guide](https://
|
|
3626
|
+
* [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
3624
3627
|
* for more information.
|
|
3625
3628
|
*/
|
|
3626
3629
|
export interface BetaResponseFileSearchToolCall {
|
|
@@ -3704,7 +3707,7 @@ export namespace BetaResponseFileSearchToolCall {
|
|
|
3704
3707
|
*
|
|
3705
3708
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
3706
3709
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
3707
|
-
* [Structured Outputs guide](https://
|
|
3710
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3708
3711
|
*
|
|
3709
3712
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
3710
3713
|
*
|
|
@@ -3746,7 +3749,7 @@ export namespace BetaResponseFormatTextConfig {
|
|
|
3746
3749
|
/**
|
|
3747
3750
|
* JSON Schema response format. Used to generate structured JSON responses. Learn
|
|
3748
3751
|
* more about
|
|
3749
|
-
* [Structured Outputs](https://
|
|
3752
|
+
* [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3750
3753
|
*/
|
|
3751
3754
|
export interface BetaResponseFormatTextJSONSchemaConfig {
|
|
3752
3755
|
/**
|
|
@@ -3777,7 +3780,7 @@ export interface BetaResponseFormatTextJSONSchemaConfig {
|
|
|
3777
3780
|
* true, the model will always follow the exact schema defined in the `schema`
|
|
3778
3781
|
* field. Only a subset of JSON Schema is supported when `strict` is `true`. To
|
|
3779
3782
|
* learn more, read the
|
|
3780
|
-
* [Structured Outputs guide](https://
|
|
3783
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3781
3784
|
*/
|
|
3782
3785
|
strict?: boolean | null;
|
|
3783
3786
|
}
|
|
@@ -4165,7 +4168,7 @@ export namespace BetaResponseFunctionShellToolCallOutput {
|
|
|
4165
4168
|
|
|
4166
4169
|
/**
|
|
4167
4170
|
* A tool call to run a function. See the
|
|
4168
|
-
* [function calling guide](https://
|
|
4171
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
4169
4172
|
* for more information.
|
|
4170
4173
|
*/
|
|
4171
4174
|
export interface BetaResponseFunctionToolCall {
|
|
@@ -4248,7 +4251,7 @@ export namespace BetaResponseFunctionToolCall {
|
|
|
4248
4251
|
|
|
4249
4252
|
/**
|
|
4250
4253
|
* A tool call to run a function. See the
|
|
4251
|
-
* [function calling guide](https://
|
|
4254
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
4252
4255
|
* for more information.
|
|
4253
4256
|
*/
|
|
4254
4257
|
export interface BetaResponseFunctionToolCallItem extends BetaResponseFunctionToolCall {
|
|
@@ -4359,8 +4362,8 @@ export namespace BetaResponseFunctionToolCallOutputItem {
|
|
|
4359
4362
|
|
|
4360
4363
|
/**
|
|
4361
4364
|
* The results of a web search tool call. See the
|
|
4362
|
-
* [web search guide](https://
|
|
4363
|
-
* more information.
|
|
4365
|
+
* [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
4366
|
+
* for more information.
|
|
4364
4367
|
*/
|
|
4365
4368
|
export interface BetaResponseFunctionWebSearch {
|
|
4366
4369
|
/**
|
|
@@ -5056,7 +5059,7 @@ export namespace BetaResponseInputFileContent {
|
|
|
5056
5059
|
|
|
5057
5060
|
/**
|
|
5058
5061
|
* An image input to the model. Learn about
|
|
5059
|
-
* [image inputs](https://
|
|
5062
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
|
|
5060
5063
|
*/
|
|
5061
5064
|
export interface BetaResponseInputImage {
|
|
5062
5065
|
/**
|
|
@@ -5105,7 +5108,7 @@ export namespace BetaResponseInputImage {
|
|
|
5105
5108
|
|
|
5106
5109
|
/**
|
|
5107
5110
|
* An image input to the model. Learn about
|
|
5108
|
-
* [image inputs](https://
|
|
5111
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
5109
5112
|
*/
|
|
5110
5113
|
export interface BetaResponseInputImageContent {
|
|
5111
5114
|
/**
|
|
@@ -9371,7 +9374,7 @@ export namespace BetaResponseOutputTextAnnotationAddedEvent {
|
|
|
9371
9374
|
|
|
9372
9375
|
/**
|
|
9373
9376
|
* Reference to a prompt template and its variables.
|
|
9374
|
-
* [Learn more](https://
|
|
9377
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
9375
9378
|
*/
|
|
9376
9379
|
export interface BetaResponsePrompt {
|
|
9377
9380
|
/**
|
|
@@ -9435,7 +9438,7 @@ export namespace BetaResponseQueuedEvent {
|
|
|
9435
9438
|
* A description of the chain of thought used by a reasoning model while generating
|
|
9436
9439
|
* a response. Be sure to include these items in your `input` to the Responses API
|
|
9437
9440
|
* for subsequent turns of a conversation if you are manually
|
|
9438
|
-
* [managing context](https://
|
|
9441
|
+
* [managing context](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
9439
9442
|
*/
|
|
9440
9443
|
export interface BetaResponseReasoningItem {
|
|
9441
9444
|
/**
|
|
@@ -10933,8 +10936,8 @@ export type BetaResponseStreamEvent =
|
|
|
10933
10936
|
* Configuration options for a text response from the model. Can be plain text or
|
|
10934
10937
|
* structured JSON data. Learn more:
|
|
10935
10938
|
*
|
|
10936
|
-
* - [Text inputs and outputs](https://
|
|
10937
|
-
* - [Structured Outputs](https://
|
|
10939
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
10940
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
10938
10941
|
*/
|
|
10939
10942
|
export interface BetaResponseTextConfig {
|
|
10940
10943
|
/**
|
|
@@ -10942,7 +10945,7 @@ export interface BetaResponseTextConfig {
|
|
|
10942
10945
|
*
|
|
10943
10946
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
10944
10947
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
10945
|
-
* [Structured Outputs guide](https://
|
|
10948
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
10946
10949
|
*
|
|
10947
10950
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
10948
10951
|
*
|
|
@@ -11349,7 +11352,7 @@ export namespace BetaResponseUsage {
|
|
|
11349
11352
|
|
|
11350
11353
|
/**
|
|
11351
11354
|
* The number of tokens that were retrieved from the cache.
|
|
11352
|
-
* [More on prompt caching](https://
|
|
11355
|
+
* [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
11353
11356
|
*/
|
|
11354
11357
|
cached_tokens: number;
|
|
11355
11358
|
}
|
|
@@ -11519,7 +11522,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11519
11522
|
|
|
11520
11523
|
/**
|
|
11521
11524
|
* Whether to run the model response in the background.
|
|
11522
|
-
* [Learn more](https://
|
|
11525
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
11523
11526
|
*/
|
|
11524
11527
|
background?: boolean | null;
|
|
11525
11528
|
|
|
@@ -11563,11 +11566,11 @@ export namespace BetaResponsesClientEvent {
|
|
|
11563
11566
|
*
|
|
11564
11567
|
* Learn more:
|
|
11565
11568
|
*
|
|
11566
|
-
* - [Text inputs and outputs](https://
|
|
11567
|
-
* - [Image inputs](https://
|
|
11568
|
-
* - [File inputs](https://
|
|
11569
|
-
* - [Conversation state](https://
|
|
11570
|
-
* - [Function calling](https://
|
|
11569
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
11570
|
+
* - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
11571
|
+
* - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)
|
|
11572
|
+
* - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)
|
|
11573
|
+
* - [Function calling](https://developers.openai.com/api/docs/guides/function-calling)
|
|
11571
11574
|
*/
|
|
11572
11575
|
input?: string | ResponsesAPI.BetaResponseInput;
|
|
11573
11576
|
|
|
@@ -11583,7 +11586,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11583
11586
|
/**
|
|
11584
11587
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
11585
11588
|
* including visible output tokens and
|
|
11586
|
-
* [reasoning tokens](https://
|
|
11589
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
11587
11590
|
*/
|
|
11588
11591
|
max_output_tokens?: number | null;
|
|
11589
11592
|
|
|
@@ -11609,8 +11612,8 @@ export namespace BetaResponsesClientEvent {
|
|
|
11609
11612
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
11610
11613
|
* range of models with different capabilities, performance characteristics, and
|
|
11611
11614
|
* price points. Refer to the
|
|
11612
|
-
* [model guide](https://
|
|
11613
|
-
* available models.
|
|
11615
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
11616
|
+
* compare available models.
|
|
11614
11617
|
*/
|
|
11615
11618
|
model?:
|
|
11616
11619
|
| 'gpt-6-astra'
|
|
@@ -11736,21 +11739,21 @@ export namespace BetaResponsesClientEvent {
|
|
|
11736
11739
|
/**
|
|
11737
11740
|
* The unique ID of the previous response to the model. Use this to create
|
|
11738
11741
|
* multi-turn conversations. Learn more about
|
|
11739
|
-
* [conversation state](https://
|
|
11742
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
11740
11743
|
* Cannot be used in conjunction with `conversation`.
|
|
11741
11744
|
*/
|
|
11742
11745
|
previous_response_id?: string | null;
|
|
11743
11746
|
|
|
11744
11747
|
/**
|
|
11745
11748
|
* Reference to a prompt template and its variables.
|
|
11746
|
-
* [Learn more](https://
|
|
11749
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
11747
11750
|
*/
|
|
11748
11751
|
prompt?: ResponsesAPI.BetaResponsePrompt | null;
|
|
11749
11752
|
|
|
11750
11753
|
/**
|
|
11751
11754
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
11752
11755
|
* hit rates. Replaces the `user` field.
|
|
11753
|
-
* [Learn more](https://
|
|
11756
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
11754
11757
|
*/
|
|
11755
11758
|
prompt_cache_key?: string | null;
|
|
11756
11759
|
|
|
@@ -11762,7 +11765,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11762
11765
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
11763
11766
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
11764
11767
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
11765
|
-
* [prompt caching guide](https://
|
|
11768
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
11766
11769
|
* for current details.
|
|
11767
11770
|
*/
|
|
11768
11771
|
prompt_cache_options?: ResponseCreate.PromptCacheOptions;
|
|
@@ -11773,7 +11776,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11773
11776
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
11774
11777
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
11775
11778
|
* of 24 hours.
|
|
11776
|
-
* [Learn more](https://
|
|
11779
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
11777
11780
|
* This field expresses a maximum retention policy, while
|
|
11778
11781
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
11779
11782
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -11790,7 +11793,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11790
11793
|
|
|
11791
11794
|
/**
|
|
11792
11795
|
* Configuration options for
|
|
11793
|
-
* [reasoning models](https://
|
|
11796
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
11794
11797
|
*/
|
|
11795
11798
|
reasoning?: ResponseCreate.Reasoning | null;
|
|
11796
11799
|
|
|
@@ -11800,7 +11803,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11800
11803
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
11801
11804
|
* hashing their username or email address, in order to avoid sending us any
|
|
11802
11805
|
* identifying information.
|
|
11803
|
-
* [Learn more](https://
|
|
11806
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
11804
11807
|
*/
|
|
11805
11808
|
safety_identifier?: string | null;
|
|
11806
11809
|
|
|
@@ -11812,13 +11815,15 @@ export namespace BetaResponsesClientEvent {
|
|
|
11812
11815
|
* will use 'default'.
|
|
11813
11816
|
* - If set to 'default', then the request will be processed with the standard
|
|
11814
11817
|
* pricing and performance for the selected model.
|
|
11815
|
-
* - If set to
|
|
11816
|
-
* then
|
|
11817
|
-
*
|
|
11818
|
-
*
|
|
11819
|
-
*
|
|
11820
|
-
*
|
|
11821
|
-
*
|
|
11818
|
+
* - If set to
|
|
11819
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
11820
|
+
* the request will be processed with the Flex Processing service tier.
|
|
11821
|
+
* - To opt-in to
|
|
11822
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
11823
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
11824
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
11825
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
11826
|
+
* `priority` in your request.
|
|
11822
11827
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
11823
11828
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
11824
11829
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -11836,7 +11841,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11836
11841
|
* Whether to store the generated model response for later retrieval via API.
|
|
11837
11842
|
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
11838
11843
|
* at least 30 days, subject to the
|
|
11839
|
-
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
11844
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
11840
11845
|
*/
|
|
11841
11846
|
store?: boolean | null;
|
|
11842
11847
|
|
|
@@ -11845,7 +11850,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11845
11850
|
* generated using
|
|
11846
11851
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
11847
11852
|
* See the
|
|
11848
|
-
* [Streaming section below](https://
|
|
11853
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
11849
11854
|
* for more information.
|
|
11850
11855
|
*/
|
|
11851
11856
|
stream?: boolean | null;
|
|
@@ -11876,8 +11881,8 @@ export namespace BetaResponsesClientEvent {
|
|
|
11876
11881
|
* Configuration options for a text response from the model. Can be plain text or
|
|
11877
11882
|
* structured JSON data. Learn more:
|
|
11878
11883
|
*
|
|
11879
|
-
* - [Text inputs and outputs](https://
|
|
11880
|
-
* - [Structured Outputs](https://
|
|
11884
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
11885
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
11881
11886
|
*/
|
|
11882
11887
|
text?: ResponsesAPI.BetaResponseTextConfig;
|
|
11883
11888
|
|
|
@@ -11905,17 +11910,18 @@ export namespace BetaResponsesClientEvent {
|
|
|
11905
11910
|
*
|
|
11906
11911
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
11907
11912
|
* capabilities, like
|
|
11908
|
-
* [web search](https://
|
|
11909
|
-
*
|
|
11913
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
11914
|
+
* or
|
|
11915
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
11910
11916
|
* Learn more about
|
|
11911
|
-
* [built-in tools](https://
|
|
11917
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
11912
11918
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
11913
11919
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
11914
|
-
* [MCP Tools](https://
|
|
11920
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
11915
11921
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
11916
11922
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
11917
11923
|
* Learn more about
|
|
11918
|
-
* [function calling](https://
|
|
11924
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
11919
11925
|
* You can also use custom tools to call your own code.
|
|
11920
11926
|
*/
|
|
11921
11927
|
tools?: Array<ResponsesAPI.BetaTool>;
|
|
@@ -11953,7 +11959,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11953
11959
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
11954
11960
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
11955
11961
|
* abuse.
|
|
11956
|
-
* [Learn more](https://
|
|
11962
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
11957
11963
|
*/
|
|
11958
11964
|
user?: string;
|
|
11959
11965
|
}
|
|
@@ -12048,7 +12054,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12048
12054
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
12049
12055
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
12050
12056
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
12051
|
-
* [prompt caching guide](https://
|
|
12057
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
12052
12058
|
* for current details.
|
|
12053
12059
|
*/
|
|
12054
12060
|
export interface PromptCacheOptions {
|
|
@@ -12078,7 +12084,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12078
12084
|
|
|
12079
12085
|
/**
|
|
12080
12086
|
* Configuration options for
|
|
12081
|
-
* [reasoning models](https://
|
|
12087
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
12082
12088
|
*/
|
|
12083
12089
|
export interface Reasoning {
|
|
12084
12090
|
/**
|
|
@@ -12096,7 +12102,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12096
12102
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
12097
12103
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
12098
12104
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
12099
|
-
* [reasoning guide](https://
|
|
12105
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
12100
12106
|
* model-specific support.
|
|
12101
12107
|
*/
|
|
12102
12108
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -12993,13 +12999,15 @@ export namespace BetaResponsesServerEvent {
|
|
|
12993
12999
|
* will use 'default'.
|
|
12994
13000
|
* - If set to 'default', then the request will be processed with the standard
|
|
12995
13001
|
* pricing and performance for the selected model.
|
|
12996
|
-
* - If set to
|
|
12997
|
-
* then
|
|
12998
|
-
*
|
|
12999
|
-
*
|
|
13000
|
-
*
|
|
13001
|
-
*
|
|
13002
|
-
*
|
|
13002
|
+
* - If set to
|
|
13003
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
13004
|
+
* the request will be processed with the Flex Processing service tier.
|
|
13005
|
+
* - To opt-in to
|
|
13006
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
13007
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
13008
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
13009
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
13010
|
+
* `priority` in your request.
|
|
13003
13011
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
13004
13012
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
13005
13013
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -13063,7 +13071,7 @@ export namespace BetaTool {
|
|
|
13063
13071
|
/**
|
|
13064
13072
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
13065
13073
|
* (MCP) servers.
|
|
13066
|
-
* [Learn more about MCP](https://
|
|
13074
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
13067
13075
|
*/
|
|
13068
13076
|
export interface Mcp {
|
|
13069
13077
|
/**
|
|
@@ -13097,7 +13105,7 @@ export namespace BetaTool {
|
|
|
13097
13105
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
13098
13106
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
13099
13107
|
* service connectors
|
|
13100
|
-
* [here](https://
|
|
13108
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
13101
13109
|
*
|
|
13102
13110
|
* Currently supported `connector_id` values are:
|
|
13103
13111
|
*
|
|
@@ -13544,12 +13552,12 @@ export interface BetaToolChoiceShell {
|
|
|
13544
13552
|
|
|
13545
13553
|
/**
|
|
13546
13554
|
* Indicates that the model should use a built-in tool to generate a response.
|
|
13547
|
-
* [Learn more about built-in tools](https://
|
|
13555
|
+
* [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
13548
13556
|
*/
|
|
13549
13557
|
export interface BetaToolChoiceTypes {
|
|
13550
13558
|
/**
|
|
13551
13559
|
* The type of hosted tool the model should to use. Learn more about
|
|
13552
|
-
* [built-in tools](https://
|
|
13560
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
13553
13561
|
*
|
|
13554
13562
|
* Allowed values are:
|
|
13555
13563
|
*
|
|
@@ -13600,7 +13608,7 @@ export interface BetaToolSearchTool {
|
|
|
13600
13608
|
/**
|
|
13601
13609
|
* This tool searches the web for relevant results to use in a response. Learn more
|
|
13602
13610
|
* about the
|
|
13603
|
-
* [web search tool](https://
|
|
13611
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
13604
13612
|
*/
|
|
13605
13613
|
export interface BetaWebSearchPreviewTool {
|
|
13606
13614
|
/**
|
|
@@ -13659,7 +13667,7 @@ export namespace BetaWebSearchPreviewTool {
|
|
|
13659
13667
|
|
|
13660
13668
|
/**
|
|
13661
13669
|
* Search the Internet for sources related to the prompt. Learn more about the
|
|
13662
|
-
* [web search tool](https://
|
|
13670
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
13663
13671
|
*/
|
|
13664
13672
|
export interface BetaWebSearchTool {
|
|
13665
13673
|
/**
|
|
@@ -13743,7 +13751,7 @@ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCr
|
|
|
13743
13751
|
export interface ResponseCreateParamsBase {
|
|
13744
13752
|
/**
|
|
13745
13753
|
* Body param: Whether to run the model response in the background.
|
|
13746
|
-
* [Learn more](https://
|
|
13754
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
13747
13755
|
*/
|
|
13748
13756
|
background?: boolean | null;
|
|
13749
13757
|
|
|
@@ -13788,11 +13796,11 @@ export interface ResponseCreateParamsBase {
|
|
|
13788
13796
|
*
|
|
13789
13797
|
* Learn more:
|
|
13790
13798
|
*
|
|
13791
|
-
* - [Text inputs and outputs](https://
|
|
13792
|
-
* - [Image inputs](https://
|
|
13793
|
-
* - [File inputs](https://
|
|
13794
|
-
* - [Conversation state](https://
|
|
13795
|
-
* - [Function calling](https://
|
|
13799
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
13800
|
+
* - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
13801
|
+
* - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)
|
|
13802
|
+
* - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)
|
|
13803
|
+
* - [Function calling](https://developers.openai.com/api/docs/guides/function-calling)
|
|
13796
13804
|
*/
|
|
13797
13805
|
input?: string | BetaResponseInput;
|
|
13798
13806
|
|
|
@@ -13808,7 +13816,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13808
13816
|
/**
|
|
13809
13817
|
* Body param: An upper bound for the number of tokens that can be generated for a
|
|
13810
13818
|
* response, including visible output tokens and
|
|
13811
|
-
* [reasoning tokens](https://
|
|
13819
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
13812
13820
|
*/
|
|
13813
13821
|
max_output_tokens?: number | null;
|
|
13814
13822
|
|
|
@@ -13834,8 +13842,8 @@ export interface ResponseCreateParamsBase {
|
|
|
13834
13842
|
* Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
|
|
13835
13843
|
* offers a wide range of models with different capabilities, performance
|
|
13836
13844
|
* characteristics, and price points. Refer to the
|
|
13837
|
-
* [model guide](https://
|
|
13838
|
-
* available models.
|
|
13845
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
13846
|
+
* compare available models.
|
|
13839
13847
|
*/
|
|
13840
13848
|
model?:
|
|
13841
13849
|
| 'gpt-6-astra'
|
|
@@ -13962,21 +13970,21 @@ export interface ResponseCreateParamsBase {
|
|
|
13962
13970
|
/**
|
|
13963
13971
|
* Body param: The unique ID of the previous response to the model. Use this to
|
|
13964
13972
|
* create multi-turn conversations. Learn more about
|
|
13965
|
-
* [conversation state](https://
|
|
13973
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
13966
13974
|
* Cannot be used in conjunction with `conversation`.
|
|
13967
13975
|
*/
|
|
13968
13976
|
previous_response_id?: string | null;
|
|
13969
13977
|
|
|
13970
13978
|
/**
|
|
13971
13979
|
* Body param: Reference to a prompt template and its variables.
|
|
13972
|
-
* [Learn more](https://
|
|
13980
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
13973
13981
|
*/
|
|
13974
13982
|
prompt?: BetaResponsePrompt | null;
|
|
13975
13983
|
|
|
13976
13984
|
/**
|
|
13977
13985
|
* Body param: Used by OpenAI to cache responses for similar requests to optimize
|
|
13978
13986
|
* your cache hit rates. Replaces the `user` field.
|
|
13979
|
-
* [Learn more](https://
|
|
13987
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
13980
13988
|
*/
|
|
13981
13989
|
prompt_cache_key?: string | null;
|
|
13982
13990
|
|
|
@@ -13989,7 +13997,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13989
13997
|
* conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
13990
13998
|
* to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
13991
13999
|
* currently the only supported value. See the
|
|
13992
|
-
* [prompt caching guide](https://
|
|
14000
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
13993
14001
|
* for current details.
|
|
13994
14002
|
*/
|
|
13995
14003
|
prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
|
|
@@ -14000,7 +14008,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14000
14008
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
14001
14009
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
14002
14010
|
* of 24 hours.
|
|
14003
|
-
* [Learn more](https://
|
|
14011
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
14004
14012
|
* This field expresses a maximum retention policy, while
|
|
14005
14013
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
14006
14014
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -14017,7 +14025,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14017
14025
|
|
|
14018
14026
|
/**
|
|
14019
14027
|
* Body param: Configuration options for
|
|
14020
|
-
* [reasoning models](https://
|
|
14028
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
14021
14029
|
*/
|
|
14022
14030
|
reasoning?: ResponseCreateParams.Reasoning | null;
|
|
14023
14031
|
|
|
@@ -14027,7 +14035,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14027
14035
|
* uniquely identifies each user, with a maximum length of 64 characters. We
|
|
14028
14036
|
* recommend hashing their username or email address, in order to avoid sending us
|
|
14029
14037
|
* any identifying information.
|
|
14030
|
-
* [Learn more](https://
|
|
14038
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
14031
14039
|
*/
|
|
14032
14040
|
safety_identifier?: string | null;
|
|
14033
14041
|
|
|
@@ -14039,13 +14047,15 @@ export interface ResponseCreateParamsBase {
|
|
|
14039
14047
|
* will use 'default'.
|
|
14040
14048
|
* - If set to 'default', then the request will be processed with the standard
|
|
14041
14049
|
* pricing and performance for the selected model.
|
|
14042
|
-
* - If set to
|
|
14043
|
-
* then
|
|
14044
|
-
*
|
|
14045
|
-
*
|
|
14046
|
-
*
|
|
14047
|
-
*
|
|
14048
|
-
*
|
|
14050
|
+
* - If set to
|
|
14051
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
14052
|
+
* the request will be processed with the Flex Processing service tier.
|
|
14053
|
+
* - To opt-in to
|
|
14054
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
14055
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
14056
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
14057
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
14058
|
+
* `priority` in your request.
|
|
14049
14059
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
14050
14060
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
14051
14061
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -14063,7 +14073,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14063
14073
|
* Body param: Whether to store the generated model response for later retrieval
|
|
14064
14074
|
* via API. Defaults to true when omitted. If set to true, response data will be
|
|
14065
14075
|
* stored for at least 30 days, subject to the
|
|
14066
|
-
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
14076
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
14067
14077
|
*/
|
|
14068
14078
|
store?: boolean | null;
|
|
14069
14079
|
|
|
@@ -14072,7 +14082,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14072
14082
|
* client as it is generated using
|
|
14073
14083
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14074
14084
|
* See the
|
|
14075
|
-
* [Streaming section below](https://
|
|
14085
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14076
14086
|
* for more information.
|
|
14077
14087
|
*/
|
|
14078
14088
|
stream?: boolean | null;
|
|
@@ -14095,8 +14105,8 @@ export interface ResponseCreateParamsBase {
|
|
|
14095
14105
|
* Body param: Configuration options for a text response from the model. Can be
|
|
14096
14106
|
* plain text or structured JSON data. Learn more:
|
|
14097
14107
|
*
|
|
14098
|
-
* - [Text inputs and outputs](https://
|
|
14099
|
-
* - [Structured Outputs](https://
|
|
14108
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
14109
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
14100
14110
|
*/
|
|
14101
14111
|
text?: BetaResponseTextConfig;
|
|
14102
14112
|
|
|
@@ -14124,17 +14134,18 @@ export interface ResponseCreateParamsBase {
|
|
|
14124
14134
|
*
|
|
14125
14135
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
14126
14136
|
* capabilities, like
|
|
14127
|
-
* [web search](https://
|
|
14128
|
-
*
|
|
14137
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
14138
|
+
* or
|
|
14139
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
14129
14140
|
* Learn more about
|
|
14130
|
-
* [built-in tools](https://
|
|
14141
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
14131
14142
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
14132
14143
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
14133
|
-
* [MCP Tools](https://
|
|
14144
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
14134
14145
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
14135
14146
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
14136
14147
|
* Learn more about
|
|
14137
|
-
* [function calling](https://
|
|
14148
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
14138
14149
|
* You can also use custom tools to call your own code.
|
|
14139
14150
|
*/
|
|
14140
14151
|
tools?: Array<BetaTool>;
|
|
@@ -14174,7 +14185,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14174
14185
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
14175
14186
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
14176
14187
|
* abuse.
|
|
14177
|
-
* [Learn more](https://
|
|
14188
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
14178
14189
|
*/
|
|
14179
14190
|
user?: string;
|
|
14180
14191
|
|
|
@@ -14274,7 +14285,7 @@ export namespace ResponseCreateParams {
|
|
|
14274
14285
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
14275
14286
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
14276
14287
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
14277
|
-
* [prompt caching guide](https://
|
|
14288
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14278
14289
|
* for current details.
|
|
14279
14290
|
*/
|
|
14280
14291
|
export interface PromptCacheOptions {
|
|
@@ -14304,7 +14315,7 @@ export namespace ResponseCreateParams {
|
|
|
14304
14315
|
|
|
14305
14316
|
/**
|
|
14306
14317
|
* Configuration options for
|
|
14307
|
-
* [reasoning models](https://
|
|
14318
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
14308
14319
|
*/
|
|
14309
14320
|
export interface Reasoning {
|
|
14310
14321
|
/**
|
|
@@ -14322,7 +14333,7 @@ export namespace ResponseCreateParams {
|
|
|
14322
14333
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
14323
14334
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
14324
14335
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
14325
|
-
* [reasoning guide](https://
|
|
14336
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
14326
14337
|
* model-specific support.
|
|
14327
14338
|
*/
|
|
14328
14339
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -14386,7 +14397,7 @@ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBa
|
|
|
14386
14397
|
* client as it is generated using
|
|
14387
14398
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14388
14399
|
* See the
|
|
14389
|
-
* [Streaming section below](https://
|
|
14400
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14390
14401
|
* for more information.
|
|
14391
14402
|
*/
|
|
14392
14403
|
stream?: false | null;
|
|
@@ -14398,7 +14409,7 @@ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase
|
|
|
14398
14409
|
* client as it is generated using
|
|
14399
14410
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14400
14411
|
* See the
|
|
14401
|
-
* [Streaming section below](https://
|
|
14412
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14402
14413
|
* for more information.
|
|
14403
14414
|
*/
|
|
14404
14415
|
stream: true;
|
|
@@ -14434,7 +14445,7 @@ export interface ResponseRetrieveParamsBase {
|
|
|
14434
14445
|
* client as it is generated using
|
|
14435
14446
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14436
14447
|
* See the
|
|
14437
|
-
* [Streaming section below](https://
|
|
14448
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14438
14449
|
* for more information.
|
|
14439
14450
|
*/
|
|
14440
14451
|
stream?: boolean;
|
|
@@ -14456,7 +14467,7 @@ export interface ResponseRetrieveParamsNonStreaming extends ResponseRetrievePara
|
|
|
14456
14467
|
* client as it is generated using
|
|
14457
14468
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14458
14469
|
* See the
|
|
14459
|
-
* [Streaming section below](https://
|
|
14470
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14460
14471
|
* for more information.
|
|
14461
14472
|
*/
|
|
14462
14473
|
stream?: false;
|
|
@@ -14468,7 +14479,7 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
|
|
|
14468
14479
|
* client as it is generated using
|
|
14469
14480
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14470
14481
|
* See the
|
|
14471
|
-
* [Streaming section below](https://
|
|
14482
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14472
14483
|
* for more information.
|
|
14473
14484
|
*/
|
|
14474
14485
|
stream: true;
|
|
@@ -14493,8 +14504,8 @@ export interface ResponseCompactParams {
|
|
|
14493
14504
|
* Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
|
|
14494
14505
|
* offers a wide range of models with different capabilities, performance
|
|
14495
14506
|
* characteristics, and price points. Refer to the
|
|
14496
|
-
* [model guide](https://
|
|
14497
|
-
* available models.
|
|
14507
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
14508
|
+
* compare available models.
|
|
14498
14509
|
*/
|
|
14499
14510
|
model:
|
|
14500
14511
|
| 'gpt-6-astra'
|
|
@@ -14620,7 +14631,7 @@ export interface ResponseCompactParams {
|
|
|
14620
14631
|
/**
|
|
14621
14632
|
* Body param: The unique ID of the previous response to the model. Use this to
|
|
14622
14633
|
* create multi-turn conversations. Learn more about
|
|
14623
|
-
* [conversation state](https://
|
|
14634
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
14624
14635
|
* Cannot be used in conjunction with `conversation`.
|
|
14625
14636
|
*/
|
|
14626
14637
|
previous_response_id?: string | null;
|
|
@@ -14639,7 +14650,7 @@ export interface ResponseCompactParams {
|
|
|
14639
14650
|
* conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
14640
14651
|
* to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
14641
14652
|
* currently the only supported value. See the
|
|
14642
|
-
* [prompt caching guide](https://
|
|
14653
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14643
14654
|
* for current details.
|
|
14644
14655
|
*/
|
|
14645
14656
|
prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
|
|
@@ -14656,17 +14667,17 @@ export interface ResponseCompactParams {
|
|
|
14656
14667
|
* in the Project settings. Unless otherwise configured, the Project will use
|
|
14657
14668
|
* 'default'. - If set to 'default', then the request will be processed with the
|
|
14658
14669
|
* standard pricing and performance for the selected model. - If set to
|
|
14659
|
-
* '[flex](https://
|
|
14660
|
-
* request will be processed with the Flex Processing service tier. - To opt-in
|
|
14661
|
-
* [Fast mode](/api/docs/guides/fast-mode) at the
|
|
14662
|
-
* `service_tier=fast` or `service_tier=priority`
|
|
14663
|
-
* Completions. For models with a dedicated Fast
|
|
14664
|
-
* `service_tier=fast`; for other models, either
|
|
14665
|
-
* `service_tier=priority`. - When not set, the default behavior
|
|
14666
|
-
* the `service_tier` parameter is set, the response body will
|
|
14667
|
-
* `service_tier` value based on the processing mode actually used to
|
|
14668
|
-
* request. This response value may be different from the value set in
|
|
14669
|
-
* parameter.
|
|
14670
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
14671
|
+
* the request will be processed with the Flex Processing service tier. - To opt-in
|
|
14672
|
+
* to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
14673
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
14674
|
+
* parameter for Responses or Chat Completions. For models with a dedicated Fast
|
|
14675
|
+
* tier, either value resolves to `service_tier=fast`; for other models, either
|
|
14676
|
+
* value resolves to `service_tier=priority`. - When not set, the default behavior
|
|
14677
|
+
* is 'auto'. When the `service_tier` parameter is set, the response body will
|
|
14678
|
+
* include the `service_tier` value based on the processing mode actually used to
|
|
14679
|
+
* serve the request. This response value may be different from the value set in
|
|
14680
|
+
* the parameter.
|
|
14670
14681
|
*/
|
|
14671
14682
|
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
14672
14683
|
|
|
@@ -14685,7 +14696,7 @@ export namespace ResponseCompactParams {
|
|
|
14685
14696
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
14686
14697
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
14687
14698
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
14688
|
-
* [prompt caching guide](https://
|
|
14699
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14689
14700
|
* for current details.
|
|
14690
14701
|
*/
|
|
14691
14702
|
export interface PromptCacheOptions {
|