openai 7.10.0 → 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 +203 -0
- package/README.md +7 -5
- package/_vendor/partial-json-parser/parser.d.mts.map +1 -1
- package/_vendor/partial-json-parser/parser.d.ts.map +1 -1
- package/_vendor/partial-json-parser/parser.js +4 -3
- package/_vendor/partial-json-parser/parser.js.map +1 -1
- package/_vendor/partial-json-parser/parser.mjs +4 -3
- package/_vendor/partial-json-parser/parser.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.js +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs.map +1 -1
- package/auth/subject-token-providers.d.mts.map +1 -1
- package/auth/subject-token-providers.d.ts.map +1 -1
- package/auth/subject-token-providers.js +10 -5
- package/auth/subject-token-providers.js.map +1 -1
- package/auth/subject-token-providers.mjs +10 -5
- package/auth/subject-token-providers.mjs.map +1 -1
- package/auth/workload-identity-auth.d.mts.map +1 -1
- package/auth/workload-identity-auth.d.ts.map +1 -1
- package/auth/workload-identity-auth.js +21 -11
- package/auth/workload-identity-auth.js.map +1 -1
- package/auth/workload-identity-auth.mjs +21 -11
- package/auth/workload-identity-auth.mjs.map +1 -1
- package/azure.d.mts.map +1 -1
- package/azure.d.ts.map +1 -1
- package/azure.js +31 -2
- package/azure.js.map +1 -1
- package/azure.mjs +32 -3
- package/azure.mjs.map +1 -1
- package/beta/realtime/internal-base.d.mts.map +1 -1
- package/beta/realtime/internal-base.d.ts.map +1 -1
- package/beta/realtime/internal-base.js +3 -2
- package/beta/realtime/internal-base.js.map +1 -1
- package/beta/realtime/internal-base.mjs +3 -2
- package/beta/realtime/internal-base.mjs.map +1 -1
- package/beta/realtime/websocket.d.mts +2 -0
- package/beta/realtime/websocket.d.mts.map +1 -1
- package/beta/realtime/websocket.d.ts +2 -0
- package/beta/realtime/websocket.d.ts.map +1 -1
- package/beta/realtime/websocket.js +12 -7
- package/beta/realtime/websocket.js.map +1 -1
- package/beta/realtime/websocket.mjs +12 -7
- package/beta/realtime/websocket.mjs.map +1 -1
- package/beta/realtime/ws.d.mts +2 -0
- package/beta/realtime/ws.d.mts.map +1 -1
- package/beta/realtime/ws.d.ts +2 -0
- package/beta/realtime/ws.d.ts.map +1 -1
- package/beta/realtime/ws.js +7 -5
- package/beta/realtime/ws.js.map +1 -1
- package/beta/realtime/ws.mjs +7 -5
- package/beta/realtime/ws.mjs.map +1 -1
- package/client.d.mts +9 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -1
- package/client.d.ts.map +1 -1
- package/client.js +17 -4
- package/client.js.map +1 -1
- package/client.mjs +17 -4
- package/client.mjs.map +1 -1
- package/core/EventEmitter.d.mts +2 -1
- package/core/EventEmitter.d.mts.map +1 -1
- package/core/EventEmitter.d.ts +2 -1
- package/core/EventEmitter.d.ts.map +1 -1
- package/core/EventEmitter.js +2 -1
- package/core/EventEmitter.js.map +1 -1
- package/core/EventEmitter.mjs +2 -1
- package/core/EventEmitter.mjs.map +1 -1
- package/core/pagination.js +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.d.mts +8 -0
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts +8 -0
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +68 -15
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +68 -15
- package/core/streaming.mjs.map +1 -1
- package/helpers/audio.d.mts +1 -1
- package/helpers/audio.d.mts.map +1 -1
- package/helpers/audio.d.ts +1 -1
- package/helpers/audio.d.ts.map +1 -1
- package/helpers/audio.js +25 -5
- package/helpers/audio.js.map +1 -1
- package/helpers/audio.mjs +25 -5
- package/helpers/audio.mjs.map +1 -1
- package/helpers/zod.d.mts +28 -15
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts +28 -15
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +30 -23
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +30 -23
- package/helpers/zod.mjs.map +1 -1
- package/index.js +4 -5
- package/internal/bedrock.d.mts +11 -0
- package/internal/bedrock.d.mts.map +1 -1
- package/internal/bedrock.d.ts +11 -0
- package/internal/bedrock.d.ts.map +1 -1
- package/internal/bedrock.js +71 -55
- package/internal/bedrock.js.map +1 -1
- package/internal/bedrock.mjs +70 -55
- package/internal/bedrock.mjs.map +1 -1
- package/internal/detect-platform.js +2 -2
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +2 -2
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +3 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +3 -2
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -5
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -5
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.js +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/realtime-credentials.d.mts +15 -0
- package/internal/realtime-credentials.d.mts.map +1 -0
- package/internal/realtime-credentials.d.ts +15 -0
- package/internal/realtime-credentials.d.ts.map +1 -0
- package/internal/realtime-credentials.js +23 -0
- package/internal/realtime-credentials.js.map +1 -0
- package/internal/realtime-credentials.mjs +19 -0
- package/internal/realtime-credentials.mjs.map +1 -0
- package/internal/responses/response-accumulator.d.mts.map +1 -1
- package/internal/responses/response-accumulator.d.ts.map +1 -1
- package/internal/responses/response-accumulator.js +2 -1
- package/internal/responses/response-accumulator.js.map +1 -1
- package/internal/responses/response-accumulator.mjs +2 -1
- package/internal/responses/response-accumulator.mjs.map +1 -1
- package/internal/to-file.d.mts +2 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +2 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +5 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +6 -5
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +3 -3
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +3 -3
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +2 -0
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +2 -0
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +12 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +11 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +3 -0
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -0
- package/internal/utils/base64.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +31 -9
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +31 -9
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/lib/AssistantStream.d.mts +4 -1
- package/lib/AssistantStream.d.mts.map +1 -1
- package/lib/AssistantStream.d.ts +4 -1
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/AssistantStream.js +23 -8
- package/lib/AssistantStream.js.map +1 -1
- package/lib/AssistantStream.mjs +24 -9
- package/lib/AssistantStream.mjs.map +1 -1
- package/lib/ChatCompletionRunner.d.mts +6 -3
- package/lib/ChatCompletionRunner.d.mts.map +1 -1
- package/lib/ChatCompletionRunner.d.ts +6 -3
- package/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/lib/ChatCompletionRunner.js +7 -4
- package/lib/ChatCompletionRunner.js.map +1 -1
- package/lib/ChatCompletionRunner.mjs +7 -4
- package/lib/ChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts.map +1 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +6 -0
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +7 -1
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.mts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.js +1 -0
- package/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/lib/ChatCompletionStreamingRunner.mjs +1 -0
- package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/lib/EventEmitter.d.mts +3 -1
- package/lib/EventEmitter.d.mts.map +1 -1
- package/lib/EventEmitter.d.ts +3 -1
- package/lib/EventEmitter.d.ts.map +1 -1
- package/lib/EventEmitter.js +2 -1
- package/lib/EventEmitter.js.map +1 -1
- package/lib/EventEmitter.mjs +2 -1
- package/lib/EventEmitter.mjs.map +1 -1
- package/lib/EventStream.d.mts +2 -1
- package/lib/EventStream.d.mts.map +1 -1
- package/lib/EventStream.d.ts +2 -1
- package/lib/EventStream.d.ts.map +1 -1
- package/lib/EventStream.js +99 -46
- package/lib/EventStream.js.map +1 -1
- package/lib/EventStream.mjs +99 -46
- package/lib/EventStream.mjs.map +1 -1
- package/lib/ResponsesParser.d.mts +5 -4
- package/lib/ResponsesParser.d.mts.map +1 -1
- package/lib/ResponsesParser.d.ts +5 -4
- package/lib/ResponsesParser.d.ts.map +1 -1
- package/lib/ResponsesParser.js +21 -7
- package/lib/ResponsesParser.js.map +1 -1
- package/lib/ResponsesParser.mjs +21 -7
- package/lib/ResponsesParser.mjs.map +1 -1
- package/lib/RunnableFunction.d.mts +2 -2
- package/lib/RunnableFunction.d.mts.map +1 -1
- package/lib/RunnableFunction.d.ts +2 -2
- package/lib/RunnableFunction.d.ts.map +1 -1
- package/lib/embeddings.d.mts.map +1 -1
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/embeddings.js +18 -12
- package/lib/embeddings.js.map +1 -1
- package/lib/embeddings.mjs +18 -12
- package/lib/embeddings.mjs.map +1 -1
- package/lib/file-processing.d.mts +3 -2
- package/lib/file-processing.d.mts.map +1 -1
- package/lib/file-processing.d.ts +3 -2
- package/lib/file-processing.d.ts.map +1 -1
- package/lib/file-processing.js +5 -4
- package/lib/file-processing.js.map +1 -1
- package/lib/file-processing.mjs +5 -4
- package/lib/file-processing.mjs.map +1 -1
- package/lib/parser.d.mts +16 -4
- package/lib/parser.d.mts.map +1 -1
- package/lib/parser.d.ts +16 -4
- package/lib/parser.d.ts.map +1 -1
- package/lib/parser.js +1 -1
- package/lib/parser.js.map +1 -1
- package/lib/parser.mjs +1 -1
- package/lib/parser.mjs.map +1 -1
- package/lib/polling.d.mts +2 -2
- package/lib/polling.d.mts.map +1 -1
- package/lib/polling.d.ts +2 -2
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +5 -4
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +5 -4
- package/lib/polling.mjs.map +1 -1
- package/lib/responses/EventTypes.d.mts +2 -2
- package/lib/responses/EventTypes.d.mts.map +1 -1
- package/lib/responses/EventTypes.d.ts +2 -2
- package/lib/responses/EventTypes.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.d.mts +3 -2
- package/lib/responses/ResponseInputItems.d.mts.map +1 -1
- package/lib/responses/ResponseInputItems.d.ts +3 -2
- package/lib/responses/ResponseInputItems.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.js +27 -4
- package/lib/responses/ResponseInputItems.js.map +1 -1
- package/lib/responses/ResponseInputItems.mjs +27 -4
- package/lib/responses/ResponseInputItems.mjs.map +1 -1
- package/lib/transform.d.mts.map +1 -1
- package/lib/transform.d.ts.map +1 -1
- package/lib/transform.js +1 -0
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +1 -0
- package/lib/transform.mjs.map +1 -1
- package/lib/vector-store-polling.d.mts +2 -2
- package/lib/vector-store-polling.d.ts +2 -2
- package/lib/vector-store-polling.js +3 -3
- package/lib/vector-store-polling.js.map +1 -1
- package/lib/vector-store-polling.mjs +3 -3
- package/lib/vector-store-polling.mjs.map +1 -1
- package/lib/vector-store-upload.d.mts +2 -1
- package/lib/vector-store-upload.d.mts.map +1 -1
- package/lib/vector-store-upload.d.ts +2 -1
- package/lib/vector-store-upload.d.ts.map +1 -1
- package/lib/vector-store-upload.js +5 -1
- package/lib/vector-store-upload.js.map +1 -1
- package/lib/vector-store-upload.mjs +5 -1
- package/lib/vector-store-upload.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/bedrock/aws.d.mts.map +1 -1
- package/providers/bedrock/aws.d.ts.map +1 -1
- package/providers/bedrock/aws.js +14 -16
- package/providers/bedrock/aws.js.map +1 -1
- package/providers/bedrock/aws.mjs +15 -17
- package/providers/bedrock/aws.mjs.map +1 -1
- package/realtime/internal-base.d.mts.map +1 -1
- package/realtime/internal-base.d.ts.map +1 -1
- package/realtime/internal-base.js +3 -5
- package/realtime/internal-base.js.map +1 -1
- package/realtime/internal-base.mjs +3 -5
- package/realtime/internal-base.mjs.map +1 -1
- package/realtime/websocket.d.mts +2 -0
- package/realtime/websocket.d.mts.map +1 -1
- package/realtime/websocket.d.ts +2 -0
- package/realtime/websocket.d.ts.map +1 -1
- package/realtime/websocket.js +12 -6
- package/realtime/websocket.js.map +1 -1
- package/realtime/websocket.mjs +12 -6
- package/realtime/websocket.mjs.map +1 -1
- package/realtime/ws.d.mts +2 -0
- package/realtime/ws.d.mts.map +1 -1
- package/realtime/ws.d.ts +2 -0
- package/realtime/ws.d.ts.map +1 -1
- package/realtime/ws.js +7 -4
- package/realtime/ws.js.map +1 -1
- package/realtime/ws.mjs +7 -4
- package/realtime/ws.mjs.map +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/api-keys.d.mts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts.map +1 -1
- 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 +284 -194
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +284 -194
- 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 +12 -3
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +12 -3
- package/resources/conversations/items.d.ts.map +1 -1
- 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 +83 -68
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +83 -68
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- 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 +278 -187
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +278 -187
- 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 +12 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -6
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/_vendor/partial-json-parser/parser.ts +4 -3
- package/src/_vendor/zod-to-json-schema/parsers/string.ts +1 -1
- package/src/_vendor/zod-to-json-schema/parsers/tuple.ts +23 -16
- package/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +11 -6
- package/src/auth/subject-token-providers.ts +12 -7
- package/src/auth/workload-identity-auth.ts +27 -12
- package/src/azure.ts +34 -3
- package/src/beta/realtime/internal-base.ts +3 -2
- package/src/beta/realtime/websocket.ts +17 -7
- package/src/beta/realtime/ws.ts +9 -5
- package/src/client.ts +19 -4
- package/src/core/EventEmitter.ts +5 -8
- package/src/core/pagination.ts +1 -1
- package/src/core/streaming.ts +69 -13
- package/src/helpers/audio.ts +27 -6
- package/src/helpers/zod.ts +78 -29
- package/src/internal/bedrock.ts +84 -58
- package/src/internal/detect-platform.ts +2 -2
- package/src/internal/errors.ts +3 -2
- package/src/internal/headers.ts +7 -5
- package/src/internal/parse.ts +1 -1
- package/src/internal/realtime-credentials.ts +27 -0
- package/src/internal/responses/response-accumulator.ts +1 -0
- package/src/internal/to-file.ts +6 -5
- package/src/internal/uploads.ts +12 -1
- package/src/internal/utils/base64.ts +3 -0
- package/src/lib/AbstractChatCompletionRunner.ts +31 -6
- package/src/lib/AssistantStream.ts +25 -11
- package/src/lib/ChatCompletionRunner.ts +8 -4
- package/src/lib/ChatCompletionStream.ts +8 -0
- package/src/lib/ChatCompletionStreamingRunner.ts +1 -0
- package/src/lib/EventEmitter.ts +17 -8
- package/src/lib/EventStream.ts +105 -52
- package/src/lib/ResponsesParser.ts +33 -12
- package/src/lib/RunnableFunction.ts +2 -2
- package/src/lib/embeddings.ts +18 -12
- package/src/lib/file-processing.ts +5 -4
- package/src/lib/parser.ts +35 -11
- package/src/lib/polling.ts +5 -4
- package/src/lib/responses/EventTypes.ts +3 -69
- package/src/lib/responses/ResponseInputItems.ts +29 -4
- package/src/lib/transform.ts +1 -0
- package/src/lib/vector-store-polling.ts +3 -3
- package/src/lib/vector-store-upload.ts +5 -1
- package/src/providers/bedrock/aws.ts +23 -24
- package/src/realtime/internal-base.ts +3 -5
- package/src/realtime/websocket.ts +14 -6
- package/src/realtime/ws.ts +9 -4
- 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/api-keys.ts +11 -0
- 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 +315 -192
- 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 +14 -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 +86 -67
- 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 +309 -185
- 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 +12 -6
- 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,21 +1368,30 @@ 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
|
|
|
1382
|
+
/**
|
|
1383
|
+
* Prompt cache diagnostics requested for this response.
|
|
1384
|
+
*/
|
|
1385
|
+
prompt_cache_diagnostics?:
|
|
1386
|
+
| BetaResponse.CacheMiss
|
|
1387
|
+
| BetaResponse.CacheHit
|
|
1388
|
+
| BetaResponse.ComparisonResponseNotFound
|
|
1389
|
+
| BetaResponse.Unavailable;
|
|
1390
|
+
|
|
1381
1391
|
/**
|
|
1382
1392
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
1383
1393
|
* hit rates. Replaces the `user` field.
|
|
1384
|
-
* [Learn more](https://
|
|
1394
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
1385
1395
|
*/
|
|
1386
1396
|
prompt_cache_key?: string | null;
|
|
1387
1397
|
|
|
@@ -1397,7 +1407,7 @@ export interface BetaResponse {
|
|
|
1397
1407
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
1398
1408
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
1399
1409
|
* of 24 hours.
|
|
1400
|
-
* [Learn more](https://
|
|
1410
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
1401
1411
|
* This field expresses a maximum retention policy, while
|
|
1402
1412
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
1403
1413
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -1414,7 +1424,7 @@ export interface BetaResponse {
|
|
|
1414
1424
|
|
|
1415
1425
|
/**
|
|
1416
1426
|
* Configuration options for
|
|
1417
|
-
* [reasoning models](https://
|
|
1427
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1418
1428
|
*/
|
|
1419
1429
|
reasoning?: BetaResponse.Reasoning | null;
|
|
1420
1430
|
|
|
@@ -1424,7 +1434,7 @@ export interface BetaResponse {
|
|
|
1424
1434
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
1425
1435
|
* hashing their username or email address, in order to avoid sending us any
|
|
1426
1436
|
* identifying information.
|
|
1427
|
-
* [Learn more](https://
|
|
1437
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1428
1438
|
*/
|
|
1429
1439
|
safety_identifier?: string | null;
|
|
1430
1440
|
|
|
@@ -1436,13 +1446,15 @@ export interface BetaResponse {
|
|
|
1436
1446
|
* will use 'default'.
|
|
1437
1447
|
* - If set to 'default', then the request will be processed with the standard
|
|
1438
1448
|
* pricing and performance for the selected model.
|
|
1439
|
-
* - If set to
|
|
1440
|
-
* then
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
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.
|
|
1446
1458
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
1447
1459
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1448
1460
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -1466,8 +1478,8 @@ export interface BetaResponse {
|
|
|
1466
1478
|
* Configuration options for a text response from the model. Can be plain text or
|
|
1467
1479
|
* structured JSON data. Learn more:
|
|
1468
1480
|
*
|
|
1469
|
-
* - [Text inputs and outputs](https://
|
|
1470
|
-
* - [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)
|
|
1471
1483
|
*/
|
|
1472
1484
|
text?: BetaResponseTextConfig;
|
|
1473
1485
|
|
|
@@ -1501,7 +1513,7 @@ export interface BetaResponse {
|
|
|
1501
1513
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
1502
1514
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
1503
1515
|
* abuse.
|
|
1504
|
-
* [Learn more](https://
|
|
1516
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1505
1517
|
*/
|
|
1506
1518
|
user?: string;
|
|
1507
1519
|
}
|
|
@@ -1669,6 +1681,47 @@ export namespace BetaResponse {
|
|
|
1669
1681
|
}
|
|
1670
1682
|
}
|
|
1671
1683
|
|
|
1684
|
+
export interface CacheMiss {
|
|
1685
|
+
/**
|
|
1686
|
+
* The estimated number of input tokens affected after the first detected
|
|
1687
|
+
* divergence.
|
|
1688
|
+
*/
|
|
1689
|
+
cache_missed_tokens: number;
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* The reason prompt cache reuse did not occur.
|
|
1693
|
+
*/
|
|
1694
|
+
reason:
|
|
1695
|
+
| 'model_changed'
|
|
1696
|
+
| 'prompt_cache_key_changed'
|
|
1697
|
+
| 'tools_changed'
|
|
1698
|
+
| 'text_format_changed'
|
|
1699
|
+
| 'reasoning_effort_changed'
|
|
1700
|
+
| 'verbosity_changed'
|
|
1701
|
+
| 'context_compacted'
|
|
1702
|
+
| 'input_changed'
|
|
1703
|
+
| 'service_tier_changed';
|
|
1704
|
+
|
|
1705
|
+
type: 'cache_miss';
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* The raw token count of the reusable prefix in the compared response.
|
|
1709
|
+
*/
|
|
1710
|
+
comparison_reusable_tokens?: number;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
export interface CacheHit {
|
|
1714
|
+
type: 'cache_hit';
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
export interface ComparisonResponseNotFound {
|
|
1718
|
+
type: 'comparison_response_not_found';
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export interface Unavailable {
|
|
1722
|
+
type: 'unavailable';
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1672
1725
|
/**
|
|
1673
1726
|
* The prompt-caching options that were applied to the response. Supported for
|
|
1674
1727
|
* `gpt-5.6` and later models.
|
|
@@ -1683,11 +1736,16 @@ export namespace BetaResponse {
|
|
|
1683
1736
|
* The minimum lifetime applied to each cache breakpoint.
|
|
1684
1737
|
*/
|
|
1685
1738
|
ttl: '30m';
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* The response ID supplied as the prompt cache diagnostics comparison.
|
|
1742
|
+
*/
|
|
1743
|
+
comparison_response_id?: string | null;
|
|
1686
1744
|
}
|
|
1687
1745
|
|
|
1688
1746
|
/**
|
|
1689
1747
|
* Configuration options for
|
|
1690
|
-
* [reasoning models](https://
|
|
1748
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1691
1749
|
*/
|
|
1692
1750
|
export interface Reasoning {
|
|
1693
1751
|
/**
|
|
@@ -1705,7 +1763,7 @@ export namespace BetaResponse {
|
|
|
1705
1763
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
1706
1764
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
1707
1765
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
1708
|
-
* [reasoning guide](https://
|
|
1766
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
1709
1767
|
* model-specific support.
|
|
1710
1768
|
*/
|
|
1711
1769
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -2387,7 +2445,7 @@ export namespace BetaResponseCodeInterpreterToolCall {
|
|
|
2387
2445
|
|
|
2388
2446
|
/**
|
|
2389
2447
|
* A compaction item generated by the
|
|
2390
|
-
* [`v1/responses/compact` API](https://
|
|
2448
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
2391
2449
|
*/
|
|
2392
2450
|
export interface BetaResponseCompactionItem {
|
|
2393
2451
|
/**
|
|
@@ -2430,7 +2488,7 @@ export namespace BetaResponseCompactionItem {
|
|
|
2430
2488
|
|
|
2431
2489
|
/**
|
|
2432
2490
|
* A compaction item generated by the
|
|
2433
|
-
* [`v1/responses/compact` API](https://
|
|
2491
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
2434
2492
|
*/
|
|
2435
2493
|
export interface BetaResponseCompactionItemParam {
|
|
2436
2494
|
/**
|
|
@@ -2505,7 +2563,7 @@ export namespace BetaResponseCompletedEvent {
|
|
|
2505
2563
|
|
|
2506
2564
|
/**
|
|
2507
2565
|
* A tool call to a computer use tool. See the
|
|
2508
|
-
* [computer use guide](https://
|
|
2566
|
+
* [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use)
|
|
2509
2567
|
* for more information.
|
|
2510
2568
|
*/
|
|
2511
2569
|
export interface BetaResponseComputerToolCall {
|
|
@@ -3565,7 +3623,7 @@ export namespace BetaResponseFileSearchCallSearchingEvent {
|
|
|
3565
3623
|
|
|
3566
3624
|
/**
|
|
3567
3625
|
* The results of a file search tool call. See the
|
|
3568
|
-
* [file search guide](https://
|
|
3626
|
+
* [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
3569
3627
|
* for more information.
|
|
3570
3628
|
*/
|
|
3571
3629
|
export interface BetaResponseFileSearchToolCall {
|
|
@@ -3649,7 +3707,7 @@ export namespace BetaResponseFileSearchToolCall {
|
|
|
3649
3707
|
*
|
|
3650
3708
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
3651
3709
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
3652
|
-
* [Structured Outputs guide](https://
|
|
3710
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3653
3711
|
*
|
|
3654
3712
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
3655
3713
|
*
|
|
@@ -3691,7 +3749,7 @@ export namespace BetaResponseFormatTextConfig {
|
|
|
3691
3749
|
/**
|
|
3692
3750
|
* JSON Schema response format. Used to generate structured JSON responses. Learn
|
|
3693
3751
|
* more about
|
|
3694
|
-
* [Structured Outputs](https://
|
|
3752
|
+
* [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3695
3753
|
*/
|
|
3696
3754
|
export interface BetaResponseFormatTextJSONSchemaConfig {
|
|
3697
3755
|
/**
|
|
@@ -3722,7 +3780,7 @@ export interface BetaResponseFormatTextJSONSchemaConfig {
|
|
|
3722
3780
|
* true, the model will always follow the exact schema defined in the `schema`
|
|
3723
3781
|
* field. Only a subset of JSON Schema is supported when `strict` is `true`. To
|
|
3724
3782
|
* learn more, read the
|
|
3725
|
-
* [Structured Outputs guide](https://
|
|
3783
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3726
3784
|
*/
|
|
3727
3785
|
strict?: boolean | null;
|
|
3728
3786
|
}
|
|
@@ -3788,11 +3846,6 @@ export interface BetaResponseFunctionCallArgumentsDoneEvent {
|
|
|
3788
3846
|
*/
|
|
3789
3847
|
item_id: string;
|
|
3790
3848
|
|
|
3791
|
-
/**
|
|
3792
|
-
* The name of the function that was called.
|
|
3793
|
-
*/
|
|
3794
|
-
name: string;
|
|
3795
|
-
|
|
3796
3849
|
/**
|
|
3797
3850
|
* The index of the output item.
|
|
3798
3851
|
*/
|
|
@@ -4115,7 +4168,7 @@ export namespace BetaResponseFunctionShellToolCallOutput {
|
|
|
4115
4168
|
|
|
4116
4169
|
/**
|
|
4117
4170
|
* A tool call to run a function. See the
|
|
4118
|
-
* [function calling guide](https://
|
|
4171
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
4119
4172
|
* for more information.
|
|
4120
4173
|
*/
|
|
4121
4174
|
export interface BetaResponseFunctionToolCall {
|
|
@@ -4198,7 +4251,7 @@ export namespace BetaResponseFunctionToolCall {
|
|
|
4198
4251
|
|
|
4199
4252
|
/**
|
|
4200
4253
|
* A tool call to run a function. See the
|
|
4201
|
-
* [function calling guide](https://
|
|
4254
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
4202
4255
|
* for more information.
|
|
4203
4256
|
*/
|
|
4204
4257
|
export interface BetaResponseFunctionToolCallItem extends BetaResponseFunctionToolCall {
|
|
@@ -4309,8 +4362,8 @@ export namespace BetaResponseFunctionToolCallOutputItem {
|
|
|
4309
4362
|
|
|
4310
4363
|
/**
|
|
4311
4364
|
* The results of a web search tool call. See the
|
|
4312
|
-
* [web search guide](https://
|
|
4313
|
-
* more information.
|
|
4365
|
+
* [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
4366
|
+
* for more information.
|
|
4314
4367
|
*/
|
|
4315
4368
|
export interface BetaResponseFunctionWebSearch {
|
|
4316
4369
|
/**
|
|
@@ -4330,7 +4383,7 @@ export interface BetaResponseFunctionWebSearch {
|
|
|
4330
4383
|
/**
|
|
4331
4384
|
* The status of the web search tool call.
|
|
4332
4385
|
*/
|
|
4333
|
-
status: 'in_progress' | 'searching' | 'completed' | 'failed';
|
|
4386
|
+
status: 'in_progress' | 'searching' | 'completed' | 'failed' | 'incomplete';
|
|
4334
4387
|
|
|
4335
4388
|
/**
|
|
4336
4389
|
* The type of the web search tool call. Always `web_search_call`.
|
|
@@ -5006,7 +5059,7 @@ export namespace BetaResponseInputFileContent {
|
|
|
5006
5059
|
|
|
5007
5060
|
/**
|
|
5008
5061
|
* An image input to the model. Learn about
|
|
5009
|
-
* [image inputs](https://
|
|
5062
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
|
|
5010
5063
|
*/
|
|
5011
5064
|
export interface BetaResponseInputImage {
|
|
5012
5065
|
/**
|
|
@@ -5055,7 +5108,7 @@ export namespace BetaResponseInputImage {
|
|
|
5055
5108
|
|
|
5056
5109
|
/**
|
|
5057
5110
|
* An image input to the model. Learn about
|
|
5058
|
-
* [image inputs](https://
|
|
5111
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
5059
5112
|
*/
|
|
5060
5113
|
export interface BetaResponseInputImageContent {
|
|
5061
5114
|
/**
|
|
@@ -5734,6 +5787,17 @@ export namespace BetaResponseInputItem {
|
|
|
5734
5787
|
* The agent that produced this item.
|
|
5735
5788
|
*/
|
|
5736
5789
|
agent?: ImageGenerationCall.Agent | null;
|
|
5790
|
+
|
|
5791
|
+
/**
|
|
5792
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
5793
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
5794
|
+
*/
|
|
5795
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
5796
|
+
|
|
5797
|
+
/**
|
|
5798
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
5799
|
+
*/
|
|
5800
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
5737
5801
|
}
|
|
5738
5802
|
|
|
5739
5803
|
export namespace ImageGenerationCall {
|
|
@@ -7212,6 +7276,17 @@ export namespace BetaResponseItem {
|
|
|
7212
7276
|
* The agent that produced this item.
|
|
7213
7277
|
*/
|
|
7214
7278
|
agent?: ImageGenerationCall.Agent | null;
|
|
7279
|
+
|
|
7280
|
+
/**
|
|
7281
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
7282
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
7283
|
+
*/
|
|
7284
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
7285
|
+
|
|
7286
|
+
/**
|
|
7287
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
7288
|
+
*/
|
|
7289
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
7215
7290
|
}
|
|
7216
7291
|
|
|
7217
7292
|
export namespace ImageGenerationCall {
|
|
@@ -8416,6 +8491,17 @@ export namespace BetaResponseOutputItem {
|
|
|
8416
8491
|
* The agent that produced this item.
|
|
8417
8492
|
*/
|
|
8418
8493
|
agent?: ImageGenerationCall.Agent | null;
|
|
8494
|
+
|
|
8495
|
+
/**
|
|
8496
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
8497
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
8498
|
+
*/
|
|
8499
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
8500
|
+
|
|
8501
|
+
/**
|
|
8502
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
8503
|
+
*/
|
|
8504
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
8419
8505
|
}
|
|
8420
8506
|
|
|
8421
8507
|
export namespace ImageGenerationCall {
|
|
@@ -9288,7 +9374,7 @@ export namespace BetaResponseOutputTextAnnotationAddedEvent {
|
|
|
9288
9374
|
|
|
9289
9375
|
/**
|
|
9290
9376
|
* Reference to a prompt template and its variables.
|
|
9291
|
-
* [Learn more](https://
|
|
9377
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
9292
9378
|
*/
|
|
9293
9379
|
export interface BetaResponsePrompt {
|
|
9294
9380
|
/**
|
|
@@ -9352,7 +9438,7 @@ export namespace BetaResponseQueuedEvent {
|
|
|
9352
9438
|
* A description of the chain of thought used by a reasoning model while generating
|
|
9353
9439
|
* a response. Be sure to include these items in your `input` to the Responses API
|
|
9354
9440
|
* for subsequent turns of a conversation if you are manually
|
|
9355
|
-
* [managing context](https://
|
|
9441
|
+
* [managing context](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
9356
9442
|
*/
|
|
9357
9443
|
export interface BetaResponseReasoningItem {
|
|
9358
9444
|
/**
|
|
@@ -10850,8 +10936,8 @@ export type BetaResponseStreamEvent =
|
|
|
10850
10936
|
* Configuration options for a text response from the model. Can be plain text or
|
|
10851
10937
|
* structured JSON data. Learn more:
|
|
10852
10938
|
*
|
|
10853
|
-
* - [Text inputs and outputs](https://
|
|
10854
|
-
* - [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)
|
|
10855
10941
|
*/
|
|
10856
10942
|
export interface BetaResponseTextConfig {
|
|
10857
10943
|
/**
|
|
@@ -10859,7 +10945,7 @@ export interface BetaResponseTextConfig {
|
|
|
10859
10945
|
*
|
|
10860
10946
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
10861
10947
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
10862
|
-
* [Structured Outputs guide](https://
|
|
10948
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
10863
10949
|
*
|
|
10864
10950
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
10865
10951
|
*
|
|
@@ -11266,7 +11352,7 @@ export namespace BetaResponseUsage {
|
|
|
11266
11352
|
|
|
11267
11353
|
/**
|
|
11268
11354
|
* The number of tokens that were retrieved from the cache.
|
|
11269
|
-
* [More on prompt caching](https://
|
|
11355
|
+
* [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
11270
11356
|
*/
|
|
11271
11357
|
cached_tokens: number;
|
|
11272
11358
|
}
|
|
@@ -11436,7 +11522,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11436
11522
|
|
|
11437
11523
|
/**
|
|
11438
11524
|
* Whether to run the model response in the background.
|
|
11439
|
-
* [Learn more](https://
|
|
11525
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
11440
11526
|
*/
|
|
11441
11527
|
background?: boolean | null;
|
|
11442
11528
|
|
|
@@ -11480,11 +11566,11 @@ export namespace BetaResponsesClientEvent {
|
|
|
11480
11566
|
*
|
|
11481
11567
|
* Learn more:
|
|
11482
11568
|
*
|
|
11483
|
-
* - [Text inputs and outputs](https://
|
|
11484
|
-
* - [Image inputs](https://
|
|
11485
|
-
* - [File inputs](https://
|
|
11486
|
-
* - [Conversation state](https://
|
|
11487
|
-
* - [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)
|
|
11488
11574
|
*/
|
|
11489
11575
|
input?: string | ResponsesAPI.BetaResponseInput;
|
|
11490
11576
|
|
|
@@ -11500,7 +11586,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11500
11586
|
/**
|
|
11501
11587
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
11502
11588
|
* including visible output tokens and
|
|
11503
|
-
* [reasoning tokens](https://
|
|
11589
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
11504
11590
|
*/
|
|
11505
11591
|
max_output_tokens?: number | null;
|
|
11506
11592
|
|
|
@@ -11526,8 +11612,8 @@ export namespace BetaResponsesClientEvent {
|
|
|
11526
11612
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
11527
11613
|
* range of models with different capabilities, performance characteristics, and
|
|
11528
11614
|
* price points. Refer to the
|
|
11529
|
-
* [model guide](https://
|
|
11530
|
-
* available models.
|
|
11615
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
11616
|
+
* compare available models.
|
|
11531
11617
|
*/
|
|
11532
11618
|
model?:
|
|
11533
11619
|
| 'gpt-6-astra'
|
|
@@ -11653,21 +11739,21 @@ export namespace BetaResponsesClientEvent {
|
|
|
11653
11739
|
/**
|
|
11654
11740
|
* The unique ID of the previous response to the model. Use this to create
|
|
11655
11741
|
* multi-turn conversations. Learn more about
|
|
11656
|
-
* [conversation state](https://
|
|
11742
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
11657
11743
|
* Cannot be used in conjunction with `conversation`.
|
|
11658
11744
|
*/
|
|
11659
11745
|
previous_response_id?: string | null;
|
|
11660
11746
|
|
|
11661
11747
|
/**
|
|
11662
11748
|
* Reference to a prompt template and its variables.
|
|
11663
|
-
* [Learn more](https://
|
|
11749
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
11664
11750
|
*/
|
|
11665
11751
|
prompt?: ResponsesAPI.BetaResponsePrompt | null;
|
|
11666
11752
|
|
|
11667
11753
|
/**
|
|
11668
11754
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
11669
11755
|
* hit rates. Replaces the `user` field.
|
|
11670
|
-
* [Learn more](https://
|
|
11756
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
11671
11757
|
*/
|
|
11672
11758
|
prompt_cache_key?: string | null;
|
|
11673
11759
|
|
|
@@ -11679,7 +11765,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11679
11765
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
11680
11766
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
11681
11767
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
11682
|
-
* [prompt caching guide](https://
|
|
11768
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
11683
11769
|
* for current details.
|
|
11684
11770
|
*/
|
|
11685
11771
|
prompt_cache_options?: ResponseCreate.PromptCacheOptions;
|
|
@@ -11690,7 +11776,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11690
11776
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
11691
11777
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
11692
11778
|
* of 24 hours.
|
|
11693
|
-
* [Learn more](https://
|
|
11779
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
11694
11780
|
* This field expresses a maximum retention policy, while
|
|
11695
11781
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
11696
11782
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -11707,7 +11793,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11707
11793
|
|
|
11708
11794
|
/**
|
|
11709
11795
|
* Configuration options for
|
|
11710
|
-
* [reasoning models](https://
|
|
11796
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
11711
11797
|
*/
|
|
11712
11798
|
reasoning?: ResponseCreate.Reasoning | null;
|
|
11713
11799
|
|
|
@@ -11717,7 +11803,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11717
11803
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
11718
11804
|
* hashing their username or email address, in order to avoid sending us any
|
|
11719
11805
|
* identifying information.
|
|
11720
|
-
* [Learn more](https://
|
|
11806
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
11721
11807
|
*/
|
|
11722
11808
|
safety_identifier?: string | null;
|
|
11723
11809
|
|
|
@@ -11729,13 +11815,15 @@ export namespace BetaResponsesClientEvent {
|
|
|
11729
11815
|
* will use 'default'.
|
|
11730
11816
|
* - If set to 'default', then the request will be processed with the standard
|
|
11731
11817
|
* pricing and performance for the selected model.
|
|
11732
|
-
* - If set to
|
|
11733
|
-
* then
|
|
11734
|
-
*
|
|
11735
|
-
*
|
|
11736
|
-
*
|
|
11737
|
-
*
|
|
11738
|
-
*
|
|
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.
|
|
11739
11827
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
11740
11828
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
11741
11829
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -11751,6 +11839,9 @@ export namespace BetaResponsesClientEvent {
|
|
|
11751
11839
|
|
|
11752
11840
|
/**
|
|
11753
11841
|
* Whether to store the generated model response for later retrieval via API.
|
|
11842
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
11843
|
+
* at least 30 days, subject to the
|
|
11844
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
11754
11845
|
*/
|
|
11755
11846
|
store?: boolean | null;
|
|
11756
11847
|
|
|
@@ -11759,7 +11850,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11759
11850
|
* generated using
|
|
11760
11851
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
11761
11852
|
* See the
|
|
11762
|
-
* [Streaming section below](https://
|
|
11853
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
11763
11854
|
* for more information.
|
|
11764
11855
|
*/
|
|
11765
11856
|
stream?: boolean | null;
|
|
@@ -11790,8 +11881,8 @@ export namespace BetaResponsesClientEvent {
|
|
|
11790
11881
|
* Configuration options for a text response from the model. Can be plain text or
|
|
11791
11882
|
* structured JSON data. Learn more:
|
|
11792
11883
|
*
|
|
11793
|
-
* - [Text inputs and outputs](https://
|
|
11794
|
-
* - [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)
|
|
11795
11886
|
*/
|
|
11796
11887
|
text?: ResponsesAPI.BetaResponseTextConfig;
|
|
11797
11888
|
|
|
@@ -11819,17 +11910,18 @@ export namespace BetaResponsesClientEvent {
|
|
|
11819
11910
|
*
|
|
11820
11911
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
11821
11912
|
* capabilities, like
|
|
11822
|
-
* [web search](https://
|
|
11823
|
-
*
|
|
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).
|
|
11824
11916
|
* Learn more about
|
|
11825
|
-
* [built-in tools](https://
|
|
11917
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
11826
11918
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
11827
11919
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
11828
|
-
* [MCP Tools](https://
|
|
11920
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
11829
11921
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
11830
11922
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
11831
11923
|
* Learn more about
|
|
11832
|
-
* [function calling](https://
|
|
11924
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
11833
11925
|
* You can also use custom tools to call your own code.
|
|
11834
11926
|
*/
|
|
11835
11927
|
tools?: Array<ResponsesAPI.BetaTool>;
|
|
@@ -11867,7 +11959,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11867
11959
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
11868
11960
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
11869
11961
|
* abuse.
|
|
11870
|
-
* [Learn more](https://
|
|
11962
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
11871
11963
|
*/
|
|
11872
11964
|
user?: string;
|
|
11873
11965
|
}
|
|
@@ -11962,10 +12054,16 @@ export namespace BetaResponsesClientEvent {
|
|
|
11962
12054
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
11963
12055
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
11964
12056
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
11965
|
-
* [prompt caching guide](https://
|
|
12057
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
11966
12058
|
* for current details.
|
|
11967
12059
|
*/
|
|
11968
12060
|
export interface PromptCacheOptions {
|
|
12061
|
+
/**
|
|
12062
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
12063
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
12064
|
+
*/
|
|
12065
|
+
comparison_response_id?: string | null;
|
|
12066
|
+
|
|
11969
12067
|
/**
|
|
11970
12068
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
11971
12069
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -11986,7 +12084,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
11986
12084
|
|
|
11987
12085
|
/**
|
|
11988
12086
|
* Configuration options for
|
|
11989
|
-
* [reasoning models](https://
|
|
12087
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
11990
12088
|
*/
|
|
11991
12089
|
export interface Reasoning {
|
|
11992
12090
|
/**
|
|
@@ -12004,7 +12102,7 @@ export namespace BetaResponsesClientEvent {
|
|
|
12004
12102
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
12005
12103
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
12006
12104
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
12007
|
-
* [reasoning guide](https://
|
|
12105
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
12008
12106
|
* model-specific support.
|
|
12009
12107
|
*/
|
|
12010
12108
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -12901,13 +12999,15 @@ export namespace BetaResponsesServerEvent {
|
|
|
12901
12999
|
* will use 'default'.
|
|
12902
13000
|
* - If set to 'default', then the request will be processed with the standard
|
|
12903
13001
|
* pricing and performance for the selected model.
|
|
12904
|
-
* - If set to
|
|
12905
|
-
* then
|
|
12906
|
-
*
|
|
12907
|
-
*
|
|
12908
|
-
*
|
|
12909
|
-
*
|
|
12910
|
-
*
|
|
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.
|
|
12911
13011
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
12912
13012
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
12913
13013
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -12971,7 +13071,7 @@ export namespace BetaTool {
|
|
|
12971
13071
|
/**
|
|
12972
13072
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
12973
13073
|
* (MCP) servers.
|
|
12974
|
-
* [Learn more about MCP](https://
|
|
13074
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
12975
13075
|
*/
|
|
12976
13076
|
export interface Mcp {
|
|
12977
13077
|
/**
|
|
@@ -13005,7 +13105,7 @@ export namespace BetaTool {
|
|
|
13005
13105
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
13006
13106
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
13007
13107
|
* service connectors
|
|
13008
|
-
* [here](https://
|
|
13108
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
13009
13109
|
*
|
|
13010
13110
|
* Currently supported `connector_id` values are:
|
|
13011
13111
|
*
|
|
@@ -13214,9 +13314,11 @@ export namespace BetaTool {
|
|
|
13214
13314
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
13215
13315
|
* the model will automatically determine the best background for the image.
|
|
13216
13316
|
*
|
|
13217
|
-
*
|
|
13218
|
-
* `
|
|
13219
|
-
*
|
|
13317
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
13318
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
13319
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
13320
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
13321
|
+
* set the output format to `png` or `webp`.
|
|
13220
13322
|
*/
|
|
13221
13323
|
background?: 'transparent' | 'opaque' | 'auto';
|
|
13222
13324
|
|
|
@@ -13236,7 +13338,9 @@ export namespace BetaTool {
|
|
|
13236
13338
|
|
|
13237
13339
|
/**
|
|
13238
13340
|
* The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
13239
|
-
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
13341
|
+
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
13342
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
13343
|
+
* `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
13240
13344
|
* `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
13241
13345
|
*/
|
|
13242
13346
|
model?:
|
|
@@ -13245,6 +13349,10 @@ export namespace BetaTool {
|
|
|
13245
13349
|
| 'gpt-image-1-mini'
|
|
13246
13350
|
| 'gpt-image-2'
|
|
13247
13351
|
| 'gpt-image-2-2026-04-21'
|
|
13352
|
+
| 'gpt-image-2.5-sunburst'
|
|
13353
|
+
| 'gpt-image-2.5-sunburst-2026-09-08'
|
|
13354
|
+
| 'gpt-image-2.5-flare'
|
|
13355
|
+
| 'gpt-image-2.5-flare-2026-09-08'
|
|
13248
13356
|
| 'gpt-image-1.5'
|
|
13249
13357
|
| 'chatgpt-image-latest';
|
|
13250
13358
|
|
|
@@ -13271,23 +13379,26 @@ export namespace BetaTool {
|
|
|
13271
13379
|
partial_images?: number;
|
|
13272
13380
|
|
|
13273
13381
|
/**
|
|
13274
|
-
* The quality of the generated image.
|
|
13275
|
-
*
|
|
13382
|
+
* The quality of the generated image. The GPT image models support `low`,
|
|
13383
|
+
* `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
13384
|
+
* including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
13385
|
+
* `auto`.
|
|
13276
13386
|
*/
|
|
13277
|
-
quality?: 'low' | 'medium' | 'high' | 'auto';
|
|
13387
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
13278
13388
|
|
|
13279
13389
|
/**
|
|
13280
|
-
* The size of the generated images. For `gpt-image-2`
|
|
13281
|
-
* `gpt-image-2-2026-
|
|
13282
|
-
*
|
|
13283
|
-
*
|
|
13284
|
-
*
|
|
13285
|
-
*
|
|
13286
|
-
*
|
|
13287
|
-
*
|
|
13288
|
-
*
|
|
13289
|
-
* `
|
|
13290
|
-
* `
|
|
13390
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
13391
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
13392
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
13393
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
13394
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
13395
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
13396
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
13397
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
13398
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
13399
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
13400
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
13401
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
13291
13402
|
*/
|
|
13292
13403
|
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
13293
13404
|
}
|
|
@@ -13441,12 +13552,12 @@ export interface BetaToolChoiceShell {
|
|
|
13441
13552
|
|
|
13442
13553
|
/**
|
|
13443
13554
|
* Indicates that the model should use a built-in tool to generate a response.
|
|
13444
|
-
* [Learn more about built-in tools](https://
|
|
13555
|
+
* [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
13445
13556
|
*/
|
|
13446
13557
|
export interface BetaToolChoiceTypes {
|
|
13447
13558
|
/**
|
|
13448
13559
|
* The type of hosted tool the model should to use. Learn more about
|
|
13449
|
-
* [built-in tools](https://
|
|
13560
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
13450
13561
|
*
|
|
13451
13562
|
* Allowed values are:
|
|
13452
13563
|
*
|
|
@@ -13497,7 +13608,7 @@ export interface BetaToolSearchTool {
|
|
|
13497
13608
|
/**
|
|
13498
13609
|
* This tool searches the web for relevant results to use in a response. Learn more
|
|
13499
13610
|
* about the
|
|
13500
|
-
* [web search tool](https://
|
|
13611
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
13501
13612
|
*/
|
|
13502
13613
|
export interface BetaWebSearchPreviewTool {
|
|
13503
13614
|
/**
|
|
@@ -13556,7 +13667,7 @@ export namespace BetaWebSearchPreviewTool {
|
|
|
13556
13667
|
|
|
13557
13668
|
/**
|
|
13558
13669
|
* Search the Internet for sources related to the prompt. Learn more about the
|
|
13559
|
-
* [web search tool](https://
|
|
13670
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
13560
13671
|
*/
|
|
13561
13672
|
export interface BetaWebSearchTool {
|
|
13562
13673
|
/**
|
|
@@ -13640,7 +13751,7 @@ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCr
|
|
|
13640
13751
|
export interface ResponseCreateParamsBase {
|
|
13641
13752
|
/**
|
|
13642
13753
|
* Body param: Whether to run the model response in the background.
|
|
13643
|
-
* [Learn more](https://
|
|
13754
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
13644
13755
|
*/
|
|
13645
13756
|
background?: boolean | null;
|
|
13646
13757
|
|
|
@@ -13685,11 +13796,11 @@ export interface ResponseCreateParamsBase {
|
|
|
13685
13796
|
*
|
|
13686
13797
|
* Learn more:
|
|
13687
13798
|
*
|
|
13688
|
-
* - [Text inputs and outputs](https://
|
|
13689
|
-
* - [Image inputs](https://
|
|
13690
|
-
* - [File inputs](https://
|
|
13691
|
-
* - [Conversation state](https://
|
|
13692
|
-
* - [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)
|
|
13693
13804
|
*/
|
|
13694
13805
|
input?: string | BetaResponseInput;
|
|
13695
13806
|
|
|
@@ -13705,7 +13816,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13705
13816
|
/**
|
|
13706
13817
|
* Body param: An upper bound for the number of tokens that can be generated for a
|
|
13707
13818
|
* response, including visible output tokens and
|
|
13708
|
-
* [reasoning tokens](https://
|
|
13819
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
13709
13820
|
*/
|
|
13710
13821
|
max_output_tokens?: number | null;
|
|
13711
13822
|
|
|
@@ -13731,8 +13842,8 @@ export interface ResponseCreateParamsBase {
|
|
|
13731
13842
|
* Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
|
|
13732
13843
|
* offers a wide range of models with different capabilities, performance
|
|
13733
13844
|
* characteristics, and price points. Refer to the
|
|
13734
|
-
* [model guide](https://
|
|
13735
|
-
* available models.
|
|
13845
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
13846
|
+
* compare available models.
|
|
13736
13847
|
*/
|
|
13737
13848
|
model?:
|
|
13738
13849
|
| 'gpt-6-astra'
|
|
@@ -13859,21 +13970,21 @@ export interface ResponseCreateParamsBase {
|
|
|
13859
13970
|
/**
|
|
13860
13971
|
* Body param: The unique ID of the previous response to the model. Use this to
|
|
13861
13972
|
* create multi-turn conversations. Learn more about
|
|
13862
|
-
* [conversation state](https://
|
|
13973
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
13863
13974
|
* Cannot be used in conjunction with `conversation`.
|
|
13864
13975
|
*/
|
|
13865
13976
|
previous_response_id?: string | null;
|
|
13866
13977
|
|
|
13867
13978
|
/**
|
|
13868
13979
|
* Body param: Reference to a prompt template and its variables.
|
|
13869
|
-
* [Learn more](https://
|
|
13980
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
13870
13981
|
*/
|
|
13871
13982
|
prompt?: BetaResponsePrompt | null;
|
|
13872
13983
|
|
|
13873
13984
|
/**
|
|
13874
13985
|
* Body param: Used by OpenAI to cache responses for similar requests to optimize
|
|
13875
13986
|
* your cache hit rates. Replaces the `user` field.
|
|
13876
|
-
* [Learn more](https://
|
|
13987
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
13877
13988
|
*/
|
|
13878
13989
|
prompt_cache_key?: string | null;
|
|
13879
13990
|
|
|
@@ -13886,7 +13997,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13886
13997
|
* conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
13887
13998
|
* to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
13888
13999
|
* currently the only supported value. See the
|
|
13889
|
-
* [prompt caching guide](https://
|
|
14000
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
13890
14001
|
* for current details.
|
|
13891
14002
|
*/
|
|
13892
14003
|
prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
|
|
@@ -13897,7 +14008,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13897
14008
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
13898
14009
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
13899
14010
|
* of 24 hours.
|
|
13900
|
-
* [Learn more](https://
|
|
14011
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
13901
14012
|
* This field expresses a maximum retention policy, while
|
|
13902
14013
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
13903
14014
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -13914,7 +14025,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13914
14025
|
|
|
13915
14026
|
/**
|
|
13916
14027
|
* Body param: Configuration options for
|
|
13917
|
-
* [reasoning models](https://
|
|
14028
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
13918
14029
|
*/
|
|
13919
14030
|
reasoning?: ResponseCreateParams.Reasoning | null;
|
|
13920
14031
|
|
|
@@ -13924,7 +14035,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13924
14035
|
* uniquely identifies each user, with a maximum length of 64 characters. We
|
|
13925
14036
|
* recommend hashing their username or email address, in order to avoid sending us
|
|
13926
14037
|
* any identifying information.
|
|
13927
|
-
* [Learn more](https://
|
|
14038
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
13928
14039
|
*/
|
|
13929
14040
|
safety_identifier?: string | null;
|
|
13930
14041
|
|
|
@@ -13936,13 +14047,15 @@ export interface ResponseCreateParamsBase {
|
|
|
13936
14047
|
* will use 'default'.
|
|
13937
14048
|
* - If set to 'default', then the request will be processed with the standard
|
|
13938
14049
|
* pricing and performance for the selected model.
|
|
13939
|
-
* - If set to
|
|
13940
|
-
* then
|
|
13941
|
-
*
|
|
13942
|
-
*
|
|
13943
|
-
*
|
|
13944
|
-
*
|
|
13945
|
-
*
|
|
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.
|
|
13946
14059
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
13947
14060
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
13948
14061
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -13958,7 +14071,9 @@ export interface ResponseCreateParamsBase {
|
|
|
13958
14071
|
|
|
13959
14072
|
/**
|
|
13960
14073
|
* Body param: Whether to store the generated model response for later retrieval
|
|
13961
|
-
* via API.
|
|
14074
|
+
* via API. Defaults to true when omitted. If set to true, response data will be
|
|
14075
|
+
* stored for at least 30 days, subject to the
|
|
14076
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
13962
14077
|
*/
|
|
13963
14078
|
store?: boolean | null;
|
|
13964
14079
|
|
|
@@ -13967,7 +14082,7 @@ export interface ResponseCreateParamsBase {
|
|
|
13967
14082
|
* client as it is generated using
|
|
13968
14083
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
13969
14084
|
* See the
|
|
13970
|
-
* [Streaming section below](https://
|
|
14085
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
13971
14086
|
* for more information.
|
|
13972
14087
|
*/
|
|
13973
14088
|
stream?: boolean | null;
|
|
@@ -13990,8 +14105,8 @@ export interface ResponseCreateParamsBase {
|
|
|
13990
14105
|
* Body param: Configuration options for a text response from the model. Can be
|
|
13991
14106
|
* plain text or structured JSON data. Learn more:
|
|
13992
14107
|
*
|
|
13993
|
-
* - [Text inputs and outputs](https://
|
|
13994
|
-
* - [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)
|
|
13995
14110
|
*/
|
|
13996
14111
|
text?: BetaResponseTextConfig;
|
|
13997
14112
|
|
|
@@ -14019,17 +14134,18 @@ export interface ResponseCreateParamsBase {
|
|
|
14019
14134
|
*
|
|
14020
14135
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
14021
14136
|
* capabilities, like
|
|
14022
|
-
* [web search](https://
|
|
14023
|
-
*
|
|
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).
|
|
14024
14140
|
* Learn more about
|
|
14025
|
-
* [built-in tools](https://
|
|
14141
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
14026
14142
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
14027
14143
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
14028
|
-
* [MCP Tools](https://
|
|
14144
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
14029
14145
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
14030
14146
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
14031
14147
|
* Learn more about
|
|
14032
|
-
* [function calling](https://
|
|
14148
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
14033
14149
|
* You can also use custom tools to call your own code.
|
|
14034
14150
|
*/
|
|
14035
14151
|
tools?: Array<BetaTool>;
|
|
@@ -14069,7 +14185,7 @@ export interface ResponseCreateParamsBase {
|
|
|
14069
14185
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
14070
14186
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
14071
14187
|
* abuse.
|
|
14072
|
-
* [Learn more](https://
|
|
14188
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
14073
14189
|
*/
|
|
14074
14190
|
user?: string;
|
|
14075
14191
|
|
|
@@ -14169,10 +14285,16 @@ export namespace ResponseCreateParams {
|
|
|
14169
14285
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
14170
14286
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
14171
14287
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
14172
|
-
* [prompt caching guide](https://
|
|
14288
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14173
14289
|
* for current details.
|
|
14174
14290
|
*/
|
|
14175
14291
|
export interface PromptCacheOptions {
|
|
14292
|
+
/**
|
|
14293
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
14294
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
14295
|
+
*/
|
|
14296
|
+
comparison_response_id?: string | null;
|
|
14297
|
+
|
|
14176
14298
|
/**
|
|
14177
14299
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
14178
14300
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -14193,7 +14315,7 @@ export namespace ResponseCreateParams {
|
|
|
14193
14315
|
|
|
14194
14316
|
/**
|
|
14195
14317
|
* Configuration options for
|
|
14196
|
-
* [reasoning models](https://
|
|
14318
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
14197
14319
|
*/
|
|
14198
14320
|
export interface Reasoning {
|
|
14199
14321
|
/**
|
|
@@ -14211,7 +14333,7 @@ export namespace ResponseCreateParams {
|
|
|
14211
14333
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
14212
14334
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
14213
14335
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
14214
|
-
* [reasoning guide](https://
|
|
14336
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
14215
14337
|
* model-specific support.
|
|
14216
14338
|
*/
|
|
14217
14339
|
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
@@ -14275,7 +14397,7 @@ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBa
|
|
|
14275
14397
|
* client as it is generated using
|
|
14276
14398
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14277
14399
|
* See the
|
|
14278
|
-
* [Streaming section below](https://
|
|
14400
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14279
14401
|
* for more information.
|
|
14280
14402
|
*/
|
|
14281
14403
|
stream?: false | null;
|
|
@@ -14287,7 +14409,7 @@ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase
|
|
|
14287
14409
|
* client as it is generated using
|
|
14288
14410
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14289
14411
|
* See the
|
|
14290
|
-
* [Streaming section below](https://
|
|
14412
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14291
14413
|
* for more information.
|
|
14292
14414
|
*/
|
|
14293
14415
|
stream: true;
|
|
@@ -14323,7 +14445,7 @@ export interface ResponseRetrieveParamsBase {
|
|
|
14323
14445
|
* client as it is generated using
|
|
14324
14446
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14325
14447
|
* See the
|
|
14326
|
-
* [Streaming section below](https://
|
|
14448
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14327
14449
|
* for more information.
|
|
14328
14450
|
*/
|
|
14329
14451
|
stream?: boolean;
|
|
@@ -14345,7 +14467,7 @@ export interface ResponseRetrieveParamsNonStreaming extends ResponseRetrievePara
|
|
|
14345
14467
|
* client as it is generated using
|
|
14346
14468
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14347
14469
|
* See the
|
|
14348
|
-
* [Streaming section below](https://
|
|
14470
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14349
14471
|
* for more information.
|
|
14350
14472
|
*/
|
|
14351
14473
|
stream?: false;
|
|
@@ -14357,7 +14479,7 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
|
|
|
14357
14479
|
* client as it is generated using
|
|
14358
14480
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
14359
14481
|
* See the
|
|
14360
|
-
* [Streaming section below](https://
|
|
14482
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
14361
14483
|
* for more information.
|
|
14362
14484
|
*/
|
|
14363
14485
|
stream: true;
|
|
@@ -14382,8 +14504,8 @@ export interface ResponseCompactParams {
|
|
|
14382
14504
|
* Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
|
|
14383
14505
|
* offers a wide range of models with different capabilities, performance
|
|
14384
14506
|
* characteristics, and price points. Refer to the
|
|
14385
|
-
* [model guide](https://
|
|
14386
|
-
* available models.
|
|
14507
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
14508
|
+
* compare available models.
|
|
14387
14509
|
*/
|
|
14388
14510
|
model:
|
|
14389
14511
|
| 'gpt-6-astra'
|
|
@@ -14509,7 +14631,7 @@ export interface ResponseCompactParams {
|
|
|
14509
14631
|
/**
|
|
14510
14632
|
* Body param: The unique ID of the previous response to the model. Use this to
|
|
14511
14633
|
* create multi-turn conversations. Learn more about
|
|
14512
|
-
* [conversation state](https://
|
|
14634
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
14513
14635
|
* Cannot be used in conjunction with `conversation`.
|
|
14514
14636
|
*/
|
|
14515
14637
|
previous_response_id?: string | null;
|
|
@@ -14528,7 +14650,7 @@ export interface ResponseCompactParams {
|
|
|
14528
14650
|
* conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
14529
14651
|
* to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
14530
14652
|
* currently the only supported value. See the
|
|
14531
|
-
* [prompt caching guide](https://
|
|
14653
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14532
14654
|
* for current details.
|
|
14533
14655
|
*/
|
|
14534
14656
|
prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
|
|
@@ -14545,16 +14667,17 @@ export interface ResponseCompactParams {
|
|
|
14545
14667
|
* in the Project settings. Unless otherwise configured, the Project will use
|
|
14546
14668
|
* 'default'. - If set to 'default', then the request will be processed with the
|
|
14547
14669
|
* standard pricing and performance for the selected model. - If set to
|
|
14548
|
-
* '[flex](https://
|
|
14549
|
-
* request will be processed with the Flex Processing service tier. - To opt-in
|
|
14550
|
-
* [Fast mode](/api/docs/guides/fast-mode) at the
|
|
14551
|
-
* `service_tier=fast` or `service_tier=priority`
|
|
14552
|
-
*
|
|
14553
|
-
*
|
|
14554
|
-
*
|
|
14555
|
-
*
|
|
14556
|
-
*
|
|
14557
|
-
* the value
|
|
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.
|
|
14558
14681
|
*/
|
|
14559
14682
|
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
14560
14683
|
|
|
@@ -14573,7 +14696,7 @@ export namespace ResponseCompactParams {
|
|
|
14573
14696
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
14574
14697
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
14575
14698
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
14576
|
-
* [prompt caching guide](https://
|
|
14699
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
14577
14700
|
* for current details.
|
|
14578
14701
|
*/
|
|
14579
14702
|
export interface PromptCacheOptions {
|