@runwayml/sdk 2.10.1 → 3.0.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 +35 -0
- package/README.md +113 -48
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +207 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +207 -0
- package/client.d.ts.map +1 -0
- package/client.js +494 -0
- package/client.js.map +1 -0
- package/client.mjs +490 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -138
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -137
- package/index.d.ts.map +1 -1
- package/index.js +12 -136
- package/index.js.map +1 -1
- package/index.mjs +6 -110
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/polling.d.mts +48 -0
- package/lib/polling.d.mts.map +1 -0
- package/lib/polling.d.ts +4 -5
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +2 -2
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs.map +1 -1
- package/package.json +113 -64
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/character-performance.d.mts +106 -0
- package/resources/character-performance.d.mts.map +1 -0
- package/resources/character-performance.d.ts +3 -3
- package/resources/character-performance.d.ts.map +1 -1
- package/resources/character-performance.js +1 -1
- package/resources/character-performance.js.map +1 -1
- package/resources/character-performance.mjs +1 -1
- package/resources/character-performance.mjs.map +1 -1
- package/resources/image-to-video.d.mts +108 -0
- package/resources/image-to-video.d.mts.map +1 -0
- package/resources/image-to-video.d.ts +3 -3
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-to-video.js +1 -1
- package/resources/image-to-video.js.map +1 -1
- package/resources/image-to-video.mjs +1 -1
- package/resources/image-to-video.mjs.map +1 -1
- package/resources/index.d.mts +10 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +422 -0
- package/resources/organization.d.mts.map +1 -0
- package/resources/organization.d.ts +37 -7
- package/resources/organization.d.ts.map +1 -1
- package/resources/organization.js +6 -5
- package/resources/organization.js.map +1 -1
- package/resources/organization.mjs +6 -5
- package/resources/organization.mjs.map +1 -1
- package/resources/tasks.d.mts +69 -0
- package/resources/tasks.d.mts.map +1 -0
- package/resources/tasks.d.ts +5 -4
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.js +6 -4
- package/resources/tasks.js.map +1 -1
- package/resources/tasks.mjs +6 -4
- package/resources/tasks.mjs.map +1 -1
- package/resources/text-to-image.d.mts +112 -0
- package/resources/text-to-image.d.mts.map +1 -0
- package/resources/text-to-image.d.ts +4 -4
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-image.js +2 -2
- package/resources/text-to-image.js.map +1 -1
- package/resources/text-to-image.mjs +2 -2
- package/resources/text-to-image.mjs.map +1 -1
- package/resources/text-to-speech.d.mts +46 -0
- package/resources/text-to-speech.d.mts.map +1 -0
- package/resources/text-to-speech.d.ts +46 -0
- package/resources/text-to-speech.d.ts.map +1 -0
- package/resources/text-to-speech.js +16 -0
- package/resources/text-to-speech.js.map +1 -0
- package/resources/text-to-speech.mjs +12 -0
- package/resources/text-to-speech.mjs.map +1 -0
- package/resources/text-to-video.d.mts +44 -0
- package/resources/text-to-video.d.mts.map +1 -0
- package/resources/text-to-video.d.ts +3 -3
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/text-to-video.js +1 -1
- package/resources/text-to-video.js.map +1 -1
- package/resources/text-to-video.mjs +1 -1
- package/resources/text-to-video.mjs.map +1 -1
- package/resources/video-to-video.d.mts +78 -0
- package/resources/video-to-video.d.mts.map +1 -0
- package/resources/video-to-video.d.ts +3 -3
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +1 -1
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +1 -1
- package/resources/video-to-video.mjs.map +1 -1
- package/resources/video-upscale.d.mts +32 -0
- package/resources/video-upscale.d.mts.map +1 -0
- package/resources/video-upscale.d.ts +3 -3
- package/resources/video-upscale.d.ts.map +1 -1
- package/resources/video-upscale.js +1 -1
- package/resources/video-upscale.js.map +1 -1
- package/resources/video-upscale.mjs +1 -1
- package/resources/video-upscale.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +840 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +12 -279
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/polling.ts +5 -5
- package/src/resource.ts +2 -11
- package/src/resources/character-performance.ts +3 -3
- package/src/resources/image-to-video.ts +3 -3
- package/src/resources/index.ts +5 -0
- package/src/resources/organization.ts +44 -15
- package/src/resources/tasks.ts +10 -7
- package/src/resources/text-to-image.ts +4 -4
- package/src/resources/text-to-speech.ts +114 -0
- package/src/resources/text-to-video.ts +3 -3
- package/src/resources/video-to-video.ts +3 -3
- package/src/resources/video-upscale.ts +3 -3
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Organization extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get usage tier and credit balance information about the organization associated
|
|
7
|
+
* with the API key used to make the request.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(options?: RequestOptions): APIPromise<OrganizationRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Fetch credit usage data broken down by model and day for the organization
|
|
12
|
+
* associated with the API key used to make the request. Up to 90 days of data can
|
|
13
|
+
* be queried at a time.
|
|
14
|
+
*/
|
|
15
|
+
retrieveUsage(body?: OrganizationRetrieveUsageParams | null | undefined, options?: RequestOptions): APIPromise<OrganizationRetrieveUsageResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface OrganizationRetrieveResponse {
|
|
18
|
+
/**
|
|
19
|
+
* The number of credits remaining in the organization account.
|
|
20
|
+
*/
|
|
21
|
+
creditBalance: number;
|
|
22
|
+
/**
|
|
23
|
+
* Limits associated with the organization's tier.
|
|
24
|
+
*/
|
|
25
|
+
tier: OrganizationRetrieveResponse.Tier;
|
|
26
|
+
/**
|
|
27
|
+
* Usage data for the organization.
|
|
28
|
+
*/
|
|
29
|
+
usage: OrganizationRetrieveResponse.Usage;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace OrganizationRetrieveResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Limits associated with the organization's tier.
|
|
34
|
+
*/
|
|
35
|
+
interface Tier {
|
|
36
|
+
/**
|
|
37
|
+
* The maximum number of credits that can be purchased in a month.
|
|
38
|
+
*/
|
|
39
|
+
maxMonthlyCreditSpend: number;
|
|
40
|
+
/**
|
|
41
|
+
* An object containing model-specific limits. Each key represents a model.
|
|
42
|
+
*/
|
|
43
|
+
models: Tier.Models;
|
|
44
|
+
}
|
|
45
|
+
namespace Tier {
|
|
46
|
+
/**
|
|
47
|
+
* An object containing model-specific limits. Each key represents a model.
|
|
48
|
+
*/
|
|
49
|
+
interface Models {
|
|
50
|
+
/**
|
|
51
|
+
* Limits associated with the act_two model.
|
|
52
|
+
*/
|
|
53
|
+
act_two?: Models.ActTwo;
|
|
54
|
+
/**
|
|
55
|
+
* Limits associated with the eleven_multilingual_v2 model.
|
|
56
|
+
*/
|
|
57
|
+
eleven_multilingual_v2?: Models.ElevenMultilingualV2;
|
|
58
|
+
/**
|
|
59
|
+
* Limits associated with the gemini_2.5_flash model.
|
|
60
|
+
*/
|
|
61
|
+
'gemini_2.5_flash'?: Models.Gemini2_5Flash;
|
|
62
|
+
/**
|
|
63
|
+
* Limits associated with the gen3a_turbo model.
|
|
64
|
+
*/
|
|
65
|
+
gen3a_turbo?: Models.Gen3aTurbo;
|
|
66
|
+
/**
|
|
67
|
+
* Limits associated with the gen4_aleph model.
|
|
68
|
+
*/
|
|
69
|
+
gen4_aleph?: Models.Gen4Aleph;
|
|
70
|
+
/**
|
|
71
|
+
* Limits associated with the gen4_image model.
|
|
72
|
+
*/
|
|
73
|
+
gen4_image?: Models.Gen4Image;
|
|
74
|
+
/**
|
|
75
|
+
* Limits associated with the gen4_image_turbo model.
|
|
76
|
+
*/
|
|
77
|
+
gen4_image_turbo?: Models.Gen4ImageTurbo;
|
|
78
|
+
/**
|
|
79
|
+
* Limits associated with the gen4_turbo model.
|
|
80
|
+
*/
|
|
81
|
+
gen4_turbo?: Models.Gen4Turbo;
|
|
82
|
+
/**
|
|
83
|
+
* Limits associated with the upscale_v1 model.
|
|
84
|
+
*/
|
|
85
|
+
upscale_v1?: Models.UpscaleV1;
|
|
86
|
+
/**
|
|
87
|
+
* Limits associated with the veo3 model.
|
|
88
|
+
*/
|
|
89
|
+
veo3?: Models.Veo3;
|
|
90
|
+
}
|
|
91
|
+
namespace Models {
|
|
92
|
+
/**
|
|
93
|
+
* Limits associated with the act_two model.
|
|
94
|
+
*/
|
|
95
|
+
interface ActTwo {
|
|
96
|
+
/**
|
|
97
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
98
|
+
*/
|
|
99
|
+
maxConcurrentGenerations: number;
|
|
100
|
+
/**
|
|
101
|
+
* The maximum number of generations that can be created each day for this model.
|
|
102
|
+
*/
|
|
103
|
+
maxDailyGenerations: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Limits associated with the eleven_multilingual_v2 model.
|
|
107
|
+
*/
|
|
108
|
+
interface ElevenMultilingualV2 {
|
|
109
|
+
/**
|
|
110
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
111
|
+
*/
|
|
112
|
+
maxConcurrentGenerations: number;
|
|
113
|
+
/**
|
|
114
|
+
* The maximum number of generations that can be created each day for this model.
|
|
115
|
+
*/
|
|
116
|
+
maxDailyGenerations: number;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Limits associated with the gemini_2.5_flash model.
|
|
120
|
+
*/
|
|
121
|
+
interface Gemini2_5Flash {
|
|
122
|
+
/**
|
|
123
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
124
|
+
*/
|
|
125
|
+
maxConcurrentGenerations: number;
|
|
126
|
+
/**
|
|
127
|
+
* The maximum number of generations that can be created each day for this model.
|
|
128
|
+
*/
|
|
129
|
+
maxDailyGenerations: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Limits associated with the gen3a_turbo model.
|
|
133
|
+
*/
|
|
134
|
+
interface Gen3aTurbo {
|
|
135
|
+
/**
|
|
136
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
137
|
+
*/
|
|
138
|
+
maxConcurrentGenerations: number;
|
|
139
|
+
/**
|
|
140
|
+
* The maximum number of generations that can be created each day for this model.
|
|
141
|
+
*/
|
|
142
|
+
maxDailyGenerations: number;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Limits associated with the gen4_aleph model.
|
|
146
|
+
*/
|
|
147
|
+
interface Gen4Aleph {
|
|
148
|
+
/**
|
|
149
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
150
|
+
*/
|
|
151
|
+
maxConcurrentGenerations: number;
|
|
152
|
+
/**
|
|
153
|
+
* The maximum number of generations that can be created each day for this model.
|
|
154
|
+
*/
|
|
155
|
+
maxDailyGenerations: number;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Limits associated with the gen4_image model.
|
|
159
|
+
*/
|
|
160
|
+
interface Gen4Image {
|
|
161
|
+
/**
|
|
162
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
163
|
+
*/
|
|
164
|
+
maxConcurrentGenerations: number;
|
|
165
|
+
/**
|
|
166
|
+
* The maximum number of generations that can be created each day for this model.
|
|
167
|
+
*/
|
|
168
|
+
maxDailyGenerations: number;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Limits associated with the gen4_image_turbo model.
|
|
172
|
+
*/
|
|
173
|
+
interface Gen4ImageTurbo {
|
|
174
|
+
/**
|
|
175
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
176
|
+
*/
|
|
177
|
+
maxConcurrentGenerations: number;
|
|
178
|
+
/**
|
|
179
|
+
* The maximum number of generations that can be created each day for this model.
|
|
180
|
+
*/
|
|
181
|
+
maxDailyGenerations: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Limits associated with the gen4_turbo model.
|
|
185
|
+
*/
|
|
186
|
+
interface Gen4Turbo {
|
|
187
|
+
/**
|
|
188
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
189
|
+
*/
|
|
190
|
+
maxConcurrentGenerations: number;
|
|
191
|
+
/**
|
|
192
|
+
* The maximum number of generations that can be created each day for this model.
|
|
193
|
+
*/
|
|
194
|
+
maxDailyGenerations: number;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Limits associated with the upscale_v1 model.
|
|
198
|
+
*/
|
|
199
|
+
interface UpscaleV1 {
|
|
200
|
+
/**
|
|
201
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
202
|
+
*/
|
|
203
|
+
maxConcurrentGenerations: number;
|
|
204
|
+
/**
|
|
205
|
+
* The maximum number of generations that can be created each day for this model.
|
|
206
|
+
*/
|
|
207
|
+
maxDailyGenerations: number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Limits associated with the veo3 model.
|
|
211
|
+
*/
|
|
212
|
+
interface Veo3 {
|
|
213
|
+
/**
|
|
214
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
215
|
+
*/
|
|
216
|
+
maxConcurrentGenerations: number;
|
|
217
|
+
/**
|
|
218
|
+
* The maximum number of generations that can be created each day for this model.
|
|
219
|
+
*/
|
|
220
|
+
maxDailyGenerations: number;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Usage data for the organization.
|
|
226
|
+
*/
|
|
227
|
+
interface Usage {
|
|
228
|
+
/**
|
|
229
|
+
* Usage data for each model.
|
|
230
|
+
*/
|
|
231
|
+
models: Usage.Models;
|
|
232
|
+
}
|
|
233
|
+
namespace Usage {
|
|
234
|
+
/**
|
|
235
|
+
* Usage data for each model.
|
|
236
|
+
*/
|
|
237
|
+
interface Models {
|
|
238
|
+
/**
|
|
239
|
+
* Usage data for the act_two model.
|
|
240
|
+
*/
|
|
241
|
+
act_two?: Models.ActTwo;
|
|
242
|
+
/**
|
|
243
|
+
* Usage data for the eleven_multilingual_v2 model.
|
|
244
|
+
*/
|
|
245
|
+
eleven_multilingual_v2?: Models.ElevenMultilingualV2;
|
|
246
|
+
/**
|
|
247
|
+
* Usage data for the gemini_2.5_flash model.
|
|
248
|
+
*/
|
|
249
|
+
'gemini_2.5_flash'?: Models.Gemini2_5Flash;
|
|
250
|
+
/**
|
|
251
|
+
* Usage data for the gen3a_turbo model.
|
|
252
|
+
*/
|
|
253
|
+
gen3a_turbo?: Models.Gen3aTurbo;
|
|
254
|
+
/**
|
|
255
|
+
* Usage data for the gen4_aleph model.
|
|
256
|
+
*/
|
|
257
|
+
gen4_aleph?: Models.Gen4Aleph;
|
|
258
|
+
/**
|
|
259
|
+
* Usage data for the gen4_image model.
|
|
260
|
+
*/
|
|
261
|
+
gen4_image?: Models.Gen4Image;
|
|
262
|
+
/**
|
|
263
|
+
* Usage data for the gen4_image_turbo model.
|
|
264
|
+
*/
|
|
265
|
+
gen4_image_turbo?: Models.Gen4ImageTurbo;
|
|
266
|
+
/**
|
|
267
|
+
* Usage data for the gen4_turbo model.
|
|
268
|
+
*/
|
|
269
|
+
gen4_turbo?: Models.Gen4Turbo;
|
|
270
|
+
/**
|
|
271
|
+
* Usage data for the upscale_v1 model.
|
|
272
|
+
*/
|
|
273
|
+
upscale_v1?: Models.UpscaleV1;
|
|
274
|
+
/**
|
|
275
|
+
* Usage data for the veo3 model.
|
|
276
|
+
*/
|
|
277
|
+
veo3?: Models.Veo3;
|
|
278
|
+
}
|
|
279
|
+
namespace Models {
|
|
280
|
+
/**
|
|
281
|
+
* Usage data for the act_two model.
|
|
282
|
+
*/
|
|
283
|
+
interface ActTwo {
|
|
284
|
+
/**
|
|
285
|
+
* The number of generations that have been run for this model in the past day.
|
|
286
|
+
*/
|
|
287
|
+
dailyGenerations: number;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Usage data for the eleven_multilingual_v2 model.
|
|
291
|
+
*/
|
|
292
|
+
interface ElevenMultilingualV2 {
|
|
293
|
+
/**
|
|
294
|
+
* The number of generations that have been run for this model in the past day.
|
|
295
|
+
*/
|
|
296
|
+
dailyGenerations: number;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Usage data for the gemini_2.5_flash model.
|
|
300
|
+
*/
|
|
301
|
+
interface Gemini2_5Flash {
|
|
302
|
+
/**
|
|
303
|
+
* The number of generations that have been run for this model in the past day.
|
|
304
|
+
*/
|
|
305
|
+
dailyGenerations: number;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Usage data for the gen3a_turbo model.
|
|
309
|
+
*/
|
|
310
|
+
interface Gen3aTurbo {
|
|
311
|
+
/**
|
|
312
|
+
* The number of generations that have been run for this model in the past day.
|
|
313
|
+
*/
|
|
314
|
+
dailyGenerations: number;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Usage data for the gen4_aleph model.
|
|
318
|
+
*/
|
|
319
|
+
interface Gen4Aleph {
|
|
320
|
+
/**
|
|
321
|
+
* The number of generations that have been run for this model in the past day.
|
|
322
|
+
*/
|
|
323
|
+
dailyGenerations: number;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Usage data for the gen4_image model.
|
|
327
|
+
*/
|
|
328
|
+
interface Gen4Image {
|
|
329
|
+
/**
|
|
330
|
+
* The number of generations that have been run for this model in the past day.
|
|
331
|
+
*/
|
|
332
|
+
dailyGenerations: number;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Usage data for the gen4_image_turbo model.
|
|
336
|
+
*/
|
|
337
|
+
interface Gen4ImageTurbo {
|
|
338
|
+
/**
|
|
339
|
+
* The number of generations that have been run for this model in the past day.
|
|
340
|
+
*/
|
|
341
|
+
dailyGenerations: number;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Usage data for the gen4_turbo model.
|
|
345
|
+
*/
|
|
346
|
+
interface Gen4Turbo {
|
|
347
|
+
/**
|
|
348
|
+
* The number of generations that have been run for this model in the past day.
|
|
349
|
+
*/
|
|
350
|
+
dailyGenerations: number;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Usage data for the upscale_v1 model.
|
|
354
|
+
*/
|
|
355
|
+
interface UpscaleV1 {
|
|
356
|
+
/**
|
|
357
|
+
* The number of generations that have been run for this model in the past day.
|
|
358
|
+
*/
|
|
359
|
+
dailyGenerations: number;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Usage data for the veo3 model.
|
|
363
|
+
*/
|
|
364
|
+
interface Veo3 {
|
|
365
|
+
/**
|
|
366
|
+
* The number of generations that have been run for this model in the past day.
|
|
367
|
+
*/
|
|
368
|
+
dailyGenerations: number;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
export interface OrganizationRetrieveUsageResponse {
|
|
374
|
+
/**
|
|
375
|
+
* The list of models with usage during the queried time range.
|
|
376
|
+
*/
|
|
377
|
+
models: Array<'act_two' | 'eleven_multilingual_v2' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3'>;
|
|
378
|
+
results: Array<OrganizationRetrieveUsageResponse.Result>;
|
|
379
|
+
}
|
|
380
|
+
export declare namespace OrganizationRetrieveUsageResponse {
|
|
381
|
+
interface Result {
|
|
382
|
+
/**
|
|
383
|
+
* The date of the usage data in ISO-8601 format (YYYY-MM-DD). All dates are in
|
|
384
|
+
* UTC.
|
|
385
|
+
*/
|
|
386
|
+
date: string;
|
|
387
|
+
/**
|
|
388
|
+
* The credits used per model for the given date.
|
|
389
|
+
*/
|
|
390
|
+
usedCredits: Array<Result.UsedCredit>;
|
|
391
|
+
}
|
|
392
|
+
namespace Result {
|
|
393
|
+
interface UsedCredit {
|
|
394
|
+
/**
|
|
395
|
+
* The number of credits used for the model.
|
|
396
|
+
*/
|
|
397
|
+
amount: number;
|
|
398
|
+
/**
|
|
399
|
+
* The model whose usage resulted in the credit usage.
|
|
400
|
+
*/
|
|
401
|
+
model: 'act_two' | 'eleven_multilingual_v2' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3';
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
export interface OrganizationRetrieveUsageParams {
|
|
406
|
+
/**
|
|
407
|
+
* The end date of the usage data in ISO-8601 format (YYYY-MM-DD), not inclusive.
|
|
408
|
+
* If unspecified, it will default to thirty days after the start date. Must be
|
|
409
|
+
* less than or equal to 90 days after the start date. All dates are in UTC.
|
|
410
|
+
*/
|
|
411
|
+
beforeDate?: string;
|
|
412
|
+
/**
|
|
413
|
+
* The start date of the usage data in ISO-8601 format (YYYY-MM-DD). If
|
|
414
|
+
* unspecified, it will default to 30 days before the current date. All dates are
|
|
415
|
+
* in UTC.
|
|
416
|
+
*/
|
|
417
|
+
startDate?: string;
|
|
418
|
+
}
|
|
419
|
+
export declare namespace Organization {
|
|
420
|
+
export { type OrganizationRetrieveResponse as OrganizationRetrieveResponse, type OrganizationRetrieveUsageResponse as OrganizationRetrieveUsageResponse, type OrganizationRetrieveUsageParams as OrganizationRetrieveUsageParams, };
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=organization.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.d.mts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI5E;;;;OAIG;IACH,aAAa,CACX,IAAI,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,4BAA4B,CAAC,KAAK,CAAC;CAC3C;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;OAEG;IACH,UAAi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|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
3
4
|
export declare class Organization extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* Get usage tier and credit balance information about the organization associated
|
|
6
7
|
* with the API key used to make the request.
|
|
7
8
|
*/
|
|
8
|
-
retrieve(options?:
|
|
9
|
+
retrieve(options?: RequestOptions): APIPromise<OrganizationRetrieveResponse>;
|
|
9
10
|
/**
|
|
10
11
|
* Fetch credit usage data broken down by model and day for the organization
|
|
11
12
|
* associated with the API key used to make the request. Up to 90 days of data can
|
|
12
13
|
* be queried at a time.
|
|
13
14
|
*/
|
|
14
|
-
retrieveUsage(body?: OrganizationRetrieveUsageParams, options?:
|
|
15
|
-
retrieveUsage(options?: Core.RequestOptions): Core.APIPromise<OrganizationRetrieveUsageResponse>;
|
|
15
|
+
retrieveUsage(body?: OrganizationRetrieveUsageParams | null | undefined, options?: RequestOptions): APIPromise<OrganizationRetrieveUsageResponse>;
|
|
16
16
|
}
|
|
17
17
|
export interface OrganizationRetrieveResponse {
|
|
18
18
|
/**
|
|
@@ -51,6 +51,10 @@ export declare namespace OrganizationRetrieveResponse {
|
|
|
51
51
|
* Limits associated with the act_two model.
|
|
52
52
|
*/
|
|
53
53
|
act_two?: Models.ActTwo;
|
|
54
|
+
/**
|
|
55
|
+
* Limits associated with the eleven_multilingual_v2 model.
|
|
56
|
+
*/
|
|
57
|
+
eleven_multilingual_v2?: Models.ElevenMultilingualV2;
|
|
54
58
|
/**
|
|
55
59
|
* Limits associated with the gemini_2.5_flash model.
|
|
56
60
|
*/
|
|
@@ -98,6 +102,19 @@ export declare namespace OrganizationRetrieveResponse {
|
|
|
98
102
|
*/
|
|
99
103
|
maxDailyGenerations: number;
|
|
100
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Limits associated with the eleven_multilingual_v2 model.
|
|
107
|
+
*/
|
|
108
|
+
interface ElevenMultilingualV2 {
|
|
109
|
+
/**
|
|
110
|
+
* The maximum number of generations that can be run concurrently for this model.
|
|
111
|
+
*/
|
|
112
|
+
maxConcurrentGenerations: number;
|
|
113
|
+
/**
|
|
114
|
+
* The maximum number of generations that can be created each day for this model.
|
|
115
|
+
*/
|
|
116
|
+
maxDailyGenerations: number;
|
|
117
|
+
}
|
|
101
118
|
/**
|
|
102
119
|
* Limits associated with the gemini_2.5_flash model.
|
|
103
120
|
*/
|
|
@@ -222,6 +239,10 @@ export declare namespace OrganizationRetrieveResponse {
|
|
|
222
239
|
* Usage data for the act_two model.
|
|
223
240
|
*/
|
|
224
241
|
act_two?: Models.ActTwo;
|
|
242
|
+
/**
|
|
243
|
+
* Usage data for the eleven_multilingual_v2 model.
|
|
244
|
+
*/
|
|
245
|
+
eleven_multilingual_v2?: Models.ElevenMultilingualV2;
|
|
225
246
|
/**
|
|
226
247
|
* Usage data for the gemini_2.5_flash model.
|
|
227
248
|
*/
|
|
@@ -265,6 +286,15 @@ export declare namespace OrganizationRetrieveResponse {
|
|
|
265
286
|
*/
|
|
266
287
|
dailyGenerations: number;
|
|
267
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Usage data for the eleven_multilingual_v2 model.
|
|
291
|
+
*/
|
|
292
|
+
interface ElevenMultilingualV2 {
|
|
293
|
+
/**
|
|
294
|
+
* The number of generations that have been run for this model in the past day.
|
|
295
|
+
*/
|
|
296
|
+
dailyGenerations: number;
|
|
297
|
+
}
|
|
268
298
|
/**
|
|
269
299
|
* Usage data for the gemini_2.5_flash model.
|
|
270
300
|
*/
|
|
@@ -344,7 +374,7 @@ export interface OrganizationRetrieveUsageResponse {
|
|
|
344
374
|
/**
|
|
345
375
|
* The list of models with usage during the queried time range.
|
|
346
376
|
*/
|
|
347
|
-
models: Array<'act_two' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3'>;
|
|
377
|
+
models: Array<'act_two' | 'eleven_multilingual_v2' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3'>;
|
|
348
378
|
results: Array<OrganizationRetrieveUsageResponse.Result>;
|
|
349
379
|
}
|
|
350
380
|
export declare namespace OrganizationRetrieveUsageResponse {
|
|
@@ -368,7 +398,7 @@ export declare namespace OrganizationRetrieveUsageResponse {
|
|
|
368
398
|
/**
|
|
369
399
|
* The model whose usage resulted in the credit usage.
|
|
370
400
|
*/
|
|
371
|
-
model: 'act_two' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3';
|
|
401
|
+
model: 'act_two' | 'eleven_multilingual_v2' | 'gemini_2.5_flash' | 'gen3a_turbo' | 'gen4_aleph' | 'gen4_image' | 'gen4_image_turbo' | 'gen4_turbo' | 'upscale_v1' | 'veo3';
|
|
372
402
|
}
|
|
373
403
|
}
|
|
374
404
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI5E;;;;OAIG;IACH,aAAa,CACX,IAAI,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED,MAAM,WAAW,4BAA4B;I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AAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Organization = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
6
|
-
const core_1 = require("../core.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
7
6
|
class Organization extends resource_1.APIResource {
|
|
8
7
|
/**
|
|
9
8
|
* Get usage tier and credit balance information about the organization associated
|
|
@@ -12,10 +11,12 @@ class Organization extends resource_1.APIResource {
|
|
|
12
11
|
retrieve(options) {
|
|
13
12
|
return this._client.get('/v1/organization', options);
|
|
14
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Fetch credit usage data broken down by model and day for the organization
|
|
16
|
+
* associated with the API key used to make the request. Up to 90 days of data can
|
|
17
|
+
* be queried at a time.
|
|
18
|
+
*/
|
|
15
19
|
retrieveUsage(body = {}, options) {
|
|
16
|
-
if ((0, core_1.isRequestOptions)(body)) {
|
|
17
|
-
return this.retrieveUsage({}, body);
|
|
18
|
-
}
|
|
19
20
|
return this._client.post('/v1/organization/usage', { body, ...options });
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,OAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AApBD,oCAoBC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../core.mjs";
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
4
3
|
export class Organization extends APIResource {
|
|
5
4
|
/**
|
|
6
5
|
* Get usage tier and credit balance information about the organization associated
|
|
@@ -9,10 +8,12 @@ export class Organization extends APIResource {
|
|
|
9
8
|
retrieve(options) {
|
|
10
9
|
return this._client.get('/v1/organization', options);
|
|
11
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetch credit usage data broken down by model and day for the organization
|
|
13
|
+
* associated with the API key used to make the request. Up to 90 days of data can
|
|
14
|
+
* be queried at a time.
|
|
15
|
+
*/
|
|
12
16
|
retrieveUsage(body = {}, options) {
|
|
13
|
-
if (isRequestOptions(body)) {
|
|
14
|
-
return this.retrieveUsage({}, body);
|
|
15
|
-
}
|
|
16
17
|
return this._client.post('/v1/organization/usage', { body, ...options });
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,OAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF"}
|