{"_id":"@comfyorg/sdk","_rev":"19-4ddcd71161fbd6ee3e630e2d50f063a0","name":"@comfyorg/sdk","dist-tags":{"latest":"0.6.0"},"versions":{"0.1.0":{"name":"@comfyorg/sdk","version":"0.1.0","_id":"@comfyorg/sdk@0.1.0","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"dist":{"shasum":"fe930deec791919eee7d8866b722d88d37c534fe","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.0.tgz","fileCount":42,"integrity":"sha512-/CwjEV7EgyAW+Itf2sdW+k0Ee8PKeYfOW5e65VqBh6+O9f92s3hVI53ntmcQSNkImD1hhpUL9/VBvKr9IJx0XQ==","signatures":[{"sig":"MEQCIFsQ30qsKOruVnlDWAWYjTUqFqXN/F7IwaA1Gq6PV5pxAiBxGiOXgQ1DwhcfmQ+u/UJK/ZqZP//2KxCLyOm6ePuwTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139221},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"gitHead":"abf9202cea458d6beb8a8d8ffa4d24720ba54c38","private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"wei-hai-comfy","email":"wei@comfy.org"},"_npmVersion":"11.16.0","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.13.0","devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1784664776545_0.7941801156635981","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@comfyorg/sdk","version":"0.1.1","_id":"@comfyorg/sdk@0.1.1","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/ComfyTypeScriptSDK#readme","bugs":{"url":"https://github.com/Comfy-Org/ComfyTypeScriptSDK/issues"},"dist":{"shasum":"cbf7a6e822c58f853ada24ea4948233ad898b5b3","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.1.tgz","fileCount":42,"integrity":"sha512-VfYz7XADna5xDfXoQx104GShuYsOic3/92AovKFzA4W65MX+fVaFBF1KEWNhw4qg3kIcbiNA5qjhS6bFLdHSRQ==","signatures":[{"sig":"MEQCIEmtO3xChFtJ6+ninUudnthkHjwqmOKwfw/hO6kwunFeAiApaNMH3hGTbber3Irm4kKdiXm0dXFvbSZIn0t1vdAlkg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":142603},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2354323f-8068-468d-ab88-a636055e046d"}},"_resolved":"/home/runner/work/ComfyTypeScriptSDK/ComfyTypeScriptSDK/dist-pack/comfyorg-sdk-0.1.1.tgz","_integrity":"sha512-VfYz7XADna5xDfXoQx104GShuYsOic3/92AovKFzA4W65MX+fVaFBF1KEWNhw4qg3kIcbiNA5qjhS6bFLdHSRQ==","repository":{"url":"git+https://github.com/Comfy-Org/ComfyTypeScriptSDK.git","type":"git"},"_npmVersion":"12.0.1","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1784676743389_0.3180766962577761","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@comfyorg/sdk","version":"0.1.2","_id":"@comfyorg/sdk@0.1.2","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/ComfyTypeScriptSDK#readme","bugs":{"url":"https://github.com/Comfy-Org/ComfyTypeScriptSDK/issues"},"dist":{"shasum":"7ba049ae2bdc128b92c5a7092781bfe605288efa","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.2.tgz","fileCount":42,"integrity":"sha512-clPEiBbfsVApVTAhxiVOcFQua1B/X8plKsWu2IWVvqt5rJl1WMiINqV+iRuSsjiS7IZanEDubzP86liAHQhiGw==","signatures":[{"sig":"MEYCIQCRAg7eOWQKXj7MvqIJJPUesGWc7bNhoHrSTUqzGNXnowIhANaSbPOISD4HCLayy+59Qf1XpOo7JG9pFcT2qYlV2lV0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":155364},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2354323f-8068-468d-ab88-a636055e046d"}},"_resolved":"/home/runner/work/ComfyTypeScriptSDK/ComfyTypeScriptSDK/dist-pack/comfyorg-sdk-0.1.2.tgz","_integrity":"sha512-clPEiBbfsVApVTAhxiVOcFQua1B/X8plKsWu2IWVvqt5rJl1WMiINqV+iRuSsjiS7IZanEDubzP86liAHQhiGw==","repository":{"url":"git+https://github.com/Comfy-Org/ComfyTypeScriptSDK.git","type":"git"},"_npmVersion":"12.0.1","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.2_1784825337821_0.23360032326866476","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@comfyorg/sdk","version":"0.1.3","_id":"@comfyorg/sdk@0.1.3","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/ComfyTypeScriptSDK#readme","bugs":{"url":"https://github.com/Comfy-Org/ComfyTypeScriptSDK/issues"},"dist":{"shasum":"64a1ffe446564f6d148d459903f0b0c613aecf34","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.3.tgz","fileCount":44,"integrity":"sha512-4DERo7/Rihaowt2FUurfik2qTLAQIy7gKXiWL/sWz/aQPnpOEaw0bKY3xfQcnoir0tG8fsxYU7MqrzyTxAr38w==","signatures":[{"sig":"MEUCIDAX8filtrPTZ4qP1ea+YCHxcq8FOcHnx6T1el3orw+7AiEApNrhcvsfNZsl7CTRTjjbP/WX7EA8Ltg1bZS1U5M1h9U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":155738},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.3.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2354323f-8068-468d-ab88-a636055e046d"}},"_resolved":"/home/runner/work/ComfyTypeScriptSDK/ComfyTypeScriptSDK/dist-pack/comfyorg-sdk-0.1.3.tgz","_integrity":"sha512-4DERo7/Rihaowt2FUurfik2qTLAQIy7gKXiWL/sWz/aQPnpOEaw0bKY3xfQcnoir0tG8fsxYU7MqrzyTxAr38w==","repository":{"url":"git+https://github.com/Comfy-Org/ComfyTypeScriptSDK.git","type":"git"},"_npmVersion":"12.0.1","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.3_1785180307275_0.9307683042454524","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@comfyorg/sdk","version":"0.1.4","_id":"@comfyorg/sdk@0.1.4","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/ComfyTypeScriptSDK#readme","bugs":{"url":"https://github.com/Comfy-Org/ComfyTypeScriptSDK/issues"},"dist":{"shasum":"80f6fe4a53cd517a73bc605f28ce18135f48e4e3","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.4.tgz","fileCount":44,"integrity":"sha512-Zff0I7HfDvNU0UuZTUTZdgXh/B71xDzBogceyRoUcG4gchY42UfVz3KbIYnyddiBZ0RkVfT2TK+LrEGKnFBaxg==","signatures":[{"sig":"MEQCIBcXdGn3A9wrR4HO5hxbfLdbol96KtxnrcGFKi3l4mGYAiAv0/5b/zwjUT9jWdZHtAf+jo2XRCjezF0scneZcW0ENw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":156646},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.4.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2354323f-8068-468d-ab88-a636055e046d"}},"_resolved":"/home/runner/work/ComfyTypeScriptSDK/ComfyTypeScriptSDK/dist-pack/comfyorg-sdk-0.1.4.tgz","_integrity":"sha512-Zff0I7HfDvNU0UuZTUTZdgXh/B71xDzBogceyRoUcG4gchY42UfVz3KbIYnyddiBZ0RkVfT2TK+LrEGKnFBaxg==","repository":{"url":"git+https://github.com/Comfy-Org/ComfyTypeScriptSDK.git","type":"git"},"_npmVersion":"12.0.1","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.4_1785266479961_0.8838813945546269","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@comfyorg/sdk","version":"0.1.5","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.1.5","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"b5d6852f1e82daabf3dffa2ddede55bd4debd8b7","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.5.tgz","fileCount":108,"integrity":"sha512-ByZ7FhC14wFkDzQ45xXTgjPSM7UyRenNjnodcJrFjU0MZ22r9j9JsJn8o97Ny7XD/F47C43iArGOzH+z156bow==","signatures":[{"sig":"MEQCIAEufgduLZydDqLgGd/SJpPLH5CgF2M+eeElJjMv1LGEAiAxBFuMH35IuLEy46kKunv2bK4oI17aRM6ecrZgE/nVJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":353109},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.5.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.1.5.tgz","_integrity":"sha512-ByZ7FhC14wFkDzQ45xXTgjPSM7UyRenNjnodcJrFjU0MZ22r9j9JsJn8o97Ny7XD/F47C43iArGOzH+z156bow==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.5_1785442332268_0.9211245706405742","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@comfyorg/sdk","version":"0.1.6","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.1.6","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"176a2e7addc35152778b364cc31ac824b97d0ad2","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.6.tgz","fileCount":108,"integrity":"sha512-UnhA0NTootGyD8xGfoV86j8l0252HOyFTBAnCqL3gmB8wSVMJuORPPemUwteDJNCryVal/It0Sr0BdhF87Rfkw==","signatures":[{"sig":"MEQCIASpQmrzyzADfQxtZ7vQb74DMa1s5P8gyHS1fafRS7HxAiBDoz8ZPrn5thRhysZinloNj53K5ynOkANwqi7P5P5RBA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":357182},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.6.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.1.6.tgz","_integrity":"sha512-UnhA0NTootGyD8xGfoV86j8l0252HOyFTBAnCqL3gmB8wSVMJuORPPemUwteDJNCryVal/It0Sr0BdhF87Rfkw==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.6_1786490783280_0.8190846936980136","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@comfyorg/sdk","version":"0.1.7","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.1.7","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"3c770132c2d7c787ed0ccb4c9900eadb5e74b90c","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.7.tgz","fileCount":108,"integrity":"sha512-B7Lg/XikehfgeilgaWaAdZ/wFKWk3M7GnsZDWodpus2G4xtaRvOiEJ6TDeagzOb/BYOTG+wBV9Q/CeRLIVrZ5Q==","signatures":[{"sig":"MEUCIQC5X/512S/B9benHdXvXjcdjuleBedyTnHflaShaG1z8wIgd/Pd3Y+RhPQZspVO6S0JCjjzWesDvCnWSdQpjWfPv8A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":391687},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.7.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:spec-drift":"node scripts/check-spec-drift.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.1.7.tgz","_integrity":"sha512-B7Lg/XikehfgeilgaWaAdZ/wFKWk3M7GnsZDWodpus2G4xtaRvOiEJ6TDeagzOb/BYOTG+wBV9Q/CeRLIVrZ5Q==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.7_1786649917112_0.9225713968302831","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@comfyorg/sdk","version":"0.1.8","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.1.8","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"bbb84be5f84e1e39848faea6c1359109a067618f","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.8.tgz","fileCount":133,"integrity":"sha512-eCh5HhfAD5sQFO0SvayZlH9FKRvYVEb5xPK9xfJZgj1i96T2MPffIqOI2NBtGAUi9GFGsFUff+cp0hRHmX/I3w==","signatures":[{"sig":"MEUCID8vPNiZij20m8baqjmbP7QSckxn1G4uc9dekG27oxDbAiEA1XUTMDLaKsaQRaszKeT/1hB81Gj1+WKQoeY34hyAOiU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":613986},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.8.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.1.8.tgz","_integrity":"sha512-eCh5HhfAD5sQFO0SvayZlH9FKRvYVEb5xPK9xfJZgj1i96T2MPffIqOI2NBtGAUi9GFGsFUff+cp0hRHmX/I3w==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.8_1788226391042_0.7624713648677806","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@comfyorg/sdk","version":"0.1.9","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.1.9","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"8d55c69d4bc85bf51ea3b785740eda2a03028578","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.1.9.tgz","fileCount":138,"integrity":"sha512-+NBWLdNd2jdl0OEiTbO3+3jLw5RGA6eM5nGfE1ykHP1psPT76Q7kvQy97vnXyhiMTX8Z6DWSKJGOCFE5hHy0/g==","signatures":[{"sig":"MEUCIQDgPsflVY/1Z8Tys9Wsr2RANRVOB5/Aa5+NjsKmlzPhdAIgGiH/8HdghFva3tt44DL8MdN4qUXYpbizzlzUIL09U94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIDq00Nj6Hs9wiGtP7CjSP7tyX6N9V0EsssrsluVPaHfdAiAlB6jsr3R8hO7xB5U42M5jfJQ99qaywlCWZNZ8gcZb9g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.1.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":647681},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.1.9.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.1.9.tgz","_integrity":"sha512-+NBWLdNd2jdl0OEiTbO3+3jLw5RGA6eM5nGfE1ykHP1psPT76Q7kvQy97vnXyhiMTX8Z6DWSKJGOCFE5hHy0/g==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.45.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^5.8.3","@types/node":"^22.10.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.9_1788544091622_0.13688705169471826","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@comfyorg/sdk","version":"0.2.0","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.2.0","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"d94406280f9c4e15cbd96060f489d4b1e62a0727","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.2.0.tgz","fileCount":138,"integrity":"sha512-x2a9mat9+s6xOACYFnlsAri7ovNaFD2VjwKohsNWJ65RodnLU5Rviq2fd7feQyfQS2C6XKZRjXj81AfypHonTQ==","signatures":[{"sig":"MEUCIQCSrW4j41GZeenaFctAzD37ONK4JE0TnhLsjPX/6o9CzwIgeLYEHUhNNvZJfFo9OXdtC0UWlCxaIO/i0Ep4bTCo0BU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGnTLz0ufxiWlHtleKxFaI6C3yibzVZpICP+aaidDBgtAiBA+wHCWyWdHUXBP/93SmwJKs95leQfsaSDOgxIfEwmsg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":747170},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.2.0.tgz","_integrity":"sha512-x2a9mat9+s6xOACYFnlsAri7ovNaFD2VjwKohsNWJ65RodnLU5Rviq2fd7feQyfQS2C6XKZRjXj81AfypHonTQ==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.66.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^6.0.3","@types/node":"^26.5.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1789073229955_0.25163015462326954","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@comfyorg/sdk","version":"0.3.0","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.3.0","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"77348b40a4cb27c7bd16cf9614fa3ea8281fcd22","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.3.0.tgz","fileCount":148,"integrity":"sha512-QKVHTc1bZnHtefRTFpY5KymjCyGhK9GIJ+R8T8aE4J0iqSdS6OZBtmXx5x3O4M39LX1Nex/wKOqqcm9jd3KsNQ==","signatures":[{"sig":"MEYCIQDIJg1F+p92TsXZ4f+x4WGI0oV9TnAyGmXqmtyYunosEQIhANct4FmHAxpX3HYXm90fl5OtGu2BOUGNAtg8lDOAKSRq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFJxqwkN0ylaQ62YL4sFXQRGHXQ9VRQIhxbXbPUJEcbBAiBZlbCSywRi81rYxyIniFokyANWkLzA7XMLKUPWDthwLg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1052619},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.3.0.tgz","_integrity":"sha512-QKVHTc1bZnHtefRTFpY5KymjCyGhK9GIJ+R8T8aE4J0iqSdS6OZBtmXx5x3O4M39LX1Nex/wKOqqcm9jd3KsNQ==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.67.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^6.0.3","@types/node":"^26.5.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.3.0_1789433451102_0.41846716046473853","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@comfyorg/sdk","version":"0.4.0","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.4.0","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"9300ff50a9259931c4f7f8e5bb6df9c684664c7d","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.4.0.tgz","fileCount":148,"integrity":"sha512-4r1MVZXKuN04raWF5HsB7hDSqAOuDdZPEXnriOrXSgoTAVRNR9uE7NfWu0HI3NFK7LMa8oaU5f7QRKNcW4hgnw==","signatures":[{"sig":"MEYCIQCIjMB52fFTi5PiMPHUlaHaGOwef+u2Z6C9QxnpJiZL2wIhAL2aqN5wmN3Il8JBNgSXCuUU+Y0f+DqxFYJqu/CIOZdY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCi8xaRmOWu5oxvHOKfe8rUtLL/xryCuj8K1Hn73pHO5wIgDAAsrSuAj8koToBIjIwLP4f/8VW4GZ4vwqsbcqqbw08=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1094239},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.4.0.tgz","_integrity":"sha512-4r1MVZXKuN04raWF5HsB7hDSqAOuDdZPEXnriOrXSgoTAVRNR9uE7NfWu0HI3NFK7LMa8oaU5f7QRKNcW4hgnw==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.0.2","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.67.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^6.0.3","@types/node":"^26.5.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.4.0_1789707432514_0.4617982008322723","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@comfyorg/sdk","version":"0.5.0","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"license":"MIT","_id":"@comfyorg/sdk@0.5.0","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"huang47","email":"huge.huang+npm@gmail.com"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"20afbb1d143b8d4e35cb16b4a695bb8dfb19a341","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.5.0.tgz","fileCount":148,"integrity":"sha512-zBOIHmXxlPivt18/Ds6P4m1zwn0hys6MG9waFND2zHKi2oCXi0aZPFLu4lr4uxf0tnGmy3oqabPTcqICH7hA0Q==","signatures":[{"sig":"MEYCIQCgbYYyoJTRTxQjFrS2m2ebmbCwYQT5e9TOk1iY6b6AfwIhAIglsZqlFetux00ugrC/AYJSN09IFNnfbe307Cmcp2kP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDLKAwmaGug+7ZzMmuh0C/z34lBfHZPG7r8djrr1wD5PQIgdSHLRVgXPW4eR8g4IErvpQTrn99tsm+uahT3V5QQahw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1242798},"main":"./dist/index.js","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.5.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.5.0.tgz","_integrity":"sha512-zBOIHmXxlPivt18/Ds6P4m1zwn0hys6MG9waFND2zHKi2oCXi0aZPFLu4lr4uxf0tnGmy3oqabPTcqICH7hA0Q==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.2.0","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"sideEffects":false,"_nodeVersion":"22.23.3","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.9.0","oxfmt":"^0.68.0","oxlint":"^1.62.0","vitest":"^4.1.0","typescript":"^6.0.3","@types/node":"^26.5.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.5.0_1791647336976_0.5240207879609298","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"_id":"@comfyorg/sdk@0.6.0","bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"dist":{"shasum":"d9dd2899601b12eb5834d5e557e9ca6f7c98503d","tarball":"https://registry.npmjs.org/@comfyorg/sdk/-/sdk-0.6.0.tgz","fileCount":153,"integrity":"sha512-g0MopQ0zWlznC+HriEMd+itgs0pq4QZn19BtBvGYzMWh4PBPtBZHBZes/w4GnpVcdalClW7SSMaGK0dPOVC8rQ==","signatures":[{"sig":"MEYCIQCeAWbXZlYJUV60hfIJe7u9MGu8rltH1lad3n90YNiSWgIhAJbJH+6svjtBpNE/tSVARrNLIdI5zOOgqLumCkBtYZUf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICKtnuwjw9RRxWSuvXMYROqVnB22wlLzf8AvkZ1Qdv2gAiAE9xHmEP1AwDVgfC3+/y5qcsUDAH0NvoubI2DLbl2Isg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@comfyorg%2fsdk@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1754103},"main":"./dist/index.js","name":"@comfyorg/sdk","type":"module","_from":"file:dist-pack/comfyorg-sdk-0.6.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./low":{"types":"./dist/low/index.d.ts","default":"./dist/low/index.js"},"./errors":{"types":"./dist/sdk/routerErrors.d.ts","default":"./dist/sdk/routerErrors.js"}},"license":"MIT","private":false,"scripts":{"lint":"oxlint .","test":"vitest run","build":"node scripts/gen-version.mjs && tsc","format":"oxfmt --write .","generate":"openapi-ts","typecheck":"tsc --noEmit","format:check":"oxfmt --check .","test:coverage":"vitest run --coverage","check:sdk-parity":"node scripts/sync-python-surface.mjs","check:spec-drift":"node scripts/check-spec-drift.mjs","sync:python-surface":"node scripts/sync-python-surface.mjs --write"},"version":"0.6.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"d769ccf7-a06a-47b8-bb92-175583f9ebb4"}},"homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"_resolved":"/home/runner/work/comfy-typescript-sdk/comfy-typescript-sdk/dist-pack/comfyorg-sdk-0.6.0.tgz","_integrity":"sha512-g0MopQ0zWlznC+HriEMd+itgs0pq4QZn19BtBvGYzMWh4PBPtBZHBZes/w4GnpVcdalClW7SSMaGK0dPOVC8rQ==","repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"_npmVersion":"12.2.3","description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","directories":{},"maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"huang47","email":"huge.huang+npm@gmail.com"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"dante01yoon","email":"bunggl@naver.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"sideEffects":false,"_nodeVersion":"22.23.5","dependencies":{"zod":"^4.4.3","hash-wasm":"^4.11.0","eventsource-parser":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.23.0","yaml":"^2.9.0","oxfmt":"^0.68.0","oxlint":"^1.62.0","vitest":"^4.1.0","@types/ws":"^8.18.2","typescript":"^6.0.3","@types/node":"^26.5.0","@hey-api/openapi-ts":"0.99.0","@vitest/coverage-v8":"^4.1.0"},"peerDependencies":{"ws":"^8.3.0"},"peerDependenciesMeta":{"ws":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.6.0_1795635037925_0.11938017875795992"}}},"time":{"created":"2026-07-21T20:12:56.411Z","modified":"2026-11-25T19:30:38.530Z","0.1.0":"2026-07-21T20:12:56.681Z","0.1.1":"2026-07-21T23:32:23.532Z","0.1.2":"2026-07-23T16:48:57.966Z","0.1.3":"2026-07-27T19:25:07.433Z","0.1.4":"2026-07-28T19:21:20.127Z","0.1.5":"2026-07-30T20:12:12.424Z","0.1.6":"2026-08-11T23:26:23.436Z","0.1.7":"2026-08-13T19:38:37.258Z","0.1.8":"2026-09-01T01:33:11.260Z","0.1.9":"2026-09-04T17:48:11.704Z","0.2.0":"2026-09-10T20:47:10.122Z","0.3.0":"2026-09-15T00:50:51.246Z","0.4.0":"2026-09-18T04:57:12.610Z","0.5.0":"2026-10-10T15:48:57.144Z","0.6.0":"2026-11-25T19:30:38.063Z"},"bugs":{"url":"https://github.com/Comfy-Org/comfy-typescript-sdk/issues"},"license":"MIT","homepage":"https://github.com/Comfy-Org/comfy-typescript-sdk#readme","keywords":["comfy","comfyui","diffusion","generative-ai","sdk","workflow"],"repository":{"url":"git+https://github.com/Comfy-Org/comfy-typescript-sdk.git","type":"git"},"description":"TypeScript SDK for running ComfyUI workflows via the Comfy API v2 (self-hosted, Comfy Cloud, serverless).","maintainers":[{"name":"terryjia","email":"terry@comfy.org"},{"name":"wei-hai-comfy","email":"wei@comfy.org"},{"name":"benceruleanlu-comfyorg","email":"ben@comfy.org"},{"name":"huang47","email":"huge.huang+npm@gmail.com"},{"name":"skishore23","email":"kishore@comfy.org"},{"name":"mattmillerai","email":"matt@miller-media.com"},{"name":"dante01yoon","email":"bunggl@naver.com"},{"name":"cbyrne","email":"cbyrne@comfy.org"}],"readme":"<div align=\"center\">\n\n<!-- Pinned to a commit SHA, not `main`: npm freezes each version's README text, so a\n     mutable ref would 404 on every already-published page if assets/ ever moves.\n     Re-pin this when assets/logo.svg changes. -->\n<img src=\"https://raw.githubusercontent.com/Comfy-Org/comfy-typescript-sdk/5ca3792f0e6c0d9d4ec58c0d9b411df51a71fd3e/assets/logo.svg\" alt=\"Comfy\" width=\"130\"/>\n\n<h1>comfy-typescript-sdk</h1>\n\n<p>\n  <strong>The TypeScript client for the <a href=\"https://docs.comfy.org\">Comfy API v2</a>.</strong><br/>\n  Submit a workflow, stream its progress, get your outputs — against self-hosted ComfyUI, Comfy Cloud, or serverless.\n</p>\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@comfyorg/sdk\"><img src=\"https://img.shields.io/npm/v/@comfyorg/sdk?style=for-the-badge&logo=npm&logoColor=white&label=npm\" alt=\"npm\"></a>\n  <a href=\"#requirements\"><img src=\"https://img.shields.io/badge/Node-%3E%3D22-339933?style=for-the-badge&logo=nodedotjs&logoColor=white\" alt=\"Node >=22\"></a>\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/TypeScript-5.8-3178C6?style=for-the-badge&logo=typescript&logoColor=white\" alt=\"TypeScript\"></a>\n  <a href=\"https://cloud.comfy.org\"><img src=\"https://img.shields.io/badge/Comfy_Cloud-cloud.comfy.org-211927?style=for-the-badge\" alt=\"Comfy Cloud\"></a>\n</p>\n\n---\n\nTypeScript SDK for running ComfyUI workflows via the **Comfy API v2**. The\nsame code runs against three surfaces — Comfy Cloud, a serverless\ndeployment, or a self-hosted ComfyUI (through\n[`comfy-api-proxy`](https://github.com/Comfy-Org/comfy-api-proxy)) — changing\nonly the `COMFY_BASE_URL` environment variable and an optional API key. It\nmirrors the behavior of the\n[Python SDK](https://github.com/Comfy-Org/comfy-python-sdk) (`comfy-sdk`):\nupload/dedup inputs, submit a workflow, wait for it, download the outputs —\ncollapsed here to a single async client (no separate sync/async API;\nJavaScript is async-native).\n\n```ts\nimport { Comfy } from \"@comfyorg/sdk\";\n\nconst client = new Comfy({ apiKey: \"...\" }); // Comfy Cloud\n// ...or set COMFY_API_KEY and write `new Comfy()` — the key is optional, the\n// environment variable is the fallback.\n// COMFY_BASE_URL=http://127.0.0.1:8189 targets a local proxy instead (no key needed)\n\nconst wf = await client.workflows.fromFile(\"workflow_api.json\");\nconst asset = client.assets.fromFile(\"photo.png\"); // lazy; hashed + uploaded on first use\nwf.setInput(\"10\", \"image\", asset); // \"10\" is a LoadImage node: bind handles to a loader's file widget\n\nconst job = await client.run(wf); // submit, then poll to a terminal state\nawait job.getOutputs(\"13\")[0].toFile(\"out.png\");\n```\n\n## Requirements\n\n- **Node >=22.** Node 20 reached end-of-life; browser support is out of\n  scope for v1.\n- **Install:**\n\n  ```bash\n  npm i @comfyorg/sdk\n  pnpm add @comfyorg/sdk\n  yarn add @comfyorg/sdk\n  ```\n\n  Releases are published to npm from a GitHub Release (tag `vX.Y.Z`) by\n  [`.github/workflows/publish.yml`](.github/workflows/publish.yml). To build\n  from source instead (for local development, or to track an unreleased\n  commit), clone this repo, `pnpm install`, `pnpm build`, and reference the\n  built `dist/`.\n\n## Auth, per surface\n\n| Surface                                                            | Auth                                                       |\n| ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| Self-hosted proxy (`comfy-api-proxy` in front of your own ComfyUI) | none — do **not** pass `apiKey`                            |\n| Comfy Cloud                                                        | `new Comfy({ apiKey: \"comfyui-...\" })`, or `COMFY_API_KEY` |\n| Serverless                                                         | `new Comfy({ apiKey: \"comfyui-...\" })`, or `COMFY_API_KEY` |\n\n`new Comfy()` resolves its credential at construction, in this order — the same\norder and the same variable the [Python SDK](https://github.com/Comfy-Org/comfy-python-sdk)\nuses, and the same variable `comfy.models.*` reads:\n\n1. The explicit `apiKey` option, when it is a non-blank string.\n2. Otherwise `COMFY_API_KEY` from the environment. Surrounding whitespace is\n   stripped and a blank value counts as unset, so `COMFY_API_KEY=` in a shell\n   profile is not an error, and a key read out of a file brings its trailing\n   newline along harmlessly. It is read **per construction**, so a process can\n   build successive clients under different credentials.\n3. Otherwise, targeting Comfy Cloud — which always requires a key — a\n   `MissingCredentials` thrown **at construction**, naming both ways to supply\n   one. No request is made: a missing credential reported as a server `401`\n   sends you looking at your key's validity instead of at its absence.\n\nPoint `COMFY_BASE_URL` at another deployment and step 3 changes: an unresolved\nkey is not an error there, and means \"send no credentials at all\" — a\nself-hosted ComfyUI behind `comfy-api-proxy` legitimately has none. Steps 1\nand 2 do **not** change: a `COMFY_API_KEY` in the environment is sent to\nwhatever `COMFY_BASE_URL` names, as the Python SDK does. For a keyless\ndeployment, leave `COMFY_API_KEY` unset in that process.\n\nA runtime with no `process` (a browser) never sees the variable, so there the\n`apiKey` option is the only source. `comfy.config({ credentials })` configures\nthe `comfy.*` namespace only — deliberately, so a process-global credential\ncannot leak into a multi-tenant server's per-request clients — and does **not**\nconfigure a class client. `COMFY_API_KEY` is process-global too, though: a\nblank or whitespace-only `apiKey` counts as unset (as in the Python SDK) and\nfalls through to it, so a per-request client in a process that sets\n`COMFY_API_KEY` should reject an empty tenant key before constructing.\n\nThe client only attaches the `Authorization` header to requests aimed at its\nown target deployment's origin. If the server hands back an absolute URL on a\ndifferent host (for example a job's `events`/`cancel` link, or a redirect on\nan asset download), the key is not sent there — see \"Typed errors\" below for\nthe exception classes this surface can raise.\n\nThe SDK identifies itself via `User-Agent` (for support + usage analytics);\nno other data is collected. Pass `clientInfo` to `new Comfy({ ... })`\nto append your own app's name to it, for example when attributing traffic\nfrom a Worker built on top of this SDK.\n\n## Module-level config (`comfy.config`) and `comfy.models`\n\nAlongside the class client there is a module-level namespace, for apps that\nconfigure credentials once at startup rather than threading a client through\nevery call site. Both import shapes reach the same members:\n\n```ts\nimport { comfy } from \"@comfyorg/sdk\";\n// or: import * as comfy from \"@comfyorg/sdk\";\n\ncomfy.config({ credentials: \"comfyui-...\" });\nconst { kind, data, requestId } = await comfy.models.run(\"bfl/flux-2-pro\", {\n  prompt: \"a cat\",\n});\n```\n\n`comfy.config({ credentials })` sets the credential for every subsequent\n`comfy.*` call in the process. If you set none, `COMFY_API_KEY` is read from\nthe environment instead — explicit config always wins, and the variable is\nread per call, so rotating it mid-run is picked up. A blank or\nwhitespace-only variable counts as unset, and a runtime with no `process` (a\nbrowser) simply never sees it. Pass `credentials: undefined` to clear a\nconfigured value and fall back to the environment again; passing an empty\nstring is an error rather than a silent clear.\n\nConfiguration is **process-global**, which is the point for a single-tenant\napp and the wrong tool for a multi-tenant server: if you need a different\ncredential per request, keep using `new Comfy({ apiKey })`, which resolves\nper instance and is unaffected by `comfy.config`.\n\nThe credential is held in a module-private binding and is never a property of\nanything the SDK hands back, so `JSON.stringify(comfy)`, `console.log(comfy)`\nand any error this SDK throws are all safe to paste into a bug report. The\nsame now holds for the class client: `console.log(client)` no longer prints\nthe `apiKey` you constructed it with.\n\nThere are two ways to run a model on this namespace — `run`, which waits, and\n`submit`, which queues — and they send the same request.\n\n### `comfy.models.run(model, input)`\n\n`model` is a canonical `{provider}/{model}` ID (`\"bfl/flux-2-pro\"`). `input`\nis the model's own native JSON input, forwarded to the provider unchanged —\nthere is no Comfy envelope to wrap it in, so an integration already written\nagainst the provider keeps the request body it already has.\n\nThe route this posts to (`/v2/models/{provider}/{model}`) and the host it posts to by default (`https://api.comfy.org`) are both pinned to the vendored Router contract in `spec/router-openapi.yaml`: `src/sdk/router-spec-contract.test.ts` and `pnpm check:spec-drift` compare them against that file's `runRouterModel` path and `servers[0].url`, so a sync PR that moves either one fails CI instead of leaving `run` to 404. When that happens, the vendored spec is the side that is right — update `RUN_ROUTE_TEMPLATE` in `src/sdk/models.ts` for the route and `COMFY_ROUTER_BASE_URL` in `src/sdk/credentials.ts` for the host.\n\nThe promise resolves **only when the generation is complete**. One call is the\nwhole contract: for a provider whose own API is submit-then-poll, the server\ndoes that polling inside the call rather than handing back a task handle, so\nthere is nothing to poll and no job to track. M1 returns the final result\nonly — no progress and no streaming.\n\nIt resolves to a `{ kind, data, requestId }` result, where `kind` tells you which of the route's two documented `200` shapes came back:\n\n- **`kind: \"json\"`** — the partner answered with a JSON document, which is what most of the catalog does. `data` is that document.\n- **`kind: \"binary\"`** — the partner's generation _is_ the response body, returned under the partner's own media type. `data` is a `Uint8Array` of the exact bytes and `contentType` carries that media type.\n\nCommon to both:\n\n- **`data`** is the provider's native payload, exactly as it came off the\n  wire. On the JSON branch it is typed `unknown` by default — deliberately not\n  `any`, which would silently switch type-checking off for every field you\n  touch. Per-model schemas are published by the server (each model serves its\n  own OpenAPI document), not baked into this package, so supply the type you\n  have: `await comfy.models.run<FluxOutput>(\"bfl/flux-2-pro\", { prompt })`.\n- **`requestId`** is the server's `X-Comfy-Request-Id` for the call — the value\n  to quote in a support request, surfaced so you never have to go reading\n  response headers to find one. It is `null` only when the response carried no\n  such header, which a proxy error page generated before the request reached\n  Comfy genuinely does not.\n\nNote this wrapper is a **deliberate difference from the Python SDK**, which\nreturns the payload directly. It matches the shape a TypeScript integration\nbeing ported from a comparable hosted-inference client already expects; it is\nan intentional asymmetry, not a parity gap.\n\n#### Binary results — a model that returns audio, image or video bytes\n\nThe run route's `200` has two branches in the contract: `application/json`, and `*/*` with `format: binary` for a partner whose generated file is the whole response. The ElevenLabs audio models (`elevenlabs/eleven_v3`, `elevenlabs/eleven_sfx_v2`) are the first of those in the catalog, and they answer with `audio/mpeg` bytes. `run` reads the response `Content-Type` before it touches the body and hands those bytes back untouched — not base64, not wrapped in an object:\n\n```ts\nimport { writeFile } from \"node:fs/promises\";\n\nconst result = await comfy.models.run(\"elevenlabs/eleven_v3\", {\n  text: \"[excited] Ship it!\",\n  output_format: \"mp3_44100_128\",\n});\n\nif (result.kind === \"binary\") {\n  // Node — straight to disk; `data` is a Uint8Array of the exact bytes.\n  await writeFile(\"dialogue.mp3\", result.data);\n\n  // Browser — hand it to an <audio> element, or download it.\n  const blob = new Blob([result.data], { type: result.contentType }); // \"audio/mpeg\"\n  const url = URL.createObjectURL(blob);\n} else {\n  // A JSON-answering model (most of the catalog) lands here.\n  console.log(result.data);\n}\n```\n\n`contentType` is the partner's own media type forwarded verbatim — remote input, not a value this SDK vouches for. A blob typed `text/html` or `image/svg+xml` and handed to `URL.createObjectURL` runs script in your origin the moment it is opened, so pin the type you expect — `new Blob([result.data], { type: \"audio/mpeg\" })` — anywhere the result might be navigated to rather than played.\n\nChecking `result.kind` is also what narrows the type: TypeScript will not let you pass `result.data` to `writeFile` until it knows the result is the binary one. If you know a given model's branch, assert it — `if (result.kind !== \"binary\") throw new Error(\"expected audio\")` — rather than casting.\n\nA media type is JSON if its subtype is `json` (`application/json`, and the `text/json` some providers still send) or carries the structured `+json` suffix; anything else is bytes. The response carries `X-Content-Type-Options: nosniff`, so the partner's declared type is taken at its word and never guessed at from the body. The one exception is a `2xx` that declares **no** `Content-Type` at all: that body is parsed as JSON if it parses, and is otherwise a binary result with `contentType: \"\"`. A response that says `application/json` and then isn't still raises `ComfyError` with `code: \"unexpected_response\"`.\n\nThe whole body is buffered in memory; there is no streaming surface yet.\n\nFailures raise a `ComfyError`, and `requestId` is on the error too — an error\nresponse is exactly when you need one, as are `retryAfter` (the pace the server\nnamed, when it named one) and `idempotencyKey` (the key the failed call went out\nunder, including one `run` minted for you). `code` carries the server's coarse\nfailure bucket (`model_not_found`, `invalid_input`, `provider_timeout`,\n`content_policy_violation`, ...), and the familiar buckets keep their existing\nclasses: `Unauthorized`, `Forbidden`, `InsufficientCredits`, and `NotFound`\nfor an ID that names no model. A model-level validation failure keeps its\nper-field detail on `error.details.detail`.\n\nA failure that never got a response — a dropped connection (undici's\n`TypeError` \"fetch failed\") or an aborted `signal` (`AbortError`) — is not a\n`ComfyError`, but it carries the same `idempotencyKey` as an own property,\nsince the key is the only handle on a call the server never answered.\n`requestId` reads `null` on it, and so does `retryAfter` unless `run` was\ncollecting, when it is the pace Router named. When several calls share one\n`AbortController`, each rejects with its own copy of `signal.reason` carrying\nits own key, so the error is not `=== signal.reason`; a reason the SDK cannot\ncopy faithfully (your own `Error` subclass, say) is re-thrown as is, unkeyed.\n\nAn `Idempotency-Key` is sent on every call; one is minted per call unless you pass your own. Every attempt within one call — the first and every retry — sends that same key, so a retry after a lost or 5xx-ed response is a replay rather than a second generation, and a second charge. Supplying your own key extends that across calls: a fresh `run` with a key you already used replays the original result instead of running the model again.\n\n```ts\nconst { data, requestId } = await comfy.models.run(\n  \"bfl/flux-2-pro\",\n  { prompt: \"a cat\" },\n  { timeoutMs: 300_000, signal: controller.signal },\n);\n```\n\n`run` accepts a third options argument: `signal`, `timeoutMs`, `maxBytes`, `idempotencyKey`, `retry`, and `respondAsync` (below).\n\nThe default deadline is **20 minutes** — minutes rather than seconds, because the finished generation is the response and a short default would abort work that had already been paid for. It covers the whole call, retries included, rather than restarting per attempt, which is also why it is twenty and not ten: Comfy's own deadline is ten minutes, so a default of ten would leave nothing for the collect described below. Pass `timeoutMs: null` to disable it, and prefer pairing that with a `signal`.\n\n#### Not holding the connection for a slow model — `respondAsync`\n\nA slow submit-and-poll model can keep `run`'s one HTTP connection open for minutes. `respondAsync: true` asks Comfy to hand such a call off to the queue instead, so no one connection has to stay open for the whole generation: the request carries `Prefer: respond-async` (RFC 7240), and when Comfy honours it — only for models its operators have enabled the handoff for — it answers `202` with `Preference-Applied: respond-async` and a queue handle. `run` then polls that handle (the same status and result reads as `comfy.models.handle`) and resolves to exactly the result it would have returned from a `200`. The polls collect the one generation the `POST` started; they never start or bill another.\n\n```ts\nconst { data } = await comfy.models.run(\"some/slow-model\", { prompt }, { respondAsync: true });\n```\n\nIt is off by default, and a call without it sends no `Prefer` header and keeps today's `200`. With it, a model the handoff is not enabled for still answers `200`, which `run` returns as usual. `timeoutMs` and `signal` bound the polling too; if either ends the call while the handed-off request is still running, `run` makes one best-effort cancel of it (as `subscribe` does) before rejecting — but not once the queue has reported it finished, since its result is still collectable. Failures keep `run`'s error contract: a handed-off request that fails rejects with the same `ComfyError` the `200` path would raise, and a rejection after the handoff carries the queued request's id on `details.queuedRequestId` for `comfy.models.handle` — except an abort whose `signal.reason` is an object the SDK cannot copy (such as your own `Error` subclass), which is rethrown untouched; re-run under the same `idempotencyKey` to recover the id. Retrying with the same `idempotencyKey` — with or without `respondAsync` — replays the handoff rather than starting a second generation, and `run` follows the replayed handle either way (Router marks the replay `Idempotent-Replayed`, and omits `Preference-Applied` when the retry sent no `Prefer`). Any other `202` that does not carry `Preference-Applied: respond-async` is still raised as `unexpected_response`.\n\n#### How much of a response it will buffer\n\nThe whole body is held in memory: one call resolves with one finished result, so there is no streaming surface to hand it to you through. `maxBytes` is the ceiling on that, defaulting to **64 MiB** (`DEFAULT_MAX_RESPONSE_BYTES`, exported) — comfortably above what the catalog returns today, and short of letting a pathological or mis-routed response allocate without bound in your process.\n\n```ts\n// A larger generation than the default allows for.\nawait comfy.models.run(\"some/video-model\", { prompt }, { maxBytes: 512 * 1024 * 1024 });\n\n// No cap at all — you would rather have the allocation than the error.\nawait comfy.models.run(\"some/video-model\", { prompt }, { maxBytes: null });\n```\n\nIt is checked twice, because the two checks catch different responses. A `Content-Length` over the cap is refused **before the body is read** and the connection is dropped, so the oversized response is never downloaded rather than downloaded and discarded. The bytes actually read are then counted against the same cap, since a chunked response declares no length at all and a declared one is a claim by the sender rather than a bound on it. The cap governs the **decoded** bytes: for a body `fetch` decompresses (`Content-Encoding` `gzip`, `deflate`, `br` or `zstd`) the `Content-Length` counts the compressed bytes on the wire, so it is not used to refuse early and only the read-side count applies — a compressed response declared past the cap that decodes inside it succeeds. Any other coding, `identity` included, reaches the reader undecoded, and its `Content-Length` still refuses before the read.\n\nA result over the cap raises a `ComfyError` with `code: \"response_too_large\"`, carrying `maxBytes` and the offending size on `details`. It is **not retried** — it is a verdict about the response rather than a transport failure, and re-asking would re-download the same oversized body on every attempt. Check `details.maxBytes` rather than the code alone if you branch on it: `code` on an error derived from a response is whatever the server's `X-Comfy-Error-Type` said, so an upstream can answer with the same string, and only a cap breach raised here carries `maxBytes`.\n\nThe cap never changes what a response _means_. A response `run` is going to retry or collect is classified from its status and headers, and its body is dropped unread — so an intermediary answering a `503` with a huge error page does not turn a retryable failure into a fatal one, and does not abandon a generation the server is still holding behind a `409`/`504`. An error response `run` does hand back is truncated instead of refused, so an oversized error body still arrives as `Unauthorized`, `InsufficientCredits`, or whatever bucket its status and header name. It is truncated at the cap or at 1 MiB, whichever is larger: a `maxBytes` chosen for small results does not cut short the error envelope a body-only `error_type` or a validation `detail[]` is parsed from, so with `maxBytes: 64` a 2,000-byte error body is still read in full.\n\n#### Retries\n\n| Setting                 | Default              | What it does                                                          |\n| ----------------------- | -------------------- | --------------------------------------------------------------------- |\n| `retry.budgetMs`        | `120_000` (2 min)    | Total wall clock, from the first attempt, in which retries may happen |\n| `retry.baseDelayMs`     | `500`                | Backoff before the first retry; doubles per attempt                   |\n| `retry.maxDelayMs`      | `8_000`              | Ceiling for one backoff, applied before jitter                        |\n| `retry.collectBudgetMs` | `1_200_000` (20 min) | Wall clock for the collect loop below, from the same first attempt    |\n\n**Only a transport failure or a 5xx is retried.** A `404`, `422`, or a `content_policy_violation` is the server's answer about this request, and sending it again buys the same verdict twice — so those raise immediately. A terminal bucket that arrives under a 5xx (`X-Comfy-Error-Type: content_policy_violation`) is treated the same way.\n\nThe bound is **elapsed time, not an attempt count**. On a route that holds the connection for the whole generation, \"3 retries\" says nothing about how long the call can take; a clock does. Each backoff is jittered — half the delay fixed, half random — so clients that failed against the same incident do not re-land on the recovering server as one wave. When the budget runs out, the last failure the server actually gave is what raises.\n\nTwo attempts is a good rule of thumb for the default budget against a slow surface, and dozens against a fast-failing one; that is the point of budgeting by clock rather than by count.\n\nPass `retry: false` for a single attempt, or narrow it per call:\n\n```ts\nawait comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { retry: false });\nawait comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { retry: { budgetMs: 30_000 } });\n```\n\n#### Collecting a generation after a lost response\n\nThere is a second, narrower loop underneath the retries, and the server is the one that asks for it. Two answers mean \"the generation your `Idempotency-Key` already names has not finished — wait, then ask again for THAT one\", and Comfy pairs each with a `Retry-After` saying how long to wait:\n\n- a **`409`** carrying `X-Comfy-Error-Type: concurrency_limit_exceeded` — an earlier attempt of this same call is still in flight. It is what a re-send after a dropped connection meets, and it is not the same thing as the `429` that shares the bucket, where the workspace slot pool is full and nothing is running under your key.\n- a **`504`** carrying `X-Comfy-Error-Type: deadline_exceeded` — Comfy stopped holding the connection at its own ten-minute bound while the provider carried on generating.\n\n`run` collects those for you rather than raising them: it waits the interval the server named, re-sends the same key, and resolves with the generation when it arrives — no second dispatch, and no second charge. Nothing needs enabling.\n\nIt gets **its own budget**, `collectBudgetMs`, defaulting to twenty minutes, because a collect has to outlast the deadline that produced it: a `504` arrives AT Comfy's ten-minute bound, so a two-minute budget measured from the first attempt is long spent by then and the collect it exists for could never start. The ordinary `budgetMs` is unchanged by this — a refused connection still gives up after two minutes.\n\nThree things bound it, and the call's own `timeoutMs` is the outermost:\n\n```ts\n// The default deadline (20 min) is what makes room for a 504 collect. A\n// SHORTER one wins over collectBudgetMs and forfeits that collect, since the\n// 504 cannot arrive before a deadline under ten minutes has already fired.\n// The 409 collect still works inside a short deadline: it arrives in\n// milliseconds, not at a ten-minute bound.\nawait comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { timeoutMs: 60_000 });\n\n// Switch the collect off and have those answers raised instead, leaving\n// ordinary retries alone. `retry: false` switches off both.\nawait comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { retry: { collectBudgetMs: 0 } });\n```\n\nA `409` that carries **no** `Retry-After` is not this: it is the contract's deterministic key refusal — the key names a different request, or its answer can no longer be replayed — and the answer is a new key, not a wait. It raises on the first attempt.\n\nWhen the collect budget (or the deadline) runs out, the server's own last answer is what raises, never a synthetic \"retries exhausted\" — and it carries what a manual re-ask needs:\n\n```ts\ntry {\n  await comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { idempotencyKey: myKey });\n} catch (err) {\n  // `retryAfter` alone means \"wait\": a 429 throttle carries one too. These two\n  // codes are the ones where the wait is for a generation still running under\n  // your key.\n  if (\n    err instanceof ComfyError &&\n    err.retryAfter !== null &&\n    (err.code === \"concurrency_limit_exceeded\" || err.code === \"deadline_exceeded\")\n  ) {\n    // Still running. Ask again later under err.idempotencyKey — the same key —\n    // and Comfy hands back that generation instead of starting another.\n    console.log(err.code, err.httpStatus, err.retryAfter, err.idempotencyKey);\n  }\n}\n```\n\nThis mirrors the Python SDK's collect loop (`is_collectable` / `collect_max_elapsed` in `comfy_sdk/retry.py`), sized the same way; `src/sdk/surface-parity.test.ts` compares the two budgets so they cannot drift apart.\n\n#### Cancelling a call\n\nBecause the server holds the connection for the whole generation, \"stop this one\" is an ordinary request rather than an edge case — and it is also the cheap exit, since a call the client disconnects from is not billed. `signal` is what makes that reach the server:\n\n```ts\nconst controller = new AbortController();\ndocument.querySelector(\"#cancel\")?.addEventListener(\"click\", () => controller.abort());\n\nawait comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" }, { signal: controller.signal });\n```\n\nThe abort aborts the underlying connection, so the server observes a disconnect rather than a client that merely stopped listening, and it stops the retry loop between attempts as well as during one. It rejects with the standard `AbortError` — your own abort, re-thrown untouched rather than dressed up as an SDK error, so `err.name === \"AbortError\"` tells \"I cancelled this\" apart from a transport failure (a `TypeError`) and from this SDK's own deadline (a `ComfyError` with `code: \"request_timeout\"`).\n\n### `comfy.models.submit(model, input)` — queue it, collect it later\n\n`run` holds one connection open until the generation is finished. When the caller cannot wait that long — a web request that has to return now, a worker that submits in one process and collects in another, a batch that should be in flight all at once — submit it to the queue instead:\n\n```ts\nconst handle = await comfy.models.submit(\"bfl/flux-2-pro\", { prompt: \"a cat\" });\n\nhandle.requestId; // with the model id, all another process needs\n(await handle.status()).status; // 'IN_QUEUE' / 'IN_PROGRESS' / 'COMPLETED'\nconst { data } = await handle.get(); // waits, then returns the provider payload\n```\n\n`submit` sends the same request `run` does — the same model id, the same native body, the same `/v2/models/{provider}/{model}` prefix with a `requests` collection under it — and resolves as soon as the server has **accepted** it. The queue is the server's: ordering, admission, retries, timeouts, billing and expiry are all decided there, and this SDK adds polling and ergonomics on top of it and nothing else.\n\nThe handle carries four operations:\n\n| Operation                 | What it does                                                                                                                                                |\n| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.status()`         | one authoritative poll, resolved as a `QueueUpdate` (`status`, `completed`, `queuePosition`, `errorType`, `retryAfterMs`, `raw`)                            |\n| `handle.get(options?)`    | poll to completion, then resolve to `{ data, requestId }` — the same `RunResult` shape `run` returns, with the provider's own payload in `data`             |\n| `handle.cancel()`         | ask the server to cancel, as a `PUT`. A request, not a guarantee: a request that already completed stays completed, and the next `status()` is what is true |\n| `handle.events(options?)` | the poll loop with its updates exposed — an async iterable yielding the first observation, every change of status or queue position, and the completion     |\n\nPolling is **poll-authoritative**: there is no stream to reconcile against on this surface, and `events()` is the poll loop rather than SSE. It backs off adaptively, and a `Retry-After` the server names on a poll beats that schedule — the server knows its own pace — capped at 60 seconds so one header cannot park a caller behind it.\n\nThe result route's `200` declares the same two branches as the run route's, and `get()` (and `subscribe`) branch on its `Content-Type` exactly as `run` does: a model whose partner answers with its own media type resolves to the [`kind: \"binary\"`](#binary-results--a-model-that-returns-audio-image-or-video-bytes) arm. Router refuses binary models at submit today, so a queued result is JSON in practice; the binary arm is there for when that changes. The result is read within the same `maxBytes` cap as `run`'s (64 MiB by default, `null` to disable), and `get()` and `subscribe()` both take it per call. A result past the cap rejects with `response_too_large` and stays collectable, so another `get()` with a larger cap can still fetch it. The cap counts decoded bytes, not time or bytes on the wire, and unlike `run` the queued wait has no default deadline: pass `timeoutMs` or a `signal` to bound a result download that stalls or never decodes to anything.\n\n**A `200` is not the same thing as a success here.** The server reports a failed _and_ a cancelled request as `COMPLETED` carrying an `error_type`, so `get()` rejects with the matching typed exception from [`routerErrors`](#router-errors-comfymodelsrun) rather than handing the failure back as a result. `events()` deliberately does not reject **for that case** — a completion carrying an `error_type` is yielded as an observation, because `events()` is a view of the queue's progress and `get()` is the one that collects. It can still reject for reasons that are not the request's own outcome: a transport failure, an exhausted `timeoutMs`, or an aborted `signal`. So keep those handlers; it is only the completion error that arrives as data rather than a throw.\n\nWhen the server quotes the request on admission, the quote is on `handle.estimate` — a `CostEstimate`, priced in US dollars at Comfy's standard list price (or, for a model billed the cost its vendor reports, from the vendor's published price list):\n\n```ts\nconst { estimate } = handle;\nif (estimate?.isExact) console.log(`$${estimate.amount}`);\nelse if (estimate?.isEstimated) console.log(`$${estimate.minAmount}–$${estimate.maxAmount}`);\nelse if (estimate?.isFree) console.log(\"free\");\n```\n\nRead `isExact` / `isEstimated` / `isFree` / `isUnknown` rather than `source`: `source` is the server's open string, and a value this release does not recognise reads as unknown. An unknown quote's `reason` is `not_quotable`, `unpriced_model`, `byok` (your own provider key — Comfy bills nothing) or `pricing_unavailable` (transient; the run is still charged); read any other value as `not_quotable`. Dollar figures (`amount`, `minAmount`, `maxAmount`) are decimal **strings**, so nothing is rounded; the `*Cents` and `credits` figures are numbers for arithmetic, and `raw` is the object as sent. It is a quote, not the charge: not a price lock — the run is charged at the rates in force when it is rated (`pricingAsOf` says when the quote's rate card was read) — not your contract rate if your workspace has negotiated pricing, and not what a vendor-reported model is billed, which is the cost the vendor reports after the run. `estimate` is `null` when no quote is available: the server sent none, sent one this SDK could not read (the submit still succeeds), the submit was an idempotent replay (the original quote is not stored), or the handle was rebuilt with `comfy.models.handle`. **`null` never means free.**\n\nWhen a `model_provider` leg will drop native input fields it cannot express, the acceptance says so, and the handle carries it on `handle.droppedParams` — one entry per field and why, read exactly as `run` reads its own `X-Comfy-Router-Dropped-Params`. The queued status and result routes never carry it, so the result `handle.get()` and `comfy.models.subscribe` resolve to carries the acceptance's disclosure on its own `droppedParams`. It is `null` when nothing was said, including on a handle rebuilt with `comfy.models.handle`, and unlike `estimate` an idempotent replay still carries one — but it is the disclosure that submit response received, which Router may recompute on replay, so after a translator update it can differ from what the original submission was told.\n\nRebuild a handle in another process from the two ids that address the request, with no call made:\n\n```ts\nconst handle = comfy.models.handle(\"bfl/flux-2-pro\", requestId);\nconst { data } = await handle.get();\n```\n\nBoth ids are needed because both address the route (`/v2/models/{provider}/{model}/requests/{request_id}`), and both are validated locally before anything is sent — a malformed model id, or a `requestId` that is not one printable path segment of at most 256 characters, throws a `TypeError` rather than being pasted into a URL.\n\n### `comfy.models.subscribe(model, input, options)` — submit, follow, collect\n\n```ts\nconst { data } = await comfy.models.subscribe(\n  \"bfl/flux-2-pro\",\n  { prompt: \"a cat\" },\n  {\n    onQueueUpdate: (update) => console.log(update.status, update.queuePosition),\n    timeoutMs: 300_000,\n  },\n);\n```\n\n`submit` + poll + `get`, in one call, for a caller who does want to wait but also wants to show progress. It resolves to the same `{ data, requestId }` `run` would have returned. `onQueueUpdate` is awaited if it returns a promise, so an `async` callback finishes before the next poll; an exception it raises propagates and abandons the wait, and the request keeps running server-side.\n\n`timeoutMs` is a **client-side** bound with no server-side meaning — the queue's own timeouts are the server's. It covers the submit, every poll, every retry of one, the pauses between them, and the result fetch. It does **not** cover time spent inside your own `onQueueUpdate` callback: the deadline and `signal` are checked by the poll loop, and a callback is awaited between polls, so a callback that returns a promise which never settles parks `subscribe` indefinitely and neither the timeout nor an abort will fire. That is deliberate and matches how a callback that _throws_ is treated — it is your code, and tearing down a healthy request because of it would be destructive — but it means an `async` `onQueueUpdate` should carry its own bound. When it runs out — or when `signal` aborts — `subscribe` makes one best-effort `cancel()`, so a caller who has stopped waiting is not also still paying for a generation nobody will collect, and then rejects. **That applies only once the submit has returned a handle**: `subscribe` submits before it has anything to cancel, so a deadline that expires during the submit itself — or a submit the server accepted whose response was lost — leaves a request running with no handle to address it. That window is what `idempotencyKey` below is for: re-submitting under the same key replays the original acceptance and returns the same request rather than queueing a second one, which is the only way back to an id that was lost with its reply. Best-effort is literal: a cancel that itself fails is swallowed, because the timeout is the failure worth reporting and a masked one sends you looking in the wrong place. Use `submit` when the request should outlive the caller's patience.\n\nThe same bound is available on `handle.get()` and `handle.events()`, where it rejects **without** cancelling: the queue is the server's, and a local clock running out says nothing about it. The first poll is always made, so `timeoutMs: 0` reads \"look once\".\n\nEach `submit` **call** mints one fresh `Idempotency-Key`: two deliberate submits of the same input are two requests, while a transport-level retry inside one call keeps the one key and replays the original acceptance rather than queueing a second generation. Pass `idempotencyKey` to choose it yourself — the case that earns it is a lost response, where the request may have been accepted and its id lost with the reply. Every failure past the argument checks carries the key the call went out under on `err.idempotencyKey`, a minted one included, the same way `run`'s do.\n\nThis surface is **gated server side**. A caller the queue is not switched on for is answered `403 not_enabled`, which arrives as `routerErrors.NotEnabled` — nothing about the request is wrong, and it is terminal, so it is not retried.\n\n> The queued methods raise `routerErrors.*` rather than the `ComfyError` family `run` maps its failures into. That difference is deliberate and matches the Python SDK: a queue failure is reported as an `error_type` inside a `200` body, where there is no HTTP status to classify and the bucket is the only thing there is.\n\n### Image to image — upload an asset first\n\nAn image-to-image model takes an image _as input_, and Router forwards the\nmodel's native body unchanged — so the image goes in whatever form the\nprovider documents. Most URL-taking models want a URL the provider can fetch,\nand your local file doesn't have one yet. Give it one by uploading it as an\nasset and handing the model the asset's download URL:\n\n```ts\nimport { Comfy, comfy } from \"@comfyorg/sdk\";\n\n// Both surfaces read COMFY_API_KEY when nothing was passed, so one variable\n// in the environment configures this whole snippet.\nconst client = new Comfy();\n\n// 1. Upload the local image (dedup-aware; a re-run re-uploads nothing) and\n//    resolve a short-lived, self-authorizing signed URL for it.\nconst asset = client.assets.fromFile(\"photo.png\");\nconst { url } = await asset.getDownloadUrl();\n\n// 2. Pass that URL wherever the model's own input schema takes an image.\nconst { data } = await comfy.models.run(\"wan/wan2.5-i2i-preview\", {\n  input: { images: [url], prompt: \"Make it golden.\" },\n  parameters: { size: \"768*768\" },\n});\n```\n\n`Asset.getDownloadUrl()` commits the asset if needed (hash → dedup probe →\nupload, exactly like submitting it in a workflow) and resolves to the same\n`{ url, expiresAt }` as an output's `getDownloadUrl()`: on Comfy Cloud /\nserverless a signed storage URL any fetcher can read until `expiresAt`\n(`null` when the URL carries no expiry the SDK can read) — which is what\nlets the provider behind Router pull your image without your API key. Mind\nthe two caveats that follow from that: the URL is short-lived, so resolve it\nright before the run rather than storing it; and on a _self-hosted_ backend\nthe URL is the auth-guarded content endpoint, which an external provider\ncannot fetch — upload to Comfy Cloud (the default assets surface) for Router\ninputs.\n\nSome models take images inline instead of by URL — `bfl/flux-2-pro`'s\n`input_image` is base64, for example — and then there is nothing to upload:\n\n```ts\nimport { readFileSync } from \"node:fs\";\n\nconst imageB64 = readFileSync(\"photo.png\").toString(\"base64\");\nconst { data } = await comfy.models.run(\"bfl/flux-2-pro\", {\n  prompt: \"make it watercolor\",\n  input_image: imageB64,\n});\n```\n\nWhich form a model takes is in its input schema, which\n`comfy.models.schema(model)` fetches for you (below), or the model's page in\nthe [Router model catalog](https://docs.comfy.org/development/comfy-router/models).\n\n### Discovering models — `comfy.models.list()` and `comfy.models.schema()`\n\nYou do not have to know a model ID (or its arguments) up front. `list()` walks\nthe catalog `run()` accepts IDs from, and `schema()` returns the OpenAPI\ndocument Router publishes for one model — so listing the catalog, reading one\nmodel's schema and running it are three calls on the same namespace, with the\nsame credential, base URL, error mapping and `requestId` capture:\n\n```ts\nimport { comfy } from \"@comfyorg/sdk\";\n\ncomfy.config({ credentials: \"comfyui-...\" });\n\n// Every model, across every page — `list()` follows the cursor for you.\nfor await (const model of comfy.models.list()) {\n  console.log(model.id, model.provider, model.model);\n}\n\n// One model's published input AND output schemas, as an OpenAPI document.\nconst result = await comfy.models.schema(\"bfl/flux-2-pro\");\nif (!result.unchanged) {\n  console.log(Object.keys(result.document as Record<string, unknown>));\n}\n\nconst { data } = await comfy.models.run(\"bfl/flux-2-pro\", { prompt: \"a cat\" });\n```\n\n**`list()` iterates models, not pages.** The catalog is cursor-paginated with\na server-chosen page size (20 at the time of writing), so a method that handed\nback one page would make \"the first twenty models, with no error to say so\"\nthe default outcome. Nothing is sent until the iteration starts, and each\niteration is a fresh walk.\n\nIf you are driving your own pagination — a \"load more\" button, say — take one\npage instead. Paginate by what came back, never by the `limit` you asked for:\na value above the server's maximum is clamped rather than refused.\n\n```ts\nconst page = await comfy.models.list({ limit: 50 }).page();\npage.data; // CatalogModel[]\npage.hasMore; // the ONLY thing that says the walk is over\npage.nextCursor; // opaque — round-trip it, never parse it\npage.limit; // the size actually served, which may be smaller than 50\n\n// `hasMore` is the guard, not a formality: at the end of the walk\n// `nextCursor` is `null`, and `list` ignores a null cursor — so following it\n// unguarded silently re-serves page one.\nconst next = page.hasMore ? await comfy.models.list({ cursor: page.nextCursor }).page() : null;\n```\n\n**`schema()` revalidates with `ETag`.** The route ships `ETag` and\n`Cache-Control` precisely so a client can cache a document and re-check it\ncheaply, and a per-model schema changes rarely. Store the tag next to your\ncopy and pass it back; a `304` resolves as an explicit `unchanged: true`\nrather than throwing or handing you an empty document:\n\n```ts\nlet cached: { document: unknown; etag: string | null } | undefined;\n\nconst fresh = await comfy.models.schema(\"bfl/flux-2-pro\", { etag: cached?.etag });\nif (!fresh.unchanged) cached = { document: fresh.document, etag: fresh.etag };\n// else: `cached` is still current, and no document crossed the wire.\n```\n\nThe document is returned as **data** and is not validated here — no validator\nis a dependency of this package. That is deliberate: these are OpenAPI 3.0.2\ndocuments, so JSON Schema draft-04 plus `nullable`, which stock Ajv does not\ncover; a consumer that validates against one wants `ajv-draft-04` and its own\ndecisions about it. Type the document yourself if you have a type for it —\n`schema<OpenAPIV3.Document>(...)` — exactly as `run<TData>` takes one.\n\nBoth routes are pinned to the vendored contract the same way `run`'s is: the\nroute-coverage check in `src/sdk/router-spec-contract.test.ts` maps every\noperation `spec/router-openapi.yaml` declares to the `comfy.models` method\nthat calls it, so the next route a sync adds fails CI rather than sitting\nunreachable.\n\n### Pointing `comfy.models` somewhere else\n\n`comfy.models` talks to the Comfy API host that fronts the model router\n(`https://api.comfy.org`), which is **not** the same surface `new Comfy()`\ntalks to: that one speaks the Comfy API v2 job/asset routes, which a\nself-hosted proxy or a serverless deployment also serves. They are two\nsettings, and pointing one at the other 404s.\n\nSet `comfy.config({ baseUrl })`, or the `COMFY_ROUTER_BASE_URL` environment\nvariable, to reach a staging deployment or a local stub — explicit config\nwins, and a value that is not an http(s) URL without query or fragment is an\nerror rather than a silent fallback to the default. `COMFY_BASE_URL` is the\nclass client's setting and is untouched by this.\n\n**To run a workflow _graph_** — your own ComfyUI node graph rather than a\npartner model — use the class client instead: `await new Comfy({ apiKey\n}).run(workflow)`, as in the Quickstart below.\n\n### Realtime sessions — `comfy.realtime.connect()`\n\nComfy Router serves its realtime models over a WebSocket, and publishes how\nto reach each one on its catalog entry: an optional `realtime` block with the\n`connect_url` path, `method`, `transport`, `wire_format` and accepted `auth`.\n`comfy.realtime.connect(model)` reads that block, opens `connect_url` on the\nsame host `comfy.models` uses, authenticates the upgrade with a method the\nblock lists, and resolves with the open socket. Comfy picks the serving leg;\nyou never name one. No codec is bundled: `session.wireFormat` says whether\nthe model speaks MessagePack binary frames (for example\n`xai/grok-voice`) or JSON text frames (`google/genie-4`), and\n`session.realtime` carries the whole block, including the informational\n`billingUnit` and `maxSessionSeconds`.\n\nIn Node, install the optional `ws` peer dependency so a refused upgrade raises\nthe typed Router error (`routerErrors.InsufficientCredits`,\n`routerErrors.ConcurrencyLimitExceeded`, ...) with its `refusalCode`; without\nit, Node's built-in `WebSocket` is used and a refusal raises\n`RealtimeUpgradeFailed`, because that transport does not expose the status.\n\n```ts\nimport { comfy } from \"@comfyorg/sdk\";\nimport { decode, encode } from \"@msgpack/msgpack\"; // your choice of codec\n\ncomfy.config({ credentials: \"comfyui-...\" }); // or COMFY_API_KEY\n\nconst voice = await comfy.realtime.connect(\"xai/grok-voice\");\n// listen before any other `await`: frames sent on connect arrive right after\nvoice.socket.binaryType = \"arraybuffer\";\nvoice.socket.addEventListener(\"message\", (event) => {\n  if (event.data instanceof ArrayBuffer) console.log(decode(event.data));\n});\nvoice.socket.send(encode(message)); // the model's own message shape\n// ...\nvoice.close();\n```\n\nA JSON session is the same call, with text frames instead. Only one\nsession may be live at a time, and `close()` returns as soon as the close has\nstarted, so wait for the socket's `close` event before opening the next one:\n\n```ts\n// after voice.close(): wait for it to finish closing (3 is CLOSED)\nif (voice.socket.readyState !== 3) {\n  await new Promise((resolve) => voice.socket.addEventListener(\"close\", resolve));\n}\nconst genie = await comfy.realtime.connect(\"google/genie-4\");\ngenie.socket.addEventListener(\"message\", (event) => {\n  if (typeof event.data === \"string\") console.log(JSON.parse(event.data));\n});\ngenie.socket.send(JSON.stringify(message)); // the model's own message shape\n// ...\ngenie.close();\n```\n\nA browser cannot put an API key on a WebSocket upgrade, so it authenticates\nwith a signed-in user's ID token, which travels as a subprotocol entry:\n\n```ts\nconst session = await comfy.realtime.connect(\"google/genie-4\", { idToken });\n```\n\nSessions are **billed per second**; when billing starts depends on the model\n(other than `google/genie-4`, models bill from the moment the upgrade\nsucceeds). A `google/genie-4` session gets a short grace period, set by Router:\nif the first frame arrives within it, billing starts at that frame, and a\nsession that ends within it without a frame is not billed. Once it passes with\nno frame, the session is billed from the upgrade, so a stalled session does not\nstay free — close it. Router allows **one live WebSocket session per\nworkspace** — a second one is refused with `429` (`refusalCode`\n`router.realtime.session_already_live`) until the first is released, so close a\nsession you are done with (or pass a `signal`). That release can trail the\nsocket's `close` event briefly, so treat this `429` as retryable: wait (for its\n`retryAfter`, when set) and connect again. The upgrade itself is bounded by\n`timeoutMs` (default 30 seconds, `null` to disable), which rejects with\n`code: \"request_timeout\"` and never bounds an open session; on `ws`, a refusal\nwhose status arrived in time but whose body did not still raises its typed\nRouter error.\n\n`connect` only opens what the catalog says is a WebSocket upgrade (`GET`,\n`websocket` or `websocket_media_frames`). A model whose entry has no `realtime`\nblock is refused with `code: \"realtime_unsupported_model\"`; one served another\nway — a `POST` `session_post` mint, or a `webrtc` session — is refused with\n`code: \"realtime_unsupported_transport\"`, and the error's `details.realtime`\ncarries the block so you can reach the route yourself. Both happen before any\nsocket opens. `readRealtimeBlock(entry)` reads the same block off any\n`comfy.models.list()` entry.\n\n### Module formats\n\nThe package is **ESM-only** — it publishes no CommonJS build, and its\n`exports` map has a single `default` condition. In practice:\n\n- ESM consumers (`import`): supported, the primary path.\n- CommonJS consumers on Node >= 22.12: `require(\"@comfyorg/sdk\")` works via\n  Node's built-in `require(esm)`. In TypeScript this needs `\"module\":\n\"nodenext\"`; under `\"module\": \"node16\"` a static import from a CommonJS\n  file is rejected (`TS1479`) and you need `await import(\"@comfyorg/sdk\")`.\n- Node 22.0-22.11 CommonJS: use `await import(\"@comfyorg/sdk\")`.\n\n## Targeting another deployment\n\n`new Comfy()` points at Comfy Cloud and takes no base-URL argument. To run\nagainst a serverless deployment or a self-hosted instance behind\n`comfy-api-proxy`, set `COMFY_BASE_URL` in the environment:\n\n```bash\nexport COMFY_BASE_URL=\"https://<deployment>.run.comfy.app\"  # serverless\nexport COMFY_BASE_URL=\"http://127.0.0.1:8189\"               # self-hosted proxy\n```\n\nIt is read each time a client is constructed, must be an `http(s)` URL, and\nan unset or blank value (including whitespace-only) means Comfy Cloud.\n\nIt also decides whether a missing credential is an error: see \"Auth, per\nsurface\" above. Comfy Cloud is matched by normalized origin and path rather\nthan by string, so `https://cloud.comfy.org:443` is still Comfy Cloud, while a\ndeployment mounted under that host (`https://cloud.comfy.org/self-hosted`) is a\ndifferent target and may go keyless.\n\nUpgrading from an earlier version: `new Comfy(url, opts)` becomes\n`new Comfy(opts)` with `COMFY_BASE_URL` set. A positional string now throws a\n`TypeError` rather than being silently ignored.\n\n## Quickstart\n\n```ts\nimport { Comfy } from \"@comfyorg/sdk\";\n\nconst client = new Comfy({ apiKey: \"comfyui-...\" });\n\nconst wf = await client.workflows.fromFile(\"workflow_api.json\");\nconst job = await client.run(wf); // submit + poll to a terminal state; throws on failure\nconst outputs = job.getOutputs(\"13\"); // outputs produced by node \"13\"\nawait outputs[0].toFile(\"out.png\");\n```\n\n`run()` submits and polls to completion in one call. If you want to act on\nthe job in between (read `job.status`, stream progress, cancel it), use\n`submit()` and drive the job yourself:\n\n```ts\nconst job = await client.submit(wf);\nawait job.wait(); // poll to terminal (adaptive backoff); or call job.refresh() yourself\nconsole.log(job.status, job.outputs);\n```\n\n## Building a workflow\n\n`client.workflows` has three constructors for the same API-format graph, so\nthe graph does not have to be a file on disk:\n\n| Constructor                             | Input                                                        |\n| --------------------------------------- | ------------------------------------------------------------ |\n| `await client.workflows.fromFile(path)` | a JSON file on disk (the only async one — it reads the file) |\n| `client.workflows.fromJson(graph)`      | an already-parsed graph object, used as-is (not copied)      |\n| `client.workflows.fromString(text)`     | JSON text you already hold in memory                         |\n\n`fromJson` is the one to reach for when your app builds the graph in code —\na template it fills in per request — rather than shipping a\n`workflow_api.json` next to it:\n\n```ts\nconst wf = client.workflows.fromJson({\n  \"4\": {\n    class_type: \"CheckpointLoaderSimple\",\n    inputs: { ckpt_name: \"v1-5-pruned-emaonly.safetensors\" },\n  },\n  \"6\": { class_type: \"CLIPTextEncode\", inputs: { text: \"\", clip: [\"4\", 1] } },\n  // … the rest of the graph\n  \"9\": { class_type: \"SaveImage\", inputs: { filename_prefix: \"ComfyUI\", images: [\"8\", 0] } },\n});\n\nwf.setInput(\"6\", \"text\", \"a red fox in the snow\"); // fill the prompt in per request\nconst job = await client.run(wf);\n```\n\nAll three return the same `Workflow`, so everything else — `setInput`,\nembedded asset handles, `run`/`submit` — behaves identically no matter how\nthe graph was constructed. The graph is the **API format** (ComfyUI's \"Save\n(API Format)\"): an object keyed by node id, where a link to another node's\noutput is `[nodeId, slotIndex]`. It stays a plain mutable object as\n`wf.json` if you would rather edit it directly, and `setInput(nodeId, field,\nvalue)` is sugar for `wf.json[nodeId].inputs[field] = value` that also\naccepts an asset handle. None of the three validates the graph — a UI-format\nexport is caught at submit time, where it throws `WorkflowFormatUi` locally\nbefore any request goes out.\n\n## Partner (API) node auth\n\nWorkflows that use partner/API nodes (Gemini, etc.) need a Comfy API key to\nauthenticate them. Pass it per submit with `apiKey`. This is **not** the same as\nthe credential you construct `Comfy` with: the constructor key authenticates\n_you_ to the server, while this one authenticates the partner nodes _inside_ the\nworkflow (it is often the same `comfyui-…` key):\n\n```ts\nconst job = await client.run(wf, { apiKey: \"comfyui-…\" });\n// or: await client.submit(wf, { apiKey: \"comfyui-…\" });\n```\n\nThe SDK sends it once as `extra_data.api_key_comfy_org` alongside the workflow —\none key authenticates every partner node in the graph. It is never logged or\npersisted by the SDK. Omit `apiKey` and no `extra_data` is sent at all.\n\n## Assets and `core/ASSET`\n\n`client.assets.fromFile(path)` / `client.assets.fromBytes(data, options)`\nreturn a **lazy** asset handle: nothing is hashed or uploaded until the\nhandle is actually used. Embed the handle directly in a workflow input with\n`wf.setInput(...)`:\n\n```ts\nconst asset = client.assets.fromFile(\"photo.png\");\nwf.setInput(\"10\", \"image\", asset); // \"10\" is a LoadImage node: see below\n```\n\nAn asset handle resolves to a **filename** on the server, not to decoded\nmedia. Bind it only to an input that takes a filename: the file widget of a\nloader node (`LoadImage.image`, `LoadVideo.file`, `LoadAudio.audio`,\n`Load3D.model_file`, or a custom node's own filename widget), then link that\nloader's output into the node that needs the tensor. Binding a handle directly\nto an `IMAGE`, `VIDEO`, `AUDIO` or `MASK` socket, including grouped\npartner-node inputs such as `model.reference_images.image_1`, is accepted at\nsubmit but fails at execution because the node receives a string.\n\n```ts\n// \"10\" is a LoadImage node: its `image` widget takes a filename, so bind the handle there.\nwf.setInput(\"10\", \"image\", asset);\n// \"11\" is the consumer: link LoadImage's decoded IMAGE output ([nodeId, outputIndex]) into it.\nwf.setInput(\"11\", \"image\", [\"10\", 0]);\n```\n\nOn submit, the SDK walks the workflow graph, finds every embedded handle,\nand for each one: hashes the bytes locally (blake3, via\n[`hash-wasm`](https://www.npmjs.com/package/hash-wasm) — pure WebAssembly,\nno native addon), probes the server's dedup fast path, and only streams a\nfull upload if the server does not already have those bytes. Each handle is\nthen substituted in place with a `core/ASSET` reference\n(`{ __type: \"core/ASSET\", info: { id, hash, file_path } }`) before the\nworkflow is sent. Re-running a script against unchanged files re-uploads\nnothing.\n\n`client.assets` also has `fromStream`, `fromUrl`, and `get(assetId)` (to\nrehydrate a handle for an asset that is already committed) for less common\ncases — see the type definitions for details.\n\nAn uploaded asset can also hand out a directly-fetchable URL for its bytes —\n`asset.getDownloadUrl()`, the same `{ url, expiresAt }` an output resolves to\n(it commits first if needed). That is how a local image reaches a service\nthat fetches by URL, e.g. an image-to-image model behind Comfy Router — see\n[Image to image — upload an asset first](#image-to-image--upload-an-asset-first).\n\nA committed asset also exposes `jobId` — the ID of the job that produced it,\n`undefined` for an asset no job produced, such as a fresh upload (an upload\nwhose file path and bytes match an existing job output resolves to that output\nand carries its job) — and `expiresAt`, its retention deadline (`undefined` if it never expires).\nDelete one with `asset.delete()` on a handle you already hold (throws if the\nhandle was never committed — there's nothing to delete yet), or\n`client.assets.delete(id)` to delete by UUID without fetching first. Deleting\nneeds a `comfy-api-proxy` new enough to serve `DELETE /api/v2/assets/{id}`;\nan older proxy returns `405`.\n\n## Live progress\n\n`job.events()` is a typed, auto-reconnecting async iterator over the job's\nlive event stream:\n\n```ts\nconst job = await client.submit(wf);\nfor await (const event of job.events()) {\n  switch (event.kind) {\n    case \"progress\":\n      console.log(event.value);\n      break;\n    case \"outputReady\":\n      await event.output.toFile(`${event.output.name}`);\n      break;\n    case \"statusChange\":\n      if (event.status === \"succeeded\") break;\n  }\n}\n```\n\nThe stream carries no replay cursor, so a dropped connection is reconnected\nfrom \"now,\" not replayed from the start. Polling stays the source of truth\nfor whether the job is actually done: if the stream is throttled, drops\npermanently, or never even connects, `events()` falls back to polling\n`GET /jobs/{id}` to detect the terminal state, so consumers never hang\nwaiting on a stream that isn't coming back. If you only care about the\nfinal result, `run()`/`job.wait()` (poll-only, no SSE) is simpler.\n\nA terminal `statusChange` other than `succeeded` carries an `error`: the status\nframe itself does not, so `events()` reads the job once and yields what\n`job.error` then holds (`event.error`, `null` for a canceled job). If that read\nfails the status arrives without an `error`.\n\n## Cancellation and timeouts\n\n`submit`, `run`, `wait`, `events`, and `cancel` all accept an `AbortSignal`,\nwhich stops both the in-flight request _and_ any internal wait (the queue-full\nretry pause, the poll backoff, the SSE reconnect pause) — an abort takes\neffect immediately rather than only after the current network call returns:\n\n```ts\nconst controller = new AbortController();\nsetTimeout(() => controller.abort(), 30_000); // give up after 30s\n\nconst job = await client.submit(wf, { signal: controller.signal });\nawait job.wait(undefined, controller.signal);\n```\n\n`run()` also takes a plain `timeoutMs` if you just want a deadline without\nmanaging an `AbortController` yourself:\n\n```ts\nawait client.run(wf, { timeoutMs: 60_000 });\n```\n\n## Downloading outputs\n\nA finished job exposes its results as output handles — `job.outputs`, or\n`job.getOutputs(nodeId)` to filter to one node. Each is an asset you can pull\ndown whichever way suits the caller, and each carries `jobId` — the ID of\nthe job that produced it, for tracing a file back to the job that made it:\n\n```ts\nconst out = job.getOutputs(\"13\")[0];\nawait out.toFile(\"result.png\"); // stream to disk\nconst data = await out.toBytes(); // buffer into memory\nawait out.toFile(\"head.png\", { range: [0, 1023] }); // range-aware: first 1 KiB only\n```\n\nOutputs are not image-only: `out.type` is the kind discriminator —\n`\"image\" | \"video\" | \"audio\" | \"text\" | \"file\" | \"latent\"` — and\n`out.contentType` carries the MIME type the server reported. Every download\nmethod above works the same way on all of them, so a job that saved audio or\nvideo is read exactly like one that saved a PNG:\n\n```ts\nconst [track] = job.getOutputs(\"9\"); // e.g. a SaveAudioMP3 node\ntrack.type; // \"audio\"\ntrack.contentType; // \"audio/mpeg\"\nawait track.toFile(\"track.mp3\");\n```\n\n`getDownloadUrl()` hands back a fetchable URL instead of streaming the bytes\nthrough your process — give it to a browser, a CDN, or another service:\n\n```ts\nconst { url, expiresAt } = await out.getDownloadUrl();\n```\n\nThat is what you want for media a browser plays rather than your server\nprocesses — the bytes never pass through your process at all. On Comfy Cloud\nand serverless the URL is self-authorizing, so a page can put it straight in\nan `<audio>`/`<video>` element with no API key of its own; on a self-hosted\nproxy it is the asset's content URL and normal auth still applies (see\nbelow).\n\n```ts\nconst [track] = job.getOutputs(\"9\");\nif (track.type === \"audio\") {\n  const { url } = await track.getDownloadUrl();\n  // hand `url` to the page: <audio src={url} controls />\n}\n```\n\nOn Comfy Cloud / serverless it's a short-lived, **self-authorizing** signed\nstorage URL: whoever holds it can read the asset until `expiresAt` with no API\nkey of their own. On a self-hosted proxy it's the content endpoint (normal auth\nstill applies) and `expiresAt` is `null`. It works on every backend and never\ndownloads the bytes first.\n\n## What a job carries\n\nA `Job` handle reads whatever state it currently holds — nothing re-fetches implicitly, so `await job.refresh()` (or `wait()`/`result()`, which poll for you) is what advances it:\n\n| Accessor              | Type                                          | What it is                                                                                                       |\n| --------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `job.id`              | `string`                                      | Server-assigned ID; enough on its own to rebuild the handle via `client.jobs.get(id)`                            |\n| `job.status`          | `string`                                      | `queued`, `running`, `canceling`, `succeeded`, `canceled`, `failed`, `expired`                                   |\n| `job.outputs`         | `Output[]`                                    | Every output across all nodes; empty until the job succeeds                                                      |\n| `job.error`           | `JobError \\| null`                            | Failure detail when the job ended `failed`                                                                       |\n| `job.failureCategory` | `FailureCategory \\| null`                     | Why a user-caused failure happened, or `null` when the error names none                                          |\n| `job.createdAt`       | `Date`                                        | When the server accepted the job                                                                                 |\n| `job.startedAt`       | `Date \\| null`                                | When it started executing; `null` while still queued                                                             |\n| `job.completedAt`     | `Date \\| null`                                | When it reached a terminal state; `null` before it did                                                           |\n| `job.expiresAt`       | `Date`                                        | Retention deadline — after this the job and its outputs are gone                                                 |\n| `job.progress`        | `Progress \\| null`             ","readmeFilename":"README.md"}