@nocobase/plugin-ai 2.1.7 → 2.1.9
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/dist/client/{406.9a530334eae8cede.js → 406.15c09d98faa2ccf1.js} +1 -1
- package/dist/client/{428.fdd0cc3cfd1632ef.js → 428.5eb4f53ddbb6a3b8.js} +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +21 -21
- package/dist/node_modules/@langchain/xai/dist/chat_models/completions.cjs +25 -34
- package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.cts +10 -22
- package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.ts +10 -22
- package/dist/node_modules/@langchain/xai/dist/chat_models/completions.js +17 -25
- package/dist/node_modules/@langchain/xai/dist/chat_models/index.cjs +2 -2
- package/dist/node_modules/@langchain/xai/dist/chat_models/index.d.cts +3 -0
- package/dist/node_modules/@langchain/xai/dist/chat_models/index.js +3 -2
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.cts +5 -12
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.ts +5 -12
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses.cjs +18 -19
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.cts +1 -1
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.ts +1 -1
- package/dist/node_modules/@langchain/xai/dist/chat_models/responses.js +13 -13
- package/dist/node_modules/@langchain/xai/dist/converters/responses.cjs +16 -22
- package/dist/node_modules/@langchain/xai/dist/converters/responses.js +7 -12
- package/dist/node_modules/@langchain/xai/dist/index.cjs +2 -2
- package/dist/node_modules/@langchain/xai/dist/index.d.ts +0 -1
- package/dist/node_modules/@langchain/xai/dist/index.js +1 -2
- package/dist/node_modules/@langchain/xai/dist/live_search.cjs +4 -5
- package/dist/node_modules/@langchain/xai/dist/live_search.js +4 -4
- package/dist/node_modules/@langchain/xai/dist/profiles.cjs +81 -97
- package/dist/node_modules/@langchain/xai/dist/profiles.js +81 -96
- package/dist/node_modules/@langchain/xai/dist/tools/code_execution.cjs +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/code_execution.js +1 -1
- package/dist/node_modules/@langchain/xai/dist/tools/collections_search.cjs +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/collections_search.js +1 -1
- package/dist/node_modules/@langchain/xai/dist/tools/index.cjs +6 -7
- package/dist/node_modules/@langchain/xai/dist/tools/index.d.cts +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/index.d.ts +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/index.js +6 -7
- package/dist/node_modules/@langchain/xai/dist/tools/live_search.cjs +3 -7
- package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.cts +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.ts +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/live_search.js +3 -6
- package/dist/node_modules/@langchain/xai/dist/tools/web_search.cjs +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/web_search.js +1 -1
- package/dist/node_modules/@langchain/xai/dist/tools/x_search.cjs +1 -2
- package/dist/node_modules/@langchain/xai/dist/tools/x_search.js +1 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.mts +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.ts +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.mts +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.ts +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.mts +1 -1
- package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.ts +1 -1
- package/dist/node_modules/openai/api-promise.d.mts +1 -0
- package/dist/node_modules/openai/api-promise.d.ts +1 -0
- package/dist/node_modules/openai/auth/index.d.mts +4 -0
- package/dist/node_modules/openai/auth/index.d.ts +4 -0
- package/dist/node_modules/openai/auth/index.js +11 -0
- package/dist/node_modules/openai/auth/subject-token-providers.d.mts +20 -0
- package/dist/node_modules/openai/auth/subject-token-providers.d.ts +20 -0
- package/dist/node_modules/openai/auth/subject-token-providers.js +127 -0
- package/dist/node_modules/openai/auth/types.d.mts +23 -0
- package/dist/node_modules/openai/auth/types.d.ts +23 -0
- package/dist/node_modules/openai/auth/types.js +3 -0
- package/dist/node_modules/openai/auth/workload-identity-auth.d.mts +16 -0
- package/dist/node_modules/openai/auth/workload-identity-auth.d.ts +16 -0
- package/dist/node_modules/openai/auth/workload-identity-auth.js +95 -0
- package/dist/node_modules/openai/azure.d.mts +6 -2
- package/dist/node_modules/openai/azure.d.ts +6 -2
- package/dist/node_modules/openai/azure.js +4 -3
- package/dist/node_modules/openai/beta/realtime/websocket.js +7 -2
- package/dist/node_modules/openai/beta/realtime/ws.js +5 -1
- package/dist/node_modules/openai/bin/migration-config.json +1120 -0
- package/dist/node_modules/openai/client.d.mts +72 -10
- package/dist/node_modules/openai/client.d.ts +72 -10
- package/dist/node_modules/openai/client.js +207 -28
- package/dist/node_modules/openai/core/EventEmitter.d.mts +56 -0
- package/dist/node_modules/openai/core/EventEmitter.d.ts +56 -0
- package/dist/node_modules/openai/core/EventEmitter.js +93 -0
- package/dist/node_modules/openai/core/error.d.mts +15 -0
- package/dist/node_modules/openai/core/error.d.ts +15 -0
- package/dist/node_modules/openai/core/error.js +34 -1
- package/dist/node_modules/openai/core/pagination.d.mts +18 -0
- package/dist/node_modules/openai/core/pagination.d.ts +18 -0
- package/dist/node_modules/openai/core/pagination.js +32 -1
- package/dist/node_modules/openai/core/streaming.d.mts +1 -1
- package/dist/node_modules/openai/core/streaming.d.ts +1 -1
- package/dist/node_modules/openai/core/streaming.js +2 -2
- package/dist/node_modules/openai/error.d.mts +1 -0
- package/dist/node_modules/openai/error.d.ts +1 -0
- package/dist/node_modules/openai/index.d.mts +1 -1
- package/dist/node_modules/openai/index.d.ts +1 -1
- package/dist/node_modules/openai/index.js +1 -1
- package/dist/node_modules/openai/internal/parse.js +2 -2
- package/dist/node_modules/openai/internal/qs/index.d.mts +2 -2
- package/dist/node_modules/openai/internal/qs/index.d.ts +2 -2
- package/dist/node_modules/openai/internal/request-options.d.mts +5 -0
- package/dist/node_modules/openai/internal/request-options.d.ts +5 -0
- package/dist/node_modules/openai/internal/shims.d.mts +6 -0
- package/dist/node_modules/openai/internal/shims.d.ts +6 -0
- package/dist/node_modules/openai/internal/types.d.mts +17 -11
- package/dist/node_modules/openai/internal/types.d.ts +17 -11
- package/dist/node_modules/openai/internal/utils/env.js +2 -2
- package/dist/node_modules/openai/internal/utils/log.js +2 -0
- package/dist/node_modules/openai/internal/utils/query.d.mts +2 -0
- package/dist/node_modules/openai/internal/utils/query.d.ts +2 -0
- package/dist/node_modules/openai/internal/utils/query.js +10 -0
- package/dist/node_modules/openai/internal/utils.d.mts +1 -0
- package/dist/node_modules/openai/internal/utils.d.ts +1 -0
- package/dist/node_modules/openai/internal/utils.js +1 -0
- package/dist/node_modules/openai/internal/ws-adapter-browser.d.mts +34 -0
- package/dist/node_modules/openai/internal/ws-adapter-browser.d.ts +34 -0
- package/dist/node_modules/openai/internal/ws-adapter-browser.js +88 -0
- package/dist/node_modules/openai/internal/ws-adapter-node.d.mts +27 -0
- package/dist/node_modules/openai/internal/ws-adapter-node.d.ts +27 -0
- package/dist/node_modules/openai/internal/ws-adapter-node.js +90 -0
- package/dist/node_modules/openai/internal/ws-adapter.d.mts +24 -0
- package/dist/node_modules/openai/internal/ws-adapter.d.ts +24 -0
- package/dist/node_modules/openai/internal/ws-adapter.js +11 -0
- package/dist/node_modules/openai/internal/ws.d.mts +80 -0
- package/dist/node_modules/openai/internal/ws.d.ts +80 -0
- package/dist/node_modules/openai/internal/ws.js +153 -0
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/openai/pagination.d.mts +1 -0
- package/dist/node_modules/openai/pagination.d.ts +1 -0
- package/dist/node_modules/openai/realtime/websocket.js +7 -2
- package/dist/node_modules/openai/realtime/ws.js +5 -1
- package/dist/node_modules/openai/resource.d.mts +1 -0
- package/dist/node_modules/openai/resource.d.ts +1 -0
- package/dist/node_modules/openai/resources/admin/admin.d.mts +10 -0
- package/dist/node_modules/openai/resources/admin/admin.d.ts +10 -0
- package/dist/node_modules/openai/resources/admin/admin.js +17 -0
- package/dist/node_modules/openai/resources/admin/index.d.mts +3 -0
- package/dist/node_modules/openai/resources/admin/index.d.ts +3 -0
- package/dist/node_modules/openai/resources/admin/index.js +9 -0
- package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.d.mts +140 -0
- package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.d.ts +140 -0
- package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.js +81 -0
- package/dist/node_modules/openai/resources/admin/organization/audit-logs.d.mts +1267 -0
- package/dist/node_modules/openai/resources/admin/organization/audit-logs.d.ts +1267 -0
- package/dist/node_modules/openai/resources/admin/organization/audit-logs.js +31 -0
- package/dist/node_modules/openai/resources/admin/organization/certificates.d.mts +322 -0
- package/dist/node_modules/openai/resources/admin/organization/certificates.d.ts +322 -0
- package/dist/node_modules/openai/resources/admin/organization/certificates.js +144 -0
- package/dist/node_modules/openai/resources/admin/organization/data-retention.d.mts +50 -0
- package/dist/node_modules/openai/resources/admin/organization/data-retention.d.ts +50 -0
- package/dist/node_modules/openai/resources/admin/organization/data-retention.js +42 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/groups.d.mts +160 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/groups.d.ts +160 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/groups.js +109 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/index.d.mts +4 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/index.d.ts +4 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/index.js +11 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/roles.d.mts +275 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/roles.d.ts +275 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/roles.js +84 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/users.d.mts +164 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/users.d.ts +164 -0
- package/dist/node_modules/openai/resources/admin/organization/groups/users.js +84 -0
- package/dist/node_modules/openai/resources/admin/organization/groups.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/groups.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/groups.js +6 -0
- package/dist/node_modules/openai/resources/admin/organization/index.d.mts +13 -0
- package/dist/node_modules/openai/resources/admin/organization/index.d.ts +13 -0
- package/dist/node_modules/openai/resources/admin/organization/index.js +29 -0
- package/dist/node_modules/openai/resources/admin/organization/invites.d.mts +153 -0
- package/dist/node_modules/openai/resources/admin/organization/invites.d.ts +153 -0
- package/dist/node_modules/openai/resources/admin/organization/invites.js +83 -0
- package/dist/node_modules/openai/resources/admin/organization/organization.d.mts +50 -0
- package/dist/node_modules/openai/resources/admin/organization/organization.d.ts +50 -0
- package/dist/node_modules/openai/resources/admin/organization/organization.js +57 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.d.mts +167 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.d.ts +167 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.js +68 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/certificates.d.mts +186 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/certificates.d.ts +186 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/certificates.js +64 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.d.mts +53 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.d.ts +53 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.js +46 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.d.mts +142 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.d.ts +142 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.js +93 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.d.mts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.d.ts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.js +9 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.d.mts +292 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.d.ts +292 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.js +87 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/groups.js +6 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.d.mts +174 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.d.ts +174 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +45 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/index.d.mts +13 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/index.d.ts +13 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/index.js +29 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.d.mts +86 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.d.ts +86 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.js +63 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/projects.d.mts +188 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/projects.d.ts +188 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/projects.js +149 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.d.mts +120 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.d.ts +120 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.js +47 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/roles.d.mts +146 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/roles.d.ts +146 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/roles.js +108 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.d.mts +168 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.d.ts +168 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.js +101 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.mts +241 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.ts +241 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +102 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/index.d.mts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/index.d.ts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/index.js +9 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.d.mts +266 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.d.ts +266 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.js +87 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/users.d.mts +157 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/users.d.ts +157 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users/users.js +116 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects/users.js +6 -0
- package/dist/node_modules/openai/resources/admin/organization/projects.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/projects.js +6 -0
- package/dist/node_modules/openai/resources/admin/organization/roles.d.mts +153 -0
- package/dist/node_modules/openai/resources/admin/organization/roles.d.ts +153 -0
- package/dist/node_modules/openai/resources/admin/organization/roles.js +96 -0
- package/dist/node_modules/openai/resources/admin/organization/spend-alerts.d.mts +224 -0
- package/dist/node_modules/openai/resources/admin/organization/spend-alerts.d.ts +224 -0
- package/dist/node_modules/openai/resources/admin/organization/spend-alerts.js +93 -0
- package/dist/node_modules/openai/resources/admin/organization/usage.d.mts +5123 -0
- package/dist/node_modules/openai/resources/admin/organization/usage.d.ts +5123 -0
- package/dist/node_modules/openai/resources/admin/organization/usage.js +207 -0
- package/dist/node_modules/openai/resources/admin/organization/users/index.d.mts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/users/index.d.ts +3 -0
- package/dist/node_modules/openai/resources/admin/organization/users/index.js +9 -0
- package/dist/node_modules/openai/resources/admin/organization/users/roles.d.mts +249 -0
- package/dist/node_modules/openai/resources/admin/organization/users/roles.d.ts +249 -0
- package/dist/node_modules/openai/resources/admin/organization/users/roles.js +84 -0
- package/dist/node_modules/openai/resources/admin/organization/users/users.d.mts +185 -0
- package/dist/node_modules/openai/resources/admin/organization/users/users.d.ts +185 -0
- package/dist/node_modules/openai/resources/admin/organization/users/users.js +84 -0
- package/dist/node_modules/openai/resources/admin/organization/users.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/users.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization/users.js +6 -0
- package/dist/node_modules/openai/resources/admin/organization.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin/organization.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin/organization.js +6 -0
- package/dist/node_modules/openai/resources/admin.d.mts +2 -0
- package/dist/node_modules/openai/resources/admin.d.ts +2 -0
- package/dist/node_modules/openai/resources/admin.js +6 -0
- package/dist/node_modules/openai/resources/audio/speech.d.mts +22 -5
- package/dist/node_modules/openai/resources/audio/speech.d.ts +22 -5
- package/dist/node_modules/openai/resources/audio/speech.js +8 -2
- package/dist/node_modules/openai/resources/audio/transcriptions.d.mts +6 -0
- package/dist/node_modules/openai/resources/audio/transcriptions.d.ts +6 -0
- package/dist/node_modules/openai/resources/audio/transcriptions.js +4 -0
- package/dist/node_modules/openai/resources/audio/translations.d.mts +3 -0
- package/dist/node_modules/openai/resources/audio/translations.d.ts +3 -0
- package/dist/node_modules/openai/resources/audio/translations.js +4 -1
- package/dist/node_modules/openai/resources/batches.d.mts +8 -4
- package/dist/node_modules/openai/resources/batches.d.ts +8 -4
- package/dist/node_modules/openai/resources/batches.js +14 -4
- package/dist/node_modules/openai/resources/beta/assistants.d.mts +6 -2
- package/dist/node_modules/openai/resources/beta/assistants.d.ts +6 -2
- package/dist/node_modules/openai/resources/beta/assistants.js +8 -0
- package/dist/node_modules/openai/resources/beta/chatkit/sessions.d.mts +4 -2
- package/dist/node_modules/openai/resources/beta/chatkit/sessions.d.ts +4 -2
- package/dist/node_modules/openai/resources/beta/chatkit/sessions.js +6 -2
- package/dist/node_modules/openai/resources/beta/chatkit/threads.d.mts +4 -4
- package/dist/node_modules/openai/resources/beta/chatkit/threads.d.ts +4 -4
- package/dist/node_modules/openai/resources/beta/chatkit/threads.js +13 -5
- package/dist/node_modules/openai/resources/beta/realtime/sessions.js +1 -0
- package/dist/node_modules/openai/resources/beta/realtime/transcription-sessions.js +1 -0
- package/dist/node_modules/openai/resources/beta/threads/messages.d.mts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/messages.d.ts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/messages.js +7 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/runs.d.mts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/runs.d.ts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/runs.js +10 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/steps.d.mts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/steps.d.ts +2 -0
- package/dist/node_modules/openai/resources/beta/threads/runs/steps.js +4 -0
- package/dist/node_modules/openai/resources/beta/threads/threads.d.mts +8 -4
- package/dist/node_modules/openai/resources/beta/threads/threads.d.ts +8 -4
- package/dist/node_modules/openai/resources/beta/threads/threads.js +8 -0
- package/dist/node_modules/openai/resources/chat/completions/completions.d.mts +37 -18
- package/dist/node_modules/openai/resources/chat/completions/completions.d.ts +37 -18
- package/dist/node_modules/openai/resources/chat/completions/completions.js +27 -5
- package/dist/node_modules/openai/resources/chat/completions/messages.d.mts +3 -0
- package/dist/node_modules/openai/resources/chat/completions/messages.d.ts +3 -0
- package/dist/node_modules/openai/resources/chat/completions/messages.js +4 -1
- package/dist/node_modules/openai/resources/completions.d.mts +9 -3
- package/dist/node_modules/openai/resources/completions.d.ts +9 -3
- package/dist/node_modules/openai/resources/completions.js +9 -1
- package/dist/node_modules/openai/resources/containers/containers.js +11 -3
- package/dist/node_modules/openai/resources/containers/files/content.js +1 -0
- package/dist/node_modules/openai/resources/containers/files/files.js +7 -2
- package/dist/node_modules/openai/resources/conversations/conversations.d.mts +15 -0
- package/dist/node_modules/openai/resources/conversations/conversations.d.ts +15 -0
- package/dist/node_modules/openai/resources/conversations/conversations.js +17 -4
- package/dist/node_modules/openai/resources/conversations/items.d.mts +4 -1
- package/dist/node_modules/openai/resources/conversations/items.d.ts +4 -1
- package/dist/node_modules/openai/resources/conversations/items.js +14 -3
- package/dist/node_modules/openai/resources/embeddings.d.mts +3 -0
- package/dist/node_modules/openai/resources/embeddings.d.ts +3 -0
- package/dist/node_modules/openai/resources/embeddings.js +4 -0
- package/dist/node_modules/openai/resources/evals/evals.d.mts +3 -0
- package/dist/node_modules/openai/resources/evals/evals.d.ts +3 -0
- package/dist/node_modules/openai/resources/evals/evals.js +12 -5
- package/dist/node_modules/openai/resources/evals/runs/output-items.d.mts +3 -0
- package/dist/node_modules/openai/resources/evals/runs/output-items.d.ts +3 -0
- package/dist/node_modules/openai/resources/evals/runs/output-items.js +8 -2
- package/dist/node_modules/openai/resources/evals/runs/runs.d.mts +3 -0
- package/dist/node_modules/openai/resources/evals/runs/runs.d.ts +3 -0
- package/dist/node_modules/openai/resources/evals/runs/runs.js +21 -4
- package/dist/node_modules/openai/resources/files.d.mts +11 -1
- package/dist/node_modules/openai/resources/files.d.ts +11 -1
- package/dist/node_modules/openai/resources/files.js +20 -5
- package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.d.mts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.d.ts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.js +13 -2
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.mts +2 -2
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.ts +2 -2
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/index.d.mts +1 -1
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/index.d.ts +1 -1
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.mts +54 -7
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.ts +54 -7
- package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +26 -9
- package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.mts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +4 -1
- package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.d.mts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +3 -0
- package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.js +26 -7
- package/dist/node_modules/openai/resources/images.d.mts +56 -24
- package/dist/node_modules/openai/resources/images.d.ts +56 -24
- package/dist/node_modules/openai/resources/images.js +11 -3
- package/dist/node_modules/openai/resources/index.d.mts +2 -1
- package/dist/node_modules/openai/resources/index.d.ts +2 -1
- package/dist/node_modules/openai/resources/index.js +3 -1
- package/dist/node_modules/openai/resources/models.d.mts +3 -0
- package/dist/node_modules/openai/resources/models.d.ts +3 -0
- package/dist/node_modules/openai/resources/models.js +6 -3
- package/dist/node_modules/openai/resources/moderations.d.mts +3 -0
- package/dist/node_modules/openai/resources/moderations.d.ts +3 -0
- package/dist/node_modules/openai/resources/moderations.js +4 -1
- package/dist/node_modules/openai/resources/realtime/calls.d.mts +13 -3
- package/dist/node_modules/openai/resources/realtime/calls.d.ts +13 -3
- package/dist/node_modules/openai/resources/realtime/calls.js +4 -0
- package/dist/node_modules/openai/resources/realtime/client-secrets.d.mts +45 -39
- package/dist/node_modules/openai/resources/realtime/client-secrets.d.ts +45 -39
- package/dist/node_modules/openai/resources/realtime/client-secrets.js +19 -1
- package/dist/node_modules/openai/resources/realtime/index.d.mts +1 -1
- package/dist/node_modules/openai/resources/realtime/index.d.ts +1 -1
- package/dist/node_modules/openai/resources/realtime/realtime.d.mts +592 -21
- package/dist/node_modules/openai/resources/realtime/realtime.d.ts +592 -21
- package/dist/node_modules/openai/resources/responses/index.d.mts +2 -0
- package/dist/node_modules/openai/resources/responses/index.d.ts +2 -0
- package/dist/node_modules/openai/resources/responses/input-items.js +1 -1
- package/dist/node_modules/openai/resources/responses/input-tokens.d.mts +4 -1
- package/dist/node_modules/openai/resources/responses/input-tokens.d.ts +4 -1
- package/dist/node_modules/openai/resources/responses/input-tokens.js +9 -2
- package/dist/node_modules/openai/resources/responses/internal-base.d.mts +71 -0
- package/dist/node_modules/openai/resources/responses/internal-base.d.ts +71 -0
- package/dist/node_modules/openai/resources/responses/internal-base.js +48 -0
- package/dist/node_modules/openai/resources/responses/responses.d.mts +956 -64
- package/dist/node_modules/openai/resources/responses/responses.d.ts +956 -64
- package/dist/node_modules/openai/resources/responses/responses.js +20 -5
- package/dist/node_modules/openai/resources/responses/ws-base.d.mts +106 -0
- package/dist/node_modules/openai/resources/responses/ws-base.d.ts +106 -0
- package/dist/node_modules/openai/resources/responses/ws-base.js +476 -0
- package/dist/node_modules/openai/resources/responses/ws.d.mts +13 -0
- package/dist/node_modules/openai/resources/responses/ws.d.ts +13 -0
- package/dist/node_modules/openai/resources/responses/ws.js +31 -0
- package/dist/node_modules/openai/resources/shared.d.mts +3 -2
- package/dist/node_modules/openai/resources/shared.d.ts +3 -2
- package/dist/node_modules/openai/resources/skills/content.d.mts +1 -1
- package/dist/node_modules/openai/resources/skills/content.d.ts +1 -1
- package/dist/node_modules/openai/resources/skills/content.js +2 -1
- package/dist/node_modules/openai/resources/skills/skills.d.mts +5 -5
- package/dist/node_modules/openai/resources/skills/skills.d.ts +5 -5
- package/dist/node_modules/openai/resources/skills/skills.js +18 -10
- package/dist/node_modules/openai/resources/skills/versions/content.d.mts +1 -1
- package/dist/node_modules/openai/resources/skills/versions/content.d.ts +1 -1
- package/dist/node_modules/openai/resources/skills/versions/content.js +2 -1
- package/dist/node_modules/openai/resources/skills/versions/versions.d.mts +4 -4
- package/dist/node_modules/openai/resources/skills/versions/versions.d.ts +4 -4
- package/dist/node_modules/openai/resources/skills/versions/versions.js +14 -7
- package/dist/node_modules/openai/resources/uploads/parts.d.mts +3 -0
- package/dist/node_modules/openai/resources/uploads/parts.d.ts +3 -0
- package/dist/node_modules/openai/resources/uploads/parts.js +4 -1
- package/dist/node_modules/openai/resources/uploads/uploads.d.mts +10 -1
- package/dist/node_modules/openai/resources/uploads/uploads.d.ts +10 -1
- package/dist/node_modules/openai/resources/uploads/uploads.js +20 -4
- package/dist/node_modules/openai/resources/vector-stores/file-batches.d.mts +9 -3
- package/dist/node_modules/openai/resources/vector-stores/file-batches.d.ts +9 -3
- package/dist/node_modules/openai/resources/vector-stores/file-batches.js +9 -1
- package/dist/node_modules/openai/resources/vector-stores/files.d.mts +3 -1
- package/dist/node_modules/openai/resources/vector-stores/files.d.ts +3 -1
- package/dist/node_modules/openai/resources/vector-stores/files.js +10 -1
- package/dist/node_modules/openai/resources/vector-stores/vector-stores.js +6 -0
- package/dist/node_modules/openai/resources/videos.d.mts +123 -11
- package/dist/node_modules/openai/resources/videos.d.ts +123 -11
- package/dist/node_modules/openai/resources/videos.js +46 -11
- package/dist/node_modules/openai/src/auth/index.ts +9 -0
- package/dist/node_modules/openai/src/auth/subject-token-providers.ts +185 -0
- package/dist/node_modules/openai/src/auth/types.ts +28 -0
- package/dist/node_modules/openai/src/auth/workload-identity-auth.ts +122 -0
- package/dist/node_modules/openai/src/azure.ts +9 -4
- package/dist/node_modules/openai/src/beta/realtime/websocket.ts +7 -2
- package/dist/node_modules/openai/src/beta/realtime/ws.ts +5 -1
- package/dist/node_modules/openai/src/client.ts +312 -35
- package/dist/node_modules/openai/src/core/EventEmitter.ts +114 -0
- package/dist/node_modules/openai/src/core/error.ts +40 -0
- package/dist/node_modules/openai/src/core/pagination.ts +62 -0
- package/dist/node_modules/openai/src/core/streaming.ts +2 -1
- package/dist/node_modules/openai/src/index.ts +2 -0
- package/dist/node_modules/openai/src/internal/parse.ts +12 -2
- package/dist/node_modules/openai/src/internal/request-options.ts +2 -0
- package/dist/node_modules/openai/src/internal/types.ts +14 -8
- package/dist/node_modules/openai/src/internal/utils/env.ts +2 -2
- package/dist/node_modules/openai/src/internal/utils/log.ts +2 -0
- package/dist/node_modules/openai/src/internal/utils/query.ts +7 -0
- package/dist/node_modules/openai/src/internal/utils.ts +1 -0
- package/dist/node_modules/openai/src/internal/ws-adapter-browser.ts +123 -0
- package/dist/node_modules/openai/src/internal/ws-adapter-node.ts +105 -0
- package/dist/node_modules/openai/src/internal/ws-adapter.ts +30 -0
- package/dist/node_modules/openai/src/internal/ws.ts +193 -0
- package/dist/node_modules/openai/src/realtime/websocket.ts +7 -2
- package/dist/node_modules/openai/src/realtime/ws.ts +5 -1
- package/dist/node_modules/openai/src/resources/admin/admin.ts +15 -0
- package/dist/node_modules/openai/src/resources/admin/index.ts +4 -0
- package/dist/node_modules/openai/src/resources/admin/organization/admin-api-keys.ts +199 -0
- package/dist/node_modules/openai/src/resources/admin/organization/audit-logs.ts +1597 -0
- package/dist/node_modules/openai/src/resources/admin/organization/certificates.ts +458 -0
- package/dist/node_modules/openai/src/resources/admin/organization/data-retention.ts +79 -0
- package/dist/node_modules/openai/src/resources/admin/organization/groups/groups.ts +277 -0
- package/dist/node_modules/openai/src/resources/admin/organization/groups/index.ts +36 -0
- package/dist/node_modules/openai/src/resources/admin/organization/groups/roles.ts +359 -0
- package/dist/node_modules/openai/src/resources/admin/organization/groups/users.ts +232 -0
- package/dist/node_modules/openai/src/resources/admin/organization/groups.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin/organization/index.ts +117 -0
- package/dist/node_modules/openai/src/resources/admin/organization/invites.ts +215 -0
- package/dist/node_modules/openai/src/resources/admin/organization/organization.ts +272 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/api-keys.ts +239 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/certificates.ts +269 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/data-retention.ts +91 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/groups.ts +231 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/index.ts +24 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/roles.ts +386 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/groups.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/hosted-tool-permissions.ts +217 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/index.ts +102 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/model-permissions.ts +123 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/projects.ts +445 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/rate-limits.ts +173 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/roles.ts +210 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/service-accounts.ts +266 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/spend-alerts.ts +332 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/users/index.ts +25 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/users/roles.ts +351 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/users/users.ts +256 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects/users.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin/organization/projects.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin/organization/roles.ts +217 -0
- package/dist/node_modules/openai/src/resources/admin/organization/spend-alerts.ts +301 -0
- package/dist/node_modules/openai/src/resources/admin/organization/usage.ts +6427 -0
- package/dist/node_modules/openai/src/resources/admin/organization/users/index.ts +22 -0
- package/dist/node_modules/openai/src/resources/admin/organization/users/roles.ts +328 -0
- package/dist/node_modules/openai/src/resources/admin/organization/users/users.ts +291 -0
- package/dist/node_modules/openai/src/resources/admin/organization/users.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin/organization.ts +3 -0
- package/dist/node_modules/openai/src/resources/admin.ts +3 -0
- package/dist/node_modules/openai/src/resources/audio/speech.ts +26 -6
- package/dist/node_modules/openai/src/resources/audio/transcriptions.ts +7 -0
- package/dist/node_modules/openai/src/resources/audio/translations.ts +7 -1
- package/dist/node_modules/openai/src/resources/batches.ts +20 -8
- package/dist/node_modules/openai/src/resources/beta/assistants.ts +11 -2
- package/dist/node_modules/openai/src/resources/beta/chatkit/sessions.ts +6 -2
- package/dist/node_modules/openai/src/resources/beta/chatkit/threads.ts +13 -5
- package/dist/node_modules/openai/src/resources/beta/realtime/sessions.ts +1 -0
- package/dist/node_modules/openai/src/resources/beta/realtime/transcription-sessions.ts +1 -0
- package/dist/node_modules/openai/src/resources/beta/threads/messages.ts +7 -0
- package/dist/node_modules/openai/src/resources/beta/threads/runs/runs.ts +10 -0
- package/dist/node_modules/openai/src/resources/beta/threads/runs/steps.ts +4 -0
- package/dist/node_modules/openai/src/resources/beta/threads/threads.ts +14 -4
- package/dist/node_modules/openai/src/resources/chat/completions/completions.ts +64 -27
- package/dist/node_modules/openai/src/resources/chat/completions/messages.ts +4 -1
- package/dist/node_modules/openai/src/resources/completions.ts +15 -6
- package/dist/node_modules/openai/src/resources/containers/containers.ts +11 -3
- package/dist/node_modules/openai/src/resources/containers/files/content.ts +1 -0
- package/dist/node_modules/openai/src/resources/containers/files/files.ts +7 -2
- package/dist/node_modules/openai/src/resources/conversations/conversations.ts +31 -4
- package/dist/node_modules/openai/src/resources/conversations/items.ts +17 -3
- package/dist/node_modules/openai/src/resources/embeddings.ts +4 -0
- package/dist/node_modules/openai/src/resources/evals/evals.ts +12 -5
- package/dist/node_modules/openai/src/resources/evals/runs/output-items.ts +8 -2
- package/dist/node_modules/openai/src/resources/evals/runs/runs.ts +21 -4
- package/dist/node_modules/openai/src/resources/files.ts +23 -5
- package/dist/node_modules/openai/src/resources/fine-tuning/alpha/graders.ts +13 -2
- package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/checkpoints.ts +6 -0
- package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/index.ts +3 -0
- package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/permissions.ts +84 -10
- package/dist/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +4 -1
- package/dist/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +26 -7
- package/dist/node_modules/openai/src/resources/images.ts +74 -27
- package/dist/node_modules/openai/src/resources/index.ts +7 -0
- package/dist/node_modules/openai/src/resources/models.ts +6 -3
- package/dist/node_modules/openai/src/resources/moderations.ts +4 -1
- package/dist/node_modules/openai/src/resources/realtime/calls.ts +21 -2
- package/dist/node_modules/openai/src/resources/realtime/client-secrets.ts +54 -40
- package/dist/node_modules/openai/src/resources/realtime/index.ts +0 -1
- package/dist/node_modules/openai/src/resources/realtime/realtime.ts +705 -20
- package/dist/node_modules/openai/src/resources/responses/index.ts +2 -0
- package/dist/node_modules/openai/src/resources/responses/input-items.ts +1 -1
- package/dist/node_modules/openai/src/resources/responses/input-tokens.ts +9 -2
- package/dist/node_modules/openai/src/resources/responses/internal-base.ts +113 -0
- package/dist/node_modules/openai/src/resources/responses/responses.ts +1314 -143
- package/dist/node_modules/openai/src/resources/responses/ws-base.ts +611 -0
- package/dist/node_modules/openai/src/resources/responses/ws.ts +38 -0
- package/dist/node_modules/openai/src/resources/shared.ts +9 -1
- package/dist/node_modules/openai/src/resources/skills/content.ts +2 -1
- package/dist/node_modules/openai/src/resources/skills/skills.ts +21 -10
- package/dist/node_modules/openai/src/resources/skills/versions/content.ts +2 -1
- package/dist/node_modules/openai/src/resources/skills/versions/versions.ts +14 -7
- package/dist/node_modules/openai/src/resources/uploads/parts.ts +4 -1
- package/dist/node_modules/openai/src/resources/uploads/uploads.ts +20 -4
- package/dist/node_modules/openai/src/resources/vector-stores/file-batches.ts +18 -4
- package/dist/node_modules/openai/src/resources/vector-stores/files.ts +13 -2
- package/dist/node_modules/openai/src/resources/vector-stores/vector-stores.ts +6 -0
- package/dist/node_modules/openai/src/resources/videos.ts +186 -16
- package/dist/node_modules/openai/src/version.ts +1 -1
- package/dist/node_modules/openai/streaming.d.mts +1 -0
- package/dist/node_modules/openai/streaming.d.ts +1 -0
- package/dist/node_modules/openai/uploads.d.mts +1 -0
- package/dist/node_modules/openai/uploads.d.ts +1 -0
- package/dist/node_modules/openai/version.d.mts +1 -1
- package/dist/node_modules/openai/version.d.ts +1 -1
- package/dist/node_modules/openai/version.js +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.d.ts +1 -1
- package/package.json +13 -13
- package/dist/node_modules/@langchain/xai/dist/_virtual/rolldown_runtime.cjs +0 -25
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { Page, PagePromise } from "../../../core/pagination.js";
|
|
3
|
+
import { ConversationCursorPage, type ConversationCursorPageParams, Page, PagePromise } from "../../../core/pagination.js";
|
|
4
4
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
7
|
+
*/
|
|
5
8
|
export declare class Permissions extends APIResource {
|
|
6
9
|
/**
|
|
7
10
|
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
|
|
@@ -21,6 +24,15 @@ export declare class Permissions extends APIResource {
|
|
|
21
24
|
* ```
|
|
22
25
|
*/
|
|
23
26
|
create(fineTunedModelCheckpoint: string, body: PermissionCreateParams, options?: RequestOptions): PagePromise<PermissionCreateResponsesPage, PermissionCreateResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
29
|
+
*
|
|
30
|
+
* Organization owners can use this endpoint to view all permissions for a
|
|
31
|
+
* fine-tuned model checkpoint.
|
|
32
|
+
*
|
|
33
|
+
* @deprecated Retrieve is deprecated. Please swap to the paginated list method instead.
|
|
34
|
+
*/
|
|
35
|
+
retrieve(fineTunedModelCheckpoint: string, query?: PermissionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<PermissionRetrieveResponse>;
|
|
24
36
|
/**
|
|
25
37
|
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
26
38
|
*
|
|
@@ -29,13 +41,15 @@ export declare class Permissions extends APIResource {
|
|
|
29
41
|
*
|
|
30
42
|
* @example
|
|
31
43
|
* ```ts
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
44
|
+
* // Automatically fetches more pages as needed.
|
|
45
|
+
* for await (const permissionListResponse of client.fineTuning.checkpoints.permissions.list(
|
|
46
|
+
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
47
|
+
* )) {
|
|
48
|
+
* // ...
|
|
49
|
+
* }
|
|
36
50
|
* ```
|
|
37
51
|
*/
|
|
38
|
-
|
|
52
|
+
list(fineTunedModelCheckpoint: string, query?: PermissionListParams | null | undefined, options?: RequestOptions): PagePromise<PermissionListResponsesPage, PermissionListResponse>;
|
|
39
53
|
/**
|
|
40
54
|
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
41
55
|
*
|
|
@@ -57,6 +71,7 @@ export declare class Permissions extends APIResource {
|
|
|
57
71
|
delete(permissionID: string, params: PermissionDeleteParams, options?: RequestOptions): APIPromise<PermissionDeleteResponse>;
|
|
58
72
|
}
|
|
59
73
|
export type PermissionCreateResponsesPage = Page<PermissionCreateResponse>;
|
|
74
|
+
export type PermissionListResponsesPage = ConversationCursorPage<PermissionListResponse>;
|
|
60
75
|
/**
|
|
61
76
|
* The `checkpoint.permission` object represents a permission for a fine-tuned
|
|
62
77
|
* model checkpoint.
|
|
@@ -110,6 +125,28 @@ export declare namespace PermissionRetrieveResponse {
|
|
|
110
125
|
project_id: string;
|
|
111
126
|
}
|
|
112
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* The `checkpoint.permission` object represents a permission for a fine-tuned
|
|
130
|
+
* model checkpoint.
|
|
131
|
+
*/
|
|
132
|
+
export interface PermissionListResponse {
|
|
133
|
+
/**
|
|
134
|
+
* The permission identifier, which can be referenced in the API endpoints.
|
|
135
|
+
*/
|
|
136
|
+
id: string;
|
|
137
|
+
/**
|
|
138
|
+
* The Unix timestamp (in seconds) for when the permission was created.
|
|
139
|
+
*/
|
|
140
|
+
created_at: number;
|
|
141
|
+
/**
|
|
142
|
+
* The object type, which is always "checkpoint.permission".
|
|
143
|
+
*/
|
|
144
|
+
object: 'checkpoint.permission';
|
|
145
|
+
/**
|
|
146
|
+
* The project identifier that the permission is for.
|
|
147
|
+
*/
|
|
148
|
+
project_id: string;
|
|
149
|
+
}
|
|
113
150
|
export interface PermissionDeleteResponse {
|
|
114
151
|
/**
|
|
115
152
|
* The ID of the fine-tuned model checkpoint permission that was deleted.
|
|
@@ -148,6 +185,16 @@ export interface PermissionRetrieveParams {
|
|
|
148
185
|
*/
|
|
149
186
|
project_id?: string;
|
|
150
187
|
}
|
|
188
|
+
export interface PermissionListParams extends ConversationCursorPageParams {
|
|
189
|
+
/**
|
|
190
|
+
* The order in which to retrieve permissions.
|
|
191
|
+
*/
|
|
192
|
+
order?: 'ascending' | 'descending';
|
|
193
|
+
/**
|
|
194
|
+
* The ID of the project to get permissions for.
|
|
195
|
+
*/
|
|
196
|
+
project_id?: string;
|
|
197
|
+
}
|
|
151
198
|
export interface PermissionDeleteParams {
|
|
152
199
|
/**
|
|
153
200
|
* The ID of the fine-tuned model checkpoint to delete a permission for.
|
|
@@ -155,6 +202,6 @@ export interface PermissionDeleteParams {
|
|
|
155
202
|
fine_tuned_model_checkpoint: string;
|
|
156
203
|
}
|
|
157
204
|
export declare namespace Permissions {
|
|
158
|
-
export { type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionDeleteParams as PermissionDeleteParams, };
|
|
205
|
+
export { type PermissionCreateResponse as PermissionCreateResponse, type PermissionRetrieveResponse as PermissionRetrieveResponse, type PermissionListResponse as PermissionListResponse, type PermissionDeleteResponse as PermissionDeleteResponse, type PermissionCreateResponsesPage as PermissionCreateResponsesPage, type PermissionListResponsesPage as PermissionListResponsesPage, type PermissionCreateParams as PermissionCreateParams, type PermissionRetrieveParams as PermissionRetrieveParams, type PermissionListParams as PermissionListParams, type PermissionDeleteParams as PermissionDeleteParams, };
|
|
159
206
|
}
|
|
160
207
|
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -5,6 +5,9 @@ exports.Permissions = void 0;
|
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../../core/pagination.js");
|
|
7
7
|
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
10
|
+
*/
|
|
8
11
|
class Permissions extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
|
|
@@ -24,7 +27,7 @@ class Permissions extends resource_1.APIResource {
|
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
29
|
create(fineTunedModelCheckpoint, body, options) {
|
|
27
|
-
return this._client.getAPIList((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, (pagination_1.Page), { body, method: 'post', ...options });
|
|
30
|
+
return this._client.getAPIList((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, (pagination_1.Page), { body, method: 'post', ...options, __security: { adminAPIKeyAuth: true } });
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
30
33
|
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
@@ -32,20 +35,34 @@ class Permissions extends resource_1.APIResource {
|
|
|
32
35
|
* Organization owners can use this endpoint to view all permissions for a
|
|
33
36
|
* fine-tuned model checkpoint.
|
|
34
37
|
*
|
|
35
|
-
* @
|
|
36
|
-
* ```ts
|
|
37
|
-
* const permission =
|
|
38
|
-
* await client.fineTuning.checkpoints.permissions.retrieve(
|
|
39
|
-
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
40
|
-
* );
|
|
41
|
-
* ```
|
|
38
|
+
* @deprecated Retrieve is deprecated. Please swap to the paginated list method instead.
|
|
42
39
|
*/
|
|
43
40
|
retrieve(fineTunedModelCheckpoint, query = {}, options) {
|
|
44
41
|
return this._client.get((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
|
|
45
42
|
query,
|
|
46
43
|
...options,
|
|
44
|
+
__security: { adminAPIKeyAuth: true },
|
|
47
45
|
});
|
|
48
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
49
|
+
*
|
|
50
|
+
* Organization owners can use this endpoint to view all permissions for a
|
|
51
|
+
* fine-tuned model checkpoint.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // Automatically fetches more pages as needed.
|
|
56
|
+
* for await (const permissionListResponse of client.fineTuning.checkpoints.permissions.list(
|
|
57
|
+
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
58
|
+
* )) {
|
|
59
|
+
* // ...
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
list(fineTunedModelCheckpoint, query = {}, options) {
|
|
64
|
+
return this._client.getAPIList((0, path_1.path) `/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, (pagination_1.ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
65
|
+
}
|
|
49
66
|
/**
|
|
50
67
|
* **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
|
|
51
68
|
*
|
|
@@ -66,7 +83,7 @@ class Permissions extends resource_1.APIResource {
|
|
|
66
83
|
*/
|
|
67
84
|
delete(permissionID, params, options) {
|
|
68
85
|
const { fine_tuned_model_checkpoint } = params;
|
|
69
|
-
return this._client.delete((0, path_1.path) `/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
|
|
86
|
+
return this._client.delete((0, path_1.path) `/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, { ...options, __security: { adminAPIKeyAuth: true } });
|
|
70
87
|
}
|
|
71
88
|
}
|
|
72
89
|
exports.Permissions = Permissions;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
3
3
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Checkpoints extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* List checkpoints for a fine-tuning job.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
3
3
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Checkpoints extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* List checkpoints for a fine-tuning job.
|
|
@@ -5,6 +5,9 @@ exports.Checkpoints = void 0;
|
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../../core/pagination.js");
|
|
7
7
|
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
10
|
+
*/
|
|
8
11
|
class Checkpoints extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* List checkpoints for a fine-tuning job.
|
|
@@ -20,7 +23,7 @@ class Checkpoints extends resource_1.APIResource {
|
|
|
20
23
|
* ```
|
|
21
24
|
*/
|
|
22
25
|
list(fineTuningJobID, query = {}, options) {
|
|
23
|
-
return this._client.getAPIList((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, (pagination_1.CursorPage), { query, ...options });
|
|
26
|
+
return this._client.getAPIList((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, (pagination_1.CursorPage), { query, ...options, __security: { bearerAuth: true } });
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
exports.Checkpoints = Checkpoints;
|
|
@@ -6,6 +6,9 @@ import { CheckpointListParams, Checkpoints, FineTuningJobCheckpoint, FineTuningJ
|
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
7
|
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
8
8
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
9
|
+
/**
|
|
10
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
11
|
+
*/
|
|
9
12
|
export declare class Jobs extends APIResource {
|
|
10
13
|
checkpoints: CheckpointsAPI.Checkpoints;
|
|
11
14
|
/**
|
|
@@ -6,6 +6,9 @@ import { CheckpointListParams, Checkpoints, FineTuningJobCheckpoint, FineTuningJ
|
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
7
|
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
8
8
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
9
|
+
/**
|
|
10
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
11
|
+
*/
|
|
9
12
|
export declare class Jobs extends APIResource {
|
|
10
13
|
checkpoints: CheckpointsAPI.Checkpoints;
|
|
11
14
|
/**
|
|
@@ -8,6 +8,9 @@ const CheckpointsAPI = tslib_1.__importStar(require("./checkpoints.js"));
|
|
|
8
8
|
const checkpoints_1 = require("./checkpoints.js");
|
|
9
9
|
const pagination_1 = require("../../../core/pagination.js");
|
|
10
10
|
const path_1 = require("../../../internal/utils/path.js");
|
|
11
|
+
/**
|
|
12
|
+
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
13
|
+
*/
|
|
11
14
|
class Jobs extends resource_1.APIResource {
|
|
12
15
|
constructor() {
|
|
13
16
|
super(...arguments);
|
|
@@ -31,7 +34,7 @@ class Jobs extends resource_1.APIResource {
|
|
|
31
34
|
* ```
|
|
32
35
|
*/
|
|
33
36
|
create(body, options) {
|
|
34
|
-
return this._client.post('/fine_tuning/jobs', { body, ...options });
|
|
37
|
+
return this._client.post('/fine_tuning/jobs', { body, ...options, __security: { bearerAuth: true } });
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
37
40
|
* Get info about a fine-tuning job.
|
|
@@ -46,7 +49,10 @@ class Jobs extends resource_1.APIResource {
|
|
|
46
49
|
* ```
|
|
47
50
|
*/
|
|
48
51
|
retrieve(fineTuningJobID, options) {
|
|
49
|
-
return this._client.get((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}`,
|
|
52
|
+
return this._client.get((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}`, {
|
|
53
|
+
...options,
|
|
54
|
+
__security: { bearerAuth: true },
|
|
55
|
+
});
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
52
58
|
* List your organization's fine-tuning jobs
|
|
@@ -60,7 +66,11 @@ class Jobs extends resource_1.APIResource {
|
|
|
60
66
|
* ```
|
|
61
67
|
*/
|
|
62
68
|
list(query = {}, options) {
|
|
63
|
-
return this._client.getAPIList('/fine_tuning/jobs', (pagination_1.CursorPage), {
|
|
69
|
+
return this._client.getAPIList('/fine_tuning/jobs', (pagination_1.CursorPage), {
|
|
70
|
+
query,
|
|
71
|
+
...options,
|
|
72
|
+
__security: { bearerAuth: true },
|
|
73
|
+
});
|
|
64
74
|
}
|
|
65
75
|
/**
|
|
66
76
|
* Immediately cancel a fine-tune job.
|
|
@@ -73,7 +83,10 @@ class Jobs extends resource_1.APIResource {
|
|
|
73
83
|
* ```
|
|
74
84
|
*/
|
|
75
85
|
cancel(fineTuningJobID, options) {
|
|
76
|
-
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/cancel`,
|
|
86
|
+
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/cancel`, {
|
|
87
|
+
...options,
|
|
88
|
+
__security: { bearerAuth: true },
|
|
89
|
+
});
|
|
77
90
|
}
|
|
78
91
|
/**
|
|
79
92
|
* Get status updates for a fine-tuning job.
|
|
@@ -89,7 +102,7 @@ class Jobs extends resource_1.APIResource {
|
|
|
89
102
|
* ```
|
|
90
103
|
*/
|
|
91
104
|
listEvents(fineTuningJobID, query = {}, options) {
|
|
92
|
-
return this._client.getAPIList((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/events`, (pagination_1.CursorPage), { query, ...options });
|
|
105
|
+
return this._client.getAPIList((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/events`, (pagination_1.CursorPage), { query, ...options, __security: { bearerAuth: true } });
|
|
93
106
|
}
|
|
94
107
|
/**
|
|
95
108
|
* Pause a fine-tune job.
|
|
@@ -102,7 +115,10 @@ class Jobs extends resource_1.APIResource {
|
|
|
102
115
|
* ```
|
|
103
116
|
*/
|
|
104
117
|
pause(fineTuningJobID, options) {
|
|
105
|
-
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/pause`,
|
|
118
|
+
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/pause`, {
|
|
119
|
+
...options,
|
|
120
|
+
__security: { bearerAuth: true },
|
|
121
|
+
});
|
|
106
122
|
}
|
|
107
123
|
/**
|
|
108
124
|
* Resume a fine-tune job.
|
|
@@ -115,7 +131,10 @@ class Jobs extends resource_1.APIResource {
|
|
|
115
131
|
* ```
|
|
116
132
|
*/
|
|
117
133
|
resume(fineTuningJobID, options) {
|
|
118
|
-
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/resume`,
|
|
134
|
+
return this._client.post((0, path_1.path) `/fine_tuning/jobs/${fineTuningJobID}/resume`, {
|
|
135
|
+
...options,
|
|
136
|
+
__security: { bearerAuth: true },
|
|
137
|
+
});
|
|
119
138
|
}
|
|
120
139
|
}
|
|
121
140
|
exports.Jobs = Jobs;
|
|
@@ -4,6 +4,9 @@ import { APIPromise } from "../core/api-promise.mjs";
|
|
|
4
4
|
import { Stream } from "../core/streaming.mjs";
|
|
5
5
|
import { type Uploadable } from "../core/uploads.mjs";
|
|
6
6
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Given a prompt and/or an input image, the model will generate a new image.
|
|
9
|
+
*/
|
|
7
10
|
export declare class Images extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Creates a variation of a given image. This endpoint only supports `dall-e-2`.
|
|
@@ -304,7 +307,7 @@ export interface ImageGenPartialImageEvent {
|
|
|
304
307
|
* Emitted when a partial image is available during image generation streaming.
|
|
305
308
|
*/
|
|
306
309
|
export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent;
|
|
307
|
-
export type ImageModel = 'gpt-image-1
|
|
310
|
+
export type ImageModel = 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-2' | 'gpt-image-2-2026-04-21' | 'gpt-image-1.5' | 'chatgpt-image-latest' | 'dall-e-2' | 'dall-e-3';
|
|
308
311
|
/**
|
|
309
312
|
* The response from the image generation endpoint.
|
|
310
313
|
*/
|
|
@@ -433,10 +436,10 @@ export interface ImageEditParamsBase {
|
|
|
433
436
|
/**
|
|
434
437
|
* The image(s) to edit. Must be a supported image file or an array of images.
|
|
435
438
|
*
|
|
436
|
-
* For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`,
|
|
437
|
-
* `gpt-image-
|
|
438
|
-
* 50MB. You can provide up to
|
|
439
|
-
*
|
|
439
|
+
* For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
440
|
+
* `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
|
|
441
|
+
* should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
|
|
442
|
+
* 16 images.
|
|
440
443
|
*
|
|
441
444
|
* For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
442
445
|
* file less than 4MB.
|
|
@@ -449,9 +452,14 @@ export interface ImageEditParamsBase {
|
|
|
449
452
|
prompt: string;
|
|
450
453
|
/**
|
|
451
454
|
* Allows to set transparency for the background of the generated image(s). This
|
|
452
|
-
* parameter is only supported for
|
|
453
|
-
* `transparent`, `opaque
|
|
454
|
-
* model will automatically determine the best background
|
|
455
|
+
* parameter is only supported for GPT image models that support transparent
|
|
456
|
+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
457
|
+
* When `auto` is used, the model will automatically determine the best background
|
|
458
|
+
* for the image.
|
|
459
|
+
*
|
|
460
|
+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
461
|
+
* backgrounds. Requests with `background` set to `transparent` will return an
|
|
462
|
+
* error for these models; use `opaque` or `auto` instead.
|
|
455
463
|
*
|
|
456
464
|
* If `transparent`, the output format needs to support transparency, so it should
|
|
457
465
|
* be set to either `png` (default value) or `webp`.
|
|
@@ -472,7 +480,10 @@ export interface ImageEditParamsBase {
|
|
|
472
480
|
*/
|
|
473
481
|
mask?: Uploadable;
|
|
474
482
|
/**
|
|
475
|
-
* The model to use for image generation.
|
|
483
|
+
* The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
484
|
+
* (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
485
|
+
* `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
|
|
486
|
+
* `gpt-image-1.5`.
|
|
476
487
|
*/
|
|
477
488
|
model?: (string & {}) | ImageModel | null;
|
|
478
489
|
/**
|
|
@@ -513,11 +524,19 @@ export interface ImageEditParamsBase {
|
|
|
513
524
|
*/
|
|
514
525
|
response_format?: 'url' | 'b64_json' | null;
|
|
515
526
|
/**
|
|
516
|
-
* The size of the generated images.
|
|
517
|
-
*
|
|
518
|
-
*
|
|
527
|
+
* The size of the generated images. For `gpt-image-2` and
|
|
528
|
+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
529
|
+
* strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
530
|
+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
531
|
+
* `2560x1440` are experimental, and the maximum supported resolution is
|
|
532
|
+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
533
|
+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
534
|
+
* supported by the GPT image models; `auto` is supported for models that allow
|
|
535
|
+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
536
|
+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
537
|
+
* `1024x1792`.
|
|
519
538
|
*/
|
|
520
|
-
size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
|
|
539
|
+
size?: (string & {}) | '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
|
|
521
540
|
/**
|
|
522
541
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
523
542
|
* [Image generation guide](https://platform.openai.com/docs/guides/image-generation)
|
|
@@ -561,9 +580,14 @@ export interface ImageGenerateParamsBase {
|
|
|
561
580
|
prompt: string;
|
|
562
581
|
/**
|
|
563
582
|
* Allows to set transparency for the background of the generated image(s). This
|
|
564
|
-
* parameter is only supported for
|
|
565
|
-
* `transparent`, `opaque
|
|
566
|
-
* model will automatically determine the best background
|
|
583
|
+
* parameter is only supported for GPT image models that support transparent
|
|
584
|
+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
585
|
+
* When `auto` is used, the model will automatically determine the best background
|
|
586
|
+
* for the image.
|
|
587
|
+
*
|
|
588
|
+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
589
|
+
* backgrounds. Requests with `background` set to `transparent` will return an
|
|
590
|
+
* error for these models; use `opaque` or `auto` instead.
|
|
567
591
|
*
|
|
568
592
|
* If `transparent`, the output format needs to support transparency, so it should
|
|
569
593
|
* be set to either `png` (default value) or `webp`.
|
|
@@ -571,8 +595,9 @@ export interface ImageGenerateParamsBase {
|
|
|
571
595
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
572
596
|
/**
|
|
573
597
|
* The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
|
|
574
|
-
* image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`
|
|
575
|
-
* `dall-e-2` unless a parameter specific
|
|
598
|
+
* image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
599
|
+
* or `gpt-image-2-2026-04-21`). Defaults to `dall-e-2` unless a parameter specific
|
|
600
|
+
* to the GPT image models is used.
|
|
576
601
|
*/
|
|
577
602
|
model?: (string & {}) | ImageModel | null;
|
|
578
603
|
/**
|
|
@@ -624,12 +649,19 @@ export interface ImageGenerateParamsBase {
|
|
|
624
649
|
*/
|
|
625
650
|
response_format?: 'url' | 'b64_json' | null;
|
|
626
651
|
/**
|
|
627
|
-
* The size of the generated images.
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
|
|
632
|
-
|
|
652
|
+
* The size of the generated images. For `gpt-image-2` and
|
|
653
|
+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
654
|
+
* strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
655
|
+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
656
|
+
* `2560x1440` are experimental, and the maximum supported resolution is
|
|
657
|
+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
658
|
+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
659
|
+
* supported by the GPT image models; `auto` is supported for models that allow
|
|
660
|
+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
661
|
+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
662
|
+
* `1024x1792`.
|
|
663
|
+
*/
|
|
664
|
+
size?: (string & {}) | 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792' | null;
|
|
633
665
|
/**
|
|
634
666
|
* Generate the image in streaming mode. Defaults to `false`. See the
|
|
635
667
|
* [Image generation guide](https://platform.openai.com/docs/guides/image-generation)
|
|
@@ -4,6 +4,9 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
4
4
|
import { Stream } from "../core/streaming.js";
|
|
5
5
|
import { type Uploadable } from "../core/uploads.js";
|
|
6
6
|
import { RequestOptions } from "../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Given a prompt and/or an input image, the model will generate a new image.
|
|
9
|
+
*/
|
|
7
10
|
export declare class Images extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Creates a variation of a given image. This endpoint only supports `dall-e-2`.
|
|
@@ -304,7 +307,7 @@ export interface ImageGenPartialImageEvent {
|
|
|
304
307
|
* Emitted when a partial image is available during image generation streaming.
|
|
305
308
|
*/
|
|
306
309
|
export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent;
|
|
307
|
-
export type ImageModel = 'gpt-image-1
|
|
310
|
+
export type ImageModel = 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-2' | 'gpt-image-2-2026-04-21' | 'gpt-image-1.5' | 'chatgpt-image-latest' | 'dall-e-2' | 'dall-e-3';
|
|
308
311
|
/**
|
|
309
312
|
* The response from the image generation endpoint.
|
|
310
313
|
*/
|
|
@@ -433,10 +436,10 @@ export interface ImageEditParamsBase {
|
|
|
433
436
|
/**
|
|
434
437
|
* The image(s) to edit. Must be a supported image file or an array of images.
|
|
435
438
|
*
|
|
436
|
-
* For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`,
|
|
437
|
-
* `gpt-image-
|
|
438
|
-
* 50MB. You can provide up to
|
|
439
|
-
*
|
|
439
|
+
* For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
440
|
+
* `gpt-image-2`, `gpt-image-2-2026-04-21`, and `chatgpt-image-latest`), each image
|
|
441
|
+
* should be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to
|
|
442
|
+
* 16 images.
|
|
440
443
|
*
|
|
441
444
|
* For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
442
445
|
* file less than 4MB.
|
|
@@ -449,9 +452,14 @@ export interface ImageEditParamsBase {
|
|
|
449
452
|
prompt: string;
|
|
450
453
|
/**
|
|
451
454
|
* Allows to set transparency for the background of the generated image(s). This
|
|
452
|
-
* parameter is only supported for
|
|
453
|
-
* `transparent`, `opaque
|
|
454
|
-
* model will automatically determine the best background
|
|
455
|
+
* parameter is only supported for GPT image models that support transparent
|
|
456
|
+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
457
|
+
* When `auto` is used, the model will automatically determine the best background
|
|
458
|
+
* for the image.
|
|
459
|
+
*
|
|
460
|
+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
461
|
+
* backgrounds. Requests with `background` set to `transparent` will return an
|
|
462
|
+
* error for these models; use `opaque` or `auto` instead.
|
|
455
463
|
*
|
|
456
464
|
* If `transparent`, the output format needs to support transparency, so it should
|
|
457
465
|
* be set to either `png` (default value) or `webp`.
|
|
@@ -472,7 +480,10 @@ export interface ImageEditParamsBase {
|
|
|
472
480
|
*/
|
|
473
481
|
mask?: Uploadable;
|
|
474
482
|
/**
|
|
475
|
-
* The model to use for image generation.
|
|
483
|
+
* The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
484
|
+
* (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
485
|
+
* `gpt-image-2-2026-04-21`, or `chatgpt-image-latest`). Defaults to
|
|
486
|
+
* `gpt-image-1.5`.
|
|
476
487
|
*/
|
|
477
488
|
model?: (string & {}) | ImageModel | null;
|
|
478
489
|
/**
|
|
@@ -513,11 +524,19 @@ export interface ImageEditParamsBase {
|
|
|
513
524
|
*/
|
|
514
525
|
response_format?: 'url' | 'b64_json' | null;
|
|
515
526
|
/**
|
|
516
|
-
* The size of the generated images.
|
|
517
|
-
*
|
|
518
|
-
*
|
|
527
|
+
* The size of the generated images. For `gpt-image-2` and
|
|
528
|
+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
529
|
+
* strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
530
|
+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
531
|
+
* `2560x1440` are experimental, and the maximum supported resolution is
|
|
532
|
+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
533
|
+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
534
|
+
* supported by the GPT image models; `auto` is supported for models that allow
|
|
535
|
+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
536
|
+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
537
|
+
* `1024x1792`.
|
|
519
538
|
*/
|
|
520
|
-
size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
|
|
539
|
+
size?: (string & {}) | '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
|
|
521
540
|
/**
|
|
522
541
|
* Edit the image in streaming mode. Defaults to `false`. See the
|
|
523
542
|
* [Image generation guide](https://platform.openai.com/docs/guides/image-generation)
|
|
@@ -561,9 +580,14 @@ export interface ImageGenerateParamsBase {
|
|
|
561
580
|
prompt: string;
|
|
562
581
|
/**
|
|
563
582
|
* Allows to set transparency for the background of the generated image(s). This
|
|
564
|
-
* parameter is only supported for
|
|
565
|
-
* `transparent`, `opaque
|
|
566
|
-
* model will automatically determine the best background
|
|
583
|
+
* parameter is only supported for GPT image models that support transparent
|
|
584
|
+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
585
|
+
* When `auto` is used, the model will automatically determine the best background
|
|
586
|
+
* for the image.
|
|
587
|
+
*
|
|
588
|
+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
589
|
+
* backgrounds. Requests with `background` set to `transparent` will return an
|
|
590
|
+
* error for these models; use `opaque` or `auto` instead.
|
|
567
591
|
*
|
|
568
592
|
* If `transparent`, the output format needs to support transparency, so it should
|
|
569
593
|
* be set to either `png` (default value) or `webp`.
|
|
@@ -571,8 +595,9 @@ export interface ImageGenerateParamsBase {
|
|
|
571
595
|
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
572
596
|
/**
|
|
573
597
|
* The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
|
|
574
|
-
* image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`
|
|
575
|
-
* `dall-e-2` unless a parameter specific
|
|
598
|
+
* image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
599
|
+
* or `gpt-image-2-2026-04-21`). Defaults to `dall-e-2` unless a parameter specific
|
|
600
|
+
* to the GPT image models is used.
|
|
576
601
|
*/
|
|
577
602
|
model?: (string & {}) | ImageModel | null;
|
|
578
603
|
/**
|
|
@@ -624,12 +649,19 @@ export interface ImageGenerateParamsBase {
|
|
|
624
649
|
*/
|
|
625
650
|
response_format?: 'url' | 'b64_json' | null;
|
|
626
651
|
/**
|
|
627
|
-
* The size of the generated images.
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
|
|
632
|
-
|
|
652
|
+
* The size of the generated images. For `gpt-image-2` and
|
|
653
|
+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
654
|
+
* strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
655
|
+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
656
|
+
* `2560x1440` are experimental, and the maximum supported resolution is
|
|
657
|
+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
658
|
+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
659
|
+
* supported by the GPT image models; `auto` is supported for models that allow
|
|
660
|
+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
661
|
+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
662
|
+
* `1024x1792`.
|
|
663
|
+
*/
|
|
664
|
+
size?: (string & {}) | 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792' | null;
|
|
633
665
|
/**
|
|
634
666
|
* Generate the image in streaming mode. Defaults to `false`. See the
|
|
635
667
|
* [Image generation guide](https://platform.openai.com/docs/guides/image-generation)
|