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
package/src/resources/images.ts
CHANGED
|
@@ -31,8 +31,7 @@ export class Images extends APIResource {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Creates an edited or extended image given one or more source images and a
|
|
34
|
-
* prompt. This endpoint supports GPT Image models
|
|
35
|
-
* `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
|
|
34
|
+
* prompt. This endpoint supports GPT Image models and `dall-e-2`.
|
|
36
35
|
*
|
|
37
36
|
* @example
|
|
38
37
|
* ```ts
|
|
@@ -69,7 +68,7 @@ export class Images extends APIResource {
|
|
|
69
68
|
|
|
70
69
|
/**
|
|
71
70
|
* Creates an image given a prompt.
|
|
72
|
-
* [Learn more](https://
|
|
71
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/images-vision).
|
|
73
72
|
*
|
|
74
73
|
* @example
|
|
75
74
|
* ```ts
|
|
@@ -151,12 +150,12 @@ export interface ImageEditCompletedEvent {
|
|
|
151
150
|
/**
|
|
152
151
|
* The quality setting for the edited image.
|
|
153
152
|
*/
|
|
154
|
-
quality: 'low' | 'medium' | 'high' | 'auto';
|
|
153
|
+
quality: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
155
154
|
|
|
156
155
|
/**
|
|
157
|
-
* The
|
|
156
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
158
157
|
*/
|
|
159
|
-
size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
158
|
+
size: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
160
159
|
|
|
161
160
|
/**
|
|
162
161
|
* The type of the event. Always `image_edit.completed`.
|
|
@@ -247,12 +246,12 @@ export interface ImageEditPartialImageEvent {
|
|
|
247
246
|
/**
|
|
248
247
|
* The quality setting for the requested edited image.
|
|
249
248
|
*/
|
|
250
|
-
quality: 'low' | 'medium' | 'high' | 'auto';
|
|
249
|
+
quality: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
251
250
|
|
|
252
251
|
/**
|
|
253
|
-
* The
|
|
252
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
254
253
|
*/
|
|
255
|
-
size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
254
|
+
size: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
256
255
|
|
|
257
256
|
/**
|
|
258
257
|
* The type of the event. Always `image_edit.partial_image`.
|
|
@@ -292,12 +291,12 @@ export interface ImageGenCompletedEvent {
|
|
|
292
291
|
/**
|
|
293
292
|
* The quality setting for the generated image.
|
|
294
293
|
*/
|
|
295
|
-
quality: 'low' | 'medium' | 'high' | 'auto';
|
|
294
|
+
quality: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
296
295
|
|
|
297
296
|
/**
|
|
298
|
-
* The
|
|
297
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
299
298
|
*/
|
|
300
|
-
size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
299
|
+
size: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
301
300
|
|
|
302
301
|
/**
|
|
303
302
|
* The type of the event. Always `image_generation.completed`.
|
|
@@ -388,12 +387,12 @@ export interface ImageGenPartialImageEvent {
|
|
|
388
387
|
/**
|
|
389
388
|
* The quality setting for the requested image.
|
|
390
389
|
*/
|
|
391
|
-
quality: 'low' | 'medium' | 'high' | 'auto';
|
|
390
|
+
quality: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
392
391
|
|
|
393
392
|
/**
|
|
394
|
-
* The
|
|
393
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
395
394
|
*/
|
|
396
|
-
size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
395
|
+
size: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
397
396
|
|
|
398
397
|
/**
|
|
399
398
|
* The type of the event. Always `image_generation.partial_image`.
|
|
@@ -411,6 +410,10 @@ export type ImageModel =
|
|
|
411
410
|
| 'gpt-image-1-mini'
|
|
412
411
|
| 'gpt-image-2'
|
|
413
412
|
| 'gpt-image-2-2026-04-21'
|
|
413
|
+
| 'gpt-image-2.5-sunburst'
|
|
414
|
+
| 'gpt-image-2.5-sunburst-2026-09-08'
|
|
415
|
+
| 'gpt-image-2.5-flare'
|
|
416
|
+
| 'gpt-image-2.5-flare-2026-09-08'
|
|
414
417
|
| 'gpt-image-1.5'
|
|
415
418
|
| 'chatgpt-image-latest'
|
|
416
419
|
| 'dall-e-2'
|
|
@@ -442,15 +445,15 @@ export interface ImagesResponse {
|
|
|
442
445
|
output_format?: 'png' | 'webp' | 'jpeg';
|
|
443
446
|
|
|
444
447
|
/**
|
|
445
|
-
* The quality of the image generated.
|
|
448
|
+
* The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or
|
|
449
|
+
* `max`.
|
|
446
450
|
*/
|
|
447
|
-
quality?: 'low' | 'medium' | 'high';
|
|
451
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
448
452
|
|
|
449
453
|
/**
|
|
450
|
-
* The
|
|
451
|
-
* `1536x1024`.
|
|
454
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
452
455
|
*/
|
|
453
|
-
size?: '1024x1024' | '1024x1536' | '1536x1024';
|
|
456
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024';
|
|
454
457
|
|
|
455
458
|
/**
|
|
456
459
|
* For `gpt-image-1` only, the token usage information for the image generation.
|
|
@@ -556,7 +559,7 @@ export interface ImageCreateVariationParams {
|
|
|
556
559
|
/**
|
|
557
560
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
558
561
|
* and detect abuse.
|
|
559
|
-
* [Learn more](https://
|
|
562
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
560
563
|
*/
|
|
561
564
|
user?: string;
|
|
562
565
|
}
|
|
@@ -568,9 +571,11 @@ export interface ImageEditParamsBase {
|
|
|
568
571
|
* The image(s) to edit. Must be a supported image file or an array of images.
|
|
569
572
|
*
|
|
570
573
|
* For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
571
|
-
* `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
+
* `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
575
|
+
* `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
576
|
+
* `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should
|
|
577
|
+
* be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
578
|
+
* images.
|
|
574
579
|
*
|
|
575
580
|
* For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
576
581
|
* file less than 4MB.
|
|
@@ -588,9 +593,11 @@ export interface ImageEditParamsBase {
|
|
|
588
593
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
589
594
|
* the model will automatically determine the best background for the image.
|
|
590
595
|
*
|
|
591
|
-
*
|
|
592
|
-
* `
|
|
593
|
-
*
|
|
596
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
597
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
598
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
599
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
600
|
+
* set the output format to `png` or `webp`.
|
|
594
601
|
*/
|
|
595
602
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
596
603
|
|
|
@@ -613,7 +620,9 @@ export interface ImageEditParamsBase {
|
|
|
613
620
|
/**
|
|
614
621
|
* The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
615
622
|
* (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
616
|
-
* `gpt-image-2-2026-04-21`,
|
|
623
|
+
* `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
624
|
+
* `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
625
|
+
* `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to
|
|
617
626
|
* `gpt-image-1.5`.
|
|
618
627
|
*/
|
|
619
628
|
model?: (string & {}) | ImageModel | null;
|
|
@@ -648,10 +657,12 @@ export interface ImageEditParamsBase {
|
|
|
648
657
|
partial_images?: number | null;
|
|
649
658
|
|
|
650
659
|
/**
|
|
651
|
-
* The quality of the image that will be generated for GPT image models.
|
|
652
|
-
*
|
|
660
|
+
* The quality of the image that will be generated for GPT image models. The GPT
|
|
661
|
+
* image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and
|
|
662
|
+
* `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
|
|
663
|
+
* `xhigh` and `max`. Defaults to `auto`.
|
|
653
664
|
*/
|
|
654
|
-
quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto' | null;
|
|
665
|
+
quality?: 'standard' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
655
666
|
|
|
656
667
|
/**
|
|
657
668
|
* The format in which the generated images are returned. Must be one of `url` or
|
|
@@ -662,23 +673,24 @@ export interface ImageEditParamsBase {
|
|
|
662
673
|
response_format?: 'url' | 'b64_json' | null;
|
|
663
674
|
|
|
664
675
|
/**
|
|
665
|
-
* The size of the generated images. For `gpt-image-2`
|
|
666
|
-
* `gpt-image-2-2026-
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
* `
|
|
675
|
-
* `
|
|
676
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
677
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
678
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
679
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
680
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
681
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
682
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
683
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
684
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
685
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
686
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
687
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
676
688
|
*/
|
|
677
689
|
size?: (string & {}) | '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
|
|
678
690
|
|
|
679
691
|
/**
|
|
680
692
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
681
|
-
* [Image generation guide](https://
|
|
693
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
682
694
|
* for more information.
|
|
683
695
|
*/
|
|
684
696
|
stream?: boolean | null;
|
|
@@ -686,7 +698,7 @@ export interface ImageEditParamsBase {
|
|
|
686
698
|
/**
|
|
687
699
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
688
700
|
* and detect abuse.
|
|
689
|
-
* [Learn more](https://
|
|
701
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
690
702
|
*/
|
|
691
703
|
user?: string;
|
|
692
704
|
}
|
|
@@ -699,7 +711,7 @@ export namespace ImageEditParams {
|
|
|
699
711
|
export interface ImageEditParamsNonStreaming extends ImageEditParamsBase {
|
|
700
712
|
/**
|
|
701
713
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
702
|
-
* [Image generation guide](https://
|
|
714
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
703
715
|
* for more information.
|
|
704
716
|
*/
|
|
705
717
|
stream?: false | null;
|
|
@@ -708,7 +720,7 @@ export interface ImageEditParamsNonStreaming extends ImageEditParamsBase {
|
|
|
708
720
|
export interface ImageEditParamsStreaming extends ImageEditParamsBase {
|
|
709
721
|
/**
|
|
710
722
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
711
|
-
* [Image generation guide](https://
|
|
723
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
712
724
|
* for more information.
|
|
713
725
|
*/
|
|
714
726
|
stream: true;
|
|
@@ -729,17 +741,21 @@ export interface ImageGenerateParamsBase {
|
|
|
729
741
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
730
742
|
* the model will automatically determine the best background for the image.
|
|
731
743
|
*
|
|
732
|
-
*
|
|
733
|
-
* `
|
|
734
|
-
*
|
|
744
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
745
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
746
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
747
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
748
|
+
* set the output format to `png` or `webp`.
|
|
735
749
|
*/
|
|
736
750
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
737
751
|
|
|
738
752
|
/**
|
|
739
753
|
* The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
|
|
740
754
|
* image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
741
|
-
*
|
|
742
|
-
*
|
|
755
|
+
* `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
756
|
+
* `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
757
|
+
* `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter
|
|
758
|
+
* specific to the GPT image models is used.
|
|
743
759
|
*/
|
|
744
760
|
model?: (string & {}) | ImageModel | null;
|
|
745
761
|
|
|
@@ -785,10 +801,12 @@ export interface ImageGenerateParamsBase {
|
|
|
785
801
|
* - `auto` (default value) will automatically select the best quality for the
|
|
786
802
|
* given model.
|
|
787
803
|
* - `high`, `medium` and `low` are supported for the GPT image models.
|
|
804
|
+
* - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their
|
|
805
|
+
* `2026-09-08` snapshots, also support `xhigh` and `max`.
|
|
788
806
|
* - `hd` and `standard` are supported for `dall-e-3`.
|
|
789
807
|
* - `standard` is the only option for `dall-e-2`.
|
|
790
808
|
*/
|
|
791
|
-
quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | null;
|
|
809
|
+
quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
792
810
|
|
|
793
811
|
/**
|
|
794
812
|
* The format in which generated images with `dall-e-2` and `dall-e-3` are
|
|
@@ -799,17 +817,18 @@ export interface ImageGenerateParamsBase {
|
|
|
799
817
|
response_format?: 'url' | 'b64_json' | null;
|
|
800
818
|
|
|
801
819
|
/**
|
|
802
|
-
* The size of the generated images. For `gpt-image-2`
|
|
803
|
-
* `gpt-image-2-2026-
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
*
|
|
810
|
-
*
|
|
811
|
-
* `
|
|
812
|
-
* `
|
|
820
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
821
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
822
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
823
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
824
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
825
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
826
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
827
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
828
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
829
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
830
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
831
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
813
832
|
*/
|
|
814
833
|
size?:
|
|
815
834
|
| (string & {})
|
|
@@ -825,7 +844,7 @@ export interface ImageGenerateParamsBase {
|
|
|
825
844
|
|
|
826
845
|
/**
|
|
827
846
|
* Generate the image in streaming mode. Defaults to `false`. See the
|
|
828
|
-
* [Image generation guide](https://
|
|
847
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
829
848
|
* for more information. This parameter is only supported for the GPT image models.
|
|
830
849
|
*/
|
|
831
850
|
stream?: boolean | null;
|
|
@@ -841,7 +860,7 @@ export interface ImageGenerateParamsBase {
|
|
|
841
860
|
/**
|
|
842
861
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
843
862
|
* and detect abuse.
|
|
844
|
-
* [Learn more](https://
|
|
863
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
845
864
|
*/
|
|
846
865
|
user?: string;
|
|
847
866
|
}
|
|
@@ -854,7 +873,7 @@ export namespace ImageGenerateParams {
|
|
|
854
873
|
export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase {
|
|
855
874
|
/**
|
|
856
875
|
* Generate the image in streaming mode. Defaults to `false`. See the
|
|
857
|
-
* [Image generation guide](https://
|
|
876
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
858
877
|
* for more information. This parameter is only supported for the GPT image models.
|
|
859
878
|
*/
|
|
860
879
|
stream?: false | null;
|
|
@@ -863,7 +882,7 @@ export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase
|
|
|
863
882
|
export interface ImageGenerateParamsStreaming extends ImageGenerateParamsBase {
|
|
864
883
|
/**
|
|
865
884
|
* Generate the image in streaming mode. Defaults to `false`. See the
|
|
866
|
-
* [Image generation guide](https://
|
|
885
|
+
* [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
|
|
867
886
|
* for more information. This parameter is only supported for the GPT image models.
|
|
868
887
|
*/
|
|
869
888
|
stream: true;
|
|
@@ -10,7 +10,8 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
10
10
|
export class Moderations extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Classifies if text and/or image inputs are potentially harmful. Learn more in
|
|
13
|
-
* the
|
|
13
|
+
* the
|
|
14
|
+
* [moderation guide](https://developers.openai.com/api/docs/guides/moderation).
|
|
14
15
|
*/
|
|
15
16
|
create(body: ModerationCreateParams, options?: RequestOptions): APIPromise<ModerationCreateResponse> {
|
|
16
17
|
return this._client.post('/moderations', { body, ...options, __security: { bearerAuth: true } });
|
|
@@ -350,9 +351,9 @@ export interface ModerationCreateParams {
|
|
|
350
351
|
|
|
351
352
|
/**
|
|
352
353
|
* The content moderation model you would like to use. Learn more in
|
|
353
|
-
* [the moderation guide](https://
|
|
354
|
-
* learn about available models
|
|
355
|
-
* [here](https://
|
|
354
|
+
* [the moderation guide](https://developers.openai.com/api/docs/guides/moderation),
|
|
355
|
+
* and learn about available models
|
|
356
|
+
* [here](https://developers.openai.com/api/docs/guides/moderation).
|
|
356
357
|
*/
|
|
357
358
|
model?: (string & {}) | ModerationModel;
|
|
358
359
|
}
|
|
@@ -213,7 +213,7 @@ export interface CallAcceptParams {
|
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* Reference to a prompt template and its variables.
|
|
216
|
-
* [Learn more](https://
|
|
216
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
217
217
|
*/
|
|
218
218
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
219
219
|
|
|
@@ -20,7 +20,7 @@ export class ClientSecrets extends APIResource {
|
|
|
20
20
|
* will be applied to any sessions created using that client secret, but these can
|
|
21
21
|
* also be overridden by the client connection.
|
|
22
22
|
*
|
|
23
|
-
* [Learn more about authentication with client secrets over WebRTC](https://
|
|
23
|
+
* [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc).
|
|
24
24
|
*
|
|
25
25
|
* Returns the created client secret and the effective session object. The client
|
|
26
26
|
* secret is a string that looks like `ek_1234`.
|
|
@@ -134,7 +134,7 @@ export interface RealtimeSessionCreateResponse {
|
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Reference to a prompt template and its variables.
|
|
137
|
-
* [Learn more](https://
|
|
137
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
138
138
|
*/
|
|
139
139
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
140
140
|
|
|
@@ -396,7 +396,7 @@ export namespace RealtimeSessionCreateResponse {
|
|
|
396
396
|
/**
|
|
397
397
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
398
398
|
* (MCP) servers.
|
|
399
|
-
* [Learn more about MCP](https://
|
|
399
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
400
400
|
*/
|
|
401
401
|
export interface McpTool {
|
|
402
402
|
/**
|
|
@@ -430,7 +430,7 @@ export namespace RealtimeSessionCreateResponse {
|
|
|
430
430
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
431
431
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
432
432
|
* service connectors
|
|
433
|
-
* [here](https://
|
|
433
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
434
434
|
*
|
|
435
435
|
* Currently supported `connector_id` values are:
|
|
436
436
|
*
|
|
@@ -71,7 +71,7 @@ export interface AudioTranscription {
|
|
|
71
71
|
/**
|
|
72
72
|
* An optional text to guide the model's style or continue a previous audio
|
|
73
73
|
* segment. For `whisper-1`, the
|
|
74
|
-
* [prompt is a list of keywords](https://
|
|
74
|
+
* [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting).
|
|
75
75
|
* For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
|
|
76
76
|
* prompt is a free text string, for example "expect words related to technology".
|
|
77
77
|
* Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.
|
|
@@ -1140,7 +1140,7 @@ export type NoiseReductionType = 'near_field' | 'far_field';
|
|
|
1140
1140
|
* trigger the server to stop generating audio and emit a
|
|
1141
1141
|
* `output_audio_buffer.cleared` event. This event should be preceded by a
|
|
1142
1142
|
* `response.cancel` client event to stop the generation of the current response.
|
|
1143
|
-
* [Learn more](https://
|
|
1143
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
1144
1144
|
*/
|
|
1145
1145
|
export interface OutputAudioBufferClearEvent {
|
|
1146
1146
|
/**
|
|
@@ -1230,7 +1230,7 @@ export interface RealtimeAudioConfigInput {
|
|
|
1230
1230
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
1231
1231
|
* model, since the model consumes audio directly. Transcription runs
|
|
1232
1232
|
* asynchronously through
|
|
1233
|
-
* [the /audio/transcriptions endpoint](https://
|
|
1233
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
1234
1234
|
* and should be treated as guidance of input audio content rather than precisely
|
|
1235
1235
|
* what the model heard. The client can optionally set the language and prompt for
|
|
1236
1236
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -2232,7 +2232,7 @@ export namespace RealtimeResponseCreateAudioOutput {
|
|
|
2232
2232
|
/**
|
|
2233
2233
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
2234
2234
|
* (MCP) servers.
|
|
2235
|
-
* [Learn more about MCP](https://
|
|
2235
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
2236
2236
|
*/
|
|
2237
2237
|
export interface RealtimeResponseCreateMcpTool {
|
|
2238
2238
|
/**
|
|
@@ -2266,7 +2266,7 @@ export interface RealtimeResponseCreateMcpTool {
|
|
|
2266
2266
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
2267
2267
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
2268
2268
|
* service connectors
|
|
2269
|
-
* [here](https://
|
|
2269
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
2270
2270
|
*
|
|
2271
2271
|
* Currently supported `connector_id` values are:
|
|
2272
2272
|
*
|
|
@@ -2470,7 +2470,7 @@ export interface RealtimeResponseCreateParams {
|
|
|
2470
2470
|
|
|
2471
2471
|
/**
|
|
2472
2472
|
* Reference to a prompt template and its variables.
|
|
2473
|
-
* [Learn more](https://
|
|
2473
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2474
2474
|
*/
|
|
2475
2475
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2476
2476
|
|
|
@@ -2724,7 +2724,7 @@ export namespace RealtimeServerEvent {
|
|
|
2724
2724
|
* **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the
|
|
2725
2725
|
* client. This event is emitted after an audio content part has been added
|
|
2726
2726
|
* (`response.content_part.added`) to the response.
|
|
2727
|
-
* [Learn more](https://
|
|
2727
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2728
2728
|
*/
|
|
2729
2729
|
export interface OutputAudioBufferStarted {
|
|
2730
2730
|
/**
|
|
@@ -2747,7 +2747,7 @@ export namespace RealtimeServerEvent {
|
|
|
2747
2747
|
* **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely
|
|
2748
2748
|
* drained on the server, and no more audio is forthcoming. This event is emitted
|
|
2749
2749
|
* after the full response data has been sent to the client (`response.done`).
|
|
2750
|
-
* [Learn more](https://
|
|
2750
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2751
2751
|
*/
|
|
2752
2752
|
export interface OutputAudioBufferStopped {
|
|
2753
2753
|
/**
|
|
@@ -2772,7 +2772,7 @@ export namespace RealtimeServerEvent {
|
|
|
2772
2772
|
* (`input_audio_buffer.speech_started`), or when the client has emitted the
|
|
2773
2773
|
* `output_audio_buffer.clear` event to manually cut off the current audio
|
|
2774
2774
|
* response.
|
|
2775
|
-
* [Learn more](https://
|
|
2775
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2776
2776
|
*/
|
|
2777
2777
|
export interface OutputAudioBufferCleared {
|
|
2778
2778
|
/**
|
|
@@ -2835,7 +2835,7 @@ export interface RealtimeSession {
|
|
|
2835
2835
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
2836
2836
|
* model, since the model consumes audio directly. Transcription runs
|
|
2837
2837
|
* asynchronously through
|
|
2838
|
-
* [the /audio/transcriptions endpoint](https://
|
|
2838
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
2839
2839
|
* and should be treated as guidance of input audio content rather than precisely
|
|
2840
2840
|
* what the model heard. The client can optionally set the language and prompt for
|
|
2841
2841
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -2905,7 +2905,7 @@ export interface RealtimeSession {
|
|
|
2905
2905
|
|
|
2906
2906
|
/**
|
|
2907
2907
|
* Reference to a prompt template and its variables.
|
|
2908
|
-
* [Learn more](https://
|
|
2908
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2909
2909
|
*/
|
|
2910
2910
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2911
2911
|
|
|
@@ -3207,7 +3207,7 @@ export interface RealtimeSessionCreateRequest {
|
|
|
3207
3207
|
|
|
3208
3208
|
/**
|
|
3209
3209
|
* Reference to a prompt template and its variables.
|
|
3210
|
-
* [Learn more](https://
|
|
3210
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
3211
3211
|
*/
|
|
3212
3212
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
3213
3213
|
|
|
@@ -3278,7 +3278,7 @@ export type RealtimeToolsConfig = Array<RealtimeToolsConfigUnion>;
|
|
|
3278
3278
|
/**
|
|
3279
3279
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
3280
3280
|
* (MCP) servers.
|
|
3281
|
-
* [Learn more about MCP](https://
|
|
3281
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
3282
3282
|
*/
|
|
3283
3283
|
export type RealtimeToolsConfigUnion = RealtimeFunctionTool | RealtimeToolsConfigUnion.Mcp;
|
|
3284
3284
|
|
|
@@ -3286,7 +3286,7 @@ export namespace RealtimeToolsConfigUnion {
|
|
|
3286
3286
|
/**
|
|
3287
3287
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
3288
3288
|
* (MCP) servers.
|
|
3289
|
-
* [Learn more about MCP](https://
|
|
3289
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
3290
3290
|
*/
|
|
3291
3291
|
export interface Mcp {
|
|
3292
3292
|
/**
|
|
@@ -3320,7 +3320,7 @@ export namespace RealtimeToolsConfigUnion {
|
|
|
3320
3320
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
3321
3321
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
3322
3322
|
* service connectors
|
|
3323
|
-
* [here](https://
|
|
3323
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
3324
3324
|
*
|
|
3325
3325
|
* Currently supported `connector_id` values are:
|
|
3326
3326
|
*
|
|
@@ -3515,7 +3515,7 @@ export interface RealtimeTranscriptionSessionAudioInput {
|
|
|
3515
3515
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
3516
3516
|
* model, since the model consumes audio directly. Transcription runs
|
|
3517
3517
|
* asynchronously through
|
|
3518
|
-
* [the /audio/transcriptions endpoint](https://
|
|
3518
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
3519
3519
|
* and should be treated as guidance of input audio content rather than precisely
|
|
3520
3520
|
* what the model heard. The client can optionally set the language and prompt for
|
|
3521
3521
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -62,8 +62,8 @@ export interface InputTokenCountParams {
|
|
|
62
62
|
* Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
|
63
63
|
* wide range of models with different capabilities, performance characteristics,
|
|
64
64
|
* and price points. Refer to the
|
|
65
|
-
* [model guide](https://
|
|
66
|
-
* available models.
|
|
65
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
66
|
+
* compare available models.
|
|
67
67
|
*/
|
|
68
68
|
model?: string | null;
|
|
69
69
|
|
|
@@ -82,14 +82,14 @@ export interface InputTokenCountParams {
|
|
|
82
82
|
/**
|
|
83
83
|
* The unique ID of the previous response to the model. Use this to create
|
|
84
84
|
* multi-turn conversations. Learn more about
|
|
85
|
-
* [conversation state](https://
|
|
85
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
86
86
|
* Cannot be used in conjunction with `conversation`.
|
|
87
87
|
*/
|
|
88
88
|
previous_response_id?: string | null;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* **gpt-5 and o-series models only** Configuration options for
|
|
92
|
-
* [reasoning models](https://
|
|
92
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
93
93
|
*/
|
|
94
94
|
reasoning?: Shared.Reasoning | null;
|
|
95
95
|
|
|
@@ -97,8 +97,8 @@ export interface InputTokenCountParams {
|
|
|
97
97
|
* Configuration options for a text response from the model. Can be plain text or
|
|
98
98
|
* structured JSON data. Learn more:
|
|
99
99
|
*
|
|
100
|
-
* - [Text inputs and outputs](https://
|
|
101
|
-
* - [Structured Outputs](https://
|
|
100
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
101
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
102
102
|
*/
|
|
103
103
|
text?: InputTokenCountParams.Text | null;
|
|
104
104
|
|
|
@@ -139,8 +139,8 @@ export namespace InputTokenCountParams {
|
|
|
139
139
|
* Configuration options for a text response from the model. Can be plain text or
|
|
140
140
|
* structured JSON data. Learn more:
|
|
141
141
|
*
|
|
142
|
-
* - [Text inputs and outputs](https://
|
|
143
|
-
* - [Structured Outputs](https://
|
|
142
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
143
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
144
144
|
*/
|
|
145
145
|
export interface Text {
|
|
146
146
|
/**
|
|
@@ -148,7 +148,7 @@ export namespace InputTokenCountParams {
|
|
|
148
148
|
*
|
|
149
149
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
150
150
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
151
|
-
* [Structured Outputs guide](https://
|
|
151
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
152
152
|
*
|
|
153
153
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
154
154
|
*
|