@comfyorg/ingest-types 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,85 @@ export type AcceptedAutoTopUpSettings = {
29
29
  target_credits: number;
30
30
  threshold_credits: number;
31
31
  };
32
+ /**
33
+ * One change to who can access what in the workspace.
34
+ */
35
+ export type AccessEvent = {
36
+ /**
37
+ * What changed, for example `project.member.added`. New values may be added; show an unknown one as received.
38
+ */
39
+ action: string;
40
+ /**
41
+ * Who made the change.
42
+ */
43
+ actor: AccessEventPerson;
44
+ /**
45
+ * The changed fields after the change. Absent after a removal.
46
+ */
47
+ after?: {
48
+ [key: string]: unknown;
49
+ };
50
+ /**
51
+ * The changed fields before the change. Absent when nothing existed before.
52
+ */
53
+ before?: {
54
+ [key: string]: unknown;
55
+ };
56
+ /**
57
+ * When the change was made
58
+ */
59
+ create_time: string;
60
+ id: string;
61
+ /**
62
+ * The project the change is about. Absent for a workspace-level change.
63
+ */
64
+ project_id?: string;
65
+ /**
66
+ * That project's name now. Absent for a workspace-level change.
67
+ */
68
+ project_name?: string;
69
+ /**
70
+ * Who the change is about. Absent when it is not about a person.
71
+ */
72
+ target?: AccessEventPerson;
73
+ };
74
+ /**
75
+ * A person named in an access change.
76
+ */
77
+ export type AccessEventPerson = {
78
+ /**
79
+ * Display name, or an empty string when the account no longer exists.
80
+ */
81
+ name: string;
82
+ user_id: string;
83
+ };
84
+ /**
85
+ * Where the next page of access changes starts.
86
+ */
87
+ export type AccessEventsPagination = {
88
+ has_more: boolean;
89
+ /**
90
+ * Pass as `after` to read the next page. Absent on the last page.
91
+ */
92
+ next_cursor?: string;
93
+ };
94
+ /**
95
+ * The upload to add to the deployment, passed to comfy-deploy as written.
96
+ */
97
+ export type AddDeploymentModelRequest = {
98
+ /**
99
+ * The blobId the model upload route answered.
100
+ */
101
+ blobId: string;
102
+ /**
103
+ * The file name on the deployment; the upload's when absent.
104
+ */
105
+ filename?: string;
106
+ /**
107
+ * The model folder, for example `loras` or `checkpoints`.
108
+ */
109
+ type: string;
110
+ };
32
111
  /**
33
112
  * Returned when a request to run the agent is declined before the turn starts, because of a billing or account condition on the workspace. The `error` object carries a `message` you can show the user, a `type` that matches the HTTP status, and a more specific `reason` you can branch on to offer the right next step.
34
113
  */
@@ -567,6 +646,12 @@ export type AgentPostMessageRequest = {
567
646
  *
568
647
  */
569
648
  attachments?: Array<string>;
649
+ /**
650
+ * Optional nodes the user has selected on the canvas with an ordinary click but did not add to the message ({node_ids, workflow_id}). The agent sees them as context for "this node" questions, never as the request's target the way `selection` is.
651
+ */
652
+ canvas_selection?: {
653
+ [key: string]: unknown;
654
+ };
570
655
  /**
571
656
  * The client's live ComfyUI WebSocket clientId (the `sid` the server hands back on the socket's first status message). Local runs the agent submits on the caller's behalf are submitted under this id, so ComfyUI addresses their execution events — node highlights, progress and outputs — to this client instead of to the short-lived CLI socket that submitted them. Additive and advisory; omitting it restores the previous behaviour, where an agent-started run leaves the canvas with no execution feedback. Ignored on the cloud target, which fans execution events out per user/workspace regardless of submitter. A value that could not be a ComfyUI socket id is DROPPED, not rejected — no turn fails over it — so an id longer than 128 bytes, or one containing whitespace or non-printable characters, or one starting with `-`, is accepted with 202 and behaves exactly like omitting the field. Surrounding whitespace is trimmed.
572
657
  */
@@ -871,6 +956,10 @@ export type AgentToolCallData = {
871
956
  * Optional terminal recovery barrier. The highest published doc_update sequence carrying this call's op_ids.
872
957
  */
873
958
  doc_seq?: number;
959
+ /**
960
+ * bash only. The model file a `comfy model download` in the call's command fetches (its --filename, else the last segment of its --url), on its running frame and on its terminal frame, so the client can name the download while it runs. Omitted on every other tool and command.
961
+ */
962
+ download?: string;
874
963
  duration_ms?: number;
875
964
  error_code?: string;
876
965
  /**
@@ -1023,6 +1112,10 @@ export type Asset = {
1023
1112
  * URL for asset preview/thumbnail
1024
1113
  */
1025
1114
  preview_url?: string;
1115
+ /**
1116
+ * The project this asset belongs to. Where Projects is enabled for the workspace it is always set, and work in the default project carries the default project's ID. Elsewhere it is absent. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
1117
+ */
1118
+ project_id?: string;
1026
1119
  /**
1027
1120
  * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash.
1028
1121
  */
@@ -1316,6 +1409,26 @@ export type AutoReloadPreview = {
1316
1409
  *
1317
1410
  */
1318
1411
  export type AutoReloadSettings = {
1412
+ /**
1413
+ * Answers one UI question: should the UI warn that auto top-up can
1414
+ * refill credits past a hard cap?
1415
+ * True: auto top-up's `status` is `on` (enabled and currently able to
1416
+ * charge) and the workspace has at least one live budget with
1417
+ * `mode: hard`. Show the warning.
1418
+ * False: show no warning, and read it as unknown, not as proof that
1419
+ * there is no conflict. Either half is missing, or the half this
1420
+ * response does not carry could not be read (the server then reports
1421
+ * false and logs it). When billing-api omits this field, ingest serves
1422
+ * false, so during a rollout false carries no information.
1423
+ * On a save it reflects the settings just saved.
1424
+ * Not a gate: it never blocks saving a budget or auto top-up, and it is
1425
+ * not authorization. Render it as received; do not compare the budget
1426
+ * list with the auto top-up settings to rebuild it. The same value is
1427
+ * served on the budget list, the budget write results and the auto
1428
+ * top-up settings.
1429
+ *
1430
+ */
1431
+ auto_top_up_conflict: boolean;
1319
1432
  /**
1320
1433
  * True when the validated default card is already expired or its expiry-month boundary (00:00 UTC on the first day of the following month) is within the next 30 days. Absent or null means unknown, never a healthy-card claim. This includes non-card methods, malformed data, provider errors or a live Stripe default that differs from the recorded default payment method (for example, before a portal-change webhook syncs). Independent of status and charge eligibility; save responses omit the fact. Missing on an older server also means unknown.
1321
1434
  *
@@ -1901,6 +2014,41 @@ export type BillingCapabilities = {
1901
2014
  * Point-in-time Cloud billing guidance for this actor, combining the supplied workflow_run decision with ingest's existing account gate and cutover mode, local enrollment, Google-session requirement, and acting-user allowance. Legacy authority includes the same fail-open behavior as submission. True means these account gates allow the attempt; false has a denial when recognized. Billing-disabled environments return true. False without a reason is unknown where authoritative guidance is unavailable. No allowance is consumed or reserved. This is not authorization for a specific job or project: the submission path rechecks its full context.
1902
2015
  */
1903
2016
  can_run_workflows: boolean;
2017
+ /**
2018
+ * - Answers: should the client offer creating and changing workspace
2019
+ * budgets (the Budgets controls)?
2020
+ * - True: the actor is a workspace owner (the creator alone while a
2021
+ * personal workspace's billing identity is not provisioned, as for
2022
+ * can_manage_billing), and the workspace has a
2023
+ * subscription whose term is open (active or canceled, with any
2024
+ * cancellation date still ahead) on a plan other than FREE.
2025
+ * - False: denied_reasons.can_set_budgets names the first refusal.
2026
+ * False with no reason means no recognised explanation.
2027
+ * - Not: authorization; the budget write endpoints decide again with
2028
+ * the same rule. A caller who is not a member is refused before
2029
+ * this rule runs, with FORBIDDEN and no reason from this list. Not whether a hard cap may be set
2030
+ * (can_set_hard_caps). Not whether budgets may be read: any member
2031
+ * may read the budget on themselves. Payment state (past due,
2032
+ * paused top-ups) does not affect it.
2033
+ * - When billing-api omits this field, ingest serves false, with no reason.
2034
+ *
2035
+ */
2036
+ can_set_budgets: boolean;
2037
+ /**
2038
+ * - Answers: should the client unlock the hard-cap control on a
2039
+ * budget, or show it locked with the path to sales?
2040
+ * - True: can_set_budgets is true and the plan is Enterprise.
2041
+ * - False: denied_reasons.can_set_hard_caps names the first refusal.
2042
+ * False with no reason means no recognised explanation.
2043
+ * `plan_not_enterprise` is the one case where budgets are available
2044
+ * and only the hard cap is locked.
2045
+ * - Not: authorization. Not whether soft budgets may be set
2046
+ * (can_set_budgets). A budget that is already hard stays editable
2047
+ * after a downgrade; this field is about setting a new hard cap.
2048
+ * - When billing-api omits this field, ingest serves false, with no reason.
2049
+ *
2050
+ */
2051
+ can_set_hard_caps: boolean;
1904
2052
  /**
1905
2053
  * - Answers: may this user start, recover or change a self-serve plan?
1906
2054
  * - True: the user is a workspace owner and no resolver branch closed it. When
@@ -2491,6 +2639,33 @@ export type BillingCapabilityDenials = {
2491
2639
  *
2492
2640
  */
2493
2641
  can_run_workflows?: 'manual_block' | 'subscription_inactive' | 'payment_past_due' | 'no_funds' | 'workspace_cap_exceeded' | 'project_cap_exceeded' | 'user_cap_exceeded' | 'free_tier_exhausted';
2642
+ /**
2643
+ * Why can_set_budgets is false. Present only when that capability is false; absent means no recognized explanation, never permission. This does not authorize the action or explain a sibling capability. First reached wins in the order below: the role refusals, then the plan refusals. The status branches never compete, since a subscription has one status.
2644
+ * - not_a_member: The actor is not a workspace member.
2645
+ * - not_workspace_owner: The actor is a member whose role is not owner.
2646
+ * - creator_only_provisioning: Only the creator can act on this personal workspace's billing until its billing identity is provisioned.
2647
+ * - no_subscription: The workspace has no subscription, so it has no billing period to budget over.
2648
+ * - free_plan: The plan is FREE, whose usage is not charged spend.
2649
+ * - subscription_ended: The subscription has stopped for good, ended or canceled with no end date ahead.
2650
+ * - subscription_not_started: The subscription is scheduled and has not started.
2651
+ * - subscription_status_unrecognized: The subscription status is one the resolver has no guidance for.
2652
+ *
2653
+ */
2654
+ can_set_budgets?: 'not_a_member' | 'not_workspace_owner' | 'creator_only_provisioning' | 'no_subscription' | 'free_plan' | 'subscription_ended' | 'subscription_not_started' | 'subscription_status_unrecognized';
2655
+ /**
2656
+ * Why can_set_hard_caps is false. Present only when that capability is false; absent means no recognized explanation, never permission. This does not authorize the action or explain a sibling capability. First reached wins in the order below: every can_set_budgets refusal in its order, then the plan check.
2657
+ * - not_a_member: The actor is not a workspace member.
2658
+ * - not_workspace_owner: The actor is a member whose role is not owner.
2659
+ * - creator_only_provisioning: Only the creator can act on this personal workspace's billing until its billing identity is provisioned.
2660
+ * - no_subscription: The workspace has no subscription.
2661
+ * - free_plan: The plan is FREE.
2662
+ * - subscription_ended: The subscription has stopped for good.
2663
+ * - subscription_not_started: The subscription is scheduled and has not started.
2664
+ * - subscription_status_unrecognized: The subscription status is one the resolver has no guidance for.
2665
+ * - plan_not_enterprise: Budgets are available, but hard caps are an Enterprise feature. Show the control locked and offer the path to sales.
2666
+ *
2667
+ */
2668
+ can_set_hard_caps?: 'not_a_member' | 'not_workspace_owner' | 'creator_only_provisioning' | 'no_subscription' | 'free_plan' | 'subscription_ended' | 'subscription_not_started' | 'subscription_status_unrecognized' | 'plan_not_enterprise';
2494
2669
  /**
2495
2670
  * Present only when can_subscribe_self_serve is false. The value names the
2496
2671
  * resolver branch that decided, not customer wording. Values are listed in the
@@ -2691,7 +2866,7 @@ export type BillingEvent = {
2691
2866
  */
2692
2867
  member_user_id?: string;
2693
2868
  /**
2694
- * Event-specific parameters
2869
+ * Event-specific parameters. On a usage row, `credits_used` is what the row cost in credits. A `cloud_workflow_executed` (GPU run) row carries it when the usage ledger holds a charge for the run. Absent means the charge is unknown (a run from before the ledger began, an unpriced row, or the ledger could not be read); it must not be read as a free run.
2695
2870
  */
2696
2871
  params?: {
2697
2872
  [key: string]: unknown;
@@ -2727,14 +2902,39 @@ export type BillingEventsResponse = {
2727
2902
  */
2728
2903
  totalPages: number;
2729
2904
  };
2905
+ /**
2906
+ * The plan a Platform billing tab continues to checkout with. Selections only; checkout prices them.
2907
+ */
2908
+ export type BillingHandoffCheckoutRequest = {
2909
+ /**
2910
+ * Plan the checkout opens with, as GET /api/billing/plans names it. Sent in the entry URL's query as `plan`.
2911
+ */
2912
+ plan_slug: string;
2913
+ /**
2914
+ * Team credit stop the checkout opens with, for a per-credit Team plan. Sent in the entry URL's query as `team_credit_stop_id`.
2915
+ */
2916
+ team_credit_stop_id?: string;
2917
+ };
2730
2918
  /**
2731
2919
  * Asks for a one-time handoff that signs a billing receiver tab in as the caller.
2732
2920
  */
2733
2921
  export type BillingHandoffCreateRequest = {
2922
+ /**
2923
+ * Credit amount the top-up checkout opens with, in cents. Whole dollars within the manual top-up limits (`min_topup_cents` to `max_topup_cents` on GET /api/billing/balance). Allowed only with intent top-up, else 400 INVALID_REQUEST; omitted, billing-web uses its default. Sent in the entry URL's query after intent. Not a credential; the checkout validates the amount again.
2924
+ */
2925
+ amount_cents?: number;
2926
+ /**
2927
+ * Auto top-up settings the top-up checkout turns on with its payment, as chosen in the issuing app's Add credits. Allowed only with intent top-up and amount_cents, else 400 INVALID_REQUEST; each count must be positive. Sent in the entry URL's query after amount_cents as auto_top_up_threshold_credits, auto_top_up_target_credits and, when set, auto_top_up_monthly_budget_cents. A choice, not a credential: the checkout shows the consent and the purchase validates the settings again.
2928
+ */
2929
+ auto_top_up?: TopupAutoTopUpSettings;
2734
2930
  /**
2735
2931
  * Version of the issuing app, for logs.
2736
2932
  */
2737
2933
  client_version: string;
2934
+ /**
2935
+ * Page the receiver opens after the exchange: top-up opens the credit checkout, subscription the plan checkout, none the receiver's billing home. Only billing_web accepts one; platform answers 400 INVALID_REQUEST. Sent in the entry URL's query, never its fragment. It is not a credential and grants nothing.
2936
+ */
2937
+ intent?: 'top-up' | 'subscription';
2738
2938
  /**
2739
2939
  * Billing app that will exchange the handoff; its origin is the only one the exchange accepts.
2740
2940
  */
@@ -2753,7 +2953,7 @@ export type BillingHandoffCreateRequest = {
2753
2953
  */
2754
2954
  export type BillingHandoffCreateResponse = {
2755
2955
  /**
2756
- * The receiver's handoff page with the token in the fragment. Open it, never display it.
2956
+ * The receiver's handoff page, with the intent, amount_cents and auto top-up settings (if any) in the query and the token in the fragment. Open it, never display it.
2757
2957
  */
2758
2958
  entry_url: string;
2759
2959
  /**
@@ -2883,6 +3083,20 @@ export type BillingOpChargeReason = {
2883
3083
  */
2884
3084
  kind: 'promo_code' | 'subscription_discount' | 'account_balance';
2885
3085
  };
3086
+ /**
3087
+ * How a billing operation ended, for a billing handoff tab whose scoped session has ended.
3088
+ */
3089
+ export type BillingOpOutcomeResponse = {
3090
+ /**
3091
+ * The `status` that `GET /api/billing/ops/{id}` reports for the same
3092
+ * operation. It answers whether the payment has finished and how:
3093
+ * pending means keep polling, the other three are final for polling.
3094
+ * It does not say why a payment failed or what the customer can do
3095
+ * next.
3096
+ *
3097
+ */
3098
+ status: 'pending' | 'succeeded' | 'failed' | 'reconciliation_needed';
3099
+ };
2886
3100
  /**
2887
3101
  * Display only. The plan the operation targets; for a scheduled change,
2888
3102
  * the plan it switches to at period end. Present for plan changes,
@@ -2968,8 +3182,10 @@ export type BillingOpStatusResponse = {
2968
3182
  authentication_deadline?: string;
2969
3183
  /**
2970
3184
  * State derived from the PaymentIntent attached to this operation's
2971
- * exact stored Stripe invoice. Absent when the operation has no
2972
- * correlated PaymentIntent.
3185
+ * exact stored Stripe invoice. One exception: a pending plan change
3186
+ * saving a new card reports requires_action while that card's
3187
+ * SetupIntent awaits 3-D Secure, before any invoice exists. Absent
3188
+ * when the operation has neither.
2973
3189
  *
2974
3190
  */
2975
3191
  authentication_state?: 'requires_action' | 'processing' | 'failed_retryable' | 'succeeded' | 'reconciliation_needed';
@@ -3030,9 +3246,11 @@ export type BillingOpStatusResponse = {
3030
3246
  */
3031
3247
  id: string;
3032
3248
  /**
3033
- * Stripe PaymentIntent client secret for completing requires_action.
3034
- * This bearer capability is returned only to workspace billing managers
3035
- * and is absent otherwise.
3249
+ * Stripe client secret for completing requires_action: the invoice's
3250
+ * PaymentIntent, or for a plan change saving a new card, that card's
3251
+ * SetupIntent (pass either to Stripe.js handleNextAction). This bearer
3252
+ * capability is returned only to workspace billing managers and is
3253
+ * absent otherwise.
3036
3254
  *
3037
3255
  */
3038
3256
  payment_intent_client_secret?: string;
@@ -3042,7 +3260,11 @@ export type BillingOpStatusResponse = {
3042
3260
  * The two awaiting_ values are blocked on the customer and will not
3043
3261
  * advance on their own: awaiting_payment_method is parked on a hosted
3044
3262
  * checkout needing a card, awaiting_invoice_payment on an invoice
3045
- * needing payment or authentication. in_progress means the operation
3263
+ * needing payment or authentication, or on a plan change's new card
3264
+ * awaiting 3-D Secure before any invoice exists (then
3265
+ * authentication_state is requires_action and
3266
+ * payment_intent_client_secret is that card's SetupIntent secret).
3267
+ * in_progress means the operation
3046
3268
  * is ours to finish, so polling is the right response. Deliberately
3047
3269
  * coarser than the internal phase — phases that differ only in what
3048
3270
  * the workflow is doing all report in_progress. Absent for a terminal
@@ -3112,7 +3334,7 @@ export type BillingStatusResponse = {
3112
3334
  */
3113
3335
  cancel_at?: string;
3114
3336
  /**
3115
- * When the current billing period began. Together with renewal_date it is the range for "current billing period" views; render the pair as received rather than deriving one from the other. Present exactly when renewal_date is: omitted for a canceled plan, a never-subscribed workspace and a free plan with no subscription.
3337
+ * When the current subscription term began. Together with renewal_date it is the term the plan renews over (a year on an annual plan); render the pair as received rather than deriving one from the other. It is not the window usage and budgets are counted over: use usage_period_start and usage_period_end for that. Present exactly when renewal_date is: omitted for a canceled plan, a never-subscribed workspace and a free plan with no subscription.
3116
3338
  */
3117
3339
  current_period_start?: string;
3118
3340
  /**
@@ -3144,7 +3366,7 @@ export type BillingStatusResponse = {
3144
3366
  */
3145
3367
  next_charge: NextCharge | null;
3146
3368
  /**
3147
- * Eligible next scheduled credit refill for both the Credits card and out-of-credits banner. Uses the actual positive credit-grant cadence, not an Enterprise invoice anniversary. Present only for a known future refill before cancellation/end; annual grants must be within 31 elapsed days inclusive, evaluated on the server. Omitted when unavailable, ineligible or no future grant is known; omission never means zero. Display only, not a payment guarantee, balance or spending permission.
3369
+ * Eligible next scheduled credit refill for both the Credits card and out-of-credits banner. Uses the actual positive credit-grant cadence, not an Enterprise invoice anniversary. Present only for a known future refill before cancellation/end, monthly and annual grants alike. Omitted when unavailable, ineligible or no future grant is known; omission never means zero. Display only, not a payment guarantee, balance or spending permission.
3148
3370
  */
3149
3371
  next_credit_refill_at?: string;
3150
3372
  /**
@@ -3194,7 +3416,7 @@ export type BillingStatusResponse = {
3194
3416
  */
3195
3417
  previous_plan?: PreviousPlan;
3196
3418
  /**
3197
- * When the current billing period ends and the next one begins: the end of the period current_period_start begins.
3419
+ * When the current subscription term ends and the next one begins: the end of the term current_period_start begins.
3198
3420
  */
3199
3421
  renewal_date?: string;
3200
3422
  renewal_invoice?: RenewalInvoice;
@@ -3217,7 +3439,7 @@ export type BillingStatusResponse = {
3217
3439
  subscription_duration?: SubscriptionDuration;
3218
3440
  subscription_payment_recovery?: SubscriptionPaymentRecovery;
3219
3441
  /**
3220
- * Render this state without recombining payment, tier, dates or activity. Native and legacy provider history distinguish never-subscribed from ended. Ended means a historical provider Cloud subscription ended, regardless of whether an invoice was ever paid. Omitted when an older upstream/server exposes no usable history facts. Optional history failures leave guidance unknown while ordinary status remains available. Also omitted for a native live subscription when a workspace payment_failed label has no authoritative subscription-payment provenance. Unknown states must not be inferred from missing fields.
3442
+ * Render this state without recombining payment, tier, dates or activity. Native and legacy provider history distinguish never-subscribed from ended. Ended means a historical provider Cloud subscription ended, regardless of whether an invoice was ever paid. Omitted when an older upstream/server exposes no usable history facts. Optional history failures leave guidance unknown while ordinary status remains available. A native live subscription labelled payment_failed is attributed by the bound Stripe subscription: past_due or unpaid serves past_due, paused serves paused, active or trialing serves active, and canceled serves ended. It is omitted when that provider read is unavailable, unrecognized or bound to another customer. Unknown states must not be inferred from missing fields.
3221
3443
  */
3222
3444
  subscription_state?: SubscriptionState;
3223
3445
  /**
@@ -3229,6 +3451,14 @@ export type BillingStatusResponse = {
3229
3451
  * The team credit stop the workspace is currently subscribed to, for per-credit Team plans (BE-1254). Lets clients tell apart team subscriptions, which all share subscription_tier=TEAM. Always present; null for personal plans (use subscription_tier to distinguish those) and for legacy team plans without a credit stop.
3230
3452
  */
3231
3453
  team_credit_stop: TeamCreditStopSummary | null;
3454
+ /**
3455
+ * End (exclusive) of the period usage_period_start begins, and when a budget's spend next resets. Not the renewal date: on an annual plan it is the next monthly anniversary, and for a subscription set to cancel it is never later than the cancellation.
3456
+ */
3457
+ usage_period_end?: string;
3458
+ /**
3459
+ * Start of the billing period that current-period usage views and workspace budgets are counted over. Together with usage_period_end it answers "which range is this period's usage?"; request usage for exactly this pair so the usage page and a budget's spend show the same number. On an annual plan it is the monthly anniversary, so it must not be read as the plan's renewal term (that is current_period_start and renewal_date). On a monthly plan the two pairs usually agree, but render each as received: they are resolved separately and can differ for a subscription whose stored period is missing or out of date. Present exactly when usage_period_end is: omitted when the workspace has no subscription, or its subscription is scheduled, ended, or canceled and past its end.
3460
+ */
3461
+ usage_period_start?: string;
3232
3462
  };
3233
3463
  /**
3234
3464
  * A tax identifier for a company Stripe customer. Stripe validates the
@@ -3246,6 +3476,290 @@ export type BillingTaxId = {
3246
3476
  type: string;
3247
3477
  value: string;
3248
3478
  };
3479
+ /**
3480
+ * A budget with its spend in the workspace's current billing period. Amounts come in credits and in micro-USD; a client shows credits as received and never converts.
3481
+ *
3482
+ */
3483
+ export type Budget = {
3484
+ /**
3485
+ * The percentages of the limit at which an alert is sent, ascending. Settings for the edit form. Do not compare them with `percent_used` to decide whether a threshold was crossed: read `crossed_alert_percent`.
3486
+ *
3487
+ */
3488
+ alert_percents: Array<number>;
3489
+ /**
3490
+ * The budget's alert email history in the current billing period: one entry for each threshold whose alert has a recorded outcome, ascending by `percent`. An entry is not proof an email went out: read its `status`. There is at most one entry for each percent, and a `sent` entry is the first email sent for that percent in the period: a later email for the same percent, which a changed limit can cause, adds no entry and leaves `sent_at` as it was. So do not read the list as a count of emails sent. `[]` when there is none, and when the workspace has no billing period. For the history display only. Not what decides the banner: an entry can be missing for a threshold the spend has crossed (its outcome is recorded shortly after, or threshold detection is off in this environment), so read `crossed_alert_percent` for that.
3491
+ *
3492
+ */
3493
+ alerts: Array<BudgetAlert>;
3494
+ /**
3495
+ * Answers one UI question: can the UI show this budget's alert
3496
+ * history?
3497
+ * True: `alerts` is the history. An empty list means no alert has a
3498
+ * recorded outcome this period.
3499
+ * False: the history could not be read. `alerts` is `[]` and says
3500
+ * nothing about what was sent. Show the history as unavailable, not
3501
+ * as "no alerts sent".
3502
+ * It is about the history only. The budget, its spend and
3503
+ * `crossed_alert_percent` are still correct when it is false, so
3504
+ * keep showing them and the banner.
3505
+ * When billing-api omits this field, ingest serves false, so during
3506
+ * a rollout false carries no information.
3507
+ *
3508
+ */
3509
+ alerts_available: boolean;
3510
+ /**
3511
+ * User id that created the budget.
3512
+ */
3513
+ created_by: string;
3514
+ /**
3515
+ * Answers one UI question: should the UI show an alert banner for
3516
+ * this budget, and for which threshold?
3517
+ * A number: the highest value of `alert_percents` that the spend has
3518
+ * reached in the current billing period. Show the banner, naming
3519
+ * this percent.
3520
+ * Null: the spend is below every alert percent, or the workspace has
3521
+ * no billing period. Show no banner.
3522
+ * It follows the budget as it is now, so it can fall or return to
3523
+ * null inside a period when the limit is raised or `alert_percents`
3524
+ * changes, and it resets with the spend at `resets_at`.
3525
+ * Not whether an alert email was sent (that is `alerts`), and not
3526
+ * whether spend is refused: on a `soft` budget 100 only alerts.
3527
+ * Render it as received; do not rebuild it from `percent_used` and
3528
+ * `alert_percents`. The server already limits the list to the
3529
+ * budgets the viewer may see, so every budget returned with a
3530
+ * number is one this viewer may be shown a banner for.
3531
+ * When billing-api omits this field, ingest serves null, so during
3532
+ * a rollout null carries no information.
3533
+ *
3534
+ */
3535
+ crossed_alert_percent: number | null;
3536
+ /**
3537
+ * End of the last billing period the budget applies to; null when it repeats indefinitely.
3538
+ */
3539
+ ends_at: string | null;
3540
+ id: string;
3541
+ /**
3542
+ * The limit in credits, rounded to the nearest credit.
3543
+ */
3544
+ limit_credits: number;
3545
+ /**
3546
+ * The limit as stored, in micro-USD of list value.
3547
+ */
3548
+ limit_micro_usd: number;
3549
+ mode: BudgetMode;
3550
+ /**
3551
+ * Answers one UI question: which workspace Owner should a member
3552
+ * contact about their own budget ("Contact a workspace owner at …")?
3553
+ * A string: one Owner's email. The server picks the Owner who last
3554
+ * changed the budget while they are still an Owner, else the
3555
+ * workspace's creator, else the longest-standing Owner with an email.
3556
+ * Set only on the list read, and only for a member reading their
3557
+ * own budget.
3558
+ * Null: show no contact line. It is null on every budget in an
3559
+ * Owner's read, in every create and update response (only Owners
3560
+ * write), when no Owner has an email, and when it could not be read
3561
+ * (the budget is still served). So null alone does not mean that no
3562
+ * Owner has an email.
3563
+ * Not a list of Owners, not the budget's creator, and not who may
3564
+ * change the budget. Render it as received; do not pick an Owner
3565
+ * from the member list.
3566
+ * When billing-api omits this field, ingest serves null, so during
3567
+ * a rollout null carries no information.
3568
+ *
3569
+ */
3570
+ owner_email: string | null;
3571
+ /**
3572
+ * Whole percent of the limit spent, rounded down, so 100 means the limit is reached. It can exceed 100. For the progress display only: whether to show an alert banner is `crossed_alert_percent`.
3573
+ *
3574
+ */
3575
+ percent_used: number;
3576
+ repeat: BudgetRepeat;
3577
+ /**
3578
+ * When spend next resets to 0: the end of the current billing period. Null when the workspace has no billing period.
3579
+ *
3580
+ */
3581
+ resets_at: string | null;
3582
+ /**
3583
+ * The workspace id, the member's user id, the API key's prefix or the deployment id.
3584
+ */
3585
+ scope_id: string;
3586
+ scope_kind: BudgetScopeKind;
3587
+ /**
3588
+ * When the totals behind spent_micro_usd were last written. Shows how fresh the spend is: a deployment's usage arrives hourly. Null when the scope has spent nothing this period.
3589
+ *
3590
+ */
3591
+ spend_updated_at: string | null;
3592
+ /**
3593
+ * spent_micro_usd in credits, rounded to the nearest credit.
3594
+ */
3595
+ spent_credits: number;
3596
+ /**
3597
+ * What the scope has spent since the current billing period began: the charged usage the usage page counts for the same range. A member budget counts session spend only; spend through the member's API keys counts toward the key. 0 when the workspace has no billing period.
3598
+ *
3599
+ */
3600
+ spent_micro_usd: number;
3601
+ /**
3602
+ * User id that last changed the budget.
3603
+ */
3604
+ updated_by: string;
3605
+ };
3606
+ /**
3607
+ * The email outcome of one threshold alert in the current billing period. It records the email, not the crossing.
3608
+ *
3609
+ */
3610
+ export type BudgetAlert = {
3611
+ /**
3612
+ * The alert percent the email was about: a percent of the limit the budget had when the alert was sent. It may no longer be in `alert_percents`, and the limit may have changed since.
3613
+ *
3614
+ */
3615
+ percent: number;
3616
+ /**
3617
+ * When the first email for this percent in the period was sent. A later email for the same percent does not change it. Null unless `status` is `sent`.
3618
+ *
3619
+ */
3620
+ sent_at: string | null;
3621
+ status: BudgetAlertStatus;
3622
+ };
3623
+ /**
3624
+ * What happened to a threshold alert's email. `sent`: the email provider accepted it for at least one recipient, which is not proof it was delivered or read. `failed`: no one was sent it and at least one send failed. `skipped`: there was nothing to send, for example no recipient has an email address. Show `failed` and `skipped` as "not sent"; neither means the threshold was not crossed.
3625
+ *
3626
+ */
3627
+ export type BudgetAlertStatus = 'sent' | 'failed' | 'skipped';
3628
+ export type BudgetChange = {
3629
+ action: 'created' | 'updated' | 'archived' | 'downgraded';
3630
+ /**
3631
+ * User id that made the change, or `system` for one the platform made.
3632
+ */
3633
+ actor_user_id: string;
3634
+ /**
3635
+ * The budget's settings after the change; null for `archived`. The settings are `scope_kind`, `scope_id`, `mode`, `alert_percents`, `ends_at`, and the limit as `limit_micro_usd` and as `limit_credits`, rounded to the nearest credit as on the budget. Show a limit change from `limit_credits` as received; do not convert `limit_micro_usd`.
3636
+ *
3637
+ */
3638
+ after: {
3639
+ [key: string]: unknown;
3640
+ } | null;
3641
+ /**
3642
+ * The budget's settings before the change; null for `created`. The settings are `scope_kind`, `scope_id`, `mode`, `alert_percents`, `ends_at`, and the limit as `limit_micro_usd` and as `limit_credits`, rounded to the nearest credit as on the budget. Show a limit change from `limit_credits` as received; do not convert `limit_micro_usd`.
3643
+ *
3644
+ */
3645
+ before: {
3646
+ [key: string]: unknown;
3647
+ } | null;
3648
+ changed_at: string;
3649
+ };
3650
+ export type BudgetCreateRequest = {
3651
+ /**
3652
+ * Ascending, no repeats. Defaults to [50, 80, 100].
3653
+ */
3654
+ alert_percents?: Array<number>;
3655
+ /**
3656
+ * Required with `repeat: until`, and must be in the future; refused with any other repeat.
3657
+ */
3658
+ ends_at?: string;
3659
+ /**
3660
+ * The limit in credits. Send exactly one of limit_credits and limit_micro_usd.
3661
+ */
3662
+ limit_credits?: number;
3663
+ /**
3664
+ * The limit in micro-USD. Send exactly one of limit_credits and limit_micro_usd.
3665
+ */
3666
+ limit_micro_usd?: number;
3667
+ mode: BudgetMode;
3668
+ /**
3669
+ * Defaults to current_period.
3670
+ */
3671
+ repeat?: BudgetRepeat;
3672
+ /**
3673
+ * The workspace id (for `workspace`, it must be this workspace), the member's user id, the API key's prefix or the deployment id.
3674
+ *
3675
+ */
3676
+ scope_id: string;
3677
+ scope_kind: BudgetScopeKind;
3678
+ };
3679
+ export type BudgetHistory = {
3680
+ changes: Array<BudgetChange>;
3681
+ };
3682
+ export type BudgetList = {
3683
+ /**
3684
+ * Answers one UI question: should the UI warn that auto top-up can
3685
+ * refill credits past a hard cap?
3686
+ * True: auto top-up's `status` is `on` (enabled and currently able to
3687
+ * charge) and the workspace has at least one live budget with
3688
+ * `mode: hard`. Show the warning.
3689
+ * False: show no warning, and read it as unknown, not as proof that
3690
+ * there is no conflict. Either half is missing, or the half this
3691
+ * response does not carry could not be read (the server then reports
3692
+ * false and logs it). When billing-api omits this field, ingest serves
3693
+ * false, so during a rollout false carries no information.
3694
+ * Always false for a member who is not an owner: it is an owner-facing warning.
3695
+ * Not a gate: it never blocks saving a budget or auto top-up, and it is
3696
+ * not authorization. Render it as received; do not compare the budget
3697
+ * list with the auto top-up settings to rebuild it. The same value is
3698
+ * served on the budget list, the budget write results and the auto
3699
+ * top-up settings.
3700
+ *
3701
+ */
3702
+ auto_top_up_conflict: boolean;
3703
+ budgets: Array<Budget>;
3704
+ };
3705
+ /**
3706
+ * `soft` alerts at its thresholds and never refuses spend. `hard` also refuses spend once the limit is reached; Enterprise plans only.
3707
+ *
3708
+ */
3709
+ export type BudgetMode = 'hard' | 'soft';
3710
+ /**
3711
+ * How long a budget applies. `current_period`: until the current billing period ends. `until`: through the period holding `ends_at`. `indefinitely`: every period, with no end.
3712
+ *
3713
+ */
3714
+ export type BudgetRepeat = 'current_period' | 'until' | 'indefinitely';
3715
+ /**
3716
+ * What a budget limits.
3717
+ */
3718
+ export type BudgetScopeKind = 'workspace' | 'member' | 'api_key' | 'deployment';
3719
+ export type BudgetUpdateRequest = {
3720
+ /**
3721
+ * Ascending, no repeats.
3722
+ */
3723
+ alert_percents?: Array<number>;
3724
+ /**
3725
+ * With `repeat: until`, or alone (which means the same): the new end, in the future. Refused with any other repeat.
3726
+ *
3727
+ */
3728
+ ends_at?: string;
3729
+ /**
3730
+ * The new limit in credits. Send at most one of limit_credits and limit_micro_usd.
3731
+ */
3732
+ limit_credits?: number;
3733
+ /**
3734
+ * The new limit in micro-USD. Send at most one of limit_credits and limit_micro_usd.
3735
+ */
3736
+ limit_micro_usd?: number;
3737
+ mode?: BudgetMode;
3738
+ repeat?: BudgetRepeat;
3739
+ };
3740
+ export type BudgetWriteResult = {
3741
+ /**
3742
+ * Answers one UI question: should the UI warn that auto top-up can
3743
+ * refill credits past a hard cap?
3744
+ * True: auto top-up's `status` is `on` (enabled and currently able to
3745
+ * charge) and the workspace has at least one live budget with
3746
+ * `mode: hard`. Show the warning.
3747
+ * False: show no warning, and read it as unknown, not as proof that
3748
+ * there is no conflict. Either half is missing, or the half this
3749
+ * response does not carry could not be read (the server then reports
3750
+ * false and logs it). When billing-api omits this field, ingest serves
3751
+ * false, so during a rollout false carries no information.
3752
+ * Reflects the workspace after this write, the written budget included.
3753
+ * Not a gate: it never blocks saving a budget or auto top-up, and it is
3754
+ * not authorization. Render it as received; do not compare the budget
3755
+ * list with the auto top-up settings to rebuild it. The same value is
3756
+ * served on the budget list, the budget write results and the auto
3757
+ * top-up settings.
3758
+ *
3759
+ */
3760
+ auto_top_up_conflict: boolean;
3761
+ budget: Budget;
3762
+ };
3249
3763
  /**
3250
3764
  * Response after bulk-revoking API keys for a workspace member.
3251
3765
  */
@@ -3497,6 +4011,9 @@ export type CccMediaConstraint = {
3497
4011
  max_bytes?: number;
3498
4012
  max_height?: number;
3499
4013
  max_width?: number;
4014
+ /**
4015
+ * Accepted file types as an HTML accept list: exact MIME types or type* families, separated by commas, such as image/webp or image*,video*. A file matches when its MIME type equals one entry or starts with the family of a type* entry.
4016
+ */
3500
4017
  mime_type: string;
3501
4018
  min_bytes?: number;
3502
4019
  };
@@ -3547,6 +4064,10 @@ export type CccPageRow = {
3547
4064
  * Deleted in Draft.
3548
4065
  */
3549
4066
  is_deleted: boolean;
4067
+ /**
4068
+ * The Draft head lists desktop_starters in available_surfaces. status does not read it.
4069
+ */
4070
+ on_desktop: boolean;
3550
4071
  /**
3551
4072
  * The Draft head lists hub in available_surfaces. The website serves only such pages.
3552
4073
  */
@@ -3840,7 +4361,7 @@ export type CccWebsiteCardsPage = {
3840
4361
  page_size: number;
3841
4362
  previous_cursor?: string;
3842
4363
  revision_id: number;
3843
- sort_orders: Array<'popular' | 'name' | 'priceAsc' | 'priceDesc'>;
4364
+ sort_orders: Array<'popular' | 'name' | 'newest' | 'priceAsc' | 'priceDesc'>;
3844
4365
  /**
3845
4366
  * Staff-only filtered count; omitted for anonymous callers
3846
4367
  */
@@ -3889,7 +4410,7 @@ export type CccWebsiteRootPresentation = {
3889
4410
  export type CccWebsiteRootTab = {
3890
4411
  facets: CccWebsiteCardFacets;
3891
4412
  page: CccWebsiteRootPageInfo;
3892
- sort_orders: Array<'popular' | 'name' | 'priceAsc' | 'priceDesc'>;
4413
+ sort_orders: Array<'popular' | 'name' | 'newest' | 'priceAsc' | 'priceDesc'>;
3893
4414
  };
3894
4415
  export type CccWebsiteRootTabs = {
3895
4416
  apps: CccWebsiteRootTab;
@@ -4008,7 +4529,7 @@ export type CloudNodeCompatibility = {
4008
4529
  };
4009
4530
  export type CloudWorkflowCompatibility = {
4010
4531
  /**
4011
- * The posted models Comfy Cloud's model list does not have in the posted folder and, for a signed-in caller, whose upload a run would pick (the newest with that name among the caller's own uploads and the public model catalog) is not in the posted folder either, in the order they were posted. Absent when the request has no `models`.
4532
+ * The posted models Comfy Cloud's model list does not have in the posted folder and, for a signed-in caller, whose upload a run would pick (the newest with that name among the caller's own uploads and the public model catalog) is not in the posted folder either, in the order they were posted. A value VAELoader offers that is not a file in `vae` (`pixel_space`, a TAESD name), posted under `vae`, is not listed when the VAELoader a browser on Comfy Cloud (no pick) is served lists it. Absent when the request has no `models`.
4012
4533
  */
4013
4534
  missing_models?: Array<CompatibilityModel>;
4014
4535
  /**
@@ -4091,6 +4612,24 @@ export type CreateInviteRequest = {
4091
4612
  */
4092
4613
  email: string;
4093
4614
  };
4615
+ /**
4616
+ * Request body for creating a project.
4617
+ */
4618
+ export type CreateProjectRequest = {
4619
+ description?: string;
4620
+ /**
4621
+ * Workspace members to add when the project is created.
4622
+ */
4623
+ members?: Array<ProjectMemberInput>;
4624
+ /**
4625
+ * Display name, 1 to 80 characters after trimming.
4626
+ */
4627
+ name: string;
4628
+ /**
4629
+ * Whether runs in the project may use Comfy's shared machines.
4630
+ */
4631
+ shared_cloud_allowed?: boolean;
4632
+ };
4094
4633
  /**
4095
4634
  * Request body for creating a new user secret.
4096
4635
  */
@@ -4169,6 +4708,13 @@ export type CreateTopupCheckoutResponse = {
4169
4708
  */
4170
4709
  session_id?: string;
4171
4710
  };
4711
+ export type CreateTopupPurchaseRequest = {
4712
+ /**
4713
+ * Nominal credit purchase in USD cents, excluding tax and discounts.
4714
+ */
4715
+ amount_cents: number;
4716
+ auto_top_up?: TopupAutoTopUpSettings;
4717
+ };
4172
4718
  /**
4173
4719
  * Request body for previewing a credit top-up.
4174
4720
  */
@@ -4429,44 +4975,155 @@ export type DeploymentCompatibilityRequest = {
4429
4975
  */
4430
4976
  node_types: Array<string>;
4431
4977
  };
4432
- export type DeploymentNodeCompatibility = {
4433
- deployment_id: string;
4978
+ /**
4979
+ * comfy-builder's BlobUpload (its POST /v1/blobs 201), passed through as written; the fields are comfy-builder's.
4980
+ */
4981
+ export type DeploymentModelUpload = {
4434
4982
  /**
4435
- * The posted node types this deployment's Release does not have, in the order they were posted. Empty when it has them all, and when unknown is true.
4983
+ * Workspace-scoped id of the upload, sent as blobId to POST .../deployments/{deployment_id}/models.
4436
4984
  */
4437
- missing_node_types: Array<string>;
4985
+ blobId: string;
4438
4986
  /**
4439
- * True when the node list of the Release this deployment runs could not be read, so it was not checked: the Release is not built yet or is gone, comfy-builder could not be reached or refused the caller, its extensions list could not be read, a browser that picked the deployment failed to load it on the same ingest pod (for good when the Release is gone or its archive is corrupt or too large to ever load, see below; for any other fault, an archive missing from storage among them, only within its 30-second retry window, after which the check follows what a browser's next load gets), its catalog fails to build (in each of the last three a browser that picked the deployment is served Comfy Cloud's catalog), it is past the 16 distinct Releases one check reads (the newest deployments' Releases are read first), or the request ended before it was read. The check reads the catalog and the extensions list but not the extensions archive: a Release whose archive fails to load (missing from storage, corrupt, too large, past 64 MiB unpacked, or an entry whose path escapes the extensions folder) is answered from its catalog, not unknown, until a browser that picked it has failed to load it on the same ingest pod (each pod keeps its own record).
4987
+ * True when the request said `reuse: true` and the workspace already held these exact bytes: blobId names that blob, uploadUrl, expiresAt and parts are absent, and nothing is uploaded. False on every fresh upload, which comes in one of two forms: a single upload carries uploadUrl and expiresAt, and one the request asked for with `parts: true` carries `parts`, each piece with its own link, and neither uploadUrl nor expiresAt. Branch on this, not on uploadUrl being absent.
4440
4988
  */
4441
- unknown: boolean;
4442
- };
4443
- /**
4444
- * Request to mint a desktop login code.
4445
- */
4446
- export type DesktopLoginCodeCreateRequest = {
4989
+ deduplicated: boolean;
4447
4990
  /**
4448
- * Desktop app version string.
4991
+ * When uploadUrl stops being accepted. Absent with it.
4449
4992
  */
4450
- app_version: string;
4993
+ expiresAt?: string;
4451
4994
  /**
4452
- * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only).
4995
+ * Present only when the request said `parts: true` and the answer is not deduplicated: one link per piece, in order. PUT each piece's bytes to its link, then call POST .../model-uploads/{blob_id}/complete.
4453
4996
  */
4454
- code_challenge: string;
4997
+ parts?: Array<DeploymentModelUploadPart>;
4455
4998
  /**
4456
- * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted.
4999
+ * Presigned PUT for the file's bytes; size-locked and no-overwrite. Absent when deduplicated is true or the request said `parts: true`.
4457
5000
  */
4458
- installation_id?: string;
5001
+ uploadUrl?: string;
5002
+ };
5003
+ /**
5004
+ * comfy-builder's BlobUploadComplete (its POST /v1/blobs/{id}/complete 200), passed through as written.
5005
+ */
5006
+ export type DeploymentModelUploadComplete = {
5007
+ blobId: string;
4459
5008
  /**
4460
- * Desktop platform identifier (e.g. darwin, win32, linux).
5009
+ * The size of the joined file, the size declared at upload.
4461
5010
  */
4462
- platform: string;
5011
+ sizeBytes: number;
4463
5012
  };
4464
5013
  /**
4465
- * A freshly minted desktop login code and its polling parameters.
5014
+ * comfy-builder's 409 on the parts and complete routes, passed through as written. It never carries `code`.
4466
5015
  */
4467
- export type DesktopLoginCodeCreateResponse = {
5016
+ export type DeploymentModelUploadConflict = {
4468
5017
  /**
4469
- * Opaque single-use login code ("dlc_" prefix).
5018
+ * Machine-readable code; each route lists the ones it sends.
5019
+ */
5020
+ error: string;
5021
+ /**
5022
+ * Written for the person; names the piece on PART_MISSING and PART_WRONG_SIZE.
5023
+ */
5024
+ message?: string;
5025
+ };
5026
+ /**
5027
+ * comfy-builder's BlobUploadPart, passed through as written.
5028
+ */
5029
+ export type DeploymentModelUploadPart = {
5030
+ /**
5031
+ * When uploadUrl stops being accepted.
5032
+ */
5033
+ expiresAt: string;
5034
+ /**
5035
+ * Where the piece starts in the file.
5036
+ */
5037
+ offsetBytes: number;
5038
+ /**
5039
+ * The piece's place in the file, from 1.
5040
+ */
5041
+ partNumber: number;
5042
+ /**
5043
+ * The piece's length; the link refuses a body of any other length.
5044
+ */
5045
+ sizeBytes: number;
5046
+ /**
5047
+ * Presigned PUT for this piece; size-locked and no-overwrite.
5048
+ */
5049
+ uploadUrl: string;
5050
+ };
5051
+ /**
5052
+ * comfy-builder's BlobUploadParts (its POST /v1/blobs/{id}/parts 200), passed through as written.
5053
+ */
5054
+ export type DeploymentModelUploadParts = {
5055
+ blobId: string;
5056
+ /**
5057
+ * A fresh link for each piece not stored yet, in order; empty when every piece is in.
5058
+ */
5059
+ parts: Array<DeploymentModelUploadPart>;
5060
+ };
5061
+ /**
5062
+ * comfy-builder's CreateBlobRequest without `kind`, which ingest sets to `model`; the fields are passed on as written.
5063
+ */
5064
+ export type DeploymentModelUploadRequest = {
5065
+ /**
5066
+ * Optional BLAKE3 digest of the same bytes, 64 hex characters.
5067
+ */
5068
+ blake3?: string;
5069
+ filename: string;
5070
+ /**
5071
+ * True asks for the upload in pieces: the answer carries `parts`, one link per piece, and no uploadUrl. comfy-builder splits sizeBytes into at most 32 pieces and refuses one over 128 GiB with 400. A deduplicated answer has no pieces.
5072
+ */
5073
+ parts?: boolean;
5074
+ /**
5075
+ * True lets comfy-builder answer with a blob the workspace already holds for these bytes, `deduplicated: true` and no uploadUrl.
5076
+ */
5077
+ reuse?: boolean;
5078
+ sha256: string;
5079
+ sizeBytes: number;
5080
+ };
5081
+ /**
5082
+ * A 403 on the deployment model routes. A body with `accepted` is ingest's authentication refusing the credential before any other check (AuthTypeNotAllowedError, `{error: {message, type: auth_type_not_allowed}, accepted}`, no `code`): a credential these routes never take, such as `X-ComfyAPI-Secret`, or the session while `web_session_enabled` is off for the user. Otherwise `code` tells them apart as in DeploymentModelsRefusalBody: a body with `code` is ingest's own refusal, and one with neither `code` nor `accepted` is the platform's 403, passed through as written.
5083
+ */
5084
+ export type DeploymentModelsForbiddenBody = ErrorResponse | AuthTypeNotAllowedError | PlatformPassthroughBody;
5085
+ /**
5086
+ * A refusal on the deployment model routes: ingest's own (and the session's), as ErrorResponse `{code, message}`, or the platform's, passed through as written. One status can carry either; `code` tells them apart. A body with `code` is ingest's own refusal, made before or instead of the platform's answer; a body without it is the platform's, comfy-deploy's or comfy-builder's `{error, message}` (or only `message`), which never carries `code`. The one exception is a 403 with `accepted`, ingest's authentication refusal (see DeploymentModelsForbiddenBody).
5087
+ */
5088
+ export type DeploymentModelsRefusalBody = ErrorResponse | PlatformPassthroughBody;
5089
+ export type DeploymentNodeCompatibility = {
5090
+ deployment_id: string;
5091
+ /**
5092
+ * The posted node types this deployment's Release does not have, in the order they were posted. Empty when it has them all, and when unknown is true.
5093
+ */
5094
+ missing_node_types: Array<string>;
5095
+ /**
5096
+ * True when the node list of the Release this deployment runs could not be read, so it was not checked: the Release is not built yet or is gone, comfy-builder could not be reached or refused the caller, its extensions list could not be read, a browser that picked the deployment failed to load it on the same ingest pod (for good when the Release is gone or its archive is corrupt or too large to ever load, see below; for any other fault, an archive missing from storage among them, only within its 30-second retry window, after which the check follows what a browser's next load gets), its catalog fails to build (in each of the last three a browser that picked the deployment is served Comfy Cloud's catalog), it is past the 16 distinct Releases one check reads (the newest deployments' Releases are read first), or the request ended before it was read. The check reads the catalog and the extensions list but not the extensions archive: a Release whose archive fails to load (missing from storage, corrupt, too large, past 64 MiB unpacked, or an entry whose path escapes the extensions folder) is answered from its catalog, not unknown, until a browser that picked it has failed to load it on the same ingest pod (each pod keeps its own record).
5097
+ */
5098
+ unknown: boolean;
5099
+ };
5100
+ /**
5101
+ * Request to mint a desktop login code.
5102
+ */
5103
+ export type DesktopLoginCodeCreateRequest = {
5104
+ /**
5105
+ * Desktop app version string.
5106
+ */
5107
+ app_version: string;
5108
+ /**
5109
+ * PKCE code challenge - base64url(SHA256(code_verifier)) per RFC 7636 (S256 only).
5110
+ */
5111
+ code_challenge: string;
5112
+ /**
5113
+ * Stable identifier of the desktop installation, used only for the login attribution event. Omit when telemetry consent is off - the login flow still works, but no attribution event is emitted.
5114
+ */
5115
+ installation_id?: string;
5116
+ /**
5117
+ * Desktop platform identifier (e.g. darwin, win32, linux).
5118
+ */
5119
+ platform: string;
5120
+ };
5121
+ /**
5122
+ * A freshly minted desktop login code and its polling parameters.
5123
+ */
5124
+ export type DesktopLoginCodeCreateResponse = {
5125
+ /**
5126
+ * Opaque single-use login code ("dlc_" prefix).
4470
5127
  */
4471
5128
  code: string;
4472
5129
  /**
@@ -5448,6 +6105,12 @@ export type InteractiveTopupRequest = {
5448
6105
  * Valid only on the interactive route. True is currently rejected; paying does not change invoice defaults.
5449
6106
  */
5450
6107
  make_default?: boolean;
6108
+ /**
6109
+ * Pays the purchase opened by POST /api/billing/topup/purchases. amount_cents and auto_top_up must equal the purchase's.
6110
+ * Refused unless the caller opened it in this workspace and it is still payable (see 404 and 409). Absent keeps the unbound top-up.
6111
+ *
6112
+ */
6113
+ purchase_id?: string;
5451
6114
  /**
5452
6115
  * Required with confirmation_token; at most 2048 bytes before and after URL normalization. Must use an existing allowed HTTPS destination (HTTP only for configured localhost or 127.0.0.1). Bound to the request. Callers must supply credential-free routing URLs: the validator rejects userinfo, fragments, known authentication query keys and recognizable Stripe authority patterns, but cannot identify every opaque secret.
5453
6116
  *
@@ -5582,6 +6245,10 @@ export type JobDetailResponse = {
5582
6245
  * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states)
5583
6246
  */
5584
6247
  previewable_outputs_count?: number;
6248
+ /**
6249
+ * The project this run belongs to. Where Projects is enabled for the workspace it is always set, and work in the default project carries the default project's ID. Elsewhere it is absent. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
6250
+ */
6251
+ project_id?: string;
5585
6252
  /**
5586
6253
  * 1-based position of this job among the caller's OWN jobs held
5587
6254
  * behind the same concurrency cap (same user, workspace and auth
@@ -5721,6 +6388,10 @@ export type JobEntry = {
5721
6388
  * Count of outputs classified as previewable media types (images, video, audio, 3D, text) — a subset of outputs_count (omitted for non-terminal states)
5722
6389
  */
5723
6390
  previewable_outputs_count?: number;
6391
+ /**
6392
+ * The project this run belongs to. Where Projects is enabled for the workspace it is always set, and work in the default project carries the default project's ID. Elsewhere it is absent. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
6393
+ */
6394
+ project_id?: string;
5724
6395
  /**
5725
6396
  * User-friendly job status
5726
6397
  */
@@ -5905,6 +6576,13 @@ export type LabelRef = {
5905
6576
  */
5906
6577
  name: string;
5907
6578
  };
6579
+ /**
6580
+ * A page of access changes, newest first.
6581
+ */
6582
+ export type ListAccessEventsResponse = {
6583
+ events: Array<AccessEvent>;
6584
+ pagination: AccessEventsPagination;
6585
+ };
5908
6586
  /**
5909
6587
  * Paginated list of assets belonging to the authenticated user.
5910
6588
  */
@@ -5924,7 +6602,15 @@ export type ListAssetsResponse = {
5924
6602
  */
5925
6603
  next_cursor?: string;
5926
6604
  /**
5927
- * Total number of assets matching the filters
6605
+ * Number of assets matching the filters, counted up to 10,000 unless
6606
+ * the request sends `capped_total=false`. A capped 10,000 means "at
6607
+ * least 10,000" and must not be read as the exact count or used to
6608
+ * work out the last page. With `include_total=false` no count runs
6609
+ * and `total` is a lower bound: the assets through this page (on an
6610
+ * offset page, the skipped `offset` rows included), plus one when
6611
+ * `has_more` is true, and 0 for an empty page. To page, follow
6612
+ * `has_more` and `next_cursor`, which do not depend on the total.
6613
+ *
5928
6614
  */
5929
6615
  total: number;
5930
6616
  };
@@ -5941,6 +6627,26 @@ export type ListMembersResponse = {
5941
6627
  members: Array<Member>;
5942
6628
  pagination: PaginationInfo;
5943
6629
  };
6630
+ /**
6631
+ * The people in a project.
6632
+ */
6633
+ export type ListProjectMembersResponse = {
6634
+ members: Array<ProjectMember>;
6635
+ };
6636
+ /**
6637
+ * The projects the caller can view, with the workspace's project quota.
6638
+ */
6639
+ export type ListProjectsResponse = {
6640
+ /**
6641
+ * Only projects the caller may view, the default project first.
6642
+ */
6643
+ projects: Array<Project>;
6644
+ /**
6645
+ * Whether the workspace has a project other than the default. Read this, not the presence of a `project_id`, to decide whether to show project controls.
6646
+ */
6647
+ projects_in_use: boolean;
6648
+ quota: ProjectQuota;
6649
+ };
5944
6650
  /**
5945
6651
  * Paginated list of available asset tags.
5946
6652
  */
@@ -6032,6 +6738,10 @@ export type Member = {
6032
6738
  * User's role in the workspace
6033
6739
  */
6034
6740
  role: 'owner' | 'member';
6741
+ /**
6742
+ * Whether this member is a Workspace admin: a member who may create projects, act as Project admin in every project other than the default, and invite and remove ordinary members. `role` stays `member`. Absent where Projects is not enabled for the workspace, which reads as false. It does not answer whether the member may manage billing or change roles; only an owner may.
6743
+ */
6744
+ workspace_admin?: boolean;
6035
6745
  };
6036
6746
  /**
6037
6747
  * The `data` of a model_download WebSocket event: the latest state of one model file a Cloud job on a deployment downloads before ComfyUI starts it. Sent by the deployment's worker (services/comfy-deploy/containerruntime worker.py, _ModelNews) only when the job asked for live progress, for each file the job fetches and never for a file the release ships, all before the job's execution_start. A failed file ends the job: no other source is tried and the job is not retried, so its execution_error (or execution_interrupted, when a cancel was in flight) follows. New fields may be added; a client ignores the ones it does not read.
@@ -6372,7 +7082,7 @@ export type OAuthConsentChallengeWorkspace = {
6372
7082
  /**
6373
7083
  * The platform this authorization code will be delivered to, when the
6374
7084
  * request's validated redirect_uri is one of a known platform's own OAuth
6375
- * callbacks (ChatGPT, Claude). Derived server-side ONLY from the
7085
+ * callbacks (ChatGPT, Claude, Cursor). Derived server-side ONLY from the
6376
7086
  * redirect_uri this request was byte-matched against at GET time —
6377
7087
  * never from the registrant-supplied client_name — against a
6378
7088
  * version-controlled registry of exact callbacks and anchored callback
@@ -6380,8 +7090,10 @@ export type OAuthConsentChallengeWorkspace = {
6380
7090
  * clients; omitted for first-party clients and for any redirect that is
6381
7091
  * not a registered platform callback. It verifies the destination
6382
7092
  * platform, NOT that the registrant is that platform's own app (any
6383
- * connector on the platform can hold such a callback), so consumers
6384
- * should label it by `display_name` and still show the redirect host.
7093
+ * connector on the platform can hold such a callback, and any local
7094
+ * process can listen on Cursor's loopback callback or claim its
7095
+ * `cursor://` scheme), so consumers should label it by `display_name`
7096
+ * and still show the redirect host.
6385
7097
  * `client_display_name` is unchanged and remains registrant-supplied.
6386
7098
  *
6387
7099
  */
@@ -6393,7 +7105,7 @@ export type OAuthConsentVerifiedClient = {
6393
7105
  /**
6394
7106
  * Stable identifier of the verified platform.
6395
7107
  */
6396
- platform: 'chatgpt' | 'claude';
7108
+ platform: 'chatgpt' | 'claude' | 'cursor';
6397
7109
  };
6398
7110
  /**
6399
7111
  * OAuth 2.1 protected-resource metadata (RFC 9728).
@@ -6581,7 +7293,13 @@ export type PaginationInfo = {
6581
7293
  */
6582
7294
  offset: number;
6583
7295
  /**
6584
- * Total number of items matching filters (may be 0 when using cursor pagination)
7296
+ * Number of items matching the filters (may be 0 when using cursor
7297
+ * pagination). `GET /api/jobs` counts it up to 10,000 unless the
7298
+ * request sends `capped_total=false`, so 10,000 there means "at
7299
+ * least 10,000" and must not be read as the exact count or used to
7300
+ * work out the last page. To page, follow `has_more` and
7301
+ * `next_cursor`, which do not depend on the total.
7302
+ *
6585
7303
  */
6586
7304
  total: number;
6587
7305
  };
@@ -6795,6 +7513,12 @@ export type PlanSeatSummary = {
6795
7513
  */
6796
7514
  total_credits_cents: number;
6797
7515
  };
7516
+ /**
7517
+ * comfy-deploy's or comfy-builder's answer, passed through as written; its shape is that service's. Their refusals are `{error, message}` (Echo's own only `message`) and never carry `code`.
7518
+ */
7519
+ export type PlatformPassthroughBody = {
7520
+ [key: string]: unknown;
7521
+ };
6798
7522
  /**
6799
7523
  * Plan information for preview display
6800
7524
  */
@@ -7080,6 +7804,132 @@ export type PreviousPlan = {
7080
7804
  */
7081
7805
  team_credit_stop_id?: string;
7082
7806
  };
7807
+ /**
7808
+ * A private, invite-only space inside a workspace, or the workspace's default project.
7809
+ */
7810
+ export type Project = {
7811
+ create_time: string;
7812
+ /**
7813
+ * User who created the project. Absent on the default project, which no one creates.
7814
+ */
7815
+ created_by_user_id?: string;
7816
+ /**
7817
+ * Up to 500 characters. Absent when none is set.
7818
+ */
7819
+ description?: string;
7820
+ id: string;
7821
+ /**
7822
+ * Whether this is the workspace's default project, which holds work that names no project. Every workspace member is in it, and it cannot be renamed or given members.
7823
+ */
7824
+ is_default: boolean;
7825
+ /**
7826
+ * The caller's project role. Absent when the caller's access comes from their workspace role (an owner or Workspace admin) or the project is the default one. Use `permissions`, not this, to decide what to show.
7827
+ */
7828
+ my_role?: ProjectRole;
7829
+ /**
7830
+ * Display name, 1 to 80 characters. Unique in the workspace, whatever its case.
7831
+ */
7832
+ name: string;
7833
+ permissions: ProjectPermissions;
7834
+ /**
7835
+ * Whether runs in this project may use Comfy's shared machines.
7836
+ */
7837
+ shared_cloud_allowed: boolean;
7838
+ update_time: string;
7839
+ workspace_id: string;
7840
+ /**
7841
+ * Whether the project takes writes. False when it is frozen, for example after a plan change; a write is then refused with `project_frozen`. It does not say whether the caller may write; read `permissions` for that.
7842
+ */
7843
+ writable: boolean;
7844
+ };
7845
+ /**
7846
+ * A person in a project, with their project role.
7847
+ */
7848
+ export type ProjectMember = {
7849
+ /**
7850
+ * User who added them. Absent when that user is no longer known.
7851
+ */
7852
+ added_by_user_id?: string;
7853
+ /**
7854
+ * When they were added to the project
7855
+ */
7856
+ create_time: string;
7857
+ /**
7858
+ * The member's email address, or an empty string if none is on file.
7859
+ */
7860
+ email: string;
7861
+ /**
7862
+ * The member's display name
7863
+ */
7864
+ name: string;
7865
+ role: ProjectRole;
7866
+ user_id: string;
7867
+ };
7868
+ /**
7869
+ * A workspace member to add to a project, with their project role.
7870
+ */
7871
+ export type ProjectMemberInput = {
7872
+ role: ProjectRole;
7873
+ user_id: string;
7874
+ };
7875
+ /**
7876
+ * What the caller may do with one kind of thing in a project. `write` includes `read`. On things that belong to one person (runs, assets, usage) the level carries a scope: `_own` covers what the caller created and `_all` covers everyone's, and `_all` includes `_own`.
7877
+ */
7878
+ export type ProjectPermissionLevel = 'read' | 'write' | 'read_own' | 'read_all' | 'write_own' | 'write_all';
7879
+ /**
7880
+ * The caller's permissions in this project, for showing and hiding actions. Render each as received; do not rebuild them from `my_role` or the workspace role. An absent key means no access. Each write is checked again by the server.
7881
+ */
7882
+ export type ProjectPermissions = {
7883
+ /**
7884
+ * See the project (`read`); rename it and edit its description (`write`).
7885
+ */
7886
+ project?: ProjectPermissionLevel;
7887
+ /**
7888
+ * View and download assets; rename, tag and delete the caller's own (`write_own`) or anyone's (`write_all`).
7889
+ */
7890
+ 'project.assets'?: ProjectPermissionLevel;
7891
+ /**
7892
+ * See the project's deployments (`read`); create and change them, and turn Comfy's shared machines on or off for the project (`write`).
7893
+ */
7894
+ 'project.deployments'?: ProjectPermissionLevel;
7895
+ /**
7896
+ * See who is in the project (`read`); add and remove people and change their roles (`write`).
7897
+ */
7898
+ 'project.members'?: ProjectPermissionLevel;
7899
+ /**
7900
+ * See runs; submit, cancel and delete the caller's own (`write_own`) or anyone's (`write_all`).
7901
+ */
7902
+ 'project.queue'?: ProjectPermissionLevel;
7903
+ /**
7904
+ * See the caller's own usage in the project (`read_own`), or the project's totals and each member's (`read_all`).
7905
+ */
7906
+ 'project.usage'?: ProjectPermissionLevel;
7907
+ /**
7908
+ * List and open workflows (`read`); create, save and delete them (`write`).
7909
+ */
7910
+ 'project.workflow'?: ProjectPermissionLevel;
7911
+ };
7912
+ /**
7913
+ * How many projects the workspace may have and has.
7914
+ */
7915
+ export type ProjectQuota = {
7916
+ /**
7917
+ * Projects the workspace has now, not counting the default project.
7918
+ */
7919
+ active: number;
7920
+ /**
7921
+ * Whether to offer the caller "New project": true when the caller holds `workspace.projects` write and the workspace is under its limit. Do not rebuild it from `max_active` and `active`.
7922
+ */
7923
+ can_create: boolean;
7924
+ /**
7925
+ * The most projects the workspace's plan allows, not counting the default project.
7926
+ */
7927
+ max_active: number;
7928
+ };
7929
+ /**
7930
+ * A person's role in one project. A Runner runs existing workflows. A Builder also creates and edits workflows. A Project admin also manages the project, its members and its deployments.
7931
+ */
7932
+ export type ProjectRole = 'runner' | 'builder' | 'project_admin';
7083
7933
  /**
7084
7934
  * Error response for ComfyUI prompt execution.
7085
7935
  */
@@ -7097,6 +7947,70 @@ export type PromptInfo = {
7097
7947
  queue_remaining?: number;
7098
7948
  };
7099
7949
  };
7950
+ /**
7951
+ * The `data` of a prompt_outputs_skipped WebSocket event. Sent when ComfyUI accepts a Cloud job's prompt but rejects some nodes: ComfyUI skips the outputs that depend on them and runs the rest, and the job keeps running. The inference server sends it to the user's channel (services/inference/server/services/joborchestrator/prompt_validation.go). Every string taken from ComfyUI has its lists of allowed values or file names replaced ("is not a valid value", "[list omitted]") and is capped at 512 characters.
7952
+ */
7953
+ export type PromptOutputsSkippedData = {
7954
+ /**
7955
+ * The rejected nodes, keyed by node id, in the shape ComfyUI's /prompt returns. At most 50 nodes, the lowest ids kept, and 64 KiB as JSON.
7956
+ */
7957
+ node_errors: {
7958
+ [key: string]: PromptOutputsSkippedNodeError;
7959
+ };
7960
+ /**
7961
+ * The Cloud job id.
7962
+ */
7963
+ prompt_id: string;
7964
+ };
7965
+ /**
7966
+ * Server-to-client prompt_outputs_skipped frame on /ws. ComfyUI skipped some of a Cloud job's outputs because nodes failed validation.
7967
+ */
7968
+ export type PromptOutputsSkippedFrame = {
7969
+ data: PromptOutputsSkippedData;
7970
+ type: 'prompt_outputs_skipped';
7971
+ };
7972
+ /**
7973
+ * One rejected node in a prompt_outputs_skipped event.
7974
+ */
7975
+ export type PromptOutputsSkippedNodeError = {
7976
+ /**
7977
+ * The node's type. Empty when ComfyUI sent none.
7978
+ */
7979
+ class_type: string;
7980
+ /**
7981
+ * The ids of the output nodes ComfyUI skipped because of this node, at most 50. Only ids ComfyUI sent as strings are kept; any other entry is dropped.
7982
+ */
7983
+ dependent_outputs: Array<string>;
7984
+ /**
7985
+ * Why ComfyUI rejected the node, at most 10. A custom node's validator may report a bare string, which is sent as that string. Can be empty when the size cap left no room for the node's errors.
7986
+ */
7987
+ errors: Array<string | PromptOutputsSkippedValidationError>;
7988
+ };
7989
+ /**
7990
+ * One validation error as ComfyUI reports it, with tracebacks and every other field removed. type, message and details are each present only when ComfyUI sent them as strings.
7991
+ */
7992
+ export type PromptOutputsSkippedValidationError = {
7993
+ details?: string;
7994
+ /**
7995
+ * Only the keys the editor reads, each present when ComfyUI sent it. A list or object value becomes the string "[list omitted]".
7996
+ */
7997
+ extra_info?: {
7998
+ /**
7999
+ * The input the error belongs to.
8000
+ */
8001
+ input_name?: string | number | boolean;
8002
+ /**
8003
+ * The type the node received.
8004
+ */
8005
+ received_type?: string | number | boolean;
8006
+ /**
8007
+ * The value the node received.
8008
+ */
8009
+ received_value?: string | number | boolean;
8010
+ };
8011
+ message?: string;
8012
+ type?: string;
8013
+ };
7100
8014
  /**
7101
8015
  * Request body for submitting a ComfyUI workflow prompt for execution.
7102
8016
  */
@@ -7629,6 +8543,12 @@ export type SecretResponse = {
7629
8543
  * Server-to-client CRDT document frame carried by the /ws envelope.
7630
8544
  */
7631
8545
  export type ServerDocFrame = DocSubscribedFrame | DocUpdateFrame | DocResetFrame | DocOpsResultFrame;
8546
+ /**
8547
+ * Request body for adding a project member or changing their role.
8548
+ */
8549
+ export type SetProjectMemberRequest = {
8550
+ role: ProjectRole;
8551
+ };
7632
8552
  /**
7633
8553
  * The deployment a start was asked for, and its status after the ask.
7634
8554
  */
@@ -7690,7 +8610,16 @@ export type SubscribeRequest = {
7690
8610
  /**
7691
8611
  * Stripe ConfirmationToken created from deferred Payment Element
7692
8612
  * details. For an initial subscription, the backend creates the exact
7693
- * invoice PaymentIntent and confirms it with this token.
8613
+ * invoice PaymentIntent and confirms it with this token. For a change
8614
+ * of an existing plan (upgrade, billing-cycle reset or scheduled
8615
+ * downgrade), the backend saves the card with a SetupIntent first; if
8616
+ * that needs 3-D Secure, the operation's payment_intent_client_secret
8617
+ * on /billing/ops/{id} carries the SetupIntent's client secret for
8618
+ * Stripe.js handleNextAction. An immediate upgrade then charges the
8619
+ * prorated amount to this card. On success the card becomes the
8620
+ * workspace default (Stripe customer default and the subscription's);
8621
+ * a declined or unauthenticated card changes no default. Requires
8622
+ * return_url. Mutually exclusive with saved_payment_method_id.
7694
8623
  *
7695
8624
  */
7696
8625
  confirmation_token?: string;
@@ -7741,9 +8670,15 @@ export type SubscribeRequest = {
7741
8670
  */
7742
8671
  return_url?: string;
7743
8672
  /**
7744
- * Optional saved payment method selected for this subscription. It
7745
- * must be attached to the current workspace's Stripe customer.
7746
- * Mutually exclusive with confirmation_token.
8673
+ * Optional saved payment method selected at checkout, for a new
8674
+ * subscription or a change of an existing plan (upgrade, billing-cycle
8675
+ * reset or scheduled downgrade). It must be attached to the current
8676
+ * workspace's Stripe customer. An immediate upgrade charges the
8677
+ * prorated amount to this card; a scheduled downgrade charges nothing.
8678
+ * On success the card becomes the workspace default (Stripe customer
8679
+ * default and the subscription's); a declined charge changes no
8680
+ * default. Omitted, the plan change charges the current default as
8681
+ * before. Mutually exclusive with confirmation_token.
7747
8682
  *
7748
8683
  */
7749
8684
  saved_payment_method_id?: string;
@@ -8206,6 +9141,31 @@ export type TopupAutoTopUpSettings = {
8206
9141
  */
8207
9142
  threshold_credits: number;
8208
9143
  };
9144
+ export type TopupPurchase = {
9145
+ amount_cents: number;
9146
+ /**
9147
+ * The settings the payment must carry; absent for a plain purchase. An absent monthly_budget_cents means the default budget.
9148
+ */
9149
+ auto_top_up?: TopupAutoTopUpSettings;
9150
+ /**
9151
+ * The latest payment attempt; read GET /api/billing/ops/{id} for its details.
9152
+ */
9153
+ billing_op_id?: string;
9154
+ /**
9155
+ * The latest attempt's operation status.
9156
+ */
9157
+ billing_op_status?: string;
9158
+ expires_at: string;
9159
+ purchase_id: string;
9160
+ /**
9161
+ * open: payable, by a first attempt or after the latest attempt failed. processing: an attempt is unresolved.
9162
+ * paid: an attempt succeeded; never payable again. reconciliation_needed: the payment was taken but its credit
9163
+ * is not confirmed; never payable again; contact support rather than paying again. superseded: replaced by a newer purchase or hosted checkout.
9164
+ * expired: past expires_at. A purchase superseded or expired while an attempt was in flight reports that attempt's outcome.
9165
+ *
9166
+ */
9167
+ status: 'open' | 'processing' | 'paid' | 'reconciliation_needed' | 'superseded' | 'expired';
9168
+ };
8209
9169
  /**
8210
9170
  * What a credit top-up of the requested amount would grant.
8211
9171
  */
@@ -8266,6 +9226,14 @@ export type UpdateMemberRoleRequest = {
8266
9226
  */
8267
9227
  role: 'owner' | 'member';
8268
9228
  };
9229
+ /**
9230
+ * Request body for changing a project. Only the fields sent are changed.
9231
+ */
9232
+ export type UpdateProjectRequest = {
9233
+ description?: string;
9234
+ name?: string;
9235
+ shared_cloud_allowed?: boolean;
9236
+ };
8269
9237
  /**
8270
9238
  * Request body for updating an existing user secret.
8271
9239
  */
@@ -8541,6 +9509,15 @@ export type ValidationResult = {
8541
9509
  */
8542
9510
  warnings?: Array<ValidationError>;
8543
9511
  };
9512
+ /**
9513
+ * The signed link `GET /api/view?redirect=false` answers with: the same link the 302 sends in `Location`, so it expires like that one.
9514
+ */
9515
+ export type ViewFileUrlResponse = {
9516
+ /**
9517
+ * Signed Google Cloud Storage link to the file. It needs no other credential, so treat it as a secret until it expires.
9518
+ */
9519
+ url: string;
9520
+ };
8544
9521
  /**
8545
9522
  * The live web session and the user it belongs to
8546
9523
  */
@@ -8644,6 +9621,10 @@ export type WorkflowResponse = {
8644
9621
  id: string;
8645
9622
  latest_version: number;
8646
9623
  name?: string;
9624
+ /**
9625
+ * The project this workflow belongs to. Where Projects is enabled for the workspace it is always set, and work in the default project carries the default project's ID. Elsewhere it is absent. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
9626
+ */
9627
+ project_id?: string;
8647
9628
  updated_at: string;
8648
9629
  };
8649
9630
  /**
@@ -8936,6 +9917,10 @@ export type WorkspaceWithRole = {
8936
9917
  role: 'owner' | 'member';
8937
9918
  subscription_tier?: SubscriptionTier;
8938
9919
  type: 'personal' | 'team';
9920
+ /**
9921
+ * Whether the requesting user is a Workspace admin: a member who may create projects, act as Project admin in every project other than the default, and invite and remove ordinary members. `role` stays `member`. Absent where Projects is not enabled for the workspace, which reads as false. It does not answer whether the member may manage billing or change roles; only an owner may.
9922
+ */
9923
+ workspace_admin?: boolean;
8939
9924
  };
8940
9925
  /**
8941
9926
  * Represents a user-owned asset (image, video, or other generated output).
@@ -8993,6 +9978,10 @@ export type AssetWritable = {
8993
9978
  * URL for asset preview/thumbnail
8994
9979
  */
8995
9980
  preview_url?: string;
9981
+ /**
9982
+ * The project this asset belongs to. Where Projects is enabled for the workspace it is always set, and work in the default project carries the default project's ID. Elsewhere it is absent. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
9983
+ */
9984
+ project_id?: string;
8996
9985
  /**
8997
9986
  * Durable, owner-gated short link to this asset's content (relative `/api/s/{id}` path). Stable across the underlying signed URL's expiry — resolving it re-mints a fresh signed URL on every request — so it is safe to persist or share into chat, unlike `preview_url`. Only the minting user can resolve it. Omitted when the short-link surface is disabled or the asset has no resolvable content hash.
8998
9987
  */
@@ -9068,10 +10057,30 @@ export type ListAssetsResponseWritable = {
9068
10057
  */
9069
10058
  next_cursor?: string;
9070
10059
  /**
9071
- * Total number of assets matching the filters
10060
+ * Number of assets matching the filters, counted up to 10,000 unless
10061
+ * the request sends `capped_total=false`. A capped 10,000 means "at
10062
+ * least 10,000" and must not be read as the exact count or used to
10063
+ * work out the last page. With `include_total=false` no count runs
10064
+ * and `total` is a lower bound: the assets through this page (on an
10065
+ * offset page, the skipped `offset` rows included), plus one when
10066
+ * `has_more` is true, and 0 for an empty page. To page, follow
10067
+ * `has_more` and `next_cursor`, which do not depend on the total.
10068
+ *
9072
10069
  */
9073
10070
  total: number;
9074
10071
  };
10072
+ /**
10073
+ * The blobId the model upload route answered
10074
+ */
10075
+ export type DeploymentModelUploadBlobId = string;
10076
+ /**
10077
+ * One of the workspace's deployments (dep-{uuid} format)
10078
+ */
10079
+ export type DeploymentModelsDeploymentId = string;
10080
+ /**
10081
+ * Workspace ID (w-{uuid} format)
10082
+ */
10083
+ export type DeploymentModelsWorkspaceId = string;
9075
10084
  /**
9076
10085
  * The workspace a media request reads from, where a media tag cannot
9077
10086
  * send `X-Comfy-Workspace-ID`. It applies only while
@@ -9088,10 +10097,28 @@ export type ListAssetsResponseWritable = {
9088
10097
  *
9089
10098
  */
9090
10099
  export type MediaWorkspaceId = string;
9091
- export type GetJwksData = {
9092
- body?: never;
9093
- path?: never;
9094
- query?: never;
10100
+ /**
10101
+ * The project a request acts in. The operations that list it are the
10102
+ * ones that read it: they list workflows, runs or assets, or create
10103
+ * one. Absent means the workspace's default project, which is how
10104
+ * existing clients keep working.
10105
+ *
10106
+ * An operation on one existing workflow, run or asset does not take
10107
+ * it: the row's own project decides. Any other operation that creates
10108
+ * a workflow, run or asset acts in the default project until it lists
10109
+ * this parameter.
10110
+ *
10111
+ * The project must be in the workspace the request resolves to. A
10112
+ * project that does not exist, or that the caller may not view, is 404
10113
+ * `not_found`; the two look the same. Where Projects is not enabled for
10114
+ * the workspace the header is ignored.
10115
+ *
10116
+ */
10117
+ export type ProjectId = string;
10118
+ export type GetJwksData = {
10119
+ body?: never;
10120
+ path?: never;
10121
+ query?: never;
9095
10122
  url: '/.well-known/jwks.json';
9096
10123
  };
9097
10124
  export type GetJwksResponses = {
@@ -10222,6 +11249,26 @@ export type AgentGetUsageStatusResponses = {
10222
11249
  export type AgentGetUsageStatusResponse = AgentGetUsageStatusResponses[keyof AgentGetUsageStatusResponses];
10223
11250
  export type ListAssetsData = {
10224
11251
  body?: never;
11252
+ headers?: {
11253
+ /**
11254
+ * The project a request acts in. The operations that list it are the
11255
+ * ones that read it: they list workflows, runs or assets, or create
11256
+ * one. Absent means the workspace's default project, which is how
11257
+ * existing clients keep working.
11258
+ *
11259
+ * An operation on one existing workflow, run or asset does not take
11260
+ * it: the row's own project decides. Any other operation that creates
11261
+ * a workflow, run or asset acts in the default project until it lists
11262
+ * this parameter.
11263
+ *
11264
+ * The project must be in the workspace the request resolves to. A
11265
+ * project that does not exist, or that the caller may not view, is 404
11266
+ * `not_found`; the two look the same. Where Projects is not enabled for
11267
+ * the workspace the header is ignored.
11268
+ *
11269
+ */
11270
+ 'X-Comfy-Project-ID'?: string;
11271
+ };
10225
11272
  path?: never;
10226
11273
  query?: {
10227
11274
  /**
@@ -10287,7 +11334,9 @@ export type ListAssetsData = {
10287
11334
  */
10288
11335
  limit?: number;
10289
11336
  /**
10290
- * Number of assets to skip for pagination
11337
+ * Number of assets to skip for pagination. A negative offset returns
11338
+ * 400 `INVALID_OFFSET`.
11339
+ *
10291
11340
  */
10292
11341
  offset?: number;
10293
11342
  /**
@@ -10336,6 +11385,28 @@ export type ListAssetsData = {
10336
11385
  *
10337
11386
  */
10338
11387
  after?: string;
11388
+ /**
11389
+ * When true or omitted, `total` counts at most 10,000 matching
11390
+ * assets, so a total of 10,000 means "at least 10,000", not an exact
11391
+ * count. A capped count stops after 10,000 matching assets instead
11392
+ * of reading every one. Send false for the exact count, for example
11393
+ * to work out the last page from the total: `has_more` and
11394
+ * `next_cursor` do not depend on the total either way. Ignored when
11395
+ * `include_total` is false.
11396
+ *
11397
+ */
11398
+ capped_total?: boolean;
11399
+ /**
11400
+ * Send false when the caller does not read `total`, for example a
11401
+ * list that pages by `has_more` and `next_cursor`. No count runs,
11402
+ * `capped_total` is ignored, and `total` is a lower bound instead of
11403
+ * a count: the assets through this page (on an offset page, the
11404
+ * skipped `offset` rows included), plus one when `has_more` is true,
11405
+ * and 0 for an empty page. When true or omitted, `total` is counted
11406
+ * as `capped_total` says.
11407
+ *
11408
+ */
11409
+ include_total?: boolean;
10339
11410
  };
10340
11411
  url: '/api/assets';
10341
11412
  };
@@ -10400,6 +11471,26 @@ export type CreateAssetData = {
10400
11471
  */
10401
11472
  user_metadata?: string;
10402
11473
  };
11474
+ headers?: {
11475
+ /**
11476
+ * The project a request acts in. The operations that list it are the
11477
+ * ones that read it: they list workflows, runs or assets, or create
11478
+ * one. Absent means the workspace's default project, which is how
11479
+ * existing clients keep working.
11480
+ *
11481
+ * An operation on one existing workflow, run or asset does not take
11482
+ * it: the row's own project decides. Any other operation that creates
11483
+ * a workflow, run or asset acts in the default project until it lists
11484
+ * this parameter.
11485
+ *
11486
+ * The project must be in the workspace the request resolves to. A
11487
+ * project that does not exist, or that the caller may not view, is 404
11488
+ * `not_found`; the two look the same. Where Projects is not enabled for
11489
+ * the workspace the header is ignored.
11490
+ *
11491
+ */
11492
+ 'X-Comfy-Project-ID'?: string;
11493
+ };
10403
11494
  path?: never;
10404
11495
  query?: never;
10405
11496
  url: '/api/assets';
@@ -10434,7 +11525,7 @@ export type CreateAssetErrors = {
10434
11525
  */
10435
11526
  500: ErrorResponse;
10436
11527
  /**
10437
- * Temporary upload unavailability. `PRIVATE_MODELS_UNAVAILABLE` means model-import eligibility could not be resolved; retry without inferring plan ineligibility. `UPLOAD_BUDGET_EXHAUSTED` means the image buffer budget is full; retry after the Retry-After seconds.
11528
+ * Temporary upload unavailability. `PRIVATE_MODELS_UNAVAILABLE` means model-import eligibility could not be resolved; retry without inferring plan ineligibility. `UPLOAD_BUDGET_EXHAUSTED` means the upload buffer budget on this pod was full while buffering the file part (the first 32 MiB of a file sent before every field is buffered); retry after the Retry-After seconds.
10438
11529
  */
10439
11530
  503: ErrorResponse;
10440
11531
  };
@@ -10938,7 +12029,7 @@ export type CreateAssetFromHashData = {
10938
12029
  */
10939
12030
  name?: string;
10940
12031
  /**
10941
- * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. At most 64 tags, each a non-empty UTF-8 string of at most 256 bytes (surrounding whitespace included) with no NUL; a request breaking either rule is refused with 400 `INVALID_BODY`. JSON decoding replaces invalid UTF-8 and lone surrogate escapes (e.g. `�`) with U+FFFD (3 bytes each) instead of refusing them, and the 256-byte limit applies to the replaced value.
12032
+ * Freeform tags for the asset. Common types include "models", "input", "output", and "temp", but any tag can be used in any order. At most 64 tags, each a non-empty UTF-8 string of at most 256 bytes (surrounding whitespace included) with no NUL; a request breaking either rule is refused with 400 `INVALID_BODY`, or with 413 `PAYLOAD_TOO_LARGE` once the body passes the 128,000-byte cap. JSON decoding replaces invalid UTF-8 and lone surrogate escapes (e.g. `�`) with U+FFFD (3 bytes each) instead of refusing them, and the 256-byte limit applies to the replaced value.
10942
12033
  */
10943
12034
  tags: Array<string>;
10944
12035
  /**
@@ -10948,6 +12039,26 @@ export type CreateAssetFromHashData = {
10948
12039
  [key: string]: unknown;
10949
12040
  };
10950
12041
  };
12042
+ headers?: {
12043
+ /**
12044
+ * The project a request acts in. The operations that list it are the
12045
+ * ones that read it: they list workflows, runs or assets, or create
12046
+ * one. Absent means the workspace's default project, which is how
12047
+ * existing clients keep working.
12048
+ *
12049
+ * An operation on one existing workflow, run or asset does not take
12050
+ * it: the row's own project decides. Any other operation that creates
12051
+ * a workflow, run or asset acts in the default project until it lists
12052
+ * this parameter.
12053
+ *
12054
+ * The project must be in the workspace the request resolves to. A
12055
+ * project that does not exist, or that the caller may not view, is 404
12056
+ * `not_found`; the two look the same. Where Projects is not enabled for
12057
+ * the workspace the header is ignored.
12058
+ *
12059
+ */
12060
+ 'X-Comfy-Project-ID'?: string;
12061
+ };
10951
12062
  path?: never;
10952
12063
  query?: never;
10953
12064
  url: '/api/assets/from-hash';
@@ -10969,6 +12080,18 @@ export type CreateAssetFromHashErrors = {
10969
12080
  * Source asset with given hash not found
10970
12081
  */
10971
12082
  404: ErrorResponse;
12083
+ /**
12084
+ * Request body exceeds 128 KB (128,000 bytes). Enforced by the server's body-limit
12085
+ * middleware, so the status stays 413 rather than being remapped to
12086
+ * 400. With a Content-Length the body is refused before it is read;
12087
+ * a chunked body is cut off at the cap while it is decoded, so one
12088
+ * whose JSON value completes within the bytes read up to the cap
12089
+ * can still succeed. The service's error handler
12090
+ * still renders it into the same `{code, message}` envelope as the
12091
+ * other failures, with code `PAYLOAD_TOO_LARGE`.
12092
+ *
12093
+ */
12094
+ 413: ErrorResponse;
10972
12095
  /**
10973
12096
  * Validation error (e.g., disallowed model_type tag)
10974
12097
  */
@@ -11327,7 +12450,7 @@ export type StartModelUploadData = {
11327
12450
  };
11328
12451
  headers?: {
11329
12452
  /**
11330
- * The browser page's HTTPS origin, forwarded when opening a resumable session so its later responses carry CORS headers for that page.
12453
+ * The browser page's HTTPS origin, or local ComfyUI's loopback http://localhost:<port> or http://127.0.0.1:<port>, forwarded when opening a resumable session so its later responses carry CORS headers for that page.
11331
12454
  */
11332
12455
  Origin?: string;
11333
12456
  };
@@ -11598,7 +12721,7 @@ export type CreateBillingHandoffData = {
11598
12721
  };
11599
12722
  export type CreateBillingHandoffErrors = {
11600
12723
  /**
11601
- * `INVALID_REQUEST`
12724
+ * `INVALID_REQUEST`, or `workspace_id_invalid`: X-Comfy-Workspace-ID or ?workspace_id= names another workspace than the body
11602
12725
  */
11603
12726
  400: ErrorResponse;
11604
12727
  /**
@@ -11626,6 +12749,42 @@ export type CreateBillingHandoffResponses = {
11626
12749
  201: BillingHandoffCreateResponse;
11627
12750
  };
11628
12751
  export type CreateBillingHandoffResponse = CreateBillingHandoffResponses[keyof CreateBillingHandoffResponses];
12752
+ export type CreateBillingHandoffCheckoutData = {
12753
+ body: BillingHandoffCheckoutRequest;
12754
+ path?: never;
12755
+ query?: never;
12756
+ url: '/api/auth/handoffs/checkout';
12757
+ };
12758
+ export type CreateBillingHandoffCheckoutErrors = {
12759
+ /**
12760
+ * `INVALID_REQUEST`: plan_slug is missing, or plan_slug or team_credit_stop_id is not 1 to 128 letters, digits, `_` or `-`
12761
+ */
12762
+ 400: ErrorResponse;
12763
+ /**
12764
+ * `INVALID_CREDENTIAL`: no scoped-session bearer, or the session or its source sign-in has ended
12765
+ */
12766
+ 401: ErrorResponse;
12767
+ /**
12768
+ * `CREDENTIAL_UNSUPPORTED`: the session is not a Platform billing tab's; `BILLING_FORBIDDEN`: the request did not come from the Platform origin, or the user no longer owns the workspace; `HANDOFF_DISABLED`, or another billing policy refusal
12769
+ */
12770
+ 403: ErrorResponse;
12771
+ /**
12772
+ * Too many handoffs for this sign-in, client address or user in the last hour
12773
+ */
12774
+ 429: ErrorResponse;
12775
+ /**
12776
+ * `SERVICE_UNAVAILABLE`: the billing policy could not be checked
12777
+ */
12778
+ 503: ErrorResponse;
12779
+ };
12780
+ export type CreateBillingHandoffCheckoutError = CreateBillingHandoffCheckoutErrors[keyof CreateBillingHandoffCheckoutErrors];
12781
+ export type CreateBillingHandoffCheckoutResponses = {
12782
+ /**
12783
+ * Handoff issued. `entry_url` is billing-web's handoff page with `intent=checkout`, `plan` and `team_credit_stop_id` (if any) in the query and the token in the fragment.
12784
+ */
12785
+ 201: BillingHandoffCreateResponse;
12786
+ };
12787
+ export type CreateBillingHandoffCheckoutResponse = CreateBillingHandoffCheckoutResponses[keyof CreateBillingHandoffCheckoutResponses];
11629
12788
  export type ExchangeBillingHandoffData = {
11630
12789
  body: BillingHandoffExchangeRequest;
11631
12790
  path?: never;
@@ -11868,7 +13027,7 @@ export type ExchangeTokenErrors = {
11868
13027
  */
11869
13028
  400: ErrorResponse;
11870
13029
  /**
11871
- * Invalid or expired Firebase JWT, no live web session, or a revoked, expired, deleted or unknown API key. Refused credentials get `code` `UNAUTHORIZED` and a `message`. A session that ends within seconds gets `code` `session_expired`: a token minted from it would expire on arrival. `oauth_grant_ended`: an OAuth access token holding `comfy-cloud:workspace-token:mint` whose grant was signed out, revoked or expired, even though the token itself is still valid; sign in again.
13030
+ * Invalid or expired Firebase JWT, no live web session, or a revoked, expired, deleted or unknown API key. Refused credentials get `code` `UNAUTHORIZED` and a `message`. A session that ends within seconds gets `code` `session_expired`: a token minted from it would expire on arrival. `oauth_grant_ended`: an OAuth access token minting a partner-node token, or holding `comfy-cloud:workspace-token:mint`, whose grant was signed out, revoked or expired, even though the token itself is still valid; sign in again.
11872
13031
  */
11873
13032
  401: ErrorResponse;
11874
13033
  /**
@@ -11888,7 +13047,7 @@ export type ExchangeTokenErrors = {
11888
13047
  */
11889
13048
  500: ErrorResponse;
11890
13049
  /**
11891
- * The comfy-api registry could not verify an API key. `code` is `SERVICE_UNAVAILABLE`; retry, since the key may be good. `partner_node_token_disabled`: a partner-node mint while ops have switched those off (`PartnerNodeTokenMintDisabled`); mint without `resource` instead. `oauth_workspace_mint_disabled`: an OAuth grant naming a workspace other than its own while ops have switched that off (`OAuthCrossWorkspaceMintDisabled`); authorize again for that workspace.
13050
+ * An API key could not be verified, so retry: the key may be good. `code` is `VERIFY_UNAVAILABLE` when a database read of the exchange failed, `VERIFY_BUSY` when none of the exchange's connections freed within 0.5 s, and `SERVICE_UNAVAILABLE` when the comfy-api registry or the account-status check's Firebase read failed. `partner_node_token_disabled`: a partner-node mint while ops have switched those off (`PartnerNodeTokenMintDisabled`); mint without `resource` instead. `oauth_workspace_mint_disabled`: an OAuth grant naming a workspace other than its own while ops have switched that off (`OAuthCrossWorkspaceMintDisabled`); authorize again for that workspace.
11892
13051
  */
11893
13052
  503: ErrorResponse;
11894
13053
  };
@@ -12099,6 +13258,266 @@ export type GetBillingBalanceResponses = {
12099
13258
  200: BillingBalanceResponse;
12100
13259
  };
12101
13260
  export type GetBillingBalanceResponse = GetBillingBalanceResponses[keyof GetBillingBalanceResponses];
13261
+ export type ListBillingBudgetsData = {
13262
+ body?: never;
13263
+ path?: never;
13264
+ query?: never;
13265
+ url: '/api/billing/budgets';
13266
+ };
13267
+ export type ListBillingBudgetsErrors = {
13268
+ /**
13269
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
13270
+ */
13271
+ 400: ErrorResponse;
13272
+ /**
13273
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
13274
+ */
13275
+ 401: ErrorResponse;
13276
+ /**
13277
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
13278
+ */
13279
+ 403: ForbiddenError;
13280
+ /**
13281
+ * Internal server error
13282
+ */
13283
+ 500: ErrorResponse;
13284
+ /**
13285
+ * `budgets_unavailable`: budgets are not available in this environment.
13286
+ */
13287
+ 503: ErrorResponse;
13288
+ };
13289
+ export type ListBillingBudgetsError = ListBillingBudgetsErrors[keyof ListBillingBudgetsErrors];
13290
+ export type ListBillingBudgetsResponses = {
13291
+ /**
13292
+ * Success
13293
+ */
13294
+ 200: BudgetList;
13295
+ };
13296
+ export type ListBillingBudgetsResponse = ListBillingBudgetsResponses[keyof ListBillingBudgetsResponses];
13297
+ export type CreateBillingBudgetData = {
13298
+ body: BudgetCreateRequest;
13299
+ path?: never;
13300
+ query?: never;
13301
+ url: '/api/billing/budgets';
13302
+ };
13303
+ export type CreateBillingBudgetErrors = {
13304
+ /**
13305
+ * `INVALID_REQUEST` (the body is not a JSON object), `invalid_budget`
13306
+ * (unknown `scope_kind` or `mode`, no `scope_id`, a limit that is not
13307
+ * positive, both or neither limit fields, bad `alert_percents`,
13308
+ * `until` without a future `ends_at`, or `ends_at` with another
13309
+ * `repeat`), or `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
13310
+ *
13311
+ */
13312
+ 400: ErrorResponse;
13313
+ /**
13314
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
13315
+ */
13316
+ 401: ErrorResponse;
13317
+ /**
13318
+ * `not_workspace_owner` (the caller is a member, not an owner),
13319
+ * `plan_not_enterprise` (`mode: hard` on a plan without hard caps),
13320
+ * a plan refusal whose code is the `can_set_budgets` denial reason
13321
+ * (`creator_only_provisioning`, `no_subscription`, `free_plan`, `subscription_ended`,
13322
+ * `subscription_not_started`, `subscription_status_unrecognized`),
13323
+ * `WORKSPACE_BLOCKED`, `api_key_not_allowed` (the request was made
13324
+ * with an API key; budgets are changed from a signed-in session
13325
+ * only), `INSUFFICIENT_SCOPE` (an OAuth session without the billing
13326
+ * write scope; sent with a `WWW-Authenticate` insufficient_scope
13327
+ * challenge), `FORBIDDEN` (the caller is no longer
13328
+ * a member of the workspace, or a deployment budget was asked for
13329
+ * with a credential that cannot be used to check the deployment;
13330
+ * sign in again), or a session refusal (see SessionWriteForbidden).
13331
+ *
13332
+ */
13333
+ 403: ForbiddenError;
13334
+ /**
13335
+ * `scope_not_found`: the member, API key or deployment is not in
13336
+ * this workspace. A deployment id must be the canonical lower-case
13337
+ * `dep-<uuid>` form.
13338
+ *
13339
+ */
13340
+ 404: ErrorResponse;
13341
+ /**
13342
+ * `budget_exists` (the scope already has a live budget) or
13343
+ * `no_billing_period` (`repeat: current_period` on a workspace with
13344
+ * no open paid subscription term).
13345
+ *
13346
+ */
13347
+ 409: ErrorResponse;
13348
+ /**
13349
+ * Internal server error
13350
+ */
13351
+ 500: ErrorResponse;
13352
+ /**
13353
+ * `budgets_unavailable` (budgets are not available in this
13354
+ * environment) or `deployment_check_unavailable` (the deployment
13355
+ * service could not be asked about a deployment scope; retry).
13356
+ *
13357
+ */
13358
+ 503: ErrorResponse;
13359
+ };
13360
+ export type CreateBillingBudgetError = CreateBillingBudgetErrors[keyof CreateBillingBudgetErrors];
13361
+ export type CreateBillingBudgetResponses = {
13362
+ /**
13363
+ * The new budget
13364
+ */
13365
+ 201: BudgetWriteResult;
13366
+ };
13367
+ export type CreateBillingBudgetResponse = CreateBillingBudgetResponses[keyof CreateBillingBudgetResponses];
13368
+ export type DeleteBillingBudgetData = {
13369
+ body?: never;
13370
+ path: {
13371
+ /**
13372
+ * Budget id (`bud_…`).
13373
+ */
13374
+ id: string;
13375
+ };
13376
+ query?: never;
13377
+ url: '/api/billing/budgets/{id}';
13378
+ };
13379
+ export type DeleteBillingBudgetErrors = {
13380
+ /**
13381
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
13382
+ */
13383
+ 400: ErrorResponse;
13384
+ /**
13385
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
13386
+ */
13387
+ 401: ErrorResponse;
13388
+ /**
13389
+ * `not_workspace_owner`, `api_key_not_allowed` (the request was made with an API key), `INSUFFICIENT_SCOPE`, `FORBIDDEN` (the caller is no longer a member of the workspace), or a session refusal (see SessionWriteForbidden).
13390
+ */
13391
+ 403: ForbiddenError;
13392
+ /**
13393
+ * `budget_not_found`: unknown or already archived budget id.
13394
+ */
13395
+ 404: ErrorResponse;
13396
+ /**
13397
+ * Internal server error
13398
+ */
13399
+ 500: ErrorResponse;
13400
+ /**
13401
+ * `budgets_unavailable`: budgets are not available in this environment.
13402
+ */
13403
+ 503: ErrorResponse;
13404
+ };
13405
+ export type DeleteBillingBudgetError = DeleteBillingBudgetErrors[keyof DeleteBillingBudgetErrors];
13406
+ export type DeleteBillingBudgetResponses = {
13407
+ /**
13408
+ * Archived
13409
+ */
13410
+ 204: void;
13411
+ };
13412
+ export type DeleteBillingBudgetResponse = DeleteBillingBudgetResponses[keyof DeleteBillingBudgetResponses];
13413
+ export type UpdateBillingBudgetData = {
13414
+ body: BudgetUpdateRequest;
13415
+ path: {
13416
+ /**
13417
+ * Budget id (`bud_…`).
13418
+ */
13419
+ id: string;
13420
+ };
13421
+ query?: never;
13422
+ url: '/api/billing/budgets/{id}';
13423
+ };
13424
+ export type UpdateBillingBudgetErrors = {
13425
+ /**
13426
+ * `INVALID_REQUEST` (the body is not a JSON object), `invalid_budget`
13427
+ * (as on create), or `workspace_id_invalid` (see
13428
+ * SessionWorkspaceIDInvalid).
13429
+ *
13430
+ */
13431
+ 400: ErrorResponse;
13432
+ /**
13433
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
13434
+ */
13435
+ 401: ErrorResponse;
13436
+ /**
13437
+ * `not_workspace_owner`, `plan_not_enterprise` (changing a soft
13438
+ * budget to hard on a plan without hard caps), a plan refusal whose
13439
+ * code is the `can_set_budgets` denial reason
13440
+ * (`creator_only_provisioning`, `no_subscription`,
13441
+ * `free_plan`, `subscription_ended`, `subscription_not_started`,
13442
+ * `subscription_status_unrecognized`), `WORKSPACE_BLOCKED`,
13443
+ * `api_key_not_allowed` (the request was made with an API key),
13444
+ * `INSUFFICIENT_SCOPE` (sent with a `WWW-Authenticate`
13445
+ * insufficient_scope challenge), `FORBIDDEN` (the caller is no
13446
+ * longer a member of the workspace), or a session refusal (see
13447
+ * SessionWriteForbidden).
13448
+ *
13449
+ */
13450
+ 403: ForbiddenError;
13451
+ /**
13452
+ * `budget_not_found`: unknown or archived budget id.
13453
+ */
13454
+ 404: ErrorResponse;
13455
+ /**
13456
+ * `no_billing_period`: `repeat: current_period` on a workspace with no open paid subscription term.
13457
+ */
13458
+ 409: ErrorResponse;
13459
+ /**
13460
+ * Internal server error
13461
+ */
13462
+ 500: ErrorResponse;
13463
+ /**
13464
+ * `budgets_unavailable`: budgets are not available in this environment.
13465
+ */
13466
+ 503: ErrorResponse;
13467
+ };
13468
+ export type UpdateBillingBudgetError = UpdateBillingBudgetErrors[keyof UpdateBillingBudgetErrors];
13469
+ export type UpdateBillingBudgetResponses = {
13470
+ /**
13471
+ * The budget after the change
13472
+ */
13473
+ 200: BudgetWriteResult;
13474
+ };
13475
+ export type UpdateBillingBudgetResponse = UpdateBillingBudgetResponses[keyof UpdateBillingBudgetResponses];
13476
+ export type GetBillingBudgetHistoryData = {
13477
+ body?: never;
13478
+ path: {
13479
+ /**
13480
+ * Budget id (`bud_…`).
13481
+ */
13482
+ id: string;
13483
+ };
13484
+ query?: never;
13485
+ url: '/api/billing/budgets/{id}/history';
13486
+ };
13487
+ export type GetBillingBudgetHistoryErrors = {
13488
+ /**
13489
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
13490
+ */
13491
+ 400: ErrorResponse;
13492
+ /**
13493
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
13494
+ */
13495
+ 401: ErrorResponse;
13496
+ /**
13497
+ * `not_workspace_owner`, `FORBIDDEN` (the caller is no longer a member of the workspace), or a session refusal (see SessionForbidden).
13498
+ */
13499
+ 403: ForbiddenError;
13500
+ /**
13501
+ * `budget_not_found`: unknown or archived budget id.
13502
+ */
13503
+ 404: ErrorResponse;
13504
+ /**
13505
+ * Internal server error
13506
+ */
13507
+ 500: ErrorResponse;
13508
+ /**
13509
+ * `budgets_unavailable`: budgets are not available in this environment.
13510
+ */
13511
+ 503: ErrorResponse;
13512
+ };
13513
+ export type GetBillingBudgetHistoryError = GetBillingBudgetHistoryErrors[keyof GetBillingBudgetHistoryErrors];
13514
+ export type GetBillingBudgetHistoryResponses = {
13515
+ /**
13516
+ * Success
13517
+ */
13518
+ 200: BudgetHistory;
13519
+ };
13520
+ export type GetBillingBudgetHistoryResponse = GetBillingBudgetHistoryResponses[keyof GetBillingBudgetHistoryResponses];
12102
13521
  export type GetBillingCapabilitiesData = {
12103
13522
  body?: never;
12104
13523
  path?: never;
@@ -12394,34 +13813,75 @@ export type CancelBillingOpResponses = {
12394
13813
  202: BillingOpCancelResponse;
12395
13814
  };
12396
13815
  export type CancelBillingOpResponse = CancelBillingOpResponses[keyof CancelBillingOpResponses];
12397
- export type ListSavedPaymentMethodsData = {
13816
+ export type GetBillingOpOutcomeData = {
12398
13817
  body?: never;
12399
- path?: never;
13818
+ path: {
13819
+ /**
13820
+ * The billing operation ID
13821
+ */
13822
+ id: string;
13823
+ };
12400
13824
  query?: never;
12401
- url: '/api/billing/payment-methods';
13825
+ url: '/api/billing/ops/{id}/outcome';
12402
13826
  };
12403
- export type ListSavedPaymentMethodsErrors = {
12404
- /**
12405
- * Billing is disabled
12406
- */
12407
- 400: ErrorResponse;
13827
+ export type GetBillingOpOutcomeErrors = {
12408
13828
  /**
12409
- * Unauthorized
13829
+ * `INVALID_CREDENTIAL`: no scoped-session bearer, or the session is unknown, revoked or expired 30 minutes ago or more
12410
13830
  */
12411
13831
  401: ErrorResponse;
12412
13832
  /**
12413
- * Workspace owner role required
13833
+ * `HANDOFF_DISABLED`, `BILLING_FORBIDDEN` or another billing policy refusal
12414
13834
  */
12415
13835
  403: ErrorResponse;
13836
+ /**
13837
+ * Billing operation not found in the session's workspace
13838
+ */
13839
+ 404: ErrorResponse;
12416
13840
  /**
12417
13841
  * Internal server error
12418
13842
  */
12419
13843
  500: ErrorResponse;
12420
- };
12421
- export type ListSavedPaymentMethodsError = ListSavedPaymentMethodsErrors[keyof ListSavedPaymentMethodsErrors];
12422
- export type ListSavedPaymentMethodsResponses = {
12423
13844
  /**
12424
- * Saved payment methods
13845
+ * `SERVICE_UNAVAILABLE`: the session or billing policy check could not be made
13846
+ */
13847
+ 503: ErrorResponse;
13848
+ };
13849
+ export type GetBillingOpOutcomeError = GetBillingOpOutcomeErrors[keyof GetBillingOpOutcomeErrors];
13850
+ export type GetBillingOpOutcomeResponses = {
13851
+ /**
13852
+ * Billing operation outcome
13853
+ */
13854
+ 200: BillingOpOutcomeResponse;
13855
+ };
13856
+ export type GetBillingOpOutcomeResponse = GetBillingOpOutcomeResponses[keyof GetBillingOpOutcomeResponses];
13857
+ export type ListSavedPaymentMethodsData = {
13858
+ body?: never;
13859
+ path?: never;
13860
+ query?: never;
13861
+ url: '/api/billing/payment-methods';
13862
+ };
13863
+ export type ListSavedPaymentMethodsErrors = {
13864
+ /**
13865
+ * Billing is disabled
13866
+ */
13867
+ 400: ErrorResponse;
13868
+ /**
13869
+ * Unauthorized
13870
+ */
13871
+ 401: ErrorResponse;
13872
+ /**
13873
+ * Workspace owner role required
13874
+ */
13875
+ 403: ErrorResponse;
13876
+ /**
13877
+ * Internal server error
13878
+ */
13879
+ 500: ErrorResponse;
13880
+ };
13881
+ export type ListSavedPaymentMethodsError = ListSavedPaymentMethodsErrors[keyof ListSavedPaymentMethodsErrors];
13882
+ export type ListSavedPaymentMethodsResponses = {
13883
+ /**
13884
+ * Saved payment methods
12425
13885
  */
12426
13886
  200: Array<SavedPaymentMethod>;
12427
13887
  };
@@ -13022,8 +14482,16 @@ export type CreateInteractiveTopupErrors = {
13022
14482
  * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
13023
14483
  */
13024
14484
  403: ForbiddenError;
14485
+ /**
14486
+ * `PURCHASE_NOT_FOUND`: purchase_id names no purchase of this actor in this workspace. Nothing was charged.
14487
+ */
14488
+ 404: ErrorResponse;
13025
14489
  /**
13026
14490
  * Immutable request mismatch, another pending operation, or billing reconciliation required. Do not start another purchase while unresolved.
14491
+ * With purchase_id, nothing was charged by this request and GET /api/billing/topup/purchases/{id} has the purchase's outcome:
14492
+ * `PURCHASE_ATTEMPT_IN_PROGRESS` (an earlier attempt is unresolved), `PURCHASE_ALREADY_PAID`, `PURCHASE_SUPERSEDED` (a newer purchase or hosted checkout replaced it),
14493
+ * `PURCHASE_EXPIRED`, or `PURCHASE_MISMATCH` (amount or auto_top_up differ from the purchase).
14494
+ *
13027
14495
  */
13028
14496
  409: ErrorResponse;
13029
14497
  /**
@@ -13051,6 +14519,88 @@ export type CreateInteractiveTopupResponses = {
13051
14519
  200: CreateTopupResponse;
13052
14520
  };
13053
14521
  export type CreateInteractiveTopupResponse = CreateInteractiveTopupResponses[keyof CreateInteractiveTopupResponses];
14522
+ export type CreateTopupPurchaseData = {
14523
+ body: CreateTopupPurchaseRequest;
14524
+ path?: never;
14525
+ query?: never;
14526
+ url: '/api/billing/topup/purchases';
14527
+ };
14528
+ export type CreateTopupPurchaseErrors = {
14529
+ /**
14530
+ * Invalid amount, auto top-up settings, or billing rail
14531
+ */
14532
+ 400: ErrorResponse;
14533
+ /**
14534
+ * Authentication required
14535
+ */
14536
+ 401: ErrorResponse;
14537
+ /**
14538
+ * Caller may not top up, the workspace is blocked, or purchases are paused
14539
+ */
14540
+ 403: ErrorResponse;
14541
+ /**
14542
+ * Another purchase or checkout is being opened for the caller; retry.
14543
+ */
14544
+ 409: ErrorResponse;
14545
+ /**
14546
+ * Billing service unreachable
14547
+ */
14548
+ 502: ErrorResponse;
14549
+ /**
14550
+ * The purchase could not be opened; retry.
14551
+ */
14552
+ 503: ErrorResponse;
14553
+ };
14554
+ export type CreateTopupPurchaseError = CreateTopupPurchaseErrors[keyof CreateTopupPurchaseErrors];
14555
+ export type CreateTopupPurchaseResponses = {
14556
+ /**
14557
+ * Purchase opened; Cache-Control no-store.
14558
+ */
14559
+ 201: TopupPurchase;
14560
+ };
14561
+ export type CreateTopupPurchaseResponse = CreateTopupPurchaseResponses[keyof CreateTopupPurchaseResponses];
14562
+ export type GetTopupPurchaseData = {
14563
+ body?: never;
14564
+ path: {
14565
+ id: string;
14566
+ };
14567
+ query?: never;
14568
+ url: '/api/billing/topup/purchases/{id}';
14569
+ };
14570
+ export type GetTopupPurchaseErrors = {
14571
+ /**
14572
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
14573
+ */
14574
+ 400: ErrorResponse;
14575
+ /**
14576
+ * Authentication required
14577
+ */
14578
+ 401: ErrorResponse;
14579
+ /**
14580
+ * Caller may not top up
14581
+ */
14582
+ 403: ErrorResponse;
14583
+ /**
14584
+ * `PURCHASE_NOT_FOUND`: no purchase of this caller in this workspace
14585
+ */
14586
+ 404: ErrorResponse;
14587
+ /**
14588
+ * Billing service unreachable
14589
+ */
14590
+ 502: ErrorResponse;
14591
+ /**
14592
+ * Purchase state unavailable; retry.
14593
+ */
14594
+ 503: ErrorResponse;
14595
+ };
14596
+ export type GetTopupPurchaseError = GetTopupPurchaseErrors[keyof GetTopupPurchaseErrors];
14597
+ export type GetTopupPurchaseResponses = {
14598
+ /**
14599
+ * Current purchase facts; Cache-Control no-store.
14600
+ */
14601
+ 200: TopupPurchase;
14602
+ };
14603
+ export type GetTopupPurchaseResponse = GetTopupPurchaseResponses[keyof GetTopupPurchaseResponses];
13054
14604
  export type CreateTopupQuoteData = {
13055
14605
  body: CreateTopupQuoteRequest;
13056
14606
  path?: never;
@@ -13102,8 +14652,8 @@ export type GetBillingUsageTimeSeriesData = {
13102
14652
  * key, a member's `person` and `source` views hold only their own
13103
14653
  * rows, and an `unattributed` group carries spend with no usable
13104
14654
  * identity so the groups still sum to the total. Elsewhere the response is an empty series with
13105
- * `not_available` set. For an enabled workspace `product_line` and
13106
- * `model` are also read from the ledger when the range starts on or
14655
+ * `not_available` set. For every workspace `product_line` and
14656
+ * `model` are read from the ledger when the range starts on or
13107
14657
  * after the environment's ledger start, and from the invoice otherwise; a model the
13108
14658
  * ledger has no name for is `unspecified`. Under Serverless the model
13109
14659
  * level is the deployment: `<deployment id>` for its GPU time and
@@ -13547,7 +15097,7 @@ export type GetFeaturesResponses = {
13547
15097
  state: 'ready';
13548
15098
  };
13549
15099
  /**
13550
- * Authenticated assignment for the Agent per-turn credit usage experiment. Control renders no usage line; treatment renders the authoritative server-reported charge beneath completed replies. It remains optional so older environments and partial fixtures fail closed. Reading this field is not exposure; the frontend records exposure only when a charged reply is rendered.
15100
+ * Served assignment for the Agent per-turn credit usage experiment. Control renders no usage line; treatment renders the authoritative server-reported charge beneath completed replies. It is omitted while the flag is inactive, evaluation is unavailable, the caller is anonymous, or no valid assignment is present, so clients cannot mistake the off state for a randomized control. Reading this field is not exposure; the frontend records exposure only when a charged reply is rendered.
13551
15101
  */
13552
15102
  'agent-credit-usage-summary'?: 'control' | 'treatment';
13553
15103
  /**
@@ -13624,9 +15174,17 @@ export type GetFeaturesResponses = {
13624
15174
  */
13625
15175
  new_free_tier_subscriptions?: boolean;
13626
15176
  /**
13627
- * Whether the frontend should enable Open on Cloud. True enables the feature and false disables it, overriding the client build default. Optional so older servers or an unconfigured rollout leave the client build default in effect (enabled in development, disabled in production). This is a UI rollout switch, not authorization to access workflows or execute jobs on Cloud.
15177
+ * Whether the frontend should offer Open on Cloud. Evaluates the PostHog rollout for signed-in and signed-out callers. Defaults to false when evaluation is unavailable. Hosted workflow access and execution require sign-in and their existing permissions.
13628
15178
  */
13629
15179
  open_on_cloud_enabled?: boolean;
15180
+ /**
15181
+ * Whether the frontend should offer and start new model file transfers from local ComfyUI through Open on Cloud. Served only from an explicit boolean FrontendFeatureFlags entry. Absent or false disables new transfers. Upload endpoints enforce workspace access and storage permissions separately.
15182
+ */
15183
+ open_on_cloud_model_upload_enabled?: boolean;
15184
+ /**
15185
+ * Whether the frontend should offer the local agent option in Open on Cloud. Requires a verified comfy.org session and a matching PostHog rollout. Defaults to false.
15186
+ */
15187
+ open_on_cloud_use_local_agent_enabled?: boolean;
13630
15188
  /**
13631
15189
  * Whether this environment advertises the authenticated private saved-workflow UUID link contract (?workflow=UUID&workspace=ID, with deployment=ID for a custom environment or environment=standard). Absent or false means unsupported. Published only from an explicit boolean FrontendFeatureFlags dynamic-config entry, enabled by an operator after the matching frontend release. This describes URL support, not workflow access or deployment eligibility; those remain authenticated checks. No default configuration enables it.
13632
15190
  */
@@ -14744,6 +16302,26 @@ export type GetJobStatusResponses = {
14744
16302
  export type GetJobStatusResponse = GetJobStatusResponses[keyof GetJobStatusResponses];
14745
16303
  export type ListJobsData = {
14746
16304
  body?: never;
16305
+ headers?: {
16306
+ /**
16307
+ * The project a request acts in. The operations that list it are the
16308
+ * ones that read it: they list workflows, runs or assets, or create
16309
+ * one. Absent means the workspace's default project, which is how
16310
+ * existing clients keep working.
16311
+ *
16312
+ * An operation on one existing workflow, run or asset does not take
16313
+ * it: the row's own project decides. Any other operation that creates
16314
+ * a workflow, run or asset acts in the default project until it lists
16315
+ * this parameter.
16316
+ *
16317
+ * The project must be in the workspace the request resolves to. A
16318
+ * project that does not exist, or that the caller may not view, is 404
16319
+ * `not_found`; the two look the same. Where Projects is not enabled for
16320
+ * the workspace the header is ignored.
16321
+ *
16322
+ */
16323
+ 'X-Comfy-Project-ID'?: string;
16324
+ };
14747
16325
  path?: never;
14748
16326
  query?: {
14749
16327
  /**
@@ -14787,6 +16365,20 @@ export type ListJobsData = {
14787
16365
  * Maximum items per page (1-1000)
14788
16366
  */
14789
16367
  limit?: number;
16368
+ /**
16369
+ * When true or omitted, `pagination.total` counts at most 10,000
16370
+ * matching jobs, so a total of 10,000 means "at least 10,000", not an
16371
+ * exact count. A capped count stops after 10,000 matching jobs
16372
+ * instead of reading every one. Send false for the exact count, for
16373
+ * example to work out the last page from the total: `has_more` and
16374
+ * `next_cursor` do not depend on the total either way. Under the
16375
+ * default `sort_by=create_time` a request with `after` reports no
16376
+ * total, so this changes nothing there; under
16377
+ * `sort_by=execution_time` `after` is ignored and the total is
16378
+ * counted, capped unless this is false.
16379
+ *
16380
+ */
16381
+ capped_total?: boolean;
14790
16382
  };
14791
16383
  url: '/api/jobs';
14792
16384
  };
@@ -15139,13 +16731,13 @@ export type GetLegacyObjectInfoByNodeClassErrors = {
15139
16731
  */
15140
16732
  404: unknown;
15141
16733
  };
15142
- export type GetPromptInfoData = {
16734
+ export type ListProjectsData = {
15143
16735
  body?: never;
15144
16736
  path?: never;
15145
16737
  query?: never;
15146
- url: '/api/prompt';
16738
+ url: '/api/projects';
15147
16739
  };
15148
- export type GetPromptInfoErrors = {
16740
+ export type ListProjectsErrors = {
15149
16741
  /**
15150
16742
  * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
15151
16743
  */
@@ -15155,91 +16747,82 @@ export type GetPromptInfoErrors = {
15155
16747
  */
15156
16748
  401: ErrorResponse;
15157
16749
  /**
15158
- * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
16750
+ * `projects_not_available`: Projects is turned off for the workspace, or the workspace's plan does not include Projects and it has no project but the default. A workspace whose plan lapsed while it had projects is answered 200, read-only, not 403. Do not read this as the workspace having no projects stored.
15159
16751
  */
15160
- 403: ForbiddenError;
16752
+ 403: ErrorResponse;
16753
+ /**
16754
+ * `not_found`: Projects is not served for this workspace
16755
+ */
16756
+ 404: ErrorResponse;
15161
16757
  /**
15162
16758
  * Internal server error
15163
16759
  */
15164
16760
  500: ErrorResponse;
15165
16761
  };
15166
- export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors];
15167
- export type GetPromptInfoResponses = {
16762
+ export type ListProjectsError = ListProjectsErrors[keyof ListProjectsErrors];
16763
+ export type ListProjectsResponses = {
15168
16764
  /**
15169
- * Success
16765
+ * Projects the caller can view. Also answered to a workspace whose plan no longer includes Projects (a lapsed or downgraded plan) but that still has projects other than the default: those projects are frozen and read-only, each with `writable: false`, and the quota has `max_active: 0` and `can_create: false`. Do not read a 200 as the plan including Projects; read `writable` on each project and `quota.can_create`.
15170
16766
  */
15171
- 200: PromptInfo;
16767
+ 200: ListProjectsResponse;
15172
16768
  };
15173
- export type GetPromptInfoResponse = GetPromptInfoResponses[keyof GetPromptInfoResponses];
15174
- export type ExecutePromptData = {
15175
- body: PromptRequest;
16769
+ export type ListProjectsResponse2 = ListProjectsResponses[keyof ListProjectsResponses];
16770
+ export type CreateProjectData = {
16771
+ body: CreateProjectRequest;
15176
16772
  path?: never;
15177
16773
  query?: never;
15178
- url: '/api/prompt';
16774
+ url: '/api/projects';
15179
16775
  };
15180
- export type ExecutePromptErrors = {
16776
+ export type CreateProjectErrors = {
15181
16777
  /**
15182
- * Invalid prompt, or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
16778
+ * `invalid_request`: a bad name, role or body; `details` names the fields. Or `workspace_id_invalid`; see `SessionWorkspaceIDInvalid`.
15183
16779
  */
15184
- 400: PromptErrorResponse;
16780
+ 400: ErrorResponse;
15185
16781
  /**
15186
- * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
16782
+ * Unauthorized
15187
16783
  */
15188
16784
  401: ErrorResponse;
15189
16785
  /**
15190
- * The account's plan does not allow this submission; nothing was queued and retrying without changing the plan never succeeds. Disambiguated by the body's `error.type`, NOT by parsing `error.message`: `PAYMENT_REQUIRED` (no active subscription, no funds, blocked tier), `CLOUD_SUBSCRIPTION_REQUIRED`, `FREE_TIER_EXHAUSTED`, `PARTNER_NODE_PAYMENT_REQUIRED`, or `MODEL_PAYMENT_REQUIRED`.
16786
+ * `permission_denied`: the caller lacks `workspace.projects` write; `details.permission` names it. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off. Or `FORBIDDEN` with an `insufficient_scope` message: an OAuth grant without `comfy-cloud:members:write` sent a non-empty `members` while OAuth scopes are enforced; sent with a `WWW-Authenticate` insufficient_scope challenge.
15191
16787
  */
15192
- 402: PromptErrorResponse;
16788
+ 403: ErrorResponse;
15193
16789
  /**
15194
- * Workspace governance policy blocks one or more partner providers (error.type PARTNER_NODE_DISABLED; error.class_types lists the offending nodes, error.providers the disabled providers), or a refused request with `code` and `message` (see SessionWriteForbidden).
16790
+ * `not_found`: Projects is not served for this workspace
15195
16791
  */
15196
- 403: PromptErrorResponse;
16792
+ 404: ErrorResponse;
15197
16793
  /**
15198
- * Workflow JSON too large
16794
+ * `project_limit_reached`: the workspace is at its project limit; `details` carries `max_active` and `active`. Or `project_name_taken`: the name is already used in the workspace, whatever its case.
15199
16795
  */
15200
- 413: PromptErrorResponse;
16796
+ 409: ErrorResponse;
15201
16797
  /**
15202
- * Retryable backpressure, disambiguated by the body's `error.type`: `QUEUE_LIMIT` (this workspace's bounded job queue is full - retrying after some queued jobs complete will succeed) or `FREE_TIER_UNAVAILABLE` (the free tier is switched off for now - retrying once it is back will succeed), or `BILLING_UNAVAILABLE` with `error.reason` `funds_unavailable` (ingest got no billing verdict for the workspace because the billing service was unreachable or rejected the check, or the billing-status read behind a no-funds verdict failed - nothing was queued, and retrying the same submission after `Retry-After` seconds will succeed once billing answers). Of the billing outcomes, a plan or billing policy refusal is a 402; only billing being unavailable is a 429. For a browser that picked a developer-platform deployment, also `PLATFORM_REFUSED` with `error.details` `deployment_not_ready` (the deployment is on its way to ready - nothing was queued, and retrying after `Retry-After` seconds will succeed once it is ready) or another platform 429 passed through.
16798
+ * `not_workspace_member`: a listed member is not in the workspace; `details.user_ids` names them
15203
16799
  */
15204
- 429: PromptErrorResponse;
16800
+ 422: ErrorResponse;
15205
16801
  /**
15206
16802
  * Internal server error
15207
16803
  */
15208
- 500: PromptErrorResponse;
15209
- /**
15210
- * Service unavailable
15211
- */
15212
- 503: PromptErrorResponse;
16804
+ 500: ErrorResponse;
15213
16805
  };
15214
- export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors];
15215
- export type ExecutePromptResponses = {
16806
+ export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors];
16807
+ export type CreateProjectResponses = {
15216
16808
  /**
15217
- * Success - Prompt accepted
16809
+ * Project created
15218
16810
  */
15219
- 200: PromptResponse;
16811
+ 201: Project;
15220
16812
  };
15221
- export type ExecutePromptResponse = ExecutePromptResponses[keyof ExecutePromptResponses];
15222
- export type GetLegacyPromptByIdData = {
16813
+ export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];
16814
+ export type GetProjectData = {
15223
16815
  body?: never;
15224
16816
  path: {
15225
- prompt_id: string;
16817
+ /**
16818
+ * Project ID
16819
+ */
16820
+ id: string;
15226
16821
  };
15227
16822
  query?: never;
15228
- url: '/api/prompt/{prompt_id}';
15229
- };
15230
- export type GetLegacyPromptByIdErrors = {
15231
- /**
15232
- * Not Found — use /api/jobs/{prompt_id} instead
15233
- */
15234
- 404: unknown;
15235
- };
15236
- export type GetProvidersData = {
15237
- body?: never;
15238
- path?: never;
15239
- query?: never;
15240
- url: '/api/providers';
16823
+ url: '/api/projects/{id}';
15241
16824
  };
15242
- export type GetProvidersErrors = {
16825
+ export type GetProjectErrors = {
15243
16826
  /**
15244
16827
  * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
15245
16828
  */
@@ -15249,63 +16832,85 @@ export type GetProvidersErrors = {
15249
16832
  */
15250
16833
  401: ErrorResponse;
15251
16834
  /**
15252
- * Governance not available (no governance entitlement)
16835
+ * `projects_not_available`: Projects is turned off for the workspace, or the workspace's plan does not include Projects and it has no project but the default. A workspace whose plan lapsed while it had projects answers 200 for a project the caller may view, not 403. Do not read this as the project not existing.
15253
16836
  */
15254
16837
  403: ErrorResponse;
16838
+ /**
16839
+ * `not_found`: the project does not exist, or the caller may not view it. The two look the same.
16840
+ */
16841
+ 404: ErrorResponse;
15255
16842
  /**
15256
16843
  * Internal server error
15257
16844
  */
15258
16845
  500: ErrorResponse;
15259
16846
  };
15260
- export type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors];
15261
- export type GetProvidersResponses = {
16847
+ export type GetProjectError = GetProjectErrors[keyof GetProjectErrors];
16848
+ export type GetProjectResponses = {
15262
16849
  /**
15263
- * The provider catalog
16850
+ * The project. In a workspace whose plan no longer includes Projects (a lapsed or downgraded plan), a project other than the default is still answered to whoever may view it, frozen, with `writable: false`. Do not read a 200 as the project taking writes, or as the plan including Projects; read `writable` and `permissions`.
15264
16851
  */
15265
- 200: ProviderCatalogResponse;
16852
+ 200: Project;
15266
16853
  };
15267
- export type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses];
15268
- export type GetQueueInfoData = {
15269
- body?: never;
15270
- path?: never;
16854
+ export type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses];
16855
+ export type UpdateProjectData = {
16856
+ body: UpdateProjectRequest;
16857
+ path: {
16858
+ /**
16859
+ * Project ID
16860
+ */
16861
+ id: string;
16862
+ };
15271
16863
  query?: never;
15272
- url: '/api/queue';
16864
+ url: '/api/projects/{id}';
15273
16865
  };
15274
- export type GetQueueInfoErrors = {
16866
+ export type UpdateProjectErrors = {
15275
16867
  /**
15276
- * Invalid request parameters
16868
+ * `invalid_request`: a bad name or body; `details` names the fields. Or `workspace_id_invalid`; see `SessionWorkspaceIDInvalid`.
15277
16869
  */
15278
16870
  400: ErrorResponse;
15279
16871
  /**
15280
- * Unauthorized - Authentication required
16872
+ * Unauthorized
15281
16873
  */
15282
16874
  401: ErrorResponse;
15283
16875
  /**
15284
- * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
16876
+ * `permission_denied`: the caller lacks the permission the change needs; `details.permission` names it. `project_frozen`: the project is frozen and takes no writes. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
15285
16877
  */
15286
- 403: ForbiddenError;
16878
+ 403: ErrorResponse;
15287
16879
  /**
15288
- * Invalid request parameters
16880
+ * `not_found`: the project does not exist, or the caller may not view it. The two look the same.
16881
+ */
16882
+ 404: ErrorResponse;
16883
+ /**
16884
+ * `project_name_taken`: the name is already used in the workspace, whatever its case
16885
+ */
16886
+ 409: ErrorResponse;
16887
+ /**
16888
+ * Internal server error
15289
16889
  */
15290
16890
  500: ErrorResponse;
15291
16891
  };
15292
- export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors];
15293
- export type GetQueueInfoResponses = {
16892
+ export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];
16893
+ export type UpdateProjectResponses = {
15294
16894
  /**
15295
- * Success
16895
+ * Project updated
15296
16896
  */
15297
- 200: QueueInfo;
16897
+ 200: Project;
15298
16898
  };
15299
- export type GetQueueInfoResponse = GetQueueInfoResponses[keyof GetQueueInfoResponses];
15300
- export type ManageQueueData = {
15301
- body: QueueManageRequest;
15302
- path?: never;
16899
+ export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
16900
+ export type ListProjectMembersData = {
16901
+ body?: never;
16902
+ path: {
16903
+ /**
16904
+ * Project ID
16905
+ */
16906
+ id: string;
16907
+ };
15303
16908
  query?: never;
15304
- url: '/api/queue';
16909
+ url: '/api/projects/{id}/members';
15305
16910
  };
15306
- export type ManageQueueErrors = {
16911
+ export type ListProjectMembersErrors = {
15307
16912
  /**
15308
- * Invalid request parameters
16913
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
15309
16914
  */
15310
16915
  400: ErrorResponse;
15311
16916
  /**
@@ -15313,48 +16918,356 @@ export type ManageQueueErrors = {
15313
16918
  */
15314
16919
  401: ErrorResponse;
15315
16920
  /**
15316
- * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
16921
+ * `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
15317
16922
  */
15318
- 403: ForbiddenError;
16923
+ 403: ErrorResponse;
16924
+ /**
16925
+ * `not_found`: the project does not exist, or the caller may not view it. The two look the same.
16926
+ */
16927
+ 404: ErrorResponse;
15319
16928
  /**
15320
16929
  * Internal server error
15321
16930
  */
15322
16931
  500: ErrorResponse;
15323
16932
  };
15324
- export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors];
15325
- export type ManageQueueResponses = {
16933
+ export type ListProjectMembersError = ListProjectMembersErrors[keyof ListProjectMembersErrors];
16934
+ export type ListProjectMembersResponses = {
15326
16935
  /**
15327
- * Success
16936
+ * Project members
15328
16937
  */
15329
- 200: QueueManageResponse;
16938
+ 200: ListProjectMembersResponse;
15330
16939
  };
15331
- export type ManageQueueResponse = ManageQueueResponses[keyof ManageQueueResponses];
15332
- export type GetReleaseUnsupportedPacksData = {
16940
+ export type ListProjectMembersResponse2 = ListProjectMembersResponses[keyof ListProjectMembersResponses];
16941
+ export type RemoveProjectMemberData = {
15333
16942
  body?: never;
15334
- path?: never;
16943
+ path: {
16944
+ /**
16945
+ * Project ID
16946
+ */
16947
+ id: string;
16948
+ /**
16949
+ * User ID of the workspace member
16950
+ */
16951
+ userId: string;
16952
+ };
15335
16953
  query?: never;
15336
- url: '/api/release/unsupported-packs';
16954
+ url: '/api/projects/{id}/members/{userId}';
15337
16955
  };
15338
- export type GetReleaseUnsupportedPacksErrors = {
16956
+ export type RemoveProjectMemberErrors = {
15339
16957
  /**
15340
16958
  * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
15341
16959
  */
15342
16960
  400: ErrorResponse;
15343
16961
  /**
15344
- * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
16962
+ * Unauthorized
15345
16963
  */
15346
16964
  401: ErrorResponse;
15347
16965
  /**
15348
- * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
16966
+ * `permission_denied`: the caller lacks `project.members` write; `details.permission` names it. `project_frozen`: the project is frozen and takes no writes. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
15349
16967
  */
15350
- 403: ForbiddenError;
15351
- };
15352
- export type GetReleaseUnsupportedPacksError = GetReleaseUnsupportedPacksErrors[keyof GetReleaseUnsupportedPacksErrors];
15353
- export type GetReleaseUnsupportedPacksResponses = {
16968
+ 403: ErrorResponse;
15354
16969
  /**
15355
- * The packs the Release built without, in the order the build declared them
16970
+ * `not_found`: the project does not exist, the caller may not view it, or the user is not in the project
15356
16971
  */
15357
- 200: ReleaseUnsupportedPacks;
16972
+ 404: ErrorResponse;
16973
+ /**
16974
+ * Internal server error
16975
+ */
16976
+ 500: ErrorResponse;
16977
+ };
16978
+ export type RemoveProjectMemberError = RemoveProjectMemberErrors[keyof RemoveProjectMemberErrors];
16979
+ export type RemoveProjectMemberResponses = {
16980
+ /**
16981
+ * Member removed
16982
+ */
16983
+ 204: void;
16984
+ };
16985
+ export type RemoveProjectMemberResponse = RemoveProjectMemberResponses[keyof RemoveProjectMemberResponses];
16986
+ export type SetProjectMemberData = {
16987
+ body: SetProjectMemberRequest;
16988
+ path: {
16989
+ /**
16990
+ * Project ID
16991
+ */
16992
+ id: string;
16993
+ /**
16994
+ * User ID of the workspace member
16995
+ */
16996
+ userId: string;
16997
+ };
16998
+ query?: never;
16999
+ url: '/api/projects/{id}/members/{userId}';
17000
+ };
17001
+ export type SetProjectMemberErrors = {
17002
+ /**
17003
+ * `invalid_request`: a bad role or body; `details` names the fields. Or `workspace_id_invalid`; see `SessionWorkspaceIDInvalid`.
17004
+ */
17005
+ 400: ErrorResponse;
17006
+ /**
17007
+ * Unauthorized
17008
+ */
17009
+ 401: ErrorResponse;
17010
+ /**
17011
+ * `permission_denied`: the caller lacks `project.members` write; `details.permission` names it. `project_frozen`: the project is frozen and takes no writes. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
17012
+ */
17013
+ 403: ErrorResponse;
17014
+ /**
17015
+ * `not_found`: the project does not exist, or the caller may not view it. The two look the same.
17016
+ */
17017
+ 404: ErrorResponse;
17018
+ /**
17019
+ * `not_workspace_member`: the user is not in the workspace; `details.user_ids` names them
17020
+ */
17021
+ 422: ErrorResponse;
17022
+ /**
17023
+ * Internal server error
17024
+ */
17025
+ 500: ErrorResponse;
17026
+ };
17027
+ export type SetProjectMemberError = SetProjectMemberErrors[keyof SetProjectMemberErrors];
17028
+ export type SetProjectMemberResponses = {
17029
+ /**
17030
+ * The member, with the role now in effect
17031
+ */
17032
+ 200: ProjectMember;
17033
+ };
17034
+ export type SetProjectMemberResponse = SetProjectMemberResponses[keyof SetProjectMemberResponses];
17035
+ export type GetPromptInfoData = {
17036
+ body?: never;
17037
+ path?: never;
17038
+ query?: never;
17039
+ url: '/api/prompt';
17040
+ };
17041
+ export type GetPromptInfoErrors = {
17042
+ /**
17043
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
17044
+ */
17045
+ 400: ErrorResponse;
17046
+ /**
17047
+ * Unauthorized
17048
+ */
17049
+ 401: ErrorResponse;
17050
+ /**
17051
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
17052
+ */
17053
+ 403: ForbiddenError;
17054
+ /**
17055
+ * Internal server error
17056
+ */
17057
+ 500: ErrorResponse;
17058
+ };
17059
+ export type GetPromptInfoError = GetPromptInfoErrors[keyof GetPromptInfoErrors];
17060
+ export type GetPromptInfoResponses = {
17061
+ /**
17062
+ * Success
17063
+ */
17064
+ 200: PromptInfo;
17065
+ };
17066
+ export type GetPromptInfoResponse = GetPromptInfoResponses[keyof GetPromptInfoResponses];
17067
+ export type ExecutePromptData = {
17068
+ body: PromptRequest;
17069
+ headers?: {
17070
+ /**
17071
+ * The project a request acts in. The operations that list it are the
17072
+ * ones that read it: they list workflows, runs or assets, or create
17073
+ * one. Absent means the workspace's default project, which is how
17074
+ * existing clients keep working.
17075
+ *
17076
+ * An operation on one existing workflow, run or asset does not take
17077
+ * it: the row's own project decides. Any other operation that creates
17078
+ * a workflow, run or asset acts in the default project until it lists
17079
+ * this parameter.
17080
+ *
17081
+ * The project must be in the workspace the request resolves to. A
17082
+ * project that does not exist, or that the caller may not view, is 404
17083
+ * `not_found`; the two look the same. Where Projects is not enabled for
17084
+ * the workspace the header is ignored.
17085
+ *
17086
+ */
17087
+ 'X-Comfy-Project-ID'?: string;
17088
+ };
17089
+ path?: never;
17090
+ query?: never;
17091
+ url: '/api/prompt';
17092
+ };
17093
+ export type ExecutePromptErrors = {
17094
+ /**
17095
+ * Invalid prompt, or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
17096
+ */
17097
+ 400: PromptErrorResponse;
17098
+ /**
17099
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17100
+ */
17101
+ 401: ErrorResponse;
17102
+ /**
17103
+ * The account's plan does not allow this submission; nothing was queued and retrying without changing the plan never succeeds. Disambiguated by the body's `error.type`, NOT by parsing `error.message`: `PAYMENT_REQUIRED` (no active subscription, no funds, blocked tier), `CLOUD_SUBSCRIPTION_REQUIRED`, `FREE_TIER_EXHAUSTED`, `PARTNER_NODE_PAYMENT_REQUIRED`, or `MODEL_PAYMENT_REQUIRED`. A `PAYMENT_REQUIRED` body may also carry `error.reason`, the billing policy's reason for the refusal, e.g. `subscription_inactive`, `no_funds` or `manual_block`; treat an absent or unknown reason as the generic refusal.
17104
+ */
17105
+ 402: PromptErrorResponse;
17106
+ /**
17107
+ * Workspace governance policy blocks one or more partner providers (error.type PARTNER_NODE_DISABLED; error.class_types lists the offending nodes, error.providers the disabled providers), or a refused request with `code` and `message` (see SessionWriteForbidden).
17108
+ */
17109
+ 403: PromptErrorResponse;
17110
+ /**
17111
+ * Workflow JSON too large
17112
+ */
17113
+ 413: PromptErrorResponse;
17114
+ /**
17115
+ * Retryable backpressure, disambiguated by the body's `error.type`: `QUEUE_LIMIT` (this workspace's bounded job queue is full - retrying after some queued jobs complete will succeed) or `FREE_TIER_UNAVAILABLE` (the free tier is switched off for now - retrying once it is back will succeed), or `BILLING_UNAVAILABLE` with `error.reason` `funds_unavailable` (ingest got no billing verdict for the workspace because the billing service was unreachable or rejected the check, or the billing-status read behind a no-funds verdict failed - nothing was queued, and retrying the same submission after `Retry-After` seconds will succeed once billing answers). Of the billing outcomes, a plan or billing policy refusal is a 402; only billing being unavailable is a 429. For a browser that picked a developer-platform deployment, also `PLATFORM_REFUSED` with `error.details` `deployment_not_ready` (the deployment is on its way to ready - nothing was queued, and retrying after `Retry-After` seconds will succeed once it is ready) or another platform 429 passed through.
17116
+ */
17117
+ 429: PromptErrorResponse;
17118
+ /**
17119
+ * Internal server error
17120
+ */
17121
+ 500: PromptErrorResponse;
17122
+ /**
17123
+ * Service unavailable
17124
+ */
17125
+ 503: PromptErrorResponse;
17126
+ };
17127
+ export type ExecutePromptError = ExecutePromptErrors[keyof ExecutePromptErrors];
17128
+ export type ExecutePromptResponses = {
17129
+ /**
17130
+ * Success - Prompt accepted
17131
+ */
17132
+ 200: PromptResponse;
17133
+ };
17134
+ export type ExecutePromptResponse = ExecutePromptResponses[keyof ExecutePromptResponses];
17135
+ export type GetLegacyPromptByIdData = {
17136
+ body?: never;
17137
+ path: {
17138
+ prompt_id: string;
17139
+ };
17140
+ query?: never;
17141
+ url: '/api/prompt/{prompt_id}';
17142
+ };
17143
+ export type GetLegacyPromptByIdErrors = {
17144
+ /**
17145
+ * Not Found — use /api/jobs/{prompt_id} instead
17146
+ */
17147
+ 404: unknown;
17148
+ };
17149
+ export type GetProvidersData = {
17150
+ body?: never;
17151
+ path?: never;
17152
+ query?: never;
17153
+ url: '/api/providers';
17154
+ };
17155
+ export type GetProvidersErrors = {
17156
+ /**
17157
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
17158
+ */
17159
+ 400: ErrorResponse;
17160
+ /**
17161
+ * Unauthorized
17162
+ */
17163
+ 401: ErrorResponse;
17164
+ /**
17165
+ * Governance not available (no governance entitlement)
17166
+ */
17167
+ 403: ErrorResponse;
17168
+ /**
17169
+ * Internal server error
17170
+ */
17171
+ 500: ErrorResponse;
17172
+ };
17173
+ export type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors];
17174
+ export type GetProvidersResponses = {
17175
+ /**
17176
+ * The provider catalog
17177
+ */
17178
+ 200: ProviderCatalogResponse;
17179
+ };
17180
+ export type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses];
17181
+ export type GetQueueInfoData = {
17182
+ body?: never;
17183
+ path?: never;
17184
+ query?: never;
17185
+ url: '/api/queue';
17186
+ };
17187
+ export type GetQueueInfoErrors = {
17188
+ /**
17189
+ * Invalid request parameters
17190
+ */
17191
+ 400: ErrorResponse;
17192
+ /**
17193
+ * Unauthorized - Authentication required
17194
+ */
17195
+ 401: ErrorResponse;
17196
+ /**
17197
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
17198
+ */
17199
+ 403: ForbiddenError;
17200
+ /**
17201
+ * Invalid request parameters
17202
+ */
17203
+ 500: ErrorResponse;
17204
+ };
17205
+ export type GetQueueInfoError = GetQueueInfoErrors[keyof GetQueueInfoErrors];
17206
+ export type GetQueueInfoResponses = {
17207
+ /**
17208
+ * Success
17209
+ */
17210
+ 200: QueueInfo;
17211
+ };
17212
+ export type GetQueueInfoResponse = GetQueueInfoResponses[keyof GetQueueInfoResponses];
17213
+ export type ManageQueueData = {
17214
+ body: QueueManageRequest;
17215
+ path?: never;
17216
+ query?: never;
17217
+ url: '/api/queue';
17218
+ };
17219
+ export type ManageQueueErrors = {
17220
+ /**
17221
+ * Invalid request parameters
17222
+ */
17223
+ 400: ErrorResponse;
17224
+ /**
17225
+ * Unauthorized
17226
+ */
17227
+ 401: ErrorResponse;
17228
+ /**
17229
+ * A refused request that changes data. For a web session, `code` is `csrf_invalid` (no `X-CSRF-Token`, or not the session's), `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email, or, on `POST /api/workspaces`, an account an SSO organization holds (its organization manages its workspaces; signing in again does not change it). On the plan-lifecycle writes (`POST /api/billing/subscribe`, `POST /api/billing/subscription/cancel`, `POST /api/billing/subscription/resubscribe`, `POST /api/billing/subscription/revert-scheduled-change`, `POST /api/billing/ops/{id}/cancel` and the `/api/billing/retention*` routes), `NOT_ORIGINAL_OWNER` means the caller is an owner but not the workspace's creator, and only the creator may change the plan; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever the flag.
17230
+ */
17231
+ 403: ForbiddenError;
17232
+ /**
17233
+ * Internal server error
17234
+ */
17235
+ 500: ErrorResponse;
17236
+ };
17237
+ export type ManageQueueError = ManageQueueErrors[keyof ManageQueueErrors];
17238
+ export type ManageQueueResponses = {
17239
+ /**
17240
+ * Success
17241
+ */
17242
+ 200: QueueManageResponse;
17243
+ };
17244
+ export type ManageQueueResponse = ManageQueueResponses[keyof ManageQueueResponses];
17245
+ export type GetReleaseUnsupportedPacksData = {
17246
+ body?: never;
17247
+ path?: never;
17248
+ query?: never;
17249
+ url: '/api/release/unsupported-packs';
17250
+ };
17251
+ export type GetReleaseUnsupportedPacksErrors = {
17252
+ /**
17253
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
17254
+ */
17255
+ 400: ErrorResponse;
17256
+ /**
17257
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
17258
+ */
17259
+ 401: ErrorResponse;
17260
+ /**
17261
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
17262
+ */
17263
+ 403: ForbiddenError;
17264
+ };
17265
+ export type GetReleaseUnsupportedPacksError = GetReleaseUnsupportedPacksErrors[keyof GetReleaseUnsupportedPacksErrors];
17266
+ export type GetReleaseUnsupportedPacksResponses = {
17267
+ /**
17268
+ * The packs the Release built without, in the order the build declared them
17269
+ */
17270
+ 200: ReleaseUnsupportedPacks;
15358
17271
  };
15359
17272
  export type GetReleaseUnsupportedPacksResponse = GetReleaseUnsupportedPacksResponses[keyof GetReleaseUnsupportedPacksResponses];
15360
17273
  export type ListSecretsData = {
@@ -16012,6 +17925,26 @@ export type UploadImageData = {
16012
17925
  */
16013
17926
  type?: string;
16014
17927
  };
17928
+ headers?: {
17929
+ /**
17930
+ * The project a request acts in. The operations that list it are the
17931
+ * ones that read it: they list workflows, runs or assets, or create
17932
+ * one. Absent means the workspace's default project, which is how
17933
+ * existing clients keep working.
17934
+ *
17935
+ * An operation on one existing workflow, run or asset does not take
17936
+ * it: the row's own project decides. Any other operation that creates
17937
+ * a workflow, run or asset acts in the default project until it lists
17938
+ * this parameter.
17939
+ *
17940
+ * The project must be in the workspace the request resolves to. A
17941
+ * project that does not exist, or that the caller may not view, is 404
17942
+ * `not_found`; the two look the same. Where Projects is not enabled for
17943
+ * the workspace the header is ignored.
17944
+ *
17945
+ */
17946
+ 'X-Comfy-Project-ID'?: string;
17947
+ };
16015
17948
  path?: never;
16016
17949
  query?: never;
16017
17950
  url: '/api/upload/image';
@@ -16070,6 +18003,26 @@ export type UploadMaskData = {
16070
18003
  */
16071
18004
  original_ref: string;
16072
18005
  };
18006
+ headers?: {
18007
+ /**
18008
+ * The project a request acts in. The operations that list it are the
18009
+ * ones that read it: they list workflows, runs or assets, or create
18010
+ * one. Absent means the workspace's default project, which is how
18011
+ * existing clients keep working.
18012
+ *
18013
+ * An operation on one existing workflow, run or asset does not take
18014
+ * it: the row's own project decides. Any other operation that creates
18015
+ * a workflow, run or asset acts in the default project until it lists
18016
+ * this parameter.
18017
+ *
18018
+ * The project must be in the workspace the request resolves to. A
18019
+ * project that does not exist, or that the caller may not view, is 404
18020
+ * `not_found`; the two look the same. Where Projects is not enabled for
18021
+ * the workspace the header is ignored.
18022
+ *
18023
+ */
18024
+ 'X-Comfy-Project-ID'?: string;
18025
+ };
16073
18026
  path?: never;
16074
18027
  query?: never;
16075
18028
  url: '/api/upload/mask';
@@ -16636,14 +18589,27 @@ export type GetCatalogAgentInstructionsData = {
16636
18589
  url: '/api/v1/catalog/agents';
16637
18590
  };
16638
18591
  export type GetCatalogAgentInstructionsErrors = {
18592
+ /**
18593
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
18594
+ */
18595
+ 400: ErrorResponse;
18596
+ /**
18597
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
18598
+ */
18599
+ 401: ErrorResponse;
18600
+ /**
18601
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
18602
+ */
18603
+ 403: ForbiddenError;
16639
18604
  /**
16640
18605
  * Catalog disabled or unavailable
16641
18606
  */
16642
18607
  503: unknown;
16643
18608
  };
18609
+ export type GetCatalogAgentInstructionsError = GetCatalogAgentInstructionsErrors[keyof GetCatalogAgentInstructionsErrors];
16644
18610
  export type GetCatalogAgentInstructionsResponses = {
16645
18611
  /**
16646
- * Editing instructions from this deployed catalog API build
18612
+ * Editing instructions from this deployed catalog API build; private no-store
16647
18613
  */
16648
18614
  200: string;
16649
18615
  };
@@ -16693,9 +18659,12 @@ export type ListCccWebsiteCardsData = {
16693
18659
  kind: 'MODEL' | 'WORKFLOW' | 'APP';
16694
18660
  limit?: number;
16695
18661
  cursor?: string;
16696
- locale?: 'en' | 'zh-CN' | 'ja';
18662
+ locale?: 'en' | 'zh-CN' | 'ja' | 'zh-TW' | 'ko' | 'es' | 'pt-BR' | 'ru' | 'fr' | 'tr' | 'ar';
16697
18663
  q?: string;
16698
- sort?: 'popular' | 'name' | 'priceAsc' | 'priceDesc';
18664
+ /**
18665
+ * newest orders by the time each page first went live on the Hub, newest first, then title and uid; pages with no recorded time come last.
18666
+ */
18667
+ sort?: 'popular' | 'name' | 'newest' | 'priceAsc' | 'priceDesc';
16699
18668
  category?: Array<string>;
16700
18669
  model?: Array<string>;
16701
18670
  use?: Array<string>;
@@ -16789,25 +18758,6 @@ export type GetCccCreatorResponses = {
16789
18758
  200: CccCreatorProfile;
16790
18759
  };
16791
18760
  export type GetCccCreatorResponse = GetCccCreatorResponses[keyof GetCccCreatorResponses];
16792
- export type GetCatalogDocsData = {
16793
- body?: never;
16794
- path?: never;
16795
- query?: never;
16796
- url: '/api/v1/catalog/docs';
16797
- };
16798
- export type GetCatalogDocsErrors = {
16799
- /**
16800
- * Catalog disabled or unavailable
16801
- */
16802
- 503: unknown;
16803
- };
16804
- export type GetCatalogDocsResponses = {
16805
- /**
16806
- * Build-coupled catalog instructions, permissions and endpoint contracts
16807
- */
16808
- 200: string;
16809
- };
16810
- export type GetCatalogDocsResponse = GetCatalogDocsResponses[keyof GetCatalogDocsResponses];
16811
18761
  export type BatchCccItemsData = {
16812
18762
  body: {
16813
18763
  expected_draft_rev: number;
@@ -17514,7 +19464,7 @@ export type GetCccStagingData = {
17514
19464
  };
17515
19465
  export type GetCccStagingErrors = {
17516
19466
  /**
17517
- * Unknown, repeated scalar or invalid filter; bounded result exceeded; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
19467
+ * Unknown, repeated scalar or invalid filter; bounded result exceeded (including the unpaged review over its document budget); or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
17518
19468
  */
17519
19469
  400: ErrorResponse;
17520
19470
  /**
@@ -17803,7 +19753,7 @@ export type ListCccWebsiteModelDirectoryData = {
17803
19753
  };
17804
19754
  path?: never;
17805
19755
  query?: {
17806
- locale?: 'en' | 'zh-CN' | 'ja';
19756
+ locale?: 'en' | 'zh-CN' | 'ja' | 'zh-TW' | 'ko' | 'es' | 'pt-BR' | 'ru' | 'fr' | 'tr' | 'ar';
17807
19757
  };
17808
19758
  url: '/api/v1/catalog/model-directory';
17809
19759
  };
@@ -17835,14 +19785,27 @@ export type GetCatalogOpenApiData = {
17835
19785
  url: '/api/v1/catalog/openapi.json';
17836
19786
  };
17837
19787
  export type GetCatalogOpenApiErrors = {
19788
+ /**
19789
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
19790
+ */
19791
+ 400: ErrorResponse;
19792
+ /**
19793
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
19794
+ */
19795
+ 401: ErrorResponse;
19796
+ /**
19797
+ * A refused request. For a web session, `code` is `workspace_access_denied` (the selected workspace is unknown, deleted, or the user is not a member; the three look the same), `no_workspace_access` (the account has no personal workspace and is a member of no live workspace), `origin_not_allowed` or `cross_site_request`; see the `WebSessionAuth` scheme. For any credential, `sso_required` means an SSO organization holds the account (its email is on the organization's verified domains) and the credential is not an SSO sign-in, or the workspace is an SSO organization's and the account is not on its domains or the credential is not an SSO sign-in; `organization_id`, when present, names the organization to sign in with. `account_outside_organization` means the workspace is an SSO organization's and the account is on none of its domains, so no sign-in admits it; `organization_id` names the workspace's organization. `personal_workspace_disabled` means the workspace is the account's personal one and an SSO organization holds the account, so it cannot use it; `organization_id` names that organization. `FORBIDDEN` is the route's own authorization check failing, such as an unverified email. On `GET /api/billing/churnkey/auth`, `NOT_ORIGINAL_OWNER` means the caller is not the workspace's creator; it is returned only when the rollout mode is `creator`. A credential this route does not take gets AuthTypeNotAllowedError instead, and so does the session while `web_session_enabled` is off for the user, unless the operation says it takes the session whatever `web_session_enabled` says.
19798
+ */
19799
+ 403: ForbiddenError;
17838
19800
  /**
17839
19801
  * Catalog disabled or unavailable
17840
19802
  */
17841
19803
  503: unknown;
17842
19804
  };
19805
+ export type GetCatalogOpenApiError = GetCatalogOpenApiErrors[keyof GetCatalogOpenApiErrors];
17843
19806
  export type GetCatalogOpenApiResponses = {
17844
19807
  /**
17845
- * Catalog OpenAPI with contract fingerprint and environment
19808
+ * Catalog OpenAPI with contract fingerprint and environment; private no-store
17846
19809
  */
17847
19810
  200: Cccjson;
17848
19811
  };
@@ -18237,7 +20200,7 @@ export type GetCccWebsiteRootPresentationData = {
18237
20200
  path?: never;
18238
20201
  query: {
18239
20202
  path: '/hub/models/' | '/hub/workflows/' | '/hub/apps/';
18240
- locale?: 'en' | 'zh-CN' | 'ja';
20203
+ locale?: 'en' | 'zh-CN' | 'ja' | 'zh-TW' | 'ko' | 'es' | 'pt-BR' | 'ru' | 'fr' | 'tr' | 'ar';
18241
20204
  /**
18242
20205
  * Live revision selected once at page entry. Redis requires both this revision and the selected authority pin. On an origin miss the revision must match current Live.
18243
20206
  */
@@ -18638,6 +20601,18 @@ export type ViewFileData = {
18638
20601
  *
18639
20602
  */
18640
20603
  res?: number;
20604
+ /**
20605
+ * `false` answers `200` with the signed link as JSON
20606
+ * (`ViewFileURLResponse`) instead of the `302` to it, after the same
20607
+ * sign-in, workspace and visibility checks. For a page on another
20608
+ * site that reads the file with `fetch`: a page cannot read a 302's
20609
+ * `Location`, and the browser sends `Origin: null` to storage after
20610
+ * following the redirect across sites, which storage refuses. Any
20611
+ * other value, or none, answers the `302`. `channel`, and `res` on
20612
+ * a raster image, answer with the image bytes either way.
20613
+ *
20614
+ */
20615
+ redirect?: string;
18641
20616
  /**
18642
20617
  * The workspace a media request reads from, where a media tag cannot send `X-Comfy-Workspace-ID`; see the `MediaWorkspaceID` parameter.
18643
20618
  */
@@ -18670,9 +20645,9 @@ export type ViewFileErrors = {
18670
20645
  export type ViewFileError = ViewFileErrors[keyof ViewFileErrors];
18671
20646
  export type ViewFileResponses = {
18672
20647
  /**
18673
- * Resized JPEG thumbnail (returned when res parameter is used)
20648
+ * Success - File content returned (used when channel or res parameter is present), or, with `redirect=false`, the signed link as JSON with `Cache-Control: no-store`.
18674
20649
  */
18675
- 200: Blob | File;
20650
+ 200: ViewFileUrlResponse;
18676
20651
  };
18677
20652
  export type ViewFileResponse = ViewFileResponses[keyof ViewFileResponses];
18678
20653
  export type GetLegacyViewMetadataData = {
@@ -18771,6 +20746,26 @@ export type GetWorkflowTemplatesResponses = {
18771
20746
  export type GetWorkflowTemplatesResponse = GetWorkflowTemplatesResponses[keyof GetWorkflowTemplatesResponses];
18772
20747
  export type ListWorkflowsData = {
18773
20748
  body?: never;
20749
+ headers?: {
20750
+ /**
20751
+ * The project a request acts in. The operations that list it are the
20752
+ * ones that read it: they list workflows, runs or assets, or create
20753
+ * one. Absent means the workspace's default project, which is how
20754
+ * existing clients keep working.
20755
+ *
20756
+ * An operation on one existing workflow, run or asset does not take
20757
+ * it: the row's own project decides. Any other operation that creates
20758
+ * a workflow, run or asset acts in the default project until it lists
20759
+ * this parameter.
20760
+ *
20761
+ * The project must be in the workspace the request resolves to. A
20762
+ * project that does not exist, or that the caller may not view, is 404
20763
+ * `not_found`; the two look the same. Where Projects is not enabled for
20764
+ * the workspace the header is ignored.
20765
+ *
20766
+ */
20767
+ 'X-Comfy-Project-ID'?: string;
20768
+ };
18774
20769
  path?: never;
18775
20770
  query?: {
18776
20771
  limit?: number;
@@ -18822,6 +20817,26 @@ export type ListWorkflowsResponses = {
18822
20817
  export type ListWorkflowsResponse = ListWorkflowsResponses[keyof ListWorkflowsResponses];
18823
20818
  export type CreateWorkflowData = {
18824
20819
  body: CreateWorkflowRequest;
20820
+ headers?: {
20821
+ /**
20822
+ * The project a request acts in. The operations that list it are the
20823
+ * ones that read it: they list workflows, runs or assets, or create
20824
+ * one. Absent means the workspace's default project, which is how
20825
+ * existing clients keep working.
20826
+ *
20827
+ * An operation on one existing workflow, run or asset does not take
20828
+ * it: the row's own project decides. Any other operation that creates
20829
+ * a workflow, run or asset acts in the default project until it lists
20830
+ * this parameter.
20831
+ *
20832
+ * The project must be in the workspace the request resolves to. A
20833
+ * project that does not exist, or that the caller may not view, is 404
20834
+ * `not_found`; the two look the same. Where Projects is not enabled for
20835
+ * the workspace the header is ignored.
20836
+ *
20837
+ */
20838
+ 'X-Comfy-Project-ID'?: string;
20839
+ };
18825
20840
  path?: never;
18826
20841
  query?: never;
18827
20842
  url: '/api/workflows';
@@ -19026,6 +21041,26 @@ export type GetWorkflowContentResponses = {
19026
21041
  export type GetWorkflowContentResponse = GetWorkflowContentResponses[keyof GetWorkflowContentResponses];
19027
21042
  export type ForkWorkflowData = {
19028
21043
  body: ForkWorkflowRequest;
21044
+ headers?: {
21045
+ /**
21046
+ * The project a request acts in. The operations that list it are the
21047
+ * ones that read it: they list workflows, runs or assets, or create
21048
+ * one. Absent means the workspace's default project, which is how
21049
+ * existing clients keep working.
21050
+ *
21051
+ * An operation on one existing workflow, run or asset does not take
21052
+ * it: the row's own project decides. Any other operation that creates
21053
+ * a workflow, run or asset acts in the default project until it lists
21054
+ * this parameter.
21055
+ *
21056
+ * The project must be in the workspace the request resolves to. A
21057
+ * project that does not exist, or that the caller may not view, is 404
21058
+ * `not_found`; the two look the same. Where Projects is not enabled for
21059
+ * the workspace the header is ignored.
21060
+ *
21061
+ */
21062
+ 'X-Comfy-Project-ID'?: string;
21063
+ };
19029
21064
  path: {
19030
21065
  /**
19031
21066
  * The UUID of the source workflow to fork from.
@@ -19248,6 +21283,55 @@ export type CreateWorkflowUploadUrlResponses = {
19248
21283
  200: UploadGrantResponse;
19249
21284
  };
19250
21285
  export type CreateWorkflowUploadUrlResponse = CreateWorkflowUploadUrlResponses[keyof CreateWorkflowUploadUrlResponses];
21286
+ export type ListWorkspaceAccessEventsData = {
21287
+ body?: never;
21288
+ path?: never;
21289
+ query?: {
21290
+ /**
21291
+ * Return only changes about this project
21292
+ */
21293
+ project_id?: string;
21294
+ /**
21295
+ * The `next_cursor` of the previous page
21296
+ */
21297
+ after?: string;
21298
+ /**
21299
+ * Maximum number of events to return
21300
+ */
21301
+ limit?: number;
21302
+ };
21303
+ url: '/api/workspace/access-events';
21304
+ };
21305
+ export type ListWorkspaceAccessEventsErrors = {
21306
+ /**
21307
+ * `invalid_request`: a bad cursor or limit. Or `workspace_id_invalid`; see `SessionWorkspaceIDInvalid`.
21308
+ */
21309
+ 400: ErrorResponse;
21310
+ /**
21311
+ * Unauthorized
21312
+ */
21313
+ 401: ErrorResponse;
21314
+ /**
21315
+ * `permission_denied`: the caller lacks `workspace.audit` read; `details.permission` names it. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
21316
+ */
21317
+ 403: ErrorResponse;
21318
+ /**
21319
+ * `not_found`: Projects is not served for this workspace
21320
+ */
21321
+ 404: ErrorResponse;
21322
+ /**
21323
+ * Internal server error
21324
+ */
21325
+ 500: ErrorResponse;
21326
+ };
21327
+ export type ListWorkspaceAccessEventsError = ListWorkspaceAccessEventsErrors[keyof ListWorkspaceAccessEventsErrors];
21328
+ export type ListWorkspaceAccessEventsResponses = {
21329
+ /**
21330
+ * Access changes, newest first
21331
+ */
21332
+ 200: ListAccessEventsResponse;
21333
+ };
21334
+ export type ListWorkspaceAccessEventsResponse = ListWorkspaceAccessEventsResponses[keyof ListWorkspaceAccessEventsResponses];
19251
21335
  export type ListWorkspaceApiKeysData = {
19252
21336
  body?: never;
19253
21337
  path?: never;
@@ -19669,7 +21753,93 @@ export type RemoveWorkspaceMemberData = {
19669
21753
  query?: never;
19670
21754
  url: '/api/workspace/members/{userId}';
19671
21755
  };
19672
- export type RemoveWorkspaceMemberErrors = {
21756
+ export type RemoveWorkspaceMemberErrors = {
21757
+ /**
21758
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
21759
+ */
21760
+ 400: ErrorResponse;
21761
+ /**
21762
+ * Unauthorized
21763
+ */
21764
+ 401: ErrorResponse;
21765
+ /**
21766
+ * Owner role required, cannot remove yourself, the original owner of a personal workspace cannot be removed (`CANNOT_REMOVE_ORIGINAL_OWNER`), or the creator of a team workspace cannot be removed (`CANNOT_REMOVE_CREATOR`)
21767
+ */
21768
+ 403: ErrorResponse;
21769
+ /**
21770
+ * Workspace or member not found
21771
+ */
21772
+ 404: ErrorResponse;
21773
+ /**
21774
+ * Internal server error
21775
+ */
21776
+ 500: ErrorResponse;
21777
+ };
21778
+ export type RemoveWorkspaceMemberError = RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors];
21779
+ export type RemoveWorkspaceMemberResponses = {
21780
+ /**
21781
+ * Member removed
21782
+ */
21783
+ 204: void;
21784
+ };
21785
+ export type RemoveWorkspaceMemberResponse = RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses];
21786
+ export type UpdateWorkspaceMemberRoleData = {
21787
+ body: UpdateMemberRoleRequest;
21788
+ path: {
21789
+ /**
21790
+ * User ID whose role is being changed
21791
+ */
21792
+ userId: string;
21793
+ };
21794
+ query?: never;
21795
+ url: '/api/workspace/members/{userId}';
21796
+ };
21797
+ export type UpdateWorkspaceMemberRoleErrors = {
21798
+ /**
21799
+ * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
21800
+ */
21801
+ 400: ErrorResponse;
21802
+ /**
21803
+ * Unauthorized
21804
+ */
21805
+ 401: ErrorResponse;
21806
+ /**
21807
+ * Owner role required, the original owner of a personal workspace cannot be demoted (`CANNOT_DEMOTE_ORIGINAL_OWNER`), the creator of a team workspace cannot be demoted (`CANNOT_DEMOTE_CREATOR`), or `DIRECTORY_MANAGED`: the member's role comes from their organization's directory (SSO) and is changed there
21808
+ */
21809
+ 403: ErrorResponse;
21810
+ /**
21811
+ * Workspace or member not found
21812
+ */
21813
+ 404: ErrorResponse;
21814
+ /**
21815
+ * Validation error
21816
+ */
21817
+ 422: ErrorResponse;
21818
+ /**
21819
+ * Internal server error
21820
+ */
21821
+ 500: ErrorResponse;
21822
+ };
21823
+ export type UpdateWorkspaceMemberRoleError = UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors];
21824
+ export type UpdateWorkspaceMemberRoleResponses = {
21825
+ /**
21826
+ * Member role updated
21827
+ */
21828
+ 200: Member;
21829
+ };
21830
+ export type UpdateWorkspaceMemberRoleResponse = UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses];
21831
+ export type RevokeWorkspaceAdminData = {
21832
+ body?: never;
21833
+ path: {
21834
+ /**
21835
+ * User ID of the workspace member
21836
+ */
21837
+ userId: string;
21838
+ };
21839
+ query?: never;
21840
+ url: '/api/workspace/members/{userId}/admin';
21841
+ };
21842
+ export type RevokeWorkspaceAdminErrors = {
19673
21843
  /**
19674
21844
  * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
19675
21845
  */
@@ -19679,38 +21849,42 @@ export type RemoveWorkspaceMemberErrors = {
19679
21849
  */
19680
21850
  401: ErrorResponse;
19681
21851
  /**
19682
- * Owner role required, cannot remove yourself, the original owner of a personal workspace cannot be removed (`CANNOT_REMOVE_ORIGINAL_OWNER`), or the creator of a team workspace cannot be removed (`CANNOT_REMOVE_CREATOR`)
21852
+ * `FORBIDDEN`, with the message `workspace owner required` and no `details`: the caller is not a workspace owner. The route's owner check answers before the handler runs, as on the other member-management routes, so there is no `permission_denied` here. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
19683
21853
  */
19684
21854
  403: ErrorResponse;
19685
21855
  /**
19686
- * Workspace or member not found
21856
+ * `not_found`: the user is not a member of the workspace
19687
21857
  */
19688
21858
  404: ErrorResponse;
21859
+ /**
21860
+ * `target_is_owner`: the member is an owner
21861
+ */
21862
+ 409: ErrorResponse;
19689
21863
  /**
19690
21864
  * Internal server error
19691
21865
  */
19692
21866
  500: ErrorResponse;
19693
21867
  };
19694
- export type RemoveWorkspaceMemberError = RemoveWorkspaceMemberErrors[keyof RemoveWorkspaceMemberErrors];
19695
- export type RemoveWorkspaceMemberResponses = {
21868
+ export type RevokeWorkspaceAdminError = RevokeWorkspaceAdminErrors[keyof RevokeWorkspaceAdminErrors];
21869
+ export type RevokeWorkspaceAdminResponses = {
19696
21870
  /**
19697
- * Member removed
21871
+ * The member, with `workspace_admin` false
19698
21872
  */
19699
- 204: void;
21873
+ 200: Member;
19700
21874
  };
19701
- export type RemoveWorkspaceMemberResponse = RemoveWorkspaceMemberResponses[keyof RemoveWorkspaceMemberResponses];
19702
- export type UpdateWorkspaceMemberRoleData = {
19703
- body: UpdateMemberRoleRequest;
21875
+ export type RevokeWorkspaceAdminResponse = RevokeWorkspaceAdminResponses[keyof RevokeWorkspaceAdminResponses];
21876
+ export type GrantWorkspaceAdminData = {
21877
+ body?: never;
19704
21878
  path: {
19705
21879
  /**
19706
- * User ID whose role is being changed
21880
+ * User ID of the workspace member
19707
21881
  */
19708
21882
  userId: string;
19709
21883
  };
19710
21884
  query?: never;
19711
- url: '/api/workspace/members/{userId}';
21885
+ url: '/api/workspace/members/{userId}/admin';
19712
21886
  };
19713
- export type UpdateWorkspaceMemberRoleErrors = {
21887
+ export type GrantWorkspaceAdminErrors = {
19714
21888
  /**
19715
21889
  * `code` is `workspace_id_invalid`: the `X-Comfy-Workspace-ID` header or `workspace_id` query value is malformed, or conflicts with another value or with the workspace the credential resolves to. Answered only while `web_session_enabled` is on for the user. See the `WebSessionAuth` scheme.
19716
21890
  */
@@ -19720,30 +21894,30 @@ export type UpdateWorkspaceMemberRoleErrors = {
19720
21894
  */
19721
21895
  401: ErrorResponse;
19722
21896
  /**
19723
- * Owner role required, the original owner of a personal workspace cannot be demoted (`CANNOT_DEMOTE_ORIGINAL_OWNER`), the creator of a team workspace cannot be demoted (`CANNOT_DEMOTE_CREATOR`), or `DIRECTORY_MANAGED`: the member's role comes from their organization's directory (SSO) and is changed there
21897
+ * `FORBIDDEN`, with the message `workspace owner required` and no `details`: the caller is not a workspace owner. The route's owner check answers before the handler runs, as on the other member-management routes, so there is no `permission_denied` here. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
19724
21898
  */
19725
21899
  403: ErrorResponse;
19726
21900
  /**
19727
- * Workspace or member not found
21901
+ * `not_found`: the user is not a member of the workspace
19728
21902
  */
19729
21903
  404: ErrorResponse;
19730
21904
  /**
19731
- * Validation error
21905
+ * `target_is_owner`: the member is an owner, who already holds every permission
19732
21906
  */
19733
- 422: ErrorResponse;
21907
+ 409: ErrorResponse;
19734
21908
  /**
19735
21909
  * Internal server error
19736
21910
  */
19737
21911
  500: ErrorResponse;
19738
21912
  };
19739
- export type UpdateWorkspaceMemberRoleError = UpdateWorkspaceMemberRoleErrors[keyof UpdateWorkspaceMemberRoleErrors];
19740
- export type UpdateWorkspaceMemberRoleResponses = {
21913
+ export type GrantWorkspaceAdminError = GrantWorkspaceAdminErrors[keyof GrantWorkspaceAdminErrors];
21914
+ export type GrantWorkspaceAdminResponses = {
19741
21915
  /**
19742
- * Member role updated
21916
+ * The member, with `workspace_admin` true
19743
21917
  */
19744
21918
  200: Member;
19745
21919
  };
19746
- export type UpdateWorkspaceMemberRoleResponse = UpdateWorkspaceMemberRoleResponses[keyof UpdateWorkspaceMemberRoleResponses];
21920
+ export type GrantWorkspaceAdminResponse = GrantWorkspaceAdminResponses[keyof GrantWorkspaceAdminResponses];
19747
21921
  export type GetProviderPolicyData = {
19748
21922
  body?: never;
19749
21923
  path?: never;
@@ -20283,7 +22457,7 @@ export type ListWorkspaceDeploymentsErrors = {
20283
22457
  */
20284
22458
  401: ErrorResponse;
20285
22459
  /**
20286
- * Not in the rollout, or an API key: listing needs a signed-in session
22460
+ * Not in the rollout, deployment picking is not configured in this environment, or an API key: listing needs a signed-in session
20287
22461
  */
20288
22462
  403: ErrorResponse;
20289
22463
  /**
@@ -20295,7 +22469,7 @@ export type ListWorkspaceDeploymentsErrors = {
20295
22469
  */
20296
22470
  500: ErrorResponse;
20297
22471
  /**
20298
- * The platform could not be asked, or deployment picking is not configured in this environment
22472
+ * The platform could not be asked, or it refused the minted token
20299
22473
  */
20300
22474
  503: ErrorResponse;
20301
22475
  };
@@ -20307,6 +22481,328 @@ export type ListWorkspaceDeploymentsResponses = {
20307
22481
  200: WorkspaceDeploymentList;
20308
22482
  };
20309
22483
  export type ListWorkspaceDeploymentsResponse = ListWorkspaceDeploymentsResponses[keyof ListWorkspaceDeploymentsResponses];
22484
+ export type CreateWorkspaceDeploymentModelUploadData = {
22485
+ body: DeploymentModelUploadRequest;
22486
+ path: {
22487
+ /**
22488
+ * Workspace ID (w-{uuid} format)
22489
+ */
22490
+ id: string;
22491
+ /**
22492
+ * One of the workspace's deployments (dep-{uuid} format)
22493
+ */
22494
+ deployment_id: string;
22495
+ };
22496
+ query?: never;
22497
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/model-uploads';
22498
+ };
22499
+ export type CreateWorkspaceDeploymentModelUploadErrors = {
22500
+ /**
22501
+ * comfy-builder's own refusal, with its status and body unchanged; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22502
+ */
22503
+ 400: DeploymentModelsRefusalBody;
22504
+ /**
22505
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22506
+ */
22507
+ 401: ErrorResponse;
22508
+ /**
22509
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionWriteForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22510
+ */
22511
+ 403: DeploymentModelsForbiddenBody;
22512
+ /**
22513
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22514
+ */
22515
+ 404: PlatformPassthroughBody;
22516
+ /**
22517
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22518
+ */
22519
+ 500: PlatformPassthroughBody;
22520
+ /**
22521
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22522
+ */
22523
+ 503: PlatformPassthroughBody;
22524
+ };
22525
+ export type CreateWorkspaceDeploymentModelUploadError = CreateWorkspaceDeploymentModelUploadErrors[keyof CreateWorkspaceDeploymentModelUploadErrors];
22526
+ export type CreateWorkspaceDeploymentModelUploadResponses = {
22527
+ /**
22528
+ * comfy-builder's BlobUpload, unchanged
22529
+ */
22530
+ 201: DeploymentModelUpload;
22531
+ };
22532
+ export type CreateWorkspaceDeploymentModelUploadResponse = CreateWorkspaceDeploymentModelUploadResponses[keyof CreateWorkspaceDeploymentModelUploadResponses];
22533
+ export type CompleteWorkspaceDeploymentModelUploadData = {
22534
+ body?: never;
22535
+ path: {
22536
+ /**
22537
+ * Workspace ID (w-{uuid} format)
22538
+ */
22539
+ id: string;
22540
+ /**
22541
+ * One of the workspace's deployments (dep-{uuid} format)
22542
+ */
22543
+ deployment_id: string;
22544
+ /**
22545
+ * The blobId the model upload route answered
22546
+ */
22547
+ blob_id: string;
22548
+ };
22549
+ query?: never;
22550
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/model-uploads/{blob_id}/complete';
22551
+ };
22552
+ export type CompleteWorkspaceDeploymentModelUploadErrors = {
22553
+ /**
22554
+ * `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22555
+ */
22556
+ 400: DeploymentModelsRefusalBody;
22557
+ /**
22558
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22559
+ */
22560
+ 401: ErrorResponse;
22561
+ /**
22562
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionWriteForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22563
+ */
22564
+ 403: DeploymentModelsForbiddenBody;
22565
+ /**
22566
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22567
+ */
22568
+ 404: PlatformPassthroughBody;
22569
+ /**
22570
+ * comfy-builder's refusal, unchanged: `error` `PART_MISSING` or `PART_WRONG_SIZE`, its `message` naming the first piece that is not right, or `UPLOAD_NOT_IN_PARTS` (the upload was made without `parts` and its bytes are not there).
22571
+ */
22572
+ 409: DeploymentModelUploadConflict;
22573
+ /**
22574
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22575
+ */
22576
+ 500: PlatformPassthroughBody;
22577
+ /**
22578
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22579
+ */
22580
+ 503: PlatformPassthroughBody;
22581
+ };
22582
+ export type CompleteWorkspaceDeploymentModelUploadError = CompleteWorkspaceDeploymentModelUploadErrors[keyof CompleteWorkspaceDeploymentModelUploadErrors];
22583
+ export type CompleteWorkspaceDeploymentModelUploadResponses = {
22584
+ /**
22585
+ * comfy-builder's BlobUploadComplete, unchanged
22586
+ */
22587
+ 200: DeploymentModelUploadComplete;
22588
+ };
22589
+ export type CompleteWorkspaceDeploymentModelUploadResponse = CompleteWorkspaceDeploymentModelUploadResponses[keyof CompleteWorkspaceDeploymentModelUploadResponses];
22590
+ export type RefreshWorkspaceDeploymentModelUploadPartsData = {
22591
+ body?: never;
22592
+ path: {
22593
+ /**
22594
+ * Workspace ID (w-{uuid} format)
22595
+ */
22596
+ id: string;
22597
+ /**
22598
+ * One of the workspace's deployments (dep-{uuid} format)
22599
+ */
22600
+ deployment_id: string;
22601
+ /**
22602
+ * The blobId the model upload route answered
22603
+ */
22604
+ blob_id: string;
22605
+ };
22606
+ query?: never;
22607
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/model-uploads/{blob_id}/parts';
22608
+ };
22609
+ export type RefreshWorkspaceDeploymentModelUploadPartsErrors = {
22610
+ /**
22611
+ * `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22612
+ */
22613
+ 400: DeploymentModelsRefusalBody;
22614
+ /**
22615
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22616
+ */
22617
+ 401: ErrorResponse;
22618
+ /**
22619
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionWriteForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22620
+ */
22621
+ 403: DeploymentModelsForbiddenBody;
22622
+ /**
22623
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22624
+ */
22625
+ 404: PlatformPassthroughBody;
22626
+ /**
22627
+ * comfy-builder's refusal, unchanged: `error` `UPLOAD_NOT_IN_PARTS` (the upload was made without `parts`) or `UPLOAD_COMPLETE` (its pieces are already joined).
22628
+ */
22629
+ 409: DeploymentModelUploadConflict;
22630
+ /**
22631
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22632
+ */
22633
+ 500: PlatformPassthroughBody;
22634
+ /**
22635
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22636
+ */
22637
+ 503: PlatformPassthroughBody;
22638
+ };
22639
+ export type RefreshWorkspaceDeploymentModelUploadPartsError = RefreshWorkspaceDeploymentModelUploadPartsErrors[keyof RefreshWorkspaceDeploymentModelUploadPartsErrors];
22640
+ export type RefreshWorkspaceDeploymentModelUploadPartsResponses = {
22641
+ /**
22642
+ * comfy-builder's BlobUploadParts, unchanged
22643
+ */
22644
+ 200: DeploymentModelUploadParts;
22645
+ };
22646
+ export type RefreshWorkspaceDeploymentModelUploadPartsResponse = RefreshWorkspaceDeploymentModelUploadPartsResponses[keyof RefreshWorkspaceDeploymentModelUploadPartsResponses];
22647
+ export type ListWorkspaceDeploymentModelsData = {
22648
+ body?: never;
22649
+ path: {
22650
+ /**
22651
+ * Workspace ID (w-{uuid} format)
22652
+ */
22653
+ id: string;
22654
+ /**
22655
+ * One of the workspace's deployments (dep-{uuid} format)
22656
+ */
22657
+ deployment_id: string;
22658
+ };
22659
+ query?: never;
22660
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/models';
22661
+ };
22662
+ export type ListWorkspaceDeploymentModelsErrors = {
22663
+ /**
22664
+ * comfy-deploy's own refusal, with its status and body unchanged; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22665
+ */
22666
+ 400: DeploymentModelsRefusalBody;
22667
+ /**
22668
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22669
+ */
22670
+ 401: ErrorResponse;
22671
+ /**
22672
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22673
+ */
22674
+ 403: DeploymentModelsForbiddenBody;
22675
+ /**
22676
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22677
+ */
22678
+ 404: PlatformPassthroughBody;
22679
+ /**
22680
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22681
+ */
22682
+ 500: PlatformPassthroughBody;
22683
+ /**
22684
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22685
+ */
22686
+ 503: PlatformPassthroughBody;
22687
+ };
22688
+ export type ListWorkspaceDeploymentModelsError = ListWorkspaceDeploymentModelsErrors[keyof ListWorkspaceDeploymentModelsErrors];
22689
+ export type ListWorkspaceDeploymentModelsResponses = {
22690
+ /**
22691
+ * comfy-deploy's model list, unchanged
22692
+ */
22693
+ 200: PlatformPassthroughBody;
22694
+ };
22695
+ export type ListWorkspaceDeploymentModelsResponse = ListWorkspaceDeploymentModelsResponses[keyof ListWorkspaceDeploymentModelsResponses];
22696
+ export type AddWorkspaceDeploymentModelData = {
22697
+ body: AddDeploymentModelRequest;
22698
+ path: {
22699
+ /**
22700
+ * Workspace ID (w-{uuid} format)
22701
+ */
22702
+ id: string;
22703
+ /**
22704
+ * One of the workspace's deployments (dep-{uuid} format)
22705
+ */
22706
+ deployment_id: string;
22707
+ };
22708
+ query?: never;
22709
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/models';
22710
+ };
22711
+ export type AddWorkspaceDeploymentModelErrors = {
22712
+ /**
22713
+ * comfy-deploy's own refusal, with its status and body unchanged; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22714
+ */
22715
+ 400: DeploymentModelsRefusalBody;
22716
+ /**
22717
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22718
+ */
22719
+ 401: ErrorResponse;
22720
+ /**
22721
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionWriteForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22722
+ */
22723
+ 403: DeploymentModelsForbiddenBody;
22724
+ /**
22725
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22726
+ */
22727
+ 404: PlatformPassthroughBody;
22728
+ /**
22729
+ * comfy-deploy's or comfy-builder's own refusal, with its status and body unchanged: `{error, message}`, `error` its machine-readable code and `message` written for the person.
22730
+ */
22731
+ 409: PlatformPassthroughBody;
22732
+ /**
22733
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22734
+ */
22735
+ 500: PlatformPassthroughBody;
22736
+ /**
22737
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22738
+ */
22739
+ 503: PlatformPassthroughBody;
22740
+ };
22741
+ export type AddWorkspaceDeploymentModelError = AddWorkspaceDeploymentModelErrors[keyof AddWorkspaceDeploymentModelErrors];
22742
+ export type AddWorkspaceDeploymentModelResponses = {
22743
+ /**
22744
+ * comfy-deploy's new entry, unchanged
22745
+ */
22746
+ 202: PlatformPassthroughBody;
22747
+ };
22748
+ export type AddWorkspaceDeploymentModelResponse = AddWorkspaceDeploymentModelResponses[keyof AddWorkspaceDeploymentModelResponses];
22749
+ export type RemoveWorkspaceDeploymentModelData = {
22750
+ body?: never;
22751
+ path: {
22752
+ /**
22753
+ * Workspace ID (w-{uuid} format)
22754
+ */
22755
+ id: string;
22756
+ /**
22757
+ * One of the workspace's deployments (dep-{uuid} format)
22758
+ */
22759
+ deployment_id: string;
22760
+ /**
22761
+ * The added model's entry id, from the model list
22762
+ */
22763
+ model_id: string;
22764
+ };
22765
+ query?: never;
22766
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/models/{model_id}';
22767
+ };
22768
+ export type RemoveWorkspaceDeploymentModelErrors = {
22769
+ /**
22770
+ * comfy-deploy's own refusal, with its status and body unchanged; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid): the `X-Comfy-Workspace-ID` value is malformed or conflicts with the workspace the credential resolves to.
22771
+ */
22772
+ 400: DeploymentModelsRefusalBody;
22773
+ /**
22774
+ * No valid credential, or an `Authorization` header, `X-API-Key` header or `?token=` next to the session cookie that could not be read, which is refused rather than answered with the session. `code` is `UNAUTHORIZED`.
22775
+ */
22776
+ 401: ErrorResponse;
22777
+ /**
22778
+ * An API key (these routes need a signed-in session), or the rollout flag is off for this account, as `code` and `message`; or the platform's own 403, unchanged. For a web session, `code` may also be one of the SessionWriteForbidden refusals. A credential these routes never take, such as `X-ComfyAPI-Secret`, and the session while `web_session_enabled` is off for the user, get ingest's authentication refusal instead, AuthTypeNotAllowedError with `accepted` and no `code`, before any other check. See DeploymentModelsForbiddenBody.
22779
+ */
22780
+ 403: DeploymentModelsForbiddenBody;
22781
+ /**
22782
+ * Workspace not found, the caller is not a member, the deployment id is not one, or the model id (on the remove) or blob id (on the parts and complete) is only dot segments: ingest's own refusal, `code` `NOT_FOUND`, before any platform call. Or the platform's own 404, its body unchanged and without `code`: on the add, list and remove, the deployment is not one of the workspace's, comfy-deploy's models switch is off, or the upload or entry is not found; on the parts and complete, comfy-builder has no such upload in the workspace (the upload routes do not check the deployment). A body with `code` is ingest's; read comfy-deploy's 404 as "not on yet" only when `code` is absent. See DeploymentModelsRefusalBody.
22783
+ */
22784
+ 404: PlatformPassthroughBody;
22785
+ /**
22786
+ * comfy-deploy's or comfy-builder's own refusal, with its status and body unchanged: `{error, message}`, `error` its machine-readable code and `message` written for the person.
22787
+ */
22788
+ 409: PlatformPassthroughBody;
22789
+ /**
22790
+ * Ingest could not read the workspace or mint the caller's token (`code` `INTERNAL_ERROR` and `message`, before any platform call); or the platform's own 500, unchanged, which need not carry a `code`: comfy-builder answers a storage or database failure with only `message`.
22791
+ */
22792
+ 500: PlatformPassthroughBody;
22793
+ /**
22794
+ * comfy-deploy or comfy-builder could not be asked, refused the token ingest minted (its 401), or is not configured in this environment, as `code` and `message`; or the platform's own 503, unchanged, such as comfy-deploy's `{error, message}` for a request that ran past its deadline.
22795
+ */
22796
+ 503: PlatformPassthroughBody;
22797
+ };
22798
+ export type RemoveWorkspaceDeploymentModelError = RemoveWorkspaceDeploymentModelErrors[keyof RemoveWorkspaceDeploymentModelErrors];
22799
+ export type RemoveWorkspaceDeploymentModelResponses = {
22800
+ /**
22801
+ * comfy-deploy's entry, now removing, unchanged
22802
+ */
22803
+ 202: PlatformPassthroughBody;
22804
+ };
22805
+ export type RemoveWorkspaceDeploymentModelResponse = RemoveWorkspaceDeploymentModelResponses[keyof RemoveWorkspaceDeploymentModelResponses];
20310
22806
  export type StartWorkspaceDeploymentData = {
20311
22807
  body?: never;
20312
22808
  path: {
@@ -20540,6 +23036,55 @@ export type GetHealthResponses = {
20540
23036
  200: string;
20541
23037
  };
20542
23038
  export type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];
23039
+ export type AgentGetSupportReplayData = {
23040
+ body?: never;
23041
+ headers: {
23042
+ 'X-Comfy-Replay-Support-Secret': string;
23043
+ 'X-Comfy-Workspace-ID': string;
23044
+ 'X-Comfy-Replay-Requester': string;
23045
+ 'X-Comfy-Replay-Reason': string;
23046
+ };
23047
+ path: {
23048
+ id: string;
23049
+ };
23050
+ query?: never;
23051
+ url: '/internal/agent/replays/{id}';
23052
+ };
23053
+ export type AgentGetSupportReplayErrors = {
23054
+ /**
23055
+ * Invalid thread id or missing tenant or audit context.
23056
+ */
23057
+ 400: unknown;
23058
+ /**
23059
+ * Invalid replay support credential.
23060
+ */
23061
+ 401: unknown;
23062
+ /**
23063
+ * No thread exists in the supplied workspace.
23064
+ */
23065
+ 404: unknown;
23066
+ /**
23067
+ * The thread exists but has no replayable messages.
23068
+ */
23069
+ 409: unknown;
23070
+ /**
23071
+ * Agent service unavailable.
23072
+ */
23073
+ 502: unknown;
23074
+ /**
23075
+ * Replay support or the Agent M2M hop is not configured.
23076
+ */
23077
+ 503: unknown;
23078
+ };
23079
+ export type AgentGetSupportReplayResponses = {
23080
+ /**
23081
+ * A degraded or full AgentReplayBundleV1.
23082
+ */
23083
+ 200: {
23084
+ [key: string]: unknown;
23085
+ };
23086
+ };
23087
+ export type AgentGetSupportReplayResponse = AgentGetSupportReplayResponses[keyof AgentGetSupportReplayResponses];
20543
23088
  export type GetInternalFolderPathsData = {
20544
23089
  body?: never;
20545
23090
  path?: never;
@@ -20672,6 +23217,10 @@ export type GetOAuthAuthorizeErrors = {
20672
23217
  * Invalid authorize request (pre-redirect failure — unknown client, redirect mismatch, malformed params). Content-negotiated; browser navigations (Accept includes text/html without application/json) receive a self-contained HTML error page instead of JSON. Or, always as JSON, `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid) for a token or API key whose workspace selector is malformed or names another workspace than its own, while `web_session_enabled` is on for its user.
20673
23218
  */
20674
23219
  400: ErrorResponse;
23220
+ /**
23221
+ * `code` `login_required`: a resume request (`oauth_request_id` present) that is not a browser top-level navigation (Accept does not prefer text/html, as with the consent page's fetch) and has no signed-in session, or one whose email is unverified while email verification is on. The request stays open, so the client sends the user to sign in and resumes it. A browser navigation in the same state gets the 302 to login instead.
23222
+ */
23223
+ 401: ErrorResponse;
20675
23224
  /**
20676
23225
  * OAuth disabled
20677
23226
  */