@comfyorg/ingest-types 1.7.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,6 +91,23 @@ export type AccessEventsPagination = {
91
91
  */
92
92
  next_cursor?: string;
93
93
  };
94
+ /**
95
+ * The upload to add to the models of the deployment's Build.
96
+ */
97
+ export type AddDeploymentBuildModelRequest = {
98
+ /**
99
+ * The blobId the model upload route answered.
100
+ */
101
+ blobId: string;
102
+ /**
103
+ * The file name in that folder, a relative path with no `..`.
104
+ */
105
+ filename: string;
106
+ /**
107
+ * The model folder, for example `loras` or `checkpoints`.
108
+ */
109
+ type: string;
110
+ };
94
111
  /**
95
112
  * The upload to add to the deployment, passed to comfy-deploy as written.
96
113
  */
@@ -112,20 +129,30 @@ export type AddDeploymentModelRequest = {
112
129
  * 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.
113
130
  */
114
131
  export type AgentAdmissionError = {
132
+ /**
133
+ * All exhausted hard budgets, visible to workspace Owners.
134
+ */
135
+ blocking_budgets?: Array<SpendBudgetDetail>;
136
+ budget?: SpendBudgetDetail;
137
+ denied_reason?: string;
115
138
  error: {
116
139
  /**
117
140
  * A human-readable explanation of why the request was declined, suitable for display.
118
141
  */
119
142
  message: string;
120
143
  /**
121
- * The specific cause of the denial, for choosing what to show the user. `no_funds`: the workspace is out of credits — prompt them to add credits. `manual_block`: the workspace has been blocked — direct them to support. `funds_unavailable`: billing was temporarily unreachable — retry after the delay given in the `Retry-After` response header.
144
+ * The specific cause of the denial, for choosing what to show the user. `no_funds`: the workspace is out of credits — prompt them to add credits. `manual_block`: the workspace has been blocked — direct them to support. `funds_unavailable`: billing was temporarily unreachable — retry after the delay given in the `Retry-After` response header. `budget_exceeded` means a hard budget prevented the turn from starting.
122
145
  */
123
- reason: 'no_funds' | 'manual_block' | 'funds_unavailable';
146
+ reason: 'budget_exceeded' | 'no_funds' | 'manual_block' | 'funds_unavailable';
124
147
  /**
125
148
  * The general category of the denial, matching the HTTP status. `PAYMENT_REQUIRED` (402): the workspace cannot currently pay for a turn. `SERVICE_UNAVAILABLE` (503): billing status could not be checked right now and the request can be retried (see the `Retry-After` response header).
126
149
  */
127
150
  type: 'PAYMENT_REQUIRED' | 'SERVICE_UNAVAILABLE';
128
151
  };
152
+ /**
153
+ * For budget admission, `budget_exceeded` or `budget_check_unavailable`.
154
+ */
155
+ error_type?: string;
129
156
  };
130
157
  /**
131
158
  * Acknowledgement that the ask is answered and the parked turn was woken; its continuation streams over the WebSocket. `selected` and `other_text` are the answer committed to the ask row. The first answer wins: when an earlier request already committed one (a retry, or another tab), this carries THAT answer, not the request body, so compare it with what you sent before showing it as the user's choice.
@@ -313,6 +340,25 @@ export type AgentAttachmentRejected = {
313
340
  rejected_count: number;
314
341
  type: 'ATTACHMENT_TYPE_NOT_ACCEPTED';
315
342
  };
343
+ /**
344
+ * One on-demand skill the agent itself ships.
345
+ */
346
+ export type AgentBuiltinSkill = {
347
+ /**
348
+ * What the model reads to decide when to load the skill. It is written for the model and can run to several sentences.
349
+ */
350
+ description: string;
351
+ /**
352
+ * The skill's flat identifier and the load_skill argument.
353
+ */
354
+ name: string;
355
+ };
356
+ /**
357
+ * The on-demand skills the agent itself ships, ordered by name.
358
+ */
359
+ export type AgentBuiltinSkillListResponse = {
360
+ skills: Array<AgentBuiltinSkill>;
361
+ };
316
362
  /**
317
363
  * Acknowledgement that a turn cancellation was requested. Cancellation is asynchronous; the terminal message state (status=error with stop copy) arrives over the WebSocket.
318
364
  */
@@ -380,7 +426,7 @@ export type AgentDraftSnapshot = {
380
426
  */
381
427
  export type AgentError = {
382
428
  /**
383
- * Stable discriminator authored only by the local agent host when its local-page security check refuses a request. The currently defined value is agent_loopback_only. Clients must accept unknown values so the host can add refusal reasons without breaking older readers. Absent on errors from the cloud agent service.
429
+ * Stable discriminator. The local agent host sets agent_loopback_only when its local-page security check refuses a request; the model selection refusals set model_unavailable and model_selection_disabled (AgentModelUnavailable, AgentModelSelectionDisabled). Clients must accept unknown values so new refusal reasons do not break older readers. Absent on other errors.
384
430
  */
385
431
  code?: string;
386
432
  /**
@@ -422,6 +468,85 @@ export type AgentExtensionChangedFrame = {
422
468
  data: AgentExtensionChangedData;
423
469
  type: 'agent_extension_changed';
424
470
  };
471
+ /**
472
+ * One entry of the model control.
473
+ */
474
+ export type AgentFeatureSelection = {
475
+ /**
476
+ * Optional relative cost cue, 1 to 3. Not a price.
477
+ */
478
+ cost_tier?: number;
479
+ /**
480
+ * Optional secondary display text.
481
+ */
482
+ description?: string;
483
+ /**
484
+ * Optional id of an entry in `groups`.
485
+ */
486
+ group?: string;
487
+ /**
488
+ * Stable id of the entry.
489
+ */
490
+ id: string;
491
+ /**
492
+ * Optional presentation hint: `option` (a semantic label such as Fast), `family` (a model name without a version) or `model` (an exact model). Rendered the same way; accept unknown values.
493
+ */
494
+ kind?: string;
495
+ /**
496
+ * Display text. Do not rewrite.
497
+ */
498
+ label: string;
499
+ /**
500
+ * Optional display name of the model the entry is bound to.
501
+ */
502
+ model_label?: string;
503
+ send: AgentModelSelection;
504
+ /**
505
+ * Optional; when true, show `model_label` under the label.
506
+ */
507
+ show_model?: boolean;
508
+ [key: string]: unknown;
509
+ };
510
+ /**
511
+ * The model selections a caller may be shown (GET /api/agent/features). Clients ignore keys they do not know; more are added over time. It never carries an internal model configuration name or a profile revision.
512
+ */
513
+ export type AgentFeatures = {
514
+ /**
515
+ * The selection id a new chat shows when `selected` is absent. Present whenever `selections` is not empty.
516
+ */
517
+ default_selection?: string;
518
+ /**
519
+ * Whether model selection is on for this caller. False: show no control and send messages as today.
520
+ */
521
+ enabled: boolean;
522
+ /**
523
+ * Optional labelled groups that selections may name in `group`.
524
+ */
525
+ groups?: Array<{
526
+ id: string;
527
+ label: string;
528
+ [key: string]: unknown;
529
+ }>;
530
+ /**
531
+ * The entry to show as current: the thread's when `thread_id` was given, otherwise the saved preference. Absent when there is nothing valid to show; then show `default_selection`.
532
+ */
533
+ selected?: {
534
+ /**
535
+ * A selection id from `selections`.
536
+ */
537
+ selection: string;
538
+ /**
539
+ * Where it came from (`thread` or `saved_default`). Informational; accept unknown values.
540
+ */
541
+ source?: string;
542
+ [key: string]: unknown;
543
+ };
544
+ /**
545
+ * The entries to show, in order. None: no control. One: its label, no menu. Two or more: a menu.
546
+ */
547
+ selections?: Array<AgentFeatureSelection>;
548
+ [key: string]: unknown;
549
+ };
425
550
  /**
426
551
  * The (workspace, user) the agent service attributes the caller's requests to.
427
552
  */
@@ -449,6 +574,25 @@ export type AgentLlmError = {
449
574
  };
450
575
  type: 'error';
451
576
  };
577
+ /**
578
+ * OpenAI-shaped error envelope on POST /api/agent/llm/v1/chat/completions and POST /api/agent/llm/v1/responses, written by the LLM proxy or passed through from the provider.
579
+ */
580
+ export type AgentLlmOpenAiError = {
581
+ error: {
582
+ /**
583
+ * An optional machine-readable reason; often null.
584
+ */
585
+ code?: string | null;
586
+ /**
587
+ * A human-readable explanation.
588
+ */
589
+ message: string;
590
+ /**
591
+ * The error category, such as `permission_error` (not served on this target) or `rate_limit_error`. Clients must accept unknown values.
592
+ */
593
+ type: string;
594
+ };
595
+ };
452
596
  /**
453
597
  * A persisted message in an agent thread.
454
598
  */
@@ -506,7 +650,7 @@ export type AgentMessageDoneFrame = {
506
650
  type: 'agent_message_done';
507
651
  };
508
652
  /**
509
- * The immutable model selection receipt for an accepted turn.
653
+ * The immutable model selection receipt for an accepted exact-id turn (a `model_selection` with no `option_id`); no other send gets one.
510
654
  */
511
655
  export type AgentModelReceipt = {
512
656
  contract: 'v1';
@@ -515,19 +659,15 @@ export type AgentModelReceipt = {
515
659
  */
516
660
  model_id: string;
517
661
  /**
518
- * Profile revision pinned for the turn (bootstrap for the configured default profile).
519
- */
520
- profile_revision: string;
521
- /**
522
- * The supplied model_selection object, or null when omitted.
662
+ * The supplied model_selection object, verbatim. Servers before this contract revision sent null for an omitted selector.
523
663
  */
524
664
  requested: AgentModelSelection | null;
525
665
  source: 'request' | 'deployment_default';
526
666
  strategy: 'anthropic';
527
- wire: 'anthropic_messages' | 'openai_chat';
667
+ wire: 'anthropic_messages' | 'openai_chat' | 'openai_responses';
528
668
  };
529
669
  /**
530
- * An explicit exact model selection. Unknown properties are refused with 400 so a newer intent is never silently ignored by an older server.
670
+ * The model for this send. With `option_id` it is a selection's `send` object from GET /api/agent/features, posted verbatim; without it, an exact model id (an eval or a script). Unknown properties are refused with 400 so a newer intent is never silently ignored by an older server. The role name `title` is refused with 422 `model_unavailable`.
531
671
  */
532
672
  export type AgentModelSelection = {
533
673
  /**
@@ -535,10 +675,22 @@ export type AgentModelSelection = {
535
675
  */
536
676
  model_id: string;
537
677
  /**
538
- * Reserved dial option ID. It is accepted and recorded in requested while the dial is off, but does not affect resolution.
678
+ * The id of one of the caller's selections from GET /api/agent/features. When present, the server uses its own binding for that selection and does not consult `model_id`, and the 202 carries no receipt. An `option_id` that is not one of the caller's current selections, including any `option_id` from a caller for whom selection is not enabled, is refused with 422 `model_unavailable`.
539
679
  */
540
680
  option_id?: string;
541
681
  };
682
+ export type AgentModelSelectionDisabled = AgentError & {
683
+ code: 'model_selection_disabled';
684
+ };
685
+ /**
686
+ * The selection a model-selection save committed.
687
+ */
688
+ export type AgentModelSelectionSaved = {
689
+ /**
690
+ * The id of the committed selection (an entry of `selections` in GET /api/agent/features).
691
+ */
692
+ selection: string;
693
+ };
542
694
  export type AgentModelUnavailable = AgentError & {
543
695
  code: 'model_unavailable';
544
696
  };
@@ -580,6 +732,10 @@ export type AgentPendingAskBase = {
580
732
  */
581
733
  allow_other: boolean;
582
734
  ask_id: string;
735
+ /**
736
+ * When the server stops waiting for the answer (RFC 3339, UTC). After it the server closes the card with an agent_ask_resolved event. Present only when the ask was opened with a wait of its own; when absent the server sets no answer deadline for this ask and the client must not assume one.
737
+ */
738
+ expires_at?: string;
583
739
  kind: AgentAskKind;
584
740
  max_selections: number;
585
741
  message_id: string;
@@ -669,7 +825,7 @@ export type AgentPostMessageRequest = {
669
825
  */
670
826
  content: string;
671
827
  /**
672
- * Cloud workflow id of the client's active editor tab; no ordering requirement. Modern clients use workflow_id for the editable target and omit this field. When present and authorized it selects the workflow the turn starts focused on — explicit workflow_id > current_tab > the thread's remembered workflow.
828
+ * Cloud workflow id of the client's active editor tab; no ordering requirement. Modern clients use workflow_id for the editable target and omit this field. When present and one the caller may change it selects the workflow the turn starts focused on — explicit workflow_id > current_tab > the thread's remembered workflow.
673
829
  */
674
830
  current_tab?: string;
675
831
  /**
@@ -689,7 +845,7 @@ export type AgentPostMessageRequest = {
689
845
  };
690
846
  model_selection?: AgentModelSelection;
691
847
  /**
692
- * Snapshot of the client's open editor tabs in editor order. Advisory context, not a grant — entries outside the caller's workspace are ignored. With workflow_references present, only the editable target and explicit references enter the model's workflow context.
848
+ * Snapshot of the client's open editor tabs in editor order. Advisory context, not a grant — entries the caller may not read are ignored. With workflow_references present, only the editable target and explicit references enter the model's workflow context.
693
849
  */
694
850
  open_tabs?: Array<{
695
851
  /**
@@ -712,13 +868,22 @@ export type AgentPostMessageRequest = {
712
868
  */
713
869
  workflow_id?: string;
714
870
  /**
715
- * Explicit read-only workflow references for this turn, independent of open_tabs. Omitted preserves legacy open-tab context; an empty array means no additional workflow context. The editable target is selected by workflow_id and excluded from references. Entries are workspace-authorized, deduplicated, capped at 50, and names truncated to 120 characters. References need not be open in the editor. Unknown or inaccessible references, including authorization lookup failures, are retained as unavailable metadata so the agent can acknowledge missing context; no workflow content or access is granted.
871
+ * Explicit read-only workflow references for this turn, independent of open_tabs. Omitted preserves legacy open-tab context; an empty array means no additional workflow context. The editable target is selected by workflow_id and excluded from references. Entries are checked against each workflow's read rule, deduplicated, capped at 50, and names truncated to 120 characters. References need not be open in the editor. Unknown or inaccessible references, including authorization lookup failures, are retained as unavailable metadata so the agent can acknowledge missing context; no workflow content or access is granted.
716
872
  */
717
873
  workflow_references?: Array<{
718
874
  name?: string;
719
875
  workflow_id: string;
720
876
  }>;
721
877
  };
878
+ /**
879
+ * User-by-workspace assignment for the proactive greeting experiment.
880
+ */
881
+ export type AgentProactiveGreetingAssignment = {
882
+ group_key: string;
883
+ user_id: string;
884
+ variant: 'control' | 'generic' | 'canvas-prefill' | 'canvas-only';
885
+ workspace_id: string;
886
+ };
722
887
  /**
723
888
  * Attachment extensions the agent can only describe from metadata. A subset of the containers
724
889
  * ingest sorts into a load node's video/audio lists: that categoriser also accepts .wmv, .flv,
@@ -996,7 +1161,7 @@ export type AgentToolCallFrame = {
996
1161
  type: 'agent_tool_call';
997
1162
  };
998
1163
  /**
999
- * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, agent_message_done); canvas edits arrive as doc_update frames. The model selection receipt is present when the backend supports its configured wire. A client that requested selection must treat a missing receipt as selection not applied.
1164
+ * Acknowledgement that a turn was accepted. The agent runs asynchronously; output streams over the WebSocket (agent_message_delta, agent_tool_call, agent_message_done); canvas edits arrive as doc_update frames. `model_selection`, the receipt, answers an exact-id request (a `model_selection` with no `option_id`, as an eval sends) and nothing else: the 202 for a send with no `model_selection`, or with an `option_id` (a selection from GET /api/agent/features), has no `model_selection` key. A client that sent an exact-id request must treat a missing receipt as selection not applied (a backend that predates the contract). The frontend needs no receipt: the next features read shows the thread's selection.
1000
1165
  */
1001
1166
  export type AgentTurnAccepted = {
1002
1167
  /**
@@ -1038,9 +1203,13 @@ export type AgentTurnUsage = {
1038
1203
  };
1039
1204
  export type AgentUsageStatusResponse = {
1040
1205
  /**
1041
- * Whether a persisted user-role message exists in a thread owned by this user in the current workspace. Does not imply a successful Agent reply, experiment eligibility or permanent retention of historical usage after server-side deletion.
1206
+ * Whether a retained accepted user-role message exists in the response's history scope. A later failed Agent reply still counts. Does not imply experiment assignment or permanent usage retention.
1042
1207
  */
1043
1208
  has_used_agent: boolean;
1209
+ /**
1210
+ * local_installation means this running Local Agent installation's retained message store, across its threads and local identities. It is not canonical user-by-workspace or cross-install history. Cloud omits this field and scopes history to the authenticated user and workspace. Local/Desktop clients require this marker; an absent marker means eligibility is unknown.
1211
+ */
1212
+ scope?: 'local_installation';
1044
1213
  };
1045
1214
  /**
1046
1215
  * Attachment extensions whose content the model can see: the raster formats Go's image
@@ -1054,6 +1223,10 @@ export type AgentViewableAttachmentExtension = '.png' | '.jpg' | '.jpeg' | '.gif
1054
1223
  * Represents a user-owned asset (image, video, or other generated output).
1055
1224
  */
1056
1225
  export type Asset = {
1226
+ /**
1227
+ * Set only on a `workspace_library` listing: true when the model policy of the Release that the caller's deployment runs (its own pick or the workspace default) blocks this model, so a Run that names it is refused. Absent when the policy allows it, when there is no policy, and on every other listing.
1228
+ */
1229
+ blocked_by_model_policy?: boolean;
1057
1230
  /**
1058
1231
  * Timestamp when the asset was created
1059
1232
  */
@@ -1117,7 +1290,7 @@ export type Asset = {
1117
1290
  */
1118
1291
  project_id?: string;
1119
1292
  /**
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.
1293
+ * 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, the asset has no resolvable content hash, or the asset is in a project other than the default.
1121
1294
  */
1122
1295
  short_url?: string | null;
1123
1296
  /**
@@ -1697,7 +1870,7 @@ export type BillingBalanceResponse = {
1697
1870
  */
1698
1871
  low_balance?: boolean;
1699
1872
  /**
1700
- * The most one top-up from this API may charge, in cents. First-purchase responses use the same bounds as purchase validation.
1873
+ * The most one manual top-up may request for this workspace, in cents before tax or discounts: the $2,500 default, or a staff override (which may raise or lower it) up to the $10,000 hard maximum. Read it per workspace; request schemas carry no maximum. First-purchase responses use the same bounds as purchase validation.
1701
1874
  */
1702
1875
  max_topup_cents?: number;
1703
1876
  /**
@@ -1732,6 +1905,12 @@ export type BillingBalanceResponse = {
1732
1905
  * @deprecated
1733
1906
  */
1734
1907
  prepaid_balance_micros?: number;
1908
+ /**
1909
+ * Remaining balance of each product's own scoped pot, in cents of currency, keyed by product name. Today only "agent": the Agent-scoped pot (free Agent allowance and Agent promo credit together) that Agent turns draw before falling back to the shared balance. This is the amount behind billing status scoped_has_funds.agent, so a client can warn before it runs out. A fractional number. A key is absent when the workspace has never held that pot (0 means exhausted). The whole object is omitted when no pot is present, the workspace is unprovisioned, billing is disabled, or the server predates this field. Not included in amount_cents or any other total here.
1910
+ */
1911
+ scoped_balance_cents?: {
1912
+ [key: string]: number;
1913
+ };
1735
1914
  /**
1736
1915
  * Amount in cents to prefill for a top-up when the effective balance is negative: covers the shortfall plus the minimum top-up, rounded up to a whole dollar, never below the default amount and never above max_topup_cents. Null when the balance is zero or positive, or not authoritative.
1737
1916
  */
@@ -1752,7 +1931,8 @@ export type BillingBalanceResponse = {
1752
1931
  * every owner.
1753
1932
  *
1754
1933
  * When the deployment has billing disabled, this endpoint answers without
1755
- * consulting billing-api: can_top_up is true; can_manage_members,
1934
+ * consulting billing-api: can_top_up is true; can_view_workspace_usage
1935
+ * follows the same rule as with billing enabled; can_manage_members,
1756
1936
  * can_invite_members, can_manage_subscription, can_manage_auto_top_up and
1757
1937
  * can_view_auto_top_up follow the owner role, and
1758
1938
  * can_view_auto_top_up_member_notice is true for a non-owner. Other billing-action fields are false. These role
@@ -1857,21 +2037,23 @@ export type BillingCapabilities = {
1857
2037
  /**
1858
2038
  * - Answers: should the client offer sending a new workspace invitation right
1859
2039
  * now?
1860
- * - True: the user is a workspace owner and the workspace has room: members
1861
- * plus unexpired pending invitations are below the seat limit, or the limit
1862
- * is not positive (unlimited).
2040
+ * - True: the user is a workspace owner, or a Workspace admin (a member with
2041
+ * `workspace_admin`, where Projects is enabled for the workspace), and the
2042
+ * workspace has room: members plus unexpired pending invitations are below
2043
+ * the seat limit, or the limit is not positive (unlimited).
1863
2044
  * - False: never explained. There is no denied_reasons key for this field.
1864
2045
  * - Not: authorization (invitation creation enforces the same limit itself).
1865
- * Not member management (can_manage_members) and not buying seats
2046
+ * Not permission to invite an owner: an invitation sent here always makes a
2047
+ * member. Not member management (can_manage_members) and not buying seats
1866
2048
  * (can_change_seats). Pending invitations count toward capacity. The
1867
2049
  * resolver ignores tier, subscription status, cancellation and past-due
1868
2050
  * payment; only the seat limit, which can come from the active plan, reflects
1869
2051
  * the plan.
1870
- * - False when: the user is not an owner; the seat limit is 1 (the limit is the
1871
- * workspace override if set, else the active plan's default max seats, and
1872
- * defaults to one seat with no active subscription); members plus unexpired
1873
- * pending invitations have reached the limit; the capacity could not be
1874
- * read, which fails closed.
2052
+ * - False when: the user is neither an owner nor a Workspace admin; the seat
2053
+ * limit is 1 (the limit is the workspace override if set, else the active
2054
+ * plan's default max seats, and defaults to one seat with no active
2055
+ * subscription); members plus unexpired pending invitations have reached
2056
+ * the limit; the capacity could not be read, which fails closed.
1875
2057
  *
1876
2058
  */
1877
2059
  can_invite_members: boolean;
@@ -1926,15 +2108,23 @@ export type BillingCapabilities = {
1926
2108
  */
1927
2109
  can_manage_billing: boolean;
1928
2110
  /**
1929
- * - Answers: should the client offer member-management controls?
1930
- * - True: the user is a member of the workspace whose role is owner.
2111
+ * - Answers: should the client show the member-management section (the
2112
+ * member list with its per-member actions, and the invitation list)?
2113
+ * - True: the user is a member of the workspace whose role is owner, or a
2114
+ * Workspace admin (a member with `workspace_admin`, where Projects is
2115
+ * enabled for the workspace).
1931
2116
  * - False: never explained. There is no denied_reasons key for this field.
1932
- * - Not: authorization; individual target restrictions still apply. Not invite
1933
- * capacity (can_invite_members), seat quantity (can_change_seats) or billing
1934
- * management (can_manage_billing). Independent of tier, subscription status,
1935
- * cancellation, past-due payment and billing provisioning.
1936
- * - False when: the user is not a member, or is a member whose role is not
1937
- * owner. Nothing else closes it.
2117
+ * - Not: authorization, and not any one action. It does not say the user may
2118
+ * change a role, appoint or remove a Workspace admin, or act on a given
2119
+ * member: a Workspace admin may remove ordinary members only and changes no
2120
+ * role. Offer each per-member action from that member's
2121
+ * `capabilities.can_change_role` and `capabilities.can_remove`, never from
2122
+ * this field. Not invite capacity (can_invite_members), seat quantity
2123
+ * (can_change_seats) or billing management (can_manage_billing).
2124
+ * Independent of tier, subscription status, cancellation, past-due payment
2125
+ * and billing provisioning.
2126
+ * - False when: the user is not a member, or is a member who is neither an
2127
+ * owner nor a Workspace admin. Nothing else closes it.
1938
2128
  *
1939
2129
  */
1940
2130
  can_manage_members: boolean;
@@ -2129,13 +2319,37 @@ export type BillingCapabilities = {
2129
2319
  */
2130
2320
  can_view_own_usage?: boolean;
2131
2321
  /**
2132
- * Whether to offer the workspace invitation list. True for a current owner while workspace features are available. A false capability may have its matching denied_reasons key; absence means no recognized explanation. This is not capacity to send another invitation; use can_invite_members. The owner-only list route stays authoritative and can include expired invitations despite the word pending.
2322
+ * Whether to offer the workspace invitation list. True for a current owner, and for a Workspace admin where Projects is enabled for the workspace, while workspace features are available. A false capability may have its matching denied_reasons key; absence means no recognized explanation. This is not capacity to send another invitation; use can_invite_members. It does not say every listed invitation can be resent or revoked: a Workspace admin may act on member invitations only. The list route stays authoritative and can include expired invitations despite the word pending.
2133
2323
  */
2134
2324
  can_view_pending_invites: boolean;
2135
2325
  /**
2136
2326
  * Whether to offer whole-workspace usage analytics. True only for a current workspace owner with usage attribution enabled. Members use can_view_own_usage instead. False with no matching denied_reasons key means unknown or unavailable guidance. This does not authorize a read.
2137
2327
  */
2138
2328
  can_view_team_usage: boolean;
2329
+ /**
2330
+ * Whether to offer `project=unallocated` on GET /api/billing/usage/timeseries. True only where that route accepts it: a team workspace with Projects on, for an actor who may read the whole workspace's usage. This does not authorize a read.
2331
+ */
2332
+ can_view_unallocated_usage: boolean;
2333
+ /**
2334
+ * - Answers: should the client show the workspace's credit balance and its
2335
+ * workspace-wide usage totals, and request GET /api/billing/balance at
2336
+ * all?
2337
+ * - True: the user is a member of the workspace and is an owner or a
2338
+ * Workspace admin; or the workspace is personal; or Projects is not
2339
+ * enabled for the workspace, where every member keeps them.
2340
+ * - False: explained by denied_reasons.can_view_workspace_usage.
2341
+ * - Not: the user's own usage, which every member keeps: an ordinary
2342
+ * member's usage reads answer with their own rows. Not whole-workspace
2343
+ * per-person analytics (can_view_team_usage), top-up (can_top_up) or
2344
+ * billing management (can_manage_billing). Independent of tier,
2345
+ * subscription status and billing provisioning. Not authorization: the
2346
+ * balance route refuses on the same rule itself.
2347
+ * - False when: the user is not a member, or is an ordinary member (neither
2348
+ * owner nor Workspace admin) of a team workspace where Projects is
2349
+ * enabled.
2350
+ *
2351
+ */
2352
+ can_view_workspace_usage: boolean;
2139
2353
  };
2140
2354
  /**
2141
2355
  * Effective billing UI guidance for one authenticated user and workspace.
@@ -2180,6 +2394,13 @@ export type BillingCapabilitiesResponse = {
2180
2394
  *
2181
2395
  */
2182
2396
  billing_web_checkout_ui: 'embedded' | 'full_page';
2397
+ /**
2398
+ * Whether billing-web may offer hosted methods for a one-off top-up.
2399
+ * Evaluated for the authenticated actor; missing or failed evaluation
2400
+ * is false. Does not grant payment permission or guarantee wallet availability.
2401
+ *
2402
+ */
2403
+ billing_web_topup_hosted_methods?: boolean;
2183
2404
  /**
2184
2405
  * Whether a cancel requested now ends the plan today instead of at the
2185
2406
  * end of the billing period. True only when can_cancel is true, the
@@ -2219,6 +2440,10 @@ export type BillingCapabilitiesResponse = {
2219
2440
  * Whether any workspace billing operation needs support reconciliation (paid_ungrantable or supersede_uncancelled), across all operation types including automatic top-ups, and independent of an active plan. Shown only when can_manage_billing is true; true requests the payment support banner, not proof of a charge. False means the local read found no parked operation. Omitted for non-managers, unavailable reads, older servers or disabled billing; omission means unknown, not a healthy payment state.
2220
2441
  */
2221
2442
  has_parked_billing_operation?: boolean;
2443
+ /**
2444
+ * Whether POST /api/billing/budgets/held-jobs/resume with no job_ids would find at least one job held by a budget that this caller may resume: for a workspace owner, any member's held job in the workspace; for anyone else, only their own. Jobs in a named project count only where the caller may queue work in that project now. Answers whether to show the "Resume all" notice; it does not predict the outcome, since a resume asks the budget again and a job can stay held as budget_exceeded. It carries no count. False means the read found no such job, or that this credential cannot call the resume (a billing handoff session, or an OAuth grant without comfy-cloud:jobs:write where scopes are enforced). Omitted when the read failed, with billing disabled, or on older servers; omission means unknown, so show no notice. The response may be cached for up to 30 seconds, so refetch after a resume.
2445
+ */
2446
+ has_resumable_held_jobs?: boolean;
2222
2447
  /**
2223
2448
  * Whether this actor may use payment management to recover an outstanding
2224
2449
  * subscription payment. True only when can_manage_billing is true, the
@@ -2487,7 +2712,7 @@ export type BillingCapabilityDenials = {
2487
2712
  /**
2488
2713
  * Why can_invite_members 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; mutually exclusive lifecycle statuses do not compete.
2489
2714
  * - not_a_member: The actor is not a workspace member.
2490
- * - not_workspace_owner: The actor does not have the workspace owner role.
2715
+ * - not_workspace_owner: The actor is neither a workspace owner nor a Workspace admin.
2491
2716
  * - invite_capacity_reached: No invitation capacity is available, including a failed capacity read.
2492
2717
  *
2493
2718
  */
@@ -2534,7 +2759,7 @@ export type BillingCapabilityDenials = {
2534
2759
  /**
2535
2760
  * Why can_manage_members 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; mutually exclusive lifecycle statuses do not compete.
2536
2761
  * - not_a_member: The actor is not a workspace member.
2537
- * - not_workspace_owner: The actor does not have the workspace owner role.
2762
+ * - not_workspace_owner: The actor is neither a workspace owner nor a Workspace admin.
2538
2763
  *
2539
2764
  */
2540
2765
  can_manage_members?: 'not_a_member' | 'not_workspace_owner';
@@ -2644,7 +2869,7 @@ export type BillingCapabilityDenials = {
2644
2869
  * - not_a_member: The actor is not a workspace member.
2645
2870
  * - not_workspace_owner: The actor is a member whose role is not owner.
2646
2871
  * - 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.
2872
+ * - no_subscription: Setting a budget requires a paid subscription.
2648
2873
  * - free_plan: The plan is FREE, whose usage is not charged spend.
2649
2874
  * - subscription_ended: The subscription has stopped for good, ended or canceled with no end date ahead.
2650
2875
  * - subscription_not_started: The subscription is scheduled and has not started.
@@ -2766,13 +2991,20 @@ export type BillingCapabilityDenials = {
2766
2991
  */
2767
2992
  can_view_own_usage?: 'not_a_member' | 'usage_attribution_unavailable';
2768
2993
  /**
2769
- * Why can_view_pending_invites is false. Permission refusals precede unavailable feature or entitlement facts; first reached wins in enum order. A present key implies refusal. Missing means unknown, including a disabled team-workspaces feature or an unavailable membership read, never permission. This explains only this capability and does not authorize a mutation.
2994
+ * Why can_view_pending_invites is false. not_workspace_owner here means the actor is neither a workspace owner nor a Workspace admin. Permission refusals precede unavailable feature or entitlement facts; first reached wins in enum order. A present key implies refusal. Missing means unknown, including a disabled team-workspaces feature or an unavailable membership read, never permission. This explains only this capability and does not authorize a mutation.
2770
2995
  */
2771
2996
  can_view_pending_invites?: 'not_a_member' | 'not_workspace_owner';
2772
2997
  /**
2773
2998
  * Why can_view_team_usage is false. Disabled usage attribution emits usage_attribution_unavailable. Permission refusals precede unavailable feature or entitlement facts; first reached wins in enum order. A present key implies refusal. Missing means unknown, including a disabled team-workspaces feature or an unavailable membership read, never permission. This explains only this capability and does not authorize a mutation.
2774
2999
  */
2775
3000
  can_view_team_usage?: 'not_a_member' | 'not_workspace_owner' | 'usage_attribution_unavailable';
3001
+ /**
3002
+ * Why can_view_workspace_usage 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; mutually exclusive lifecycle statuses do not compete.
3003
+ * - not_a_member: The actor is not a workspace member.
3004
+ * - not_workspace_owner: The actor is neither a workspace owner nor a Workspace admin, in a team workspace where Projects is enabled.
3005
+ *
3006
+ */
3007
+ can_view_workspace_usage?: 'not_a_member' | 'not_workspace_owner';
2776
3008
  };
2777
3009
  /**
2778
3010
  * Identifies capability values currently using safe rollout defaults
@@ -2920,7 +3152,7 @@ export type BillingHandoffCheckoutRequest = {
2920
3152
  */
2921
3153
  export type BillingHandoffCreateRequest = {
2922
3154
  /**
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.
3155
+ * Optional whole-dollar prefill between the minimum and the $10,000 hard maximum. The receiver quotes and enforces the workspace's current `max_topup_cents`; issuing a handoff does not authorize a purchase. 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.
2924
3156
  */
2925
3157
  amount_cents?: number;
2926
3158
  /**
@@ -3298,6 +3530,10 @@ export type BillingOpStatusResponse = {
3298
3530
  * List of available billing plans for subscription.
3299
3531
  */
3300
3532
  export type BillingPlansResponse = {
3533
+ /**
3534
+ * What Cancel plan does to the workspace's projects once the subscription ends. Present only when the workspace has a subscription and Projects is on for it.
3535
+ */
3536
+ cancel_project_change?: PlanProjectChange;
3301
3537
  /**
3302
3538
  * Current plan slug if subscribed
3303
3539
  */
@@ -3306,6 +3542,30 @@ export type BillingPlansResponse = {
3306
3542
  subscription_payment_recovery?: SubscriptionPaymentRecovery;
3307
3543
  team_credit_stops?: TeamCreditStops;
3308
3544
  };
3545
+ /**
3546
+ * Answers "should this client show and apply a promotion right now?". Non-null means yes: show the offer, put `promotion_code` on plan links and follow `auto_apply` at checkout. Null means no promotion is running, and clients show and apply nothing. It is not a statement about the caller: it does not say this visitor or workspace qualifies, and a code restricted to first-time customers is still refused at checkout for anyone else.
3547
+ */
3548
+ export type BillingPromotion = {
3549
+ /**
3550
+ * Answers "may checkout apply `promotion_code` from the link without a click?". True means apply it on load, once per checkout, and respect the customer removing it. False means fill it in and wait for the customer. It is not a promise that Stripe accepts the code for this customer.
3551
+ */
3552
+ auto_apply: boolean;
3553
+ /**
3554
+ * When Stripe stops accepting the code, for display ("ends Monday"). Null when the code has no expiry. Always present. Clients do not need to hide the offer at this time themselves: `promotion` turns null when the code expires.
3555
+ */
3556
+ ends_at: string | null;
3557
+ /**
3558
+ * The discount of the coupon behind the code, as a percentage (20 for 20% off), for display. Read from Stripe, so the number clients show is the one checkout applies. Null when the coupon takes a fixed amount off: show the offer without a number. Always present. It is not the price the customer pays, and it says nothing about which plans or billing periods the coupon covers.
3559
+ */
3560
+ percent_off: number | null;
3561
+ /**
3562
+ * The customer-facing Stripe promotion code of the running campaign. Clients put it on plan links and may show it. It is the only code checkout may apply without a click; any other code in a link waits for the customer to apply it.
3563
+ */
3564
+ promotion_code: string;
3565
+ } | null;
3566
+ export type BillingPromotionResponse = {
3567
+ promotion: BillingPromotion;
3568
+ };
3309
3569
  /**
3310
3570
  * Payment lifecycle status
3311
3571
  */
@@ -3456,7 +3716,7 @@ export type BillingStatusResponse = {
3456
3716
  */
3457
3717
  usage_period_end?: string;
3458
3718
  /**
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.
3719
+ * 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. Budgets then use the UTC calendar month when the absence of a cycle is known.
3460
3720
  */
3461
3721
  usage_period_start?: string;
3462
3722
  };
@@ -3477,7 +3737,7 @@ export type BillingTaxId = {
3477
3737
  value: string;
3478
3738
  };
3479
3739
  /**
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.
3740
+ * A budget with its spend in the workspace's current billing period. This is the subscription cycle or, when there is no cycle, the UTC calendar month. Only a workspace whose subscription is unresolved has no budget period. Amounts come in credits and in micro-USD; a client shows credits as received and never converts.
3481
3741
  *
3482
3742
  */
3483
3743
  export type Budget = {
@@ -3575,7 +3835,7 @@ export type Budget = {
3575
3835
  percent_used: number;
3576
3836
  repeat: BudgetRepeat;
3577
3837
  /**
3578
- * When spend next resets to 0: the end of the current billing period. Null when the workspace has no billing period.
3838
+ * When spend next resets to 0: the end of the current billing period. With no subscription cycle, spend resets at 00:00 UTC on the first of the next month. Null when the budget period could not be resolved.
3579
3839
  *
3580
3840
  */
3581
3841
  resets_at: string | null;
@@ -3676,6 +3936,68 @@ export type BudgetCreateRequest = {
3676
3936
  scope_id: string;
3677
3937
  scope_kind: BudgetScopeKind;
3678
3938
  };
3939
+ /**
3940
+ * A selected job that stayed where it was, and why.
3941
+ */
3942
+ export type BudgetHeldJobNotResumed = {
3943
+ /**
3944
+ * The budget that still refuses the job, present for `budget_exceeded` when billing named one. The same object a refused submit carries: an owner gets its amounts, anyone else gets only `scope_kind`, `resets_at` and `set_by`.
3945
+ */
3946
+ budget?: {
3947
+ [key: string]: unknown;
3948
+ };
3949
+ /**
3950
+ * The billing policy's reason, present for `budget_exceeded`, `budget_check_unavailable` and `spend_denied`. For a budget it is `workspace_cap_exceeded`, `user_cap_exceeded` or `api_key_cap_exceeded`.
3951
+ */
3952
+ denied_reason?: string;
3953
+ job_id: string;
3954
+ /**
3955
+ * Why the job did not move. One value per job, the first that applies:
3956
+ * - `not_found`: no such job in this workspace, it is another member's and the caller is not an owner, or it is in a project the caller may not queue work in. They look the same on purpose.
3957
+ * - `not_held`: the job is not in `held_budget`; it was already resumed, cancelled or finished.
3958
+ * - `budget_exceeded`: a hard budget that applies to the job is still used up. `denied_reason` and `budget` say which.
3959
+ * - `budget_check_unavailable`: the budget check could not be made, or billing answered without enforcing budgets. Nothing is wrong with the job; retry shortly.
3960
+ * - `spend_denied`: the workspace may not spend for another reason, named in `denied_reason` (for example `no_funds`).
3961
+ * - `no_free_slot`: the job's submitter or the workspace is at its concurrent-jobs limit, or the queue was busy. Retry when a running job ends.
3962
+ * - `failed`: the server could not move the job. Retry.
3963
+ *
3964
+ */
3965
+ reason: 'not_found' | 'not_held' | 'budget_exceeded' | 'budget_check_unavailable' | 'spend_denied' | 'no_free_slot' | 'failed';
3966
+ };
3967
+ /**
3968
+ * Which held jobs to resume. An empty body resumes every held job the caller may resume.
3969
+ */
3970
+ export type BudgetHeldJobsResumeRequest = {
3971
+ /**
3972
+ * `next_cursor` from the previous answer, to continue a resume of every held job where that call stopped. Ignored when `job_ids` is given. Opaque; send it back unchanged.
3973
+ */
3974
+ cursor?: string;
3975
+ /**
3976
+ * The jobs to resume. Absent or empty means every held job the caller may resume: the whole workspace's for an owner, their own for any other member.
3977
+ */
3978
+ job_ids?: Array<string>;
3979
+ };
3980
+ /**
3981
+ * The outcome of one resume call. Every selected job is in exactly one of the two lists.
3982
+ */
3983
+ export type BudgetHeldJobsResumeResult = {
3984
+ /**
3985
+ * Answers "are there held jobs this call did not look at?". True only for a call with no `job_ids` that stopped at its 100-job limit; call again with `cursor` set to `next_cursor` to continue. It does not say whether the jobs in `not_resumed` can be resumed later; read their `reason` for that.
3986
+ */
3987
+ more_held: boolean;
3988
+ /**
3989
+ * Present exactly when `more_held` is true. Send it as `cursor` to look at the held jobs after the ones this call looked at. It moves past jobs that stayed held, so repeating the call without it looks at the same jobs again.
3990
+ */
3991
+ next_cursor?: string;
3992
+ /**
3993
+ * Jobs that did not move, each with the reason. `[]`, never `null`.
3994
+ */
3995
+ not_resumed: Array<BudgetHeldJobNotResumed>;
3996
+ /**
3997
+ * Jobs that left `held_budget` and are queued again. `[]`, never `null`.
3998
+ */
3999
+ resumed: Array<string>;
4000
+ };
3679
4001
  export type BudgetHistory = {
3680
4002
  changes: Array<BudgetChange>;
3681
4003
  };
@@ -3701,6 +4023,24 @@ export type BudgetList = {
3701
4023
  */
3702
4024
  auto_top_up_conflict: boolean;
3703
4025
  budgets: Array<Budget>;
4026
+ /**
4027
+ * Answers one UI question: which Budgets layout does this caller get?
4028
+ * `owner`: `budgets` is every live budget of the workspace. Show the
4029
+ * full list.
4030
+ * `member`: `budgets` is only the budget set on the caller, if there
4031
+ * is one. Show the member view.
4032
+ * It names the list this response carries, so the layout and the
4033
+ * list always agree. Not permission to edit: `can_set_budgets` on
4034
+ * `GET /api/billing/capabilities` answers that, and an `owner` viewer
4035
+ * can still be refused a write, for example on a plan without
4036
+ * budgets. Render it as received; do not rebuild it from the role or
4037
+ * from the capabilities.
4038
+ * Absent while billing-api does not send it yet (a rollout with an
4039
+ * older billing-api): ingest never guesses it. A client then falls
4040
+ * back to the layout the capabilities imply.
4041
+ *
4042
+ */
4043
+ viewer?: 'owner' | 'member';
3704
4044
  };
3705
4045
  /**
3706
4046
  * `soft` alerts at its thresholds and never refuses spend. `hard` also refuses spend once the limit is reached; Enterprise plans only.
@@ -4205,6 +4545,57 @@ export type CccSiteTagUsageItem = {
4205
4545
  */
4206
4546
  tag: string;
4207
4547
  };
4548
+ /**
4549
+ * One app page at its Draft head, with only what a Desktop card shows.
4550
+ */
4551
+ export type CccStaffApp = {
4552
+ description: string;
4553
+ /**
4554
+ * The Draft head's compatibility.desktop.draft_page, returned only where catalog-api has draft links turned on (staging and production), and there present when it is an https address on a comfy-website-preview-pr-<n>.vercel.app preview deploy whose path starts with /apps/<slug>/, with no query or fragment. Absent when draft links are off, and when unset or anything else.
4555
+ */
4556
+ draft_page?: string;
4557
+ /**
4558
+ * Show on the Hub in the Draft head; false when unset.
4559
+ */
4560
+ enabled: boolean;
4561
+ /**
4562
+ * The Draft head's compatibility.website.href when it is a path under /hub/ on comfy.org, for example /hub/apps/reshoot/. Absent when unset or anything else.
4563
+ */
4564
+ hub_page?: string;
4565
+ /**
4566
+ * The Draft head lists desktop_starters in available_surfaces.
4567
+ */
4568
+ on_desktop: boolean;
4569
+ /**
4570
+ * The Draft head lists hub in available_surfaces.
4571
+ */
4572
+ on_hub: boolean;
4573
+ /**
4574
+ * Path under /api/v1/catalog of the card picture, /staff-apps/{uid}/picture/{version}. Absent when the page has no image picture.
4575
+ */
4576
+ picture?: string;
4577
+ /**
4578
+ * Empty when the page has no address yet.
4579
+ */
4580
+ slug: string;
4581
+ /**
4582
+ * As on /pages. It does not say whether the app is on the public Desktop list.
4583
+ */
4584
+ status: 'not_live' | 'unpublished' | 'hidden' | 'scheduled' | 'live';
4585
+ title: string;
4586
+ uid: string;
4587
+ };
4588
+ /**
4589
+ * One page of the comfy.org staff app list.
4590
+ */
4591
+ export type CccStaffAppsPage = {
4592
+ has_more: boolean;
4593
+ items: Array<CccStaffApp>;
4594
+ /**
4595
+ * Opaque; send it back with the same limit.
4596
+ */
4597
+ next_cursor?: string;
4598
+ };
4208
4599
  export type CccStaffPermissions = {
4209
4600
  account_id: string;
4210
4601
  /**
@@ -4669,10 +5060,12 @@ export type CreateSessionResponse = {
4669
5060
  */
4670
5061
  export type CreateTopupCheckoutRequest = {
4671
5062
  /**
4672
- * Amount to charge in cents, before any promotion code the customer
4673
- * enters. Whole dollars only, from $5.00 to `max_topup_cents` on GET /api/billing/balance. The
4674
- * credits granted are derived server-side from this amount and
4675
- * cannot be set by the caller.
5063
+ * Amount to charge in cents, before any discount: whole dollars from
5064
+ * the minimum up to this workspace's `max_topup_cents` on GET
5065
+ * /api/billing/balance. The server enforces the maximum (400
5066
+ * `INVALID_AMOUNT` with `details.reason` `above_max`); there is no
5067
+ * schema maximum. The credits granted are derived server-side from
5068
+ * this amount and cannot be set by the caller.
4676
5069
  *
4677
5070
  */
4678
5071
  amount_cents: number;
@@ -4729,7 +5122,7 @@ export type CreateTopupQuoteRequest = {
4729
5122
  */
4730
5123
  export type CreateTopupRequest = {
4731
5124
  /**
4732
- * Amount to charge and grant as credits (in cents). Minimum $5.00; maximum `max_topup_cents` on GET /api/billing/balance (400 INVALID_AMOUNT above it).
5125
+ * Amount to charge and grant as credits (in cents). Minimum $5.00; maximum this workspace's `max_topup_cents` on GET /api/billing/balance (400 INVALID_AMOUNT with `details.reason` `above_max` above it).
4733
5126
  */
4734
5127
  amount_cents: number;
4735
5128
  /**
@@ -4956,6 +5349,15 @@ export type DeployToCloudError = {
4956
5349
  */
4957
5350
  message?: string;
4958
5351
  };
5352
+ /**
5353
+ * The version cut with the model added.
5354
+ */
5355
+ export type DeploymentBuildModelRelease = {
5356
+ /**
5357
+ * comfy-builder's id of the new Release.
5358
+ */
5359
+ releaseId: string;
5360
+ };
4959
5361
  /**
4960
5362
  * Which of the posted node types each of the workspace's deployments, and Comfy Cloud, does not have.
4961
5363
  */
@@ -4975,6 +5377,45 @@ export type DeploymentCompatibilityRequest = {
4975
5377
  */
4976
5378
  node_types: Array<string>;
4977
5379
  };
5380
+ /**
5381
+ * One model file added to a deployment: comfy-deploy's DeploymentModel (an entry of its GET /v1/deployments/{id}/models, and its POST 202), passed through as written; the fields are comfy-deploy's.
5382
+ */
5383
+ export type DeploymentModel = {
5384
+ /**
5385
+ * Why the file could not be added, for the log; set once the entry has failed, and kept if it is then removed. Not for display: the editor says "<file> was not added to this deployment. Remove it and add it again."
5386
+ */
5387
+ failure?: string;
5388
+ /**
5389
+ * The file's name in that folder.
5390
+ */
5391
+ filename: string;
5392
+ /**
5393
+ * The entry's id, the model_id that DELETE .../deployments/{deployment_id}/models/{model_id} takes. Not the upload's blobId.
5394
+ */
5395
+ id: string;
5396
+ /**
5397
+ * The file's size as its upload declared it.
5398
+ */
5399
+ sizeBytes: number;
5400
+ /**
5401
+ * `adding` until the deployment's workers can use the file, `ready` once they can, `failed` where it could not be added, and `removing` once a removal was asked.
5402
+ */
5403
+ status: 'adding' | 'ready' | 'failed' | 'removing';
5404
+ /**
5405
+ * The model folder the file is in, for example `loras` or `checkpoints`.
5406
+ */
5407
+ type: string;
5408
+ };
5409
+ /**
5410
+ * comfy-deploy's DeploymentModelList (its GET /v1/deployments/{id}/models 200), passed through as written: every model file added to the deployment, oldest first.
5411
+ */
5412
+ export type DeploymentModelList = {
5413
+ /**
5414
+ * Always true: adding a model file is on for every caller, so the editor shows its Add button. Not whether this deployment can take the file now: the add still answers its own refusal.
5415
+ */
5416
+ addEnabled: boolean;
5417
+ models: Array<DeploymentModel>;
5418
+ };
4978
5419
  /**
4979
5420
  * comfy-builder's BlobUpload (its POST /v1/blobs 201), passed through as written; the fields are comfy-builder's.
4980
5421
  */
@@ -5179,6 +5620,15 @@ export type DesktopLoginCodeRedeemResponse = {
5179
5620
  */
5180
5621
  status: 'redeemed';
5181
5622
  };
5623
+ /**
5624
+ * A one-time Firebase custom token for the Desktop grant's user.
5625
+ */
5626
+ export type DesktopWebSessionResponse = {
5627
+ /**
5628
+ * Firebase custom token. Valid for one hour; sign in with it at once.
5629
+ */
5630
+ custom_token: string;
5631
+ };
5182
5632
  /**
5183
5633
  * First rejected op in an abort-remainder batch.
5184
5634
  */
@@ -5289,7 +5739,7 @@ export type ErrorResponse = {
5289
5739
  */
5290
5740
  denied_reasons?: WorkspaceCreationDenials;
5291
5741
  /**
5292
- * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape.
5742
+ * Optional open object carrying structured, machine-readable context about the error (e.g. offending field names, validation specifics). Absent for most errors; consumers must not assume any particular shape. One documented key: a manual top-up refused because the amount is above the workspace's `max_topup_cents` answers 400 `INVALID_AMOUNT` with `details.reason` `above_max`; below-minimum and part-dollar refusals carry no reason.
5293
5743
  */
5294
5744
  details?: {
5295
5745
  [key: string]: unknown;
@@ -5359,6 +5809,10 @@ export type ExchangeTokenResponse = {
5359
5809
  * Detailed execution error information from ComfyUI
5360
5810
  */
5361
5811
  export type ExecutionError = {
5812
+ /**
5813
+ * Stable frontend error-catalog identity supplied by the Cloud error producer. Absent while a producer has not migrated; clients must retain their message matcher for an absent or unknown id.
5814
+ */
5815
+ catalog_id?: string;
5362
5816
  /**
5363
5817
  * Input values at time of failure (empty object if not available)
5364
5818
  */
@@ -5379,6 +5833,12 @@ export type ExecutionError = {
5379
5833
  * Python exception type (e.g., "RuntimeError")
5380
5834
  */
5381
5835
  exception_type: string;
5836
+ /**
5837
+ * Present when ComfyUI rejected the whole prompt at validation (exception_type ValidationError): the rejected nodes, keyed by node id, in the shape ComfyUI's /prompt returns and cleaned and capped like a prompt_outputs_skipped event's node_errors.
5838
+ */
5839
+ node_errors?: {
5840
+ [key: string]: PromptOutputsSkippedNodeError;
5841
+ };
5382
5842
  /**
5383
5843
  * ID of the node that failed
5384
5844
  */
@@ -6140,7 +6600,43 @@ export type JobAssetsResponse = {
6140
6600
  pagination: PaginationInfo;
6141
6601
  };
6142
6602
  /**
6143
- * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops.
6603
+ * The facts the queue shows for a job held by a budget decision: why it is held, the budget that stopped it, and whether the caller may resume it. The client renders these as received and derives none of them from the caller's role.
6604
+ */
6605
+ export type JobBudgetHold = {
6606
+ /**
6607
+ * The budget that stopped the job, as billing reported it when the job was held. Later changes to the budget or its spend are not reflected here; read `GET /api/billing/budgets` for the current figures. Absent when the hold names no budget, as with `budget_check_unavailable`.
6608
+ */
6609
+ budget?: JobHeldBudget;
6610
+ /**
6611
+ * Answers one UI question: may this caller press Resume on this job.
6612
+ *
6613
+ * - True: the job is in the caller's current workspace, and the
6614
+ * caller either submitted it or is an Owner of that workspace.
6615
+ * For a job in a project other than the default, the project
6616
+ * must also take new runs from the caller.
6617
+ * - False: anyone else who can read the job, such as a project
6618
+ * member reading another member's run, or staff reading a job in
6619
+ * a workspace they are not signed in to. Also false for everyone
6620
+ * while the job's project is read-only because the workspace's
6621
+ * plan does not include Projects, and when the project's state
6622
+ * could not be read.
6623
+ *
6624
+ * Not a promise that the resume goes through: resuming checks the
6625
+ * budget again and the job stays held while the budget still
6626
+ * refuses it. Not permission to change the budget (that is
6627
+ * `can_set_budgets` on `GET /api/billing/capabilities`), to manage
6628
+ * members, or to cancel the job. It is about this job only and says
6629
+ * nothing about other held jobs in the workspace.
6630
+ *
6631
+ */
6632
+ can_resume: boolean;
6633
+ /**
6634
+ * Billing's reason for the hold, recorded when the job was held and not updated afterwards. A used-up hard budget is `workspace_cap_exceeded`, `user_cap_exceeded` or `api_key_cap_exceeded`, which names whose budget stopped the job. `budget_check_unavailable` is a hold made because the budget could not be checked; it does not mean a budget is used up. Treat any other value as a hold with no further explanation.
6635
+ */
6636
+ reason: string;
6637
+ };
6638
+ /**
6639
+ * Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops.
6144
6640
  */
6145
6641
  export type JobCancelResponse = {
6146
6642
  /**
@@ -6180,6 +6676,10 @@ export type JobDeployment = {
6180
6676
  * Full job details including workflow and outputs
6181
6677
  */
6182
6678
  export type JobDetailResponse = {
6679
+ /**
6680
+ * Why the job is held and whether the caller may resume it. Present only while `status` is `held_budget`; absent for every other status.
6681
+ */
6682
+ budget_hold?: JobBudgetHold;
6183
6683
  /**
6184
6684
  * Job creation timestamp (Unix timestamp in milliseconds)
6185
6685
  */
@@ -6290,9 +6790,9 @@ export type JobDetailResponse = {
6290
6790
  */
6291
6791
  queue_reason?: 'concurrency_limit' | 'capacity';
6292
6792
  /**
6293
- * User-friendly job status
6793
+ * Job status for display. A held_budget job is paused by a budget decision, occupies no worker slot and requires explicit resume or cancellation.
6294
6794
  */
6295
- status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled';
6795
+ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'held_budget';
6296
6796
  /**
6297
6797
  * Last update timestamp (Unix timestamp in milliseconds)
6298
6798
  */
@@ -6346,6 +6846,10 @@ export type JobDetailResponse = {
6346
6846
  * Lightweight job data for list views (workflow and full outputs excluded)
6347
6847
  */
6348
6848
  export type JobEntry = {
6849
+ /**
6850
+ * Why the job is held and whether the caller may resume it. Present only while `status` is `held_budget`; absent for every other status.
6851
+ */
6852
+ budget_hold?: JobBudgetHold;
6349
6853
  /**
6350
6854
  * Job creation timestamp (Unix timestamp in milliseconds)
6351
6855
  */
@@ -6393,9 +6897,9 @@ export type JobEntry = {
6393
6897
  */
6394
6898
  project_id?: string;
6395
6899
  /**
6396
- * User-friendly job status
6900
+ * Job status for display. A held_budget job is paused by a budget decision, occupies no worker slot and requires explicit resume or cancellation.
6397
6901
  */
6398
- status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled';
6902
+ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'held_budget';
6399
6903
  /**
6400
6904
  * UUID identifying the workflow graph definition
6401
6905
  */
@@ -6426,6 +6930,51 @@ export type JobExecutionMetaEntry = {
6426
6930
  real_node_id?: string;
6427
6931
  [key: string]: unknown;
6428
6932
  };
6933
+ /**
6934
+ * A budget as billing reported it when a job was held. Every caller who can read the job gets `scope_kind`, `resets_at` and `set_by`. The identifiers, the mode and the amounts are present only for an Owner of the job's workspace; their absence means the caller may not see them, never zero.
6935
+ */
6936
+ export type JobHeldBudget = {
6937
+ /**
6938
+ * Budget ID. Owner only.
6939
+ */
6940
+ id?: string;
6941
+ /**
6942
+ * The limit in credits. Owner only.
6943
+ */
6944
+ limit_credits?: number;
6945
+ /**
6946
+ * The limit in millionths of a US dollar. Owner only.
6947
+ */
6948
+ limit_micro_usd?: number;
6949
+ /**
6950
+ * The budget's mode when the job was held, `hard` for a budget that stops spend. Owner only.
6951
+ */
6952
+ mode?: string;
6953
+ /**
6954
+ * When the budget's current period ends and its spend starts again from zero.
6955
+ */
6956
+ resets_at: string;
6957
+ /**
6958
+ * The workspace ID, the member's user ID or the API key's prefix, by `scope_kind`. Owner only.
6959
+ */
6960
+ scope_id?: string;
6961
+ /**
6962
+ * What the budget limits: `workspace`, `member` or `api_key`.
6963
+ */
6964
+ scope_kind: string;
6965
+ /**
6966
+ * ID of the user who last set the budget.
6967
+ */
6968
+ set_by: string;
6969
+ /**
6970
+ * Spend counted against the limit when the job was held, in credits. Owner only.
6971
+ */
6972
+ spent_credits?: number;
6973
+ /**
6974
+ * Spend counted against the limit when the job was held, in millionths of a US dollar. Owner only.
6975
+ */
6976
+ spent_micro_usd?: number;
6977
+ };
6429
6978
  /**
6430
6979
  * An asset produced by a job, enriched with the per-output node context
6431
6980
  * (`node_id`, `output_key`, `output_index`) correlated from the job's
@@ -6500,9 +7049,9 @@ export type JobStatusResponse = {
6500
7049
  */
6501
7050
  last_state_update?: string;
6502
7051
  /**
6503
- * Current job status
7052
+ * Raw job lifecycle state. A held_budget job is paused until explicitly resumed or cancelled. Historical schema values waiting_to_dispatch, pending, in_progress and completed are retained for client compatibility.
6504
7053
  */
6505
- status: 'waiting_to_dispatch' | 'pending' | 'in_progress' | 'completed' | 'error' | 'cancelled';
7054
+ status: 'submitted' | 'preprocessing' | 'queued_limited' | 'queued_waiting' | 'held_budget' | 'allocated' | 'preparing' | 'pending_execution' | 'executing' | 'executed' | 'cancel_requested' | 'cancel_pending' | 'erroring' | 'cancelling_preparing' | 'cancelled' | 'non_retryable_error' | 'error' | 'lost' | 'success' | 'waiting_to_dispatch' | 'pending' | 'in_progress' | 'completed';
6506
7055
  /**
6507
7056
  * When the job was last updated
6508
7057
  */
@@ -6627,11 +7176,27 @@ export type ListMembersResponse = {
6627
7176
  members: Array<Member>;
6628
7177
  pagination: PaginationInfo;
6629
7178
  };
7179
+ /**
7180
+ * The people the caller may add to a project.
7181
+ */
7182
+ export type ListProjectMemberCandidatesResponse = {
7183
+ /**
7184
+ * Workspace members not in the project, in the order they joined the workspace. Someone left out cannot be added by this caller: a `PUT` for a person outside the workspace answers 422 `not_workspace_member`.
7185
+ */
7186
+ candidates: Array<ProjectMemberCandidate>;
7187
+ };
6630
7188
  /**
6631
7189
  * The people in a project.
6632
7190
  */
6633
7191
  export type ListProjectMembersResponse = {
7192
+ /**
7193
+ * The people who hold a membership in the project, with their project role. It does not list everyone who can open the project: owners and Workspace admins reach it without a membership (`workspace_access`).
7194
+ */
6634
7195
  members: Array<ProjectMember>;
7196
+ /**
7197
+ * Everyone who reaches the project through their workspace role, the owners and Workspace admins, whether or not they also hold a membership (someone who does is in `members` too). They carry no project role and no member actions. Absent for the default project, which every workspace member is in.
7198
+ */
7199
+ workspace_access?: Array<ProjectWorkspaceAccessMember>;
6635
7200
  };
6636
7201
  /**
6637
7202
  * The projects the caller can view, with the workspace's project quota.
@@ -7429,6 +7994,10 @@ export type Plan = {
7429
7994
  * Per-member price in cents (base + one seat)
7430
7995
  */
7431
7996
  price_cents: number;
7997
+ /**
7998
+ * What moving the workspace to this plan does to its projects. For a per-credit Team plan it answers for the credit stop this plan's action targets (the current stop on the current plan, otherwise the slider's default); team_credit_stops carries the answer for every stop. Absent where Projects is off for the workspace.
7999
+ */
8000
+ project_change?: PlanProjectChange;
7432
8001
  seat_summary: PlanSeatSummary;
7433
8002
  /**
7434
8003
  * Plan identifier (e.g., "pro-monthly", "team-standard-annual")
@@ -7473,6 +8042,19 @@ export type PlanAvailability = {
7473
8042
  * requires_team and requires_personal are part of this enum but are not reported today.
7474
8043
  */
7475
8044
  export type PlanAvailabilityReason = 'same_plan' | 'incompatible_transition' | 'billing_operation_in_progress' | 'billing_operation_parked' | 'annual_to_monthly_unsupported' | 'exceeds_max_seats' | 'requires_team' | 'requires_personal';
8045
+ /**
8046
+ * A project named by a plan change.
8047
+ */
8048
+ export type PlanChangeProject = {
8049
+ /**
8050
+ * Project ID
8051
+ */
8052
+ id: string;
8053
+ /**
8054
+ * Project name
8055
+ */
8056
+ name: string;
8057
+ };
7476
8058
  export type PlanFeatureItem = {
7477
8059
  /**
7478
8060
  * Stable semantic display identifier; additions appear in generated client types.
@@ -7496,6 +8078,19 @@ export type PlanFeatureItem = {
7496
8078
  */
7497
8079
  text: string;
7498
8080
  };
8081
+ /**
8082
+ * What a plan change does to the workspace's projects, judged by the same rule that freezes them. It answers whether the downgrade confirmation must name projects that freeze, or say that nothing freezes and only new projects are blocked. The change applies when the plan change takes effect (effective_at on the preview, the end date for a cancellation). Both fields empty or false means the change does nothing to projects and needs no projects confirmation. It is not a permission: subscribe and cancel do not check it, and it does not say who may manage projects.
8083
+ */
8084
+ export type PlanProjectChange = {
8085
+ /**
8086
+ * The projects the caller can view (as GET /api/projects lists them) that take changes now and would freeze on the target plan, oldest first. The workspace owner and Workspace admins see every one; a member sees only the projects they belong to, so the list can be shorter than what freezes. A frozen project stays readable and nothing in it is deleted. The default project never freezes. Empty when none the caller can view would, including projects that are frozen already.
8087
+ */
8088
+ freezes_projects: Array<PlanChangeProject>;
8089
+ /**
8090
+ * True when, after this change, new projects are blocked and nothing freezes: the target plan includes Projects and the workspace has at least as many projects as it allows, where the current plan has room for another, as on a move to a lower Team level. Creating a project is refused while the workspace stays at or over the limit. False when creating is already refused on the current plan (at or over its limit, or Projects frozen), and whenever freezes_projects is not empty.
8091
+ */
8092
+ over_project_limit: boolean;
8093
+ };
7499
8094
  /**
7500
8095
  * Summary of seat costs based on current workspace members
7501
8096
  */
@@ -7694,6 +8289,10 @@ export type PreviewSubscribeResponse = {
7694
8289
  *
7695
8290
  */
7696
8291
  payment_method_configuration_id?: string;
8292
+ /**
8293
+ * What this change does to the workspace's projects, for the plan and team_credit_stop_id previewed. Absent where Projects is off for the workspace.
8294
+ */
8295
+ project_change?: PlanProjectChange;
7697
8296
  /**
7698
8297
  * Normalized promotion code accepted by Stripe.
7699
8298
  */
@@ -7822,6 +8421,10 @@ export type Project = {
7822
8421
  * 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
8422
  */
7824
8423
  is_default: boolean;
8424
+ /**
8425
+ * How many people were added to the project as its members, the people `GET /api/projects/{id}/members` lists. It does not count workspace owners and Workspace admins, who reach every project through their workspace role, so do not read it as everyone who can open the project. Absent on the default project, which has no member list: every workspace member is in it.
8426
+ */
8427
+ member_count?: number;
7825
8428
  /**
7826
8429
  * 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
8430
  */
@@ -7850,10 +8453,18 @@ export type ProjectMember = {
7850
8453
  * User who added them. Absent when that user is no longer known.
7851
8454
  */
7852
8455
  added_by_user_id?: string;
8456
+ /**
8457
+ * What the caller may do to this member. Present on each row of `GET /api/projects/{id}/members`; absent from the `PUT` answer. Absent means unknown, not permission.
8458
+ */
8459
+ capabilities?: ProjectMemberCapabilities;
7853
8460
  /**
7854
8461
  * When they were added to the project
7855
8462
  */
7856
8463
  create_time: string;
8464
+ /**
8465
+ * Why a capability of this row is false, keyed by the capability. Absent when every capability is true.
8466
+ */
8467
+ denied_reasons?: ProjectMemberDenials;
7857
8468
  /**
7858
8469
  * The member's email address, or an empty string if none is on file.
7859
8470
  */
@@ -7865,6 +8476,52 @@ export type ProjectMember = {
7865
8476
  role: ProjectRole;
7866
8477
  user_id: string;
7867
8478
  };
8479
+ /**
8480
+ * A workspace member the caller may add to the project.
8481
+ */
8482
+ export type ProjectMemberCandidate = {
8483
+ /**
8484
+ * Their email address, or an empty string if none is on file.
8485
+ */
8486
+ email: string;
8487
+ /**
8488
+ * Their display name
8489
+ */
8490
+ name: string;
8491
+ /**
8492
+ * The project roles the caller may give this person, least first. Offer only these.
8493
+ */
8494
+ roles: Array<ProjectRole>;
8495
+ user_id: string;
8496
+ /**
8497
+ * Present when this person already reaches the project through their workspace role. Adding them is accepted and changes nothing they can do there while they hold that role. Absent for an ordinary member.
8498
+ */
8499
+ workspace_access?: ProjectWorkspaceAccess;
8500
+ };
8501
+ /**
8502
+ * What the caller may do to one project member, from the same checks the member routes make. Render each as received; do not rebuild them from `my_role`, `permissions` or the workspace role. Read them per row: a rule may depend on the member. Neither is permission to add someone; that is `GET /api/projects/{id}/member-candidates`.
8503
+ */
8504
+ export type ProjectMemberCapabilities = {
8505
+ /**
8506
+ * Whether `PUT /api/projects/{id}/members/{userId}` would give this member another role. False in a frozen project. A Project admin may change their own role, the project's last Project admin included: owners and Workspace admins always reach the project. Not permission to remove them.
8507
+ */
8508
+ can_change_role: boolean;
8509
+ /**
8510
+ * Whether `DELETE /api/projects/{id}/members/{userId}` would remove this member. Still true in a frozen project, which keeps accepting removals. True for the caller's own row and for the last Project admin when the caller manages members. Not permission to change their role.
8511
+ */
8512
+ can_remove: boolean;
8513
+ };
8514
+ /**
8515
+ * `permission_denied`: the caller does not manage the project's members (`project.members` write). `project_frozen`: the project is frozen and takes no role changes; it still takes removals. New values may be added.
8516
+ */
8517
+ export type ProjectMemberDenialReason = 'permission_denied' | 'project_frozen';
8518
+ /**
8519
+ * Why a capability is false, keyed by the capability. The value names the rule that refused, not wording: the client owns the message. A missing key is not a grant.
8520
+ */
8521
+ export type ProjectMemberDenials = {
8522
+ can_change_role?: ProjectMemberDenialReason;
8523
+ can_remove?: ProjectMemberDenialReason;
8524
+ };
7868
8525
  /**
7869
8526
  * A workspace member to add to a project, with their project role.
7870
8527
  */
@@ -7918,18 +8575,51 @@ export type ProjectQuota = {
7918
8575
  */
7919
8576
  active: number;
7920
8577
  /**
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`.
8578
+ * 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`. This, not `denied_reasons`, answers whether the caller may create.
7922
8579
  */
7923
8580
  can_create: boolean;
8581
+ /**
8582
+ * Why `can_create` is false, keyed by the fact it explains. Present exactly when `can_create` is false.
8583
+ */
8584
+ denied_reasons?: ProjectQuotaDenials;
7924
8585
  /**
7925
8586
  * The most projects the workspace's plan allows, not counting the default project.
7926
8587
  */
7927
8588
  max_active: number;
7928
8589
  };
8590
+ /**
8591
+ * Why the caller may not create a project. `permission_denied`: the caller does not hold `workspace.projects` write (only owners and Workspace admins do), whatever the workspace's limit; hide "New project" rather than show a limit. A create answers 403 `permission_denied`. `limit_reached`: the caller may create projects but the workspace has as many as its plan allows; show the project limit and a way to change plans. A create answers 409 `project_limit_reached`. `frozen`: the caller may create projects but the workspace's plan no longer includes Projects, so its projects are read-only and none can be created until the plan includes Projects again. A create answers 403 `projects_not_available`. A caller without permission is answered `permission_denied` even when the workspace is also at its limit or frozen. Treat a value not listed here as "may not create".
8592
+ */
8593
+ export type ProjectQuotaCreateDenialReason = 'permission_denied' | 'limit_reached' | 'frozen';
8594
+ /**
8595
+ * Why a quota fact is false, keyed by the fact. The value names the rule that refused, not wording: the client owns the message. A missing key is not a grant.
8596
+ */
8597
+ export type ProjectQuotaDenials = {
8598
+ can_create?: ProjectQuotaCreateDenialReason;
8599
+ };
7929
8600
  /**
7930
8601
  * 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
8602
  */
7932
8603
  export type ProjectRole = 'runner' | 'builder' | 'project_admin';
8604
+ /**
8605
+ * How someone reaches every project of the workspace through their workspace role: as an owner, or as a Workspace admin. Either acts as a Project admin in the project. Not a project role, and not a membership: they cannot be removed from the project or given a role there; that is a change to their workspace role.
8606
+ */
8607
+ export type ProjectWorkspaceAccess = 'workspace_owner' | 'workspace_admin';
8608
+ /**
8609
+ * A person who reaches the project through their workspace role.
8610
+ */
8611
+ export type ProjectWorkspaceAccessMember = {
8612
+ access: ProjectWorkspaceAccess;
8613
+ /**
8614
+ * Their email address, or an empty string if none is on file.
8615
+ */
8616
+ email: string;
8617
+ /**
8618
+ * Their display name
8619
+ */
8620
+ name: string;
8621
+ user_id: string;
8622
+ };
7933
8623
  /**
7934
8624
  * Error response for ComfyUI prompt execution.
7935
8625
  */
@@ -8011,6 +8701,29 @@ export type PromptOutputsSkippedValidationError = {
8011
8701
  message?: string;
8012
8702
  type?: string;
8013
8703
  };
8704
+ /**
8705
+ * Payment or hard-budget refusal for ComfyUI prompt execution.
8706
+ */
8707
+ export type PromptPaymentRequired = {
8708
+ /**
8709
+ * All exhausted hard budgets, visible to workspace Owners.
8710
+ */
8711
+ blocking_budgets?: Array<SpendBudgetDetail>;
8712
+ budget?: SpendBudgetDetail;
8713
+ /**
8714
+ * The billing policy reason for a hard-budget refusal.
8715
+ */
8716
+ denied_reason?: string;
8717
+ /**
8718
+ * The existing prompt error payload for this payment refusal.
8719
+ */
8720
+ error?: unknown;
8721
+ /**
8722
+ * For a hard-budget refusal, this is `budget_exceeded`.
8723
+ */
8724
+ error_type?: string;
8725
+ [key: string]: unknown;
8726
+ };
8014
8727
  /**
8015
8728
  * Request body for submitting a ComfyUI workflow prompt for execution.
8016
8729
  */
@@ -8102,6 +8815,32 @@ export type ProviderPolicyEntry = {
8102
8815
  */
8103
8816
  provider_id: string;
8104
8817
  };
8818
+ export type PublicModel = {
8819
+ /**
8820
+ * Path under the models root, as `GET /api/assets` reports it
8821
+ * (e.g. `models/checkpoints/x.safetensors`). Absent when it cannot
8822
+ * be built safely.
8823
+ *
8824
+ */
8825
+ file_path?: string;
8826
+ id: string;
8827
+ /**
8828
+ * The model's file name, as loaders show it.
8829
+ */
8830
+ name: string;
8831
+ /**
8832
+ * Bytes on disk. Absent when never measured, not zero.
8833
+ */
8834
+ size?: number;
8835
+ /**
8836
+ * The public http(s) URL the model was downloaded from, when known.
8837
+ */
8838
+ source_url?: string;
8839
+ tags: Array<string>;
8840
+ };
8841
+ export type PublicModelsResponse = {
8842
+ models: Array<PublicModel>;
8843
+ };
8105
8844
  /**
8106
8845
  * Request body for publishing or updating a workflow on the Hub.
8107
8846
  */
@@ -8215,7 +8954,7 @@ export type QueueInfo = {
8215
8954
  */
8216
8955
  export type QueueManageRequest = {
8217
8956
  /**
8218
- * If true, clear all pending jobs from the queue
8957
+ * If true, cancel the caller’s pending and budget-held jobs in this workspace
8219
8958
  */
8220
8959
  clear?: boolean;
8221
8960
  /**
@@ -8549,6 +9288,21 @@ export type ServerDocFrame = DocSubscribedFrame | DocUpdateFrame | DocResetFrame
8549
9288
  export type SetProjectMemberRequest = {
8550
9289
  role: ProjectRole;
8551
9290
  };
9291
+ /**
9292
+ * The exhausted budget. Workspace Owners also receive its ID, scope ID, mode, and amounts.
9293
+ */
9294
+ export type SpendBudgetDetail = {
9295
+ id?: string;
9296
+ limit_credits?: number;
9297
+ limit_micro_usd?: number;
9298
+ mode?: string;
9299
+ resets_at: string;
9300
+ scope_id?: string;
9301
+ scope_kind: string;
9302
+ set_by: string;
9303
+ spent_credits?: number;
9304
+ spent_micro_usd?: number;
9305
+ };
8552
9306
  /**
8553
9307
  * The deployment a start was asked for, and its status after the ask.
8554
9308
  */
@@ -9033,6 +9787,10 @@ export type TeamCreditStopPrice = {
9033
9787
  * Post-discount (bold) price in cents
9034
9788
  */
9035
9789
  price_cents: number;
9790
+ /**
9791
+ * What moving the workspace to the per-credit Team plan at this stop and billing period does to its projects. Absent where Projects is off for the workspace.
9792
+ */
9793
+ project_change?: PlanProjectChange;
9036
9794
  };
9037
9795
  /**
9038
9796
  * The team credit stop a workspace is currently subscribed to: the
@@ -9174,6 +9932,17 @@ export type TopupQuoteResponse = {
9174
9932
  * The quoted amount, in cents.
9175
9933
  */
9176
9934
  amount_cents: number;
9935
+ /**
9936
+ * The workspace's effective balance (credits minus pending
9937
+ * draft-invoice charges) plus this top-up, in display credits,
9938
+ * rounded to the nearest whole credit. An overrun smaller than half
9939
+ * a credit rounds to 0, so use `runs_paused_after`, not this value's
9940
+ * sign, to tell whether the top-up covers the overrun. Render it as
9941
+ * is; do not recompute it from the balance. Omitted when the balance
9942
+ * cannot be read authoritatively.
9943
+ *
9944
+ */
9945
+ balance_after_credits?: number;
9177
9946
  /**
9178
9947
  * Display credits at 211 per dollar, rounded half up. The top-up
9179
9948
  * itself grants `amount_cents` of balance.
@@ -9200,6 +9969,18 @@ export type TopupQuoteResponse = {
9200
9969
  *
9201
9970
  */
9202
9971
  payment_method_configuration_id?: string;
9972
+ /**
9973
+ * Whether the credit funds gate still holds runs after this top-up
9974
+ * settles: its verdict on the unrounded balance, true when it is zero
9975
+ * or below. A `balance_after_credits` of 0 can come with either value,
9976
+ * because Metronome keeps fractional cents; read this field, not the
9977
+ * sign of `balance_after_credits`. It answers only the funds gate:
9978
+ * Cloud checks subscription eligibility separately, so false does not
9979
+ * promise a run is admitted, and it says nothing about whether the
9980
+ * payment succeeds. Omitted with `balance_after_credits`.
9981
+ *
9982
+ */
9983
+ runs_paused_after?: boolean;
9203
9984
  };
9204
9985
  /**
9205
9986
  * Request body for updating an existing Hub profile.
@@ -9339,6 +10120,10 @@ export type UsageBreakdownRow = {
9339
10120
  export type UsageBucket = {
9340
10121
  cost_micros: number;
9341
10122
  group_key: string;
10123
+ /**
10124
+ * True when the bucket ends within two hours before `as_of`, or after it: usage is still being reported for it, so its cost may grow. Set only in a team workspace where Projects is on; absent elsewhere and on a bucket that is complete.
10125
+ */
10126
+ pending?: boolean;
9342
10127
  period_end: string;
9343
10128
  period_start: string;
9344
10129
  };
@@ -9356,7 +10141,7 @@ export type UsageGroupLabel = {
9356
10141
  */
9357
10142
  deployment_name?: string;
9358
10143
  /**
9359
- * Human-readable name for the key: a person's name, a product line's label, a model's name (`Not specified` for `unspecified`: charges that name no model, such as Agent rounds, partner calls that send none, and Comfy Cloud GPU time), or the key's owner and prefix.
10144
+ * Human-readable name for the key: a person's name, a product line's label, a model's name (`<partner> · Model not reported` for `unspecified/<api_name>`: a partner's calls that send no model; `Not specified` for `unspecified` and for an `unspecified/<api_name>` whose partner is unknown: charges that name no model or partner, such as Agent rounds and Comfy Cloud GPU time), or the key's owner and prefix.
9360
10145
  */
9361
10146
  display_name?: string;
9362
10147
  /**
@@ -9400,7 +10185,7 @@ export type UsageGroupLabel = {
9400
10185
  */
9401
10186
  owner_user_id?: string;
9402
10187
  /**
9403
- * Only for `model` on a ledger-served answer: the partner the model's charges came through, as the partner catalog's provider id (the id workspace provider policy uses). Absent for a model whose charges name no known partner, a deployment and `unspecified`.
10188
+ * Only for `model` on a ledger-served answer: the partner the model's charges came through, as the partner catalog's provider id (the id workspace provider policy uses). Present on `unspecified/<api_name>` when the partner is known. Absent for a model whose charges name no known partner, a deployment and `unspecified`.
9404
10189
  */
9405
10190
  provider?: string;
9406
10191
  /**
@@ -9412,10 +10197,10 @@ export type UsageGroupLabel = {
9412
10197
  * Present, with empty groups, buckets and breakdown, when the requested grouping is not served for this workspace. Render as unavailable, not as zero spend.
9413
10198
  */
9414
10199
  export type UsageNotAvailable = {
9415
- reason: 'no_attribution_source' | 'filter_needs_ledger';
10200
+ reason: 'no_attribution_source' | 'filter_needs_ledger' | 'too_many_deployments' | 'deployments_unavailable';
9416
10201
  };
9417
10202
  /**
9418
- * Mixed units, deliberately. `spend_micros` here (and `cost_micros` on UsageBucket / UsageBreakdownRow) is genuinely MICROS -- 1/1,000,000 of the currency unit -- because it comes from Metronome's usage figures. The `balance` breakdown below is CENTS, and its `*_micros` names are a misnomer; use its `*_cents` fields.
10203
+ * Mixed units, deliberately. `spend_micros` here (and `cost_micros` on UsageBucket / UsageBreakdownRow) is genuinely MICROS -- 1/1,000,000 of the currency unit -- because it comes from Metronome's usage figures. The `balance` breakdown below is CENTS, and its `*_micros` names are a misnomer; use its `*_cents` fields. `balance` is omitted, never null, when it could not be read, the workspace has no billing account, or the caller may not see it (can_view_workspace_usage is false).
9419
10204
  */
9420
10205
  export type UsageSummary = {
9421
10206
  balance?: UsageBalance;
@@ -9622,7 +10407,7 @@ export type WorkflowResponse = {
9622
10407
  latest_version: number;
9623
10408
  name?: string;
9624
10409
  /**
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.
10410
+ * The project this workflow belongs to, set only for a workflow in a project other than the default. Absent means the workflow is in the workspace's default project, whether or not Projects is enabled for the workspace: the default project's ID is never sent here. Absent does not mean the caller lacks access to the workflow's project. It does not say whether the workspace uses Projects; read `projects_in_use` on `GET /api/projects` for that.
9626
10411
  */
9627
10412
  project_id?: string;
9628
10413
  updated_at: string;
@@ -9869,11 +10654,11 @@ export type WorkspaceDeploymentList = {
9869
10654
  */
9870
10655
  export type WorkspaceMemberCapabilities = {
9871
10656
  /**
9872
- * Whether the actor may switch this member to the other supported role. Requires current owner authority and respects directory management, creator protection and the last-owner guard. Non-creator self-demotion is allowed when another owner remains. Not mutation authorization.
10657
+ * Whether the actor may switch this member to the other supported role. Requires current owner authority and respects directory management, creator protection and the last-owner guard. Non-creator self-demotion is allowed when another owner remains. Always false for a Workspace admin, who changes no role. It does not answer whether the actor may set or clear this member's `workspace_admin`; only an owner may. Not mutation authorization.
9873
10658
  */
9874
10659
  can_change_role: boolean;
9875
10660
  /**
9876
- * Whether the actor may remove this member. Requires current owner authority, refuses self-removal and protects the creator. Directory management alone does not refuse the existing removal route. Not permission to leave the workspace; use can_leave_workspace.
10661
+ * Whether the actor may remove this member. True for a current owner, and for a Workspace admin when this member is an ordinary member: an admin is never offered an owner or another Workspace admin. Refuses self-removal and protects the creator. Directory management alone does not refuse the existing removal route. Not permission to change this member's role (can_change_role) and not permission to leave the workspace; use can_leave_workspace.
9877
10662
  */
9878
10663
  can_remove: boolean;
9879
10664
  /**
@@ -9926,6 +10711,10 @@ export type WorkspaceWithRole = {
9926
10711
  * Represents a user-owned asset (image, video, or other generated output).
9927
10712
  */
9928
10713
  export type AssetWritable = {
10714
+ /**
10715
+ * Set only on a `workspace_library` listing: true when the model policy of the Release that the caller's deployment runs (its own pick or the workspace default) blocks this model, so a Run that names it is refused. Absent when the policy allows it, when there is no policy, and on every other listing.
10716
+ */
10717
+ blocked_by_model_policy?: boolean;
9929
10718
  /**
9930
10719
  * Timestamp when the asset was created
9931
10720
  */
@@ -9983,7 +10772,7 @@ export type AssetWritable = {
9983
10772
  */
9984
10773
  project_id?: string;
9985
10774
  /**
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.
10775
+ * 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, the asset has no resolvable content hash, or the asset is in a project other than the default.
9987
10776
  */
9988
10777
  short_url?: string | null;
9989
10778
  /**
@@ -10099,9 +10888,12 @@ export type DeploymentModelsWorkspaceId = string;
10099
10888
  export type MediaWorkspaceId = string;
10100
10889
  /**
10101
10890
  * 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.
10891
+ * ones that read it: they list workflows, runs or assets, create one,
10892
+ * export assets, clear the caller's queue or History, pick the
10893
+ * deployment a browser runs on, or serve the editor that deployment
10894
+ * (the node, extension and model lists). Absent means
10895
+ * the workspace's default project, which is how existing clients keep
10896
+ * working.
10105
10897
  *
10106
10898
  * An operation on one existing workflow, run or asset does not take
10107
10899
  * it: the row's own project decides. Any other operation that creates
@@ -10113,6 +10905,13 @@ export type MediaWorkspaceId = string;
10113
10905
  * `not_found`; the two look the same. Where Projects is not enabled for
10114
10906
  * the workspace the header is ignored.
10115
10907
  *
10908
+ * A Cloud JWT that carries a `project_id` claim acts only in that
10909
+ * project. Without the header such a request acts in the claimed
10910
+ * project; a header naming any other project, the default project
10911
+ * included, is 403 `permission_denied`, and so is any such request
10912
+ * where Projects is not enabled for the workspace. The refusal says the
10913
+ * token is bound to another project, not what the caller's role allows.
10914
+ *
10116
10915
  */
10117
10916
  export type ProjectId = string;
10118
10917
  export type GetJwksData = {
@@ -10278,7 +11077,7 @@ export type AgentGetDraftErrors = {
10278
11077
  */
10279
11078
  401: ErrorResponse | AgentError;
10280
11079
  /**
10281
- * Forbidden (workflow not found or cross-workspace). An ingest refusal, such as the web session's, is ErrorResponse; the agent service's is AgentError.
11080
+ * Forbidden (workflow not found, or not the caller's to read: one answer, AgentError). An ingest refusal, such as the web session's, is ErrorResponse.
10282
11081
  */
10283
11082
  403: ErrorResponse | AgentError;
10284
11083
  /**
@@ -10343,6 +11142,36 @@ export type GetAgentEventsErrors = {
10343
11142
  export type GetAgentEventsError = GetAgentEventsErrors[keyof GetAgentEventsErrors];
10344
11143
  export type AgentGetExecutionsData = {
10345
11144
  body?: never;
11145
+ headers?: {
11146
+ /**
11147
+ * The project a request acts in. The operations that list it are the
11148
+ * ones that read it: they list workflows, runs or assets, create one,
11149
+ * export assets, clear the caller's queue or History, pick the
11150
+ * deployment a browser runs on, or serve the editor that deployment
11151
+ * (the node, extension and model lists). Absent means
11152
+ * the workspace's default project, which is how existing clients keep
11153
+ * working.
11154
+ *
11155
+ * An operation on one existing workflow, run or asset does not take
11156
+ * it: the row's own project decides. Any other operation that creates
11157
+ * a workflow, run or asset acts in the default project until it lists
11158
+ * this parameter.
11159
+ *
11160
+ * The project must be in the workspace the request resolves to. A
11161
+ * project that does not exist, or that the caller may not view, is 404
11162
+ * `not_found`; the two look the same. Where Projects is not enabled for
11163
+ * the workspace the header is ignored.
11164
+ *
11165
+ * A Cloud JWT that carries a `project_id` claim acts only in that
11166
+ * project. Without the header such a request acts in the claimed
11167
+ * project; a header naming any other project, the default project
11168
+ * included, is 403 `permission_denied`, and so is any such request
11169
+ * where Projects is not enabled for the workspace. The refusal says the
11170
+ * token is bound to another project, not what the caller's role allows.
11171
+ *
11172
+ */
11173
+ 'X-Comfy-Project-ID'?: string;
11174
+ };
10346
11175
  path?: never;
10347
11176
  query?: {
10348
11177
  /**
@@ -10410,6 +11239,85 @@ export type AgentGetExecutionsResponses = {
10410
11239
  };
10411
11240
  };
10412
11241
  export type AgentGetExecutionsResponse = AgentGetExecutionsResponses[keyof AgentGetExecutionsResponses];
11242
+ export type AgentGetFeaturesData = {
11243
+ body?: never;
11244
+ headers?: {
11245
+ /**
11246
+ * The project a request acts in. The operations that list it are the
11247
+ * ones that read it: they list workflows, runs or assets, create one,
11248
+ * export assets, clear the caller's queue or History, pick the
11249
+ * deployment a browser runs on, or serve the editor that deployment
11250
+ * (the node, extension and model lists). Absent means
11251
+ * the workspace's default project, which is how existing clients keep
11252
+ * working.
11253
+ *
11254
+ * An operation on one existing workflow, run or asset does not take
11255
+ * it: the row's own project decides. Any other operation that creates
11256
+ * a workflow, run or asset acts in the default project until it lists
11257
+ * this parameter.
11258
+ *
11259
+ * The project must be in the workspace the request resolves to. A
11260
+ * project that does not exist, or that the caller may not view, is 404
11261
+ * `not_found`; the two look the same. Where Projects is not enabled for
11262
+ * the workspace the header is ignored.
11263
+ *
11264
+ * A Cloud JWT that carries a `project_id` claim acts only in that
11265
+ * project. Without the header such a request acts in the claimed
11266
+ * project; a header naming any other project, the default project
11267
+ * included, is 403 `permission_denied`, and so is any such request
11268
+ * where Projects is not enabled for the workspace. The refusal says the
11269
+ * token is bound to another project, not what the caller's role allows.
11270
+ *
11271
+ */
11272
+ 'X-Comfy-Project-ID'?: string;
11273
+ };
11274
+ path?: never;
11275
+ query?: {
11276
+ /**
11277
+ * The thread whose current selection is asked for. A canonical UUID.
11278
+ */
11279
+ thread_id?: string;
11280
+ };
11281
+ url: '/api/agent/features';
11282
+ };
11283
+ export type AgentGetFeaturesErrors = {
11284
+ /**
11285
+ * `thread_id` is not a canonical UUID, or the session's workspace id is invalid.
11286
+ */
11287
+ 400: ErrorResponse;
11288
+ /**
11289
+ * Unauthorized. An ingest refusal, such as the web session's, is ErrorResponse; the agent service's identity-header rejection is AgentError and carries `kind`.
11290
+ */
11291
+ 401: ErrorResponse | AgentError;
11292
+ /**
11293
+ * 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.
11294
+ */
11295
+ 403: ForbiddenError;
11296
+ /**
11297
+ * No model control. Ingest-raised (ErrorResponse): the caller is not enrolled in the agent-in-app-experience flag gating the whole /api/agent surface. Agent-raised: the agent service does not serve this route, or `thread_id` names no thread of the caller's in this project. Show no control and send messages as today.
11298
+ */
11299
+ 404: ErrorResponse | AgentError;
11300
+ /**
11301
+ * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead)
11302
+ */
11303
+ 500: AgentError;
11304
+ /**
11305
+ * Agent service unavailable
11306
+ */
11307
+ 502: ErrorResponse;
11308
+ /**
11309
+ * The selections could not be read (retryable; keep the last list for this view, or show no control). Ingest also answers 503 when the agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret).
11310
+ */
11311
+ 503: ErrorResponse | AgentError;
11312
+ };
11313
+ export type AgentGetFeaturesError = AgentGetFeaturesErrors[keyof AgentGetFeaturesErrors];
11314
+ export type AgentGetFeaturesResponses = {
11315
+ /**
11316
+ * The caller's selections.
11317
+ */
11318
+ 200: AgentFeatures;
11319
+ };
11320
+ export type AgentGetFeaturesResponse = AgentGetFeaturesResponses[keyof AgentGetFeaturesResponses];
10413
11321
  export type AgentGetIdentityData = {
10414
11322
  body?: never;
10415
11323
  path?: never;
@@ -10521,18 +11429,18 @@ export type AgentLlmAdmitResponses = {
10521
11429
  };
10522
11430
  };
10523
11431
  export type AgentLlmAdmitResponse = AgentLlmAdmitResponses[keyof AgentLlmAdmitResponses];
10524
- export type AgentLlmMessagesData = {
11432
+ export type AgentLlmChatCompletionsData = {
10525
11433
  /**
10526
- * Opaque Anthropic Messages request body, passed through to the upstream. Not modeled here — the agent's LLM proxy owns the contract.
11434
+ * Opaque OpenAI Chat Completions request body, passed through to the upstream. Not modeled here — the LLM proxy owns the contract.
10527
11435
  */
10528
11436
  body: {
10529
11437
  [key: string]: unknown;
10530
11438
  };
10531
11439
  path?: never;
10532
11440
  query?: never;
10533
- url: '/api/agent/llm/v1/messages';
11441
+ url: '/api/agent/llm/v1/chat/completions';
10534
11442
  };
10535
- export type AgentLlmMessagesErrors = {
11443
+ export type AgentLlmChatCompletionsErrors = {
10536
11444
  /**
10537
11445
  * `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.
10538
11446
  */
@@ -10546,35 +11454,183 @@ export type AgentLlmMessagesErrors = {
10546
11454
  */
10547
11455
  402: AgentAdmissionError;
10548
11456
  /**
10549
- * 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.
11457
+ * Refused, with one of two bodies. ErrorResponse: an ingest refusal of a request that changes data (see SessionWriteForbidden). AgentLLMOpenAIError: the LLM proxy does not serve this caller in this request format; today it refuses every local caller with `error.type` `permission_error`, so nothing ran and nothing was spent. Read it as "not served on this target", not as a credential problem.
10550
11458
  */
10551
- 403: ForbiddenError;
11459
+ 403: ErrorResponse | AgentLlmOpenAiError;
10552
11460
  /**
10553
- * The agent in-app experience is disabled for this caller (FlagAgentInAppExperience off). The feature is kept invisible when off, so ingest returns 404 rather than 403.
11461
+ * The agent in-app experience is disabled for this caller (FlagAgentInAppExperience off; kept invisible, so 404 rather than 403), or the upstream LLM proxy does not mount this route (the proxy embedded in comfy-agent, or llm-proxy where Responses is switched off).
10554
11462
  */
10555
11463
  404: ErrorResponse;
10556
11464
  /**
10557
- * Too many requests, with one of two bodies. RateLimitExceededError (`error` is a string): ingest refused the request before it reached the agent, so nothing ran, and no Retry-After is sent. AgentLLMError (`error` is an object): the agent's LLM proxy held the round for capacity past its wait (`error.type` `rate_limit_error`), an operator paused the Agent or the workspace (`error.type` `paused`), or Anthropic throttled the call.
11465
+ * Too many requests, with one of two bodies. RateLimitExceededError (`error` is a string): ingest refused the request before it reached the agent, so nothing ran, and no Retry-After is sent. AgentLLMOpenAIError (`error` is an object): the agent's LLM proxy held the round for capacity past its wait (`error.type` `rate_limit_error`), an operator paused the Agent or the workspace (`error.type` `paused`), or the provider throttled the call.
10558
11466
  */
10559
- 429: RateLimitExceededError | AgentLlmError;
11467
+ 429: RateLimitExceededError | AgentLlmOpenAiError;
10560
11468
  /**
10561
11469
  * Agent service unavailable
10562
11470
  */
10563
11471
  502: ErrorResponse;
10564
11472
  /**
10565
- * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers.
11473
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. If a hard budget cannot be checked, the response carries `error_type: budget_check_unavailable`, `denied_reason`, and `Retry-After`.
10566
11474
  */
10567
11475
  503: ErrorResponse;
10568
11476
  };
10569
- export type AgentLlmMessagesError = AgentLlmMessagesErrors[keyof AgentLlmMessagesErrors];
10570
- export type AgentLlmMessagesResponses = {
11477
+ export type AgentLlmChatCompletionsError = AgentLlmChatCompletionsErrors[keyof AgentLlmChatCompletionsErrors];
11478
+ export type AgentLlmChatCompletionsResponses = {
10571
11479
  /**
10572
- * The upstream LLM response, streamed back as Server-Sent Events (text/event-stream) chunk-by-chunk.
11480
+ * The upstream response, streamed back chunk-by-chunk (Server-Sent Events for a streamed request).
10573
11481
  */
10574
11482
  200: string;
10575
11483
  };
10576
- export type AgentLlmMessagesResponse = AgentLlmMessagesResponses[keyof AgentLlmMessagesResponses];
10577
- export type AgentLlmTracesData = {
11484
+ export type AgentLlmChatCompletionsResponse = AgentLlmChatCompletionsResponses[keyof AgentLlmChatCompletionsResponses];
11485
+ export type AgentLlmFeaturesData = {
11486
+ body?: never;
11487
+ path?: never;
11488
+ query?: never;
11489
+ url: '/api/agent/llm/v1/features';
11490
+ };
11491
+ export type AgentLlmFeaturesErrors = {
11492
+ /**
11493
+ * `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.
11494
+ */
11495
+ 400: ErrorResponse;
11496
+ /**
11497
+ * Unauthorized
11498
+ */
11499
+ 401: ErrorResponse;
11500
+ /**
11501
+ * 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.
11502
+ */
11503
+ 403: ForbiddenError;
11504
+ /**
11505
+ * The agent in-app experience is disabled for this caller (FlagAgentInAppExperience off; kept invisible, so 404 rather than 403), or the LLM proxy does not serve this route. Either means "not enabled".
11506
+ */
11507
+ 404: ErrorResponse;
11508
+ /**
11509
+ * The LLM proxy is unavailable, or its answer exceeded 1 MiB. The binary keeps its cached answer.
11510
+ */
11511
+ 502: ErrorResponse;
11512
+ /**
11513
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), or the proxy could not read the selections (retryable).
11514
+ */
11515
+ 503: ErrorResponse;
11516
+ };
11517
+ export type AgentLlmFeaturesError = AgentLlmFeaturesErrors[keyof AgentLlmFeaturesErrors];
11518
+ export type AgentLlmFeaturesResponses = {
11519
+ /**
11520
+ * Opaque features document, passed through from the LLM proxy. Not modeled here — the proxy owns the contract.
11521
+ */
11522
+ 200: {
11523
+ [key: string]: unknown;
11524
+ };
11525
+ };
11526
+ export type AgentLlmFeaturesResponse = AgentLlmFeaturesResponses[keyof AgentLlmFeaturesResponses];
11527
+ export type AgentLlmMessagesData = {
11528
+ /**
11529
+ * Opaque Anthropic Messages request body, passed through to the upstream. Not modeled here — the agent's LLM proxy owns the contract.
11530
+ */
11531
+ body: {
11532
+ [key: string]: unknown;
11533
+ };
11534
+ path?: never;
11535
+ query?: never;
11536
+ url: '/api/agent/llm/v1/messages';
11537
+ };
11538
+ export type AgentLlmMessagesErrors = {
11539
+ /**
11540
+ * `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.
11541
+ */
11542
+ 400: ErrorResponse;
11543
+ /**
11544
+ * Unauthorized
11545
+ */
11546
+ 401: ErrorResponse;
11547
+ /**
11548
+ * The pre-turn admission gate declined the turn for a payment reason: the workspace is out of credits or has been blocked. Not retryable as-is — resolve the account condition first.
11549
+ */
11550
+ 402: AgentAdmissionError;
11551
+ /**
11552
+ * 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.
11553
+ */
11554
+ 403: ForbiddenError;
11555
+ /**
11556
+ * The agent in-app experience is disabled for this caller (FlagAgentInAppExperience off). The feature is kept invisible when off, so ingest returns 404 rather than 403.
11557
+ */
11558
+ 404: ErrorResponse;
11559
+ /**
11560
+ * Too many requests, with one of two bodies. RateLimitExceededError (`error` is a string): ingest refused the request before it reached the agent, so nothing ran, and no Retry-After is sent. AgentLLMError (`error` is an object): the agent's LLM proxy held the round for capacity past its wait (`error.type` `rate_limit_error`), an operator paused the Agent or the workspace (`error.type` `paused`), or Anthropic throttled the call.
11561
+ */
11562
+ 429: RateLimitExceededError | AgentLlmError;
11563
+ /**
11564
+ * Agent service unavailable
11565
+ */
11566
+ 502: ErrorResponse;
11567
+ /**
11568
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. If a hard budget cannot be checked, the response carries `error_type: budget_check_unavailable`, `denied_reason`, and `Retry-After`.
11569
+ */
11570
+ 503: ErrorResponse;
11571
+ };
11572
+ export type AgentLlmMessagesError = AgentLlmMessagesErrors[keyof AgentLlmMessagesErrors];
11573
+ export type AgentLlmMessagesResponses = {
11574
+ /**
11575
+ * The upstream LLM response, streamed back as Server-Sent Events (text/event-stream) chunk-by-chunk.
11576
+ */
11577
+ 200: string;
11578
+ };
11579
+ export type AgentLlmMessagesResponse = AgentLlmMessagesResponses[keyof AgentLlmMessagesResponses];
11580
+ export type AgentLlmResponsesData = {
11581
+ /**
11582
+ * Opaque OpenAI Responses request body, passed through to the upstream. Not modeled here — the LLM proxy owns the contract.
11583
+ */
11584
+ body: {
11585
+ [key: string]: unknown;
11586
+ };
11587
+ path?: never;
11588
+ query?: never;
11589
+ url: '/api/agent/llm/v1/responses';
11590
+ };
11591
+ export type AgentLlmResponsesErrors = {
11592
+ /**
11593
+ * `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.
11594
+ */
11595
+ 400: ErrorResponse;
11596
+ /**
11597
+ * Unauthorized
11598
+ */
11599
+ 401: ErrorResponse;
11600
+ /**
11601
+ * The pre-turn admission gate declined the turn for a payment reason: the workspace is out of credits or has been blocked. Not retryable as-is — resolve the account condition first.
11602
+ */
11603
+ 402: AgentAdmissionError;
11604
+ /**
11605
+ * Refused, with one of two bodies. ErrorResponse: an ingest refusal of a request that changes data (see SessionWriteForbidden). AgentLLMOpenAIError: the LLM proxy does not serve this caller in this request format; today it refuses every local caller with `error.type` `permission_error`, so nothing ran and nothing was spent. Read it as "not served on this target", not as a credential problem.
11606
+ */
11607
+ 403: ErrorResponse | AgentLlmOpenAiError;
11608
+ /**
11609
+ * The agent in-app experience is disabled for this caller (FlagAgentInAppExperience off; kept invisible, so 404 rather than 403), or the upstream LLM proxy does not mount this route (the proxy embedded in comfy-agent, or llm-proxy where Responses is switched off).
11610
+ */
11611
+ 404: ErrorResponse;
11612
+ /**
11613
+ * Too many requests, with one of two bodies. RateLimitExceededError (`error` is a string): ingest refused the request before it reached the agent, so nothing ran, and no Retry-After is sent. AgentLLMOpenAIError (`error` is an object): the agent's LLM proxy held the round for capacity past its wait (`error.type` `rate_limit_error`), an operator paused the Agent or the workspace (`error.type` `paused`), or the provider throttled the call.
11614
+ */
11615
+ 429: RateLimitExceededError | AgentLlmOpenAiError;
11616
+ /**
11617
+ * Agent service unavailable
11618
+ */
11619
+ 502: ErrorResponse;
11620
+ /**
11621
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers. If a hard budget cannot be checked, the response carries `error_type: budget_check_unavailable`, `denied_reason`, and `Retry-After`.
11622
+ */
11623
+ 503: ErrorResponse;
11624
+ };
11625
+ export type AgentLlmResponsesError = AgentLlmResponsesErrors[keyof AgentLlmResponsesErrors];
11626
+ export type AgentLlmResponsesResponses = {
11627
+ /**
11628
+ * The upstream response, streamed back chunk-by-chunk (Server-Sent Events for a streamed request).
11629
+ */
11630
+ 200: string;
11631
+ };
11632
+ export type AgentLlmResponsesResponse = AgentLlmResponsesResponses[keyof AgentLlmResponsesResponses];
11633
+ export type AgentLlmTracesData = {
10578
11634
  /**
10579
11635
  * An OTLP ExportTraceServiceRequest, optionally gzip-encoded (Content-Encoding gzip); at most 4 MiB encoded and decoded, and 4096 spans.
10580
11636
  */
@@ -10629,6 +11685,58 @@ export type AgentLlmTracesResponses = {
10629
11685
  200: Blob | File;
10630
11686
  };
10631
11687
  export type AgentLlmTracesResponse = AgentLlmTracesResponses[keyof AgentLlmTracesResponses];
11688
+ export type AgentPutModelPreferenceData = {
11689
+ body: AgentModelSelection;
11690
+ path?: never;
11691
+ query?: never;
11692
+ url: '/api/agent/model-preference';
11693
+ };
11694
+ export type AgentPutModelPreferenceErrors = {
11695
+ /**
11696
+ * The body is not a selection's send object (not JSON, a missing or malformed model_id, or an unknown key). An ingest refusal is ErrorResponse; the agent service's is AgentError.
11697
+ */
11698
+ 400: ErrorResponse | AgentError;
11699
+ /**
11700
+ * Unauthorized. An ingest refusal, such as the web session's, is ErrorResponse; the agent service's identity-header rejection is AgentError and carries `kind`.
11701
+ */
11702
+ 401: ErrorResponse | AgentError;
11703
+ /**
11704
+ * 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.
11705
+ */
11706
+ 403: ForbiddenError;
11707
+ /**
11708
+ * No model control: the caller is not enrolled in the agent-in-app-experience flag (ErrorResponse), or the agent service does not serve this route. Keep the previous selection.
11709
+ */
11710
+ 404: ErrorResponse | AgentError;
11711
+ /**
11712
+ * Request body over the route's 4 KiB cap.
11713
+ */
11714
+ 413: ErrorResponse;
11715
+ /**
11716
+ * Nothing was saved. `model_unavailable`: the selection is not one the caller may choose now (re-read the features and ask again). `model_selection_disabled`: selection is not enabled for the caller (re-read the features; the control disappears).
11717
+ */
11718
+ 422: AgentModelUnavailable | AgentModelSelectionDisabled;
11719
+ /**
11720
+ * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead)
11721
+ */
11722
+ 500: AgentError;
11723
+ /**
11724
+ * Agent service unavailable
11725
+ */
11726
+ 502: ErrorResponse;
11727
+ /**
11728
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), or the selections could not be read (retryable).
11729
+ */
11730
+ 503: ErrorResponse | AgentError;
11731
+ };
11732
+ export type AgentPutModelPreferenceError = AgentPutModelPreferenceErrors[keyof AgentPutModelPreferenceErrors];
11733
+ export type AgentPutModelPreferenceResponses = {
11734
+ /**
11735
+ * The committed selection.
11736
+ */
11737
+ 200: AgentModelSelectionSaved;
11738
+ };
11739
+ export type AgentPutModelPreferenceResponse = AgentPutModelPreferenceResponses[keyof AgentPutModelPreferenceResponses];
10632
11740
  export type AgentGetRunModeData = {
10633
11741
  body?: never;
10634
11742
  path?: never;
@@ -10870,8 +11978,82 @@ export type AgentDeleteSkillResponses = {
10870
11978
  204: void;
10871
11979
  };
10872
11980
  export type AgentDeleteSkillResponse = AgentDeleteSkillResponses[keyof AgentDeleteSkillResponses];
11981
+ export type AgentListBuiltinSkillsData = {
11982
+ body?: never;
11983
+ path?: never;
11984
+ query?: never;
11985
+ url: '/api/agent/skills/builtin';
11986
+ };
11987
+ export type AgentListBuiltinSkillsErrors = {
11988
+ /**
11989
+ * `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.
11990
+ */
11991
+ 400: ErrorResponse;
11992
+ /**
11993
+ * Unauthorized. An ingest refusal, such as the web session's, is ErrorResponse; the agent service's identity-header rejection is AgentError and carries `kind`.
11994
+ */
11995
+ 401: ErrorResponse | AgentError;
11996
+ /**
11997
+ * 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.
11998
+ */
11999
+ 403: ForbiddenError;
12000
+ /**
12001
+ * The caller is not enrolled in the cohort gate fronting the skill routes: the agent-skill-packs flag, or the agent-in-app-experience flag gating the whole /api/agent surface. Both default off and fail closed (a missing evaluation context resolves to false), and both answer 404 rather than 403 so the surface is invisible when off. Ingest-raised, so the body is the standard ErrorResponse shape.
12002
+ */
12003
+ 404: ErrorResponse;
12004
+ /**
12005
+ * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead)
12006
+ */
12007
+ 500: AgentError;
12008
+ /**
12009
+ * Agent service unavailable
12010
+ */
12011
+ 502: ErrorResponse;
12012
+ /**
12013
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), so ingest refuses rather than sending unverifiable identity headers.
12014
+ */
12015
+ 503: ErrorResponse;
12016
+ };
12017
+ export type AgentListBuiltinSkillsError = AgentListBuiltinSkillsErrors[keyof AgentListBuiltinSkillsErrors];
12018
+ export type AgentListBuiltinSkillsResponses = {
12019
+ /**
12020
+ * The skills the agent itself ships.
12021
+ */
12022
+ 200: AgentBuiltinSkillListResponse;
12023
+ };
12024
+ export type AgentListBuiltinSkillsResponse = AgentListBuiltinSkillsResponses[keyof AgentListBuiltinSkillsResponses];
10873
12025
  export type AgentListThreadsData = {
10874
12026
  body?: never;
12027
+ headers?: {
12028
+ /**
12029
+ * The project a request acts in. The operations that list it are the
12030
+ * ones that read it: they list workflows, runs or assets, create one,
12031
+ * export assets, clear the caller's queue or History, pick the
12032
+ * deployment a browser runs on, or serve the editor that deployment
12033
+ * (the node, extension and model lists). Absent means
12034
+ * the workspace's default project, which is how existing clients keep
12035
+ * working.
12036
+ *
12037
+ * An operation on one existing workflow, run or asset does not take
12038
+ * it: the row's own project decides. Any other operation that creates
12039
+ * a workflow, run or asset acts in the default project until it lists
12040
+ * this parameter.
12041
+ *
12042
+ * The project must be in the workspace the request resolves to. A
12043
+ * project that does not exist, or that the caller may not view, is 404
12044
+ * `not_found`; the two look the same. Where Projects is not enabled for
12045
+ * the workspace the header is ignored.
12046
+ *
12047
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12048
+ * project. Without the header such a request acts in the claimed
12049
+ * project; a header naming any other project, the default project
12050
+ * included, is 403 `permission_denied`, and so is any such request
12051
+ * where Projects is not enabled for the workspace. The refusal says the
12052
+ * token is bound to another project, not what the caller's role allows.
12053
+ *
12054
+ */
12055
+ 'X-Comfy-Project-ID'?: string;
12056
+ };
10875
12057
  path?: never;
10876
12058
  query?: {
10877
12059
  /**
@@ -10938,6 +12120,36 @@ export type AgentListThreadsResponses = {
10938
12120
  export type AgentListThreadsResponse = AgentListThreadsResponses[keyof AgentListThreadsResponses];
10939
12121
  export type AgentCreateThreadData = {
10940
12122
  body?: AgentThreadCreateRequest;
12123
+ headers?: {
12124
+ /**
12125
+ * The project a request acts in. The operations that list it are the
12126
+ * ones that read it: they list workflows, runs or assets, create one,
12127
+ * export assets, clear the caller's queue or History, pick the
12128
+ * deployment a browser runs on, or serve the editor that deployment
12129
+ * (the node, extension and model lists). Absent means
12130
+ * the workspace's default project, which is how existing clients keep
12131
+ * working.
12132
+ *
12133
+ * An operation on one existing workflow, run or asset does not take
12134
+ * it: the row's own project decides. Any other operation that creates
12135
+ * a workflow, run or asset acts in the default project until it lists
12136
+ * this parameter.
12137
+ *
12138
+ * The project must be in the workspace the request resolves to. A
12139
+ * project that does not exist, or that the caller may not view, is 404
12140
+ * `not_found`; the two look the same. Where Projects is not enabled for
12141
+ * the workspace the header is ignored.
12142
+ *
12143
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12144
+ * project. Without the header such a request acts in the claimed
12145
+ * project; a header naming any other project, the default project
12146
+ * included, is 403 `permission_denied`, and so is any such request
12147
+ * where Projects is not enabled for the workspace. The refusal says the
12148
+ * token is bound to another project, not what the caller's role allows.
12149
+ *
12150
+ */
12151
+ 'X-Comfy-Project-ID'?: string;
12152
+ };
10941
12153
  path?: never;
10942
12154
  query?: never;
10943
12155
  url: '/api/agent/threads';
@@ -10972,8 +12184,117 @@ export type AgentCreateThreadResponses = {
10972
12184
  201: AgentThreadCreated;
10973
12185
  };
10974
12186
  export type AgentCreateThreadResponse = AgentCreateThreadResponses[keyof AgentCreateThreadResponses];
12187
+ export type AgentDeleteThreadData = {
12188
+ body?: never;
12189
+ headers?: {
12190
+ /**
12191
+ * The project a request acts in. The operations that list it are the
12192
+ * ones that read it: they list workflows, runs or assets, create one,
12193
+ * export assets, clear the caller's queue or History, pick the
12194
+ * deployment a browser runs on, or serve the editor that deployment
12195
+ * (the node, extension and model lists). Absent means
12196
+ * the workspace's default project, which is how existing clients keep
12197
+ * working.
12198
+ *
12199
+ * An operation on one existing workflow, run or asset does not take
12200
+ * it: the row's own project decides. Any other operation that creates
12201
+ * a workflow, run or asset acts in the default project until it lists
12202
+ * this parameter.
12203
+ *
12204
+ * The project must be in the workspace the request resolves to. A
12205
+ * project that does not exist, or that the caller may not view, is 404
12206
+ * `not_found`; the two look the same. Where Projects is not enabled for
12207
+ * the workspace the header is ignored.
12208
+ *
12209
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12210
+ * project. Without the header such a request acts in the claimed
12211
+ * project; a header naming any other project, the default project
12212
+ * included, is 403 `permission_denied`, and so is any such request
12213
+ * where Projects is not enabled for the workspace. The refusal says the
12214
+ * token is bound to another project, not what the caller's role allows.
12215
+ *
12216
+ */
12217
+ 'X-Comfy-Project-ID'?: string;
12218
+ };
12219
+ path: {
12220
+ /**
12221
+ * Thread ID (canonical UUID).
12222
+ */
12223
+ id: string;
12224
+ };
12225
+ query?: never;
12226
+ url: '/api/agent/threads/{id}';
12227
+ };
12228
+ export type AgentDeleteThreadErrors = {
12229
+ /**
12230
+ * The thread ID is not a canonical UUID.
12231
+ */
12232
+ 400: ErrorResponse;
12233
+ /**
12234
+ * Unauthorized. An ingest refusal, such as the web session's, is ErrorResponse; the agent service's identity-header rejection is AgentError and carries `kind`.
12235
+ */
12236
+ 401: ErrorResponse | AgentError;
12237
+ /**
12238
+ * 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.
12239
+ */
12240
+ 403: ForbiddenError;
12241
+ /**
12242
+ * The caller holds no thread with that ID in this workspace and project (including repeat deletes), or the caller is not enrolled in the agent-in-app-experience feature flag (ingest-raised 404 uses ErrorResponse; agent-raised 404 uses AgentError).
12243
+ */
12244
+ 404: ErrorResponse | AgentError;
12245
+ /**
12246
+ * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead)
12247
+ */
12248
+ 500: AgentError;
12249
+ /**
12250
+ * Agent service unavailable
12251
+ */
12252
+ 502: ErrorResponse;
12253
+ /**
12254
+ * Either the active turn's cancellation request did not land or could not be confirmed (`AgentCancelUnconfirmed` with `Retry-After` — the thread was not deleted and retrying is safe), or the agent proxy is not configured to forward safely (`ErrorResponse`).
12255
+ */
12256
+ 503: ErrorResponse | AgentCancelUnconfirmed;
12257
+ };
12258
+ export type AgentDeleteThreadError = AgentDeleteThreadErrors[keyof AgentDeleteThreadErrors];
12259
+ export type AgentDeleteThreadResponses = {
12260
+ /**
12261
+ * The thread was deleted.
12262
+ */
12263
+ 204: void;
12264
+ };
12265
+ export type AgentDeleteThreadResponse = AgentDeleteThreadResponses[keyof AgentDeleteThreadResponses];
10975
12266
  export type AgentAnswerAskData = {
10976
12267
  body: AgentAnswerRequest;
12268
+ headers?: {
12269
+ /**
12270
+ * The project a request acts in. The operations that list it are the
12271
+ * ones that read it: they list workflows, runs or assets, create one,
12272
+ * export assets, clear the caller's queue or History, pick the
12273
+ * deployment a browser runs on, or serve the editor that deployment
12274
+ * (the node, extension and model lists). Absent means
12275
+ * the workspace's default project, which is how existing clients keep
12276
+ * working.
12277
+ *
12278
+ * An operation on one existing workflow, run or asset does not take
12279
+ * it: the row's own project decides. Any other operation that creates
12280
+ * a workflow, run or asset acts in the default project until it lists
12281
+ * this parameter.
12282
+ *
12283
+ * The project must be in the workspace the request resolves to. A
12284
+ * project that does not exist, or that the caller may not view, is 404
12285
+ * `not_found`; the two look the same. Where Projects is not enabled for
12286
+ * the workspace the header is ignored.
12287
+ *
12288
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12289
+ * project. Without the header such a request acts in the claimed
12290
+ * project; a header naming any other project, the default project
12291
+ * included, is 403 `permission_denied`, and so is any such request
12292
+ * where Projects is not enabled for the workspace. The refusal says the
12293
+ * token is bound to another project, not what the caller's role allows.
12294
+ *
12295
+ */
12296
+ 'X-Comfy-Project-ID'?: string;
12297
+ };
10977
12298
  path: {
10978
12299
  /**
10979
12300
  * Thread ID
@@ -11042,6 +12363,36 @@ export type AgentAnswerAskResponses = {
11042
12363
  export type AgentAnswerAskResponse = AgentAnswerAskResponses[keyof AgentAnswerAskResponses];
11043
12364
  export type AgentGetMessagesData = {
11044
12365
  body?: never;
12366
+ headers?: {
12367
+ /**
12368
+ * The project a request acts in. The operations that list it are the
12369
+ * ones that read it: they list workflows, runs or assets, create one,
12370
+ * export assets, clear the caller's queue or History, pick the
12371
+ * deployment a browser runs on, or serve the editor that deployment
12372
+ * (the node, extension and model lists). Absent means
12373
+ * the workspace's default project, which is how existing clients keep
12374
+ * working.
12375
+ *
12376
+ * An operation on one existing workflow, run or asset does not take
12377
+ * it: the row's own project decides. Any other operation that creates
12378
+ * a workflow, run or asset acts in the default project until it lists
12379
+ * this parameter.
12380
+ *
12381
+ * The project must be in the workspace the request resolves to. A
12382
+ * project that does not exist, or that the caller may not view, is 404
12383
+ * `not_found`; the two look the same. Where Projects is not enabled for
12384
+ * the workspace the header is ignored.
12385
+ *
12386
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12387
+ * project. Without the header such a request acts in the claimed
12388
+ * project; a header naming any other project, the default project
12389
+ * included, is 403 `permission_denied`, and so is any such request
12390
+ * where Projects is not enabled for the workspace. The refusal says the
12391
+ * token is bound to another project, not what the caller's role allows.
12392
+ *
12393
+ */
12394
+ 'X-Comfy-Project-ID'?: string;
12395
+ };
11045
12396
  path: {
11046
12397
  /**
11047
12398
  * Thread ID
@@ -11087,6 +12438,36 @@ export type AgentGetMessagesResponses = {
11087
12438
  export type AgentGetMessagesResponse = AgentGetMessagesResponses[keyof AgentGetMessagesResponses];
11088
12439
  export type AgentPostMessageData = {
11089
12440
  body: AgentPostMessageRequest;
12441
+ headers?: {
12442
+ /**
12443
+ * The project a request acts in. The operations that list it are the
12444
+ * ones that read it: they list workflows, runs or assets, create one,
12445
+ * export assets, clear the caller's queue or History, pick the
12446
+ * deployment a browser runs on, or serve the editor that deployment
12447
+ * (the node, extension and model lists). Absent means
12448
+ * the workspace's default project, which is how existing clients keep
12449
+ * working.
12450
+ *
12451
+ * An operation on one existing workflow, run or asset does not take
12452
+ * it: the row's own project decides. Any other operation that creates
12453
+ * a workflow, run or asset acts in the default project until it lists
12454
+ * this parameter.
12455
+ *
12456
+ * The project must be in the workspace the request resolves to. A
12457
+ * project that does not exist, or that the caller may not view, is 404
12458
+ * `not_found`; the two look the same. Where Projects is not enabled for
12459
+ * the workspace the header is ignored.
12460
+ *
12461
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12462
+ * project. Without the header such a request acts in the claimed
12463
+ * project; a header naming any other project, the default project
12464
+ * included, is 403 `permission_denied`, and so is any such request
12465
+ * where Projects is not enabled for the workspace. The refusal says the
12466
+ * token is bound to another project, not what the caller's role allows.
12467
+ *
12468
+ */
12469
+ 'X-Comfy-Project-ID'?: string;
12470
+ };
11090
12471
  path: {
11091
12472
  /**
11092
12473
  * Thread ID. Use the literal "new" to open a fresh thread in the same call.
@@ -11114,7 +12495,7 @@ export type AgentPostMessageErrors = {
11114
12495
  */
11115
12496
  403: ErrorResponse | AgentError;
11116
12497
  /**
11117
- * The selected model is unavailable, or one or more attachments name a file type the agent does not accept. A model refusal writes no thread or message row and does not substitute another model. An attachment refusal names the offending references and carries the full accepted policy, so the client can explain the refusal without hardcoding the list.
12498
+ * The selected model is unavailable (including an `option_id` that is not one of the caller's selections, and the role name `title`), or one or more attachments name a file type the agent does not accept. A model refusal writes no thread or message row and does not substitute another model. An attachment refusal names the offending references and carries the full accepted policy, so the client can explain the refusal without hardcoding the list.
11118
12499
  */
11119
12500
  422: AgentAttachmentError | AgentModelUnavailable;
11120
12501
  /**
@@ -11130,9 +12511,9 @@ export type AgentPostMessageErrors = {
11130
12511
  */
11131
12512
  502: ErrorResponse;
11132
12513
  /**
11133
- * The workspace's billing status could not be checked right now (a temporary outage, not a payment problem). Retry the request after the delay given in the Retry-After header.
12514
+ * Temporarily unable to start the turn. A billing-status outage returns AgentAdmissionError with Retry-After. The agent returns AgentError when it is shutting down or cannot read a recorded thread's model configuration, including a missing features route. These agent refusals write no message and start no turn; retry without changing the recorded model.
11134
12515
  */
11135
- 503: AgentAdmissionError;
12516
+ 503: AgentAdmissionError | AgentError;
11136
12517
  };
11137
12518
  export type AgentPostMessageError = AgentPostMessageErrors[keyof AgentPostMessageErrors];
11138
12519
  export type AgentPostMessageResponses = {
@@ -11144,6 +12525,36 @@ export type AgentPostMessageResponses = {
11144
12525
  export type AgentPostMessageResponse = AgentPostMessageResponses[keyof AgentPostMessageResponses];
11145
12526
  export type AgentCancelMessageData = {
11146
12527
  body?: never;
12528
+ headers?: {
12529
+ /**
12530
+ * The project a request acts in. The operations that list it are the
12531
+ * ones that read it: they list workflows, runs or assets, create one,
12532
+ * export assets, clear the caller's queue or History, pick the
12533
+ * deployment a browser runs on, or serve the editor that deployment
12534
+ * (the node, extension and model lists). Absent means
12535
+ * the workspace's default project, which is how existing clients keep
12536
+ * working.
12537
+ *
12538
+ * An operation on one existing workflow, run or asset does not take
12539
+ * it: the row's own project decides. Any other operation that creates
12540
+ * a workflow, run or asset acts in the default project until it lists
12541
+ * this parameter.
12542
+ *
12543
+ * The project must be in the workspace the request resolves to. A
12544
+ * project that does not exist, or that the caller may not view, is 404
12545
+ * `not_found`; the two look the same. Where Projects is not enabled for
12546
+ * the workspace the header is ignored.
12547
+ *
12548
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12549
+ * project. Without the header such a request acts in the claimed
12550
+ * project; a header naming any other project, the default project
12551
+ * included, is 403 `permission_denied`, and so is any such request
12552
+ * where Projects is not enabled for the workspace. The refusal says the
12553
+ * token is bound to another project, not what the caller's role allows.
12554
+ *
12555
+ */
12556
+ 'X-Comfy-Project-ID'?: string;
12557
+ };
11147
12558
  path: {
11148
12559
  /**
11149
12560
  * Thread ID
@@ -11203,6 +12614,93 @@ export type AgentCancelMessageResponses = {
11203
12614
  202: AgentCancelAccepted;
11204
12615
  };
11205
12616
  export type AgentCancelMessageResponse = AgentCancelMessageResponses[keyof AgentCancelMessageResponses];
12617
+ export type AgentPutThreadModelSelectionData = {
12618
+ body: AgentModelSelection;
12619
+ headers?: {
12620
+ /**
12621
+ * The project a request acts in. The operations that list it are the
12622
+ * ones that read it: they list workflows, runs or assets, create one,
12623
+ * export assets, clear the caller's queue or History, pick the
12624
+ * deployment a browser runs on, or serve the editor that deployment
12625
+ * (the node, extension and model lists). Absent means
12626
+ * the workspace's default project, which is how existing clients keep
12627
+ * working.
12628
+ *
12629
+ * An operation on one existing workflow, run or asset does not take
12630
+ * it: the row's own project decides. Any other operation that creates
12631
+ * a workflow, run or asset acts in the default project until it lists
12632
+ * this parameter.
12633
+ *
12634
+ * The project must be in the workspace the request resolves to. A
12635
+ * project that does not exist, or that the caller may not view, is 404
12636
+ * `not_found`; the two look the same. Where Projects is not enabled for
12637
+ * the workspace the header is ignored.
12638
+ *
12639
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12640
+ * project. Without the header such a request acts in the claimed
12641
+ * project; a header naming any other project, the default project
12642
+ * included, is 403 `permission_denied`, and so is any such request
12643
+ * where Projects is not enabled for the workspace. The refusal says the
12644
+ * token is bound to another project, not what the caller's role allows.
12645
+ *
12646
+ */
12647
+ 'X-Comfy-Project-ID'?: string;
12648
+ };
12649
+ path: {
12650
+ /**
12651
+ * Thread ID, a canonical UUID.
12652
+ */
12653
+ id: string;
12654
+ };
12655
+ query?: never;
12656
+ url: '/api/agent/threads/{id}/model-selection';
12657
+ };
12658
+ export type AgentPutThreadModelSelectionErrors = {
12659
+ /**
12660
+ * The thread id is not a canonical UUID, or the body is not a selection's send object. An ingest refusal is ErrorResponse; the agent service's is AgentError.
12661
+ */
12662
+ 400: ErrorResponse | AgentError;
12663
+ /**
12664
+ * Unauthorized. An ingest refusal, such as the web session's, is ErrorResponse; the agent service's identity-header rejection is AgentError and carries `kind`.
12665
+ */
12666
+ 401: ErrorResponse | AgentError;
12667
+ /**
12668
+ * 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.
12669
+ */
12670
+ 403: ForbiddenError;
12671
+ /**
12672
+ * No model control: the caller is not enrolled in the agent-in-app-experience flag (ErrorResponse), or the agent service does not serve this route; or no such thread of the caller's in this project.
12673
+ */
12674
+ 404: ErrorResponse | AgentError;
12675
+ /**
12676
+ * Request body over the route's 4 KiB cap.
12677
+ */
12678
+ 413: ErrorResponse;
12679
+ /**
12680
+ * Nothing was saved. `model_unavailable`: the selection is not one the caller may choose now (re-read the features and ask again). `model_selection_disabled`: selection is not enabled for the caller (re-read the features; the control disappears).
12681
+ */
12682
+ 422: AgentModelUnavailable | AgentModelSelectionDisabled;
12683
+ /**
12684
+ * Internal server error (ingest-raised failures use the standard ErrorResponse shape instead)
12685
+ */
12686
+ 500: AgentError;
12687
+ /**
12688
+ * Agent service unavailable
12689
+ */
12690
+ 502: ErrorResponse;
12691
+ /**
12692
+ * The agent proxy is not configured to forward safely (a non-local agent service URL with no shared machine-to-machine secret), or the selections could not be read (retryable).
12693
+ */
12694
+ 503: ErrorResponse | AgentError;
12695
+ };
12696
+ export type AgentPutThreadModelSelectionError = AgentPutThreadModelSelectionErrors[keyof AgentPutThreadModelSelectionErrors];
12697
+ export type AgentPutThreadModelSelectionResponses = {
12698
+ /**
12699
+ * The committed selection.
12700
+ */
12701
+ 200: AgentModelSelectionSaved;
12702
+ };
12703
+ export type AgentPutThreadModelSelectionResponse = AgentPutThreadModelSelectionResponses[keyof AgentPutThreadModelSelectionResponses];
11206
12704
  export type AgentGetUsageStatusData = {
11207
12705
  body?: never;
11208
12706
  path?: never;
@@ -11252,9 +12750,12 @@ export type ListAssetsData = {
11252
12750
  headers?: {
11253
12751
  /**
11254
12752
  * 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.
12753
+ * ones that read it: they list workflows, runs or assets, create one,
12754
+ * export assets, clear the caller's queue or History, pick the
12755
+ * deployment a browser runs on, or serve the editor that deployment
12756
+ * (the node, extension and model lists). Absent means
12757
+ * the workspace's default project, which is how existing clients keep
12758
+ * working.
11258
12759
  *
11259
12760
  * An operation on one existing workflow, run or asset does not take
11260
12761
  * it: the row's own project decides. Any other operation that creates
@@ -11266,6 +12767,13 @@ export type ListAssetsData = {
11266
12767
  * `not_found`; the two look the same. Where Projects is not enabled for
11267
12768
  * the workspace the header is ignored.
11268
12769
  *
12770
+ * A Cloud JWT that carries a `project_id` claim acts only in that
12771
+ * project. Without the header such a request acts in the claimed
12772
+ * project; a header naming any other project, the default project
12773
+ * included, is 403 `permission_denied`, and so is any such request
12774
+ * where Projects is not enabled for the workspace. The refusal says the
12775
+ * token is bound to another project, not what the caller's role allows.
12776
+ *
11269
12777
  */
11270
12778
  'X-Comfy-Project-ID'?: string;
11271
12779
  };
@@ -11355,8 +12863,14 @@ export type ListAssetsData = {
11355
12863
  * List the workspace's model library: every member's private model
11356
12864
  * rows in this workspace, not only the caller's, and none of the
11357
12865
  * public catalog. A browser that runs on a picked deployment gets the
11358
- * whole library, not only the Release's models, so its loader
11359
- * dropdowns can offer a model the deployment downloads for the job.
12866
+ * library, not only the Release's models, so its loader dropdowns can
12867
+ * offer a model the deployment downloads for the job. Every library
12868
+ * row is listed, whatever the Release's model policy says. For a
12869
+ * browser bound to a deployment (its own pick or the workspace
12870
+ * default), each row that policy blocks carries
12871
+ * `blocked_by_model_policy: true`, so a client can show it as blocked
12872
+ * rather than leave it out; a Run that names it is refused. A policy
12873
+ * that cannot be read marks no row.
11360
12874
  * Needs `models` among the tags (`tags_all` or `include_tags`), else
11361
12875
  * 400 `INVALID_TAG_FILTER`. Honoured only while the
11362
12876
  * `runtime_library_models_enabled` flag is on for the caller;
@@ -11474,9 +12988,12 @@ export type CreateAssetData = {
11474
12988
  headers?: {
11475
12989
  /**
11476
12990
  * 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.
12991
+ * ones that read it: they list workflows, runs or assets, create one,
12992
+ * export assets, clear the caller's queue or History, pick the
12993
+ * deployment a browser runs on, or serve the editor that deployment
12994
+ * (the node, extension and model lists). Absent means
12995
+ * the workspace's default project, which is how existing clients keep
12996
+ * working.
11480
12997
  *
11481
12998
  * An operation on one existing workflow, run or asset does not take
11482
12999
  * it: the row's own project decides. Any other operation that creates
@@ -11488,6 +13005,13 @@ export type CreateAssetData = {
11488
13005
  * `not_found`; the two look the same. Where Projects is not enabled for
11489
13006
  * the workspace the header is ignored.
11490
13007
  *
13008
+ * A Cloud JWT that carries a `project_id` claim acts only in that
13009
+ * project. Without the header such a request acts in the claimed
13010
+ * project; a header naming any other project, the default project
13011
+ * included, is 403 `permission_denied`, and so is any such request
13012
+ * where Projects is not enabled for the workspace. The refusal says the
13013
+ * token is bound to another project, not what the caller's role allows.
13014
+ *
11491
13015
  */
11492
13016
  'X-Comfy-Project-ID'?: string;
11493
13017
  };
@@ -11738,6 +13262,10 @@ export type GetAssetContentErrors = {
11738
13262
  * Internal server error
11739
13263
  */
11740
13264
  500: ErrorResponse;
13265
+ /**
13266
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
13267
+ */
13268
+ 503: ErrorResponse;
11741
13269
  };
11742
13270
  export type GetAssetContentError = GetAssetContentErrors[keyof GetAssetContentErrors];
11743
13271
  export type GetAssetContentResponses = {
@@ -11943,6 +13471,36 @@ export type CreateAssetExportData = {
11943
13471
  */
11944
13472
  naming_strategy?: 'group_by_job_id' | 'preserve' | 'asset_id' | 'group_by_job_time';
11945
13473
  };
13474
+ headers?: {
13475
+ /**
13476
+ * The project a request acts in. The operations that list it are the
13477
+ * ones that read it: they list workflows, runs or assets, create one,
13478
+ * export assets, clear the caller's queue or History, pick the
13479
+ * deployment a browser runs on, or serve the editor that deployment
13480
+ * (the node, extension and model lists). Absent means
13481
+ * the workspace's default project, which is how existing clients keep
13482
+ * working.
13483
+ *
13484
+ * An operation on one existing workflow, run or asset does not take
13485
+ * it: the row's own project decides. Any other operation that creates
13486
+ * a workflow, run or asset acts in the default project until it lists
13487
+ * this parameter.
13488
+ *
13489
+ * The project must be in the workspace the request resolves to. A
13490
+ * project that does not exist, or that the caller may not view, is 404
13491
+ * `not_found`; the two look the same. Where Projects is not enabled for
13492
+ * the workspace the header is ignored.
13493
+ *
13494
+ * A Cloud JWT that carries a `project_id` claim acts only in that
13495
+ * project. Without the header such a request acts in the claimed
13496
+ * project; a header naming any other project, the default project
13497
+ * included, is 403 `permission_denied`, and so is any such request
13498
+ * where Projects is not enabled for the workspace. The refusal says the
13499
+ * token is bound to another project, not what the caller's role allows.
13500
+ *
13501
+ */
13502
+ 'X-Comfy-Project-ID'?: string;
13503
+ };
11946
13504
  path?: never;
11947
13505
  query?: never;
11948
13506
  url: '/api/assets/export';
@@ -12042,9 +13600,12 @@ export type CreateAssetFromHashData = {
12042
13600
  headers?: {
12043
13601
  /**
12044
13602
  * 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.
13603
+ * ones that read it: they list workflows, runs or assets, create one,
13604
+ * export assets, clear the caller's queue or History, pick the
13605
+ * deployment a browser runs on, or serve the editor that deployment
13606
+ * (the node, extension and model lists). Absent means
13607
+ * the workspace's default project, which is how existing clients keep
13608
+ * working.
12048
13609
  *
12049
13610
  * An operation on one existing workflow, run or asset does not take
12050
13611
  * it: the row's own project decides. Any other operation that creates
@@ -12056,6 +13617,13 @@ export type CreateAssetFromHashData = {
12056
13617
  * `not_found`; the two look the same. Where Projects is not enabled for
12057
13618
  * the workspace the header is ignored.
12058
13619
  *
13620
+ * A Cloud JWT that carries a `project_id` claim acts only in that
13621
+ * project. Without the header such a request acts in the claimed
13622
+ * project; a header naming any other project, the default project
13623
+ * included, is 403 `permission_denied`, and so is any such request
13624
+ * where Projects is not enabled for the workspace. The refusal says the
13625
+ * token is bound to another project, not what the caller's role allows.
13626
+ *
12059
13627
  */
12060
13628
  'X-Comfy-Project-ID'?: string;
12061
13629
  };
@@ -12713,6 +14281,38 @@ export type RedeemDesktopLoginCodeResponses = {
12713
14281
  200: DesktopLoginCodeRedeemResponse;
12714
14282
  };
12715
14283
  export type RedeemDesktopLoginCodeResponse = RedeemDesktopLoginCodeResponses[keyof RedeemDesktopLoginCodeResponses];
14284
+ export type CreateDesktopWebSessionData = {
14285
+ body?: never;
14286
+ path?: never;
14287
+ query?: never;
14288
+ url: '/api/auth/desktop-web-session';
14289
+ };
14290
+ export type CreateDesktopWebSessionErrors = {
14291
+ /**
14292
+ * `INVALID_CREDENTIAL`, or `oauth_grant_ended`: the grant was signed out
14293
+ */
14294
+ 401: ErrorResponse;
14295
+ /**
14296
+ * `auth_type_not_allowed` (not an OAuth access token, or a token derived from one; answered by the auth policy), `CREDENTIAL_UNSUPPORTED` (not the Desktop grant's own access token), `insufficient_scope` (no `comfy-cloud:web-session:mint`), or `web_session_unavailable` (an SSO sign-in, or no single enabled Firebase account)
14297
+ */
14298
+ 403: ErrorResponse;
14299
+ /**
14300
+ * Too many web sessions issued to this user, or too many refused, in the current clock hour
14301
+ */
14302
+ 429: ErrorResponse;
14303
+ /**
14304
+ * `desktop_web_session_disabled` (not switched on), or `SERVICE_UNAVAILABLE` (Firebase could not be reached)
14305
+ */
14306
+ 503: ErrorResponse;
14307
+ };
14308
+ export type CreateDesktopWebSessionError = CreateDesktopWebSessionErrors[keyof CreateDesktopWebSessionErrors];
14309
+ export type CreateDesktopWebSessionResponses = {
14310
+ /**
14311
+ * Custom token minted
14312
+ */
14313
+ 200: DesktopWebSessionResponse;
14314
+ };
14315
+ export type CreateDesktopWebSessionResponse = CreateDesktopWebSessionResponses[keyof CreateDesktopWebSessionResponses];
12716
14316
  export type CreateBillingHandoffData = {
12717
14317
  body: BillingHandoffCreateRequest;
12718
14318
  path?: never;
@@ -13340,8 +14940,8 @@ export type CreateBillingBudgetErrors = {
13340
14940
  404: ErrorResponse;
13341
14941
  /**
13342
14942
  * `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).
14943
+ * `no_billing_period` (`repeat: current_period` when the budget period
14944
+ * cannot be resolved).
13345
14945
  *
13346
14946
  */
13347
14947
  409: ErrorResponse;
@@ -13453,7 +15053,7 @@ export type UpdateBillingBudgetErrors = {
13453
15053
  */
13454
15054
  404: ErrorResponse;
13455
15055
  /**
13456
- * `no_billing_period`: `repeat: current_period` on a workspace with no open paid subscription term.
15056
+ * `no_billing_period`: `repeat: current_period` when the budget period cannot be resolved.
13457
15057
  */
13458
15058
  409: ErrorResponse;
13459
15059
  /**
@@ -13518,6 +15118,38 @@ export type GetBillingBudgetHistoryResponses = {
13518
15118
  200: BudgetHistory;
13519
15119
  };
13520
15120
  export type GetBillingBudgetHistoryResponse = GetBillingBudgetHistoryResponses[keyof GetBillingBudgetHistoryResponses];
15121
+ export type ResumeHeldBudgetJobsData = {
15122
+ body?: BudgetHeldJobsResumeRequest;
15123
+ path?: never;
15124
+ query?: never;
15125
+ url: '/api/billing/budgets/held-jobs/resume';
15126
+ };
15127
+ export type ResumeHeldBudgetJobsErrors = {
15128
+ /**
15129
+ * `INVALID_REQUEST`: the body is not valid, or `job_ids` holds more than 100 ids.
15130
+ */
15131
+ 400: ErrorResponse;
15132
+ /**
15133
+ * Unauthorized
15134
+ */
15135
+ 401: ErrorResponse;
15136
+ /**
15137
+ * 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.
15138
+ */
15139
+ 403: ForbiddenError;
15140
+ /**
15141
+ * Internal server error
15142
+ */
15143
+ 500: ErrorResponse;
15144
+ };
15145
+ export type ResumeHeldBudgetJobsError = ResumeHeldBudgetJobsErrors[keyof ResumeHeldBudgetJobsErrors];
15146
+ export type ResumeHeldBudgetJobsResponses = {
15147
+ /**
15148
+ * What happened to each selected job.
15149
+ */
15150
+ 200: BudgetHeldJobsResumeResult;
15151
+ };
15152
+ export type ResumeHeldBudgetJobsResponse = ResumeHeldBudgetJobsResponses[keyof ResumeHeldBudgetJobsResponses];
13521
15153
  export type GetBillingCapabilitiesData = {
13522
15154
  body?: never;
13523
15155
  path?: never;
@@ -13986,6 +15618,30 @@ export type PreviewSubscribeResponses = {
13986
15618
  200: PreviewSubscribeResponse;
13987
15619
  };
13988
15620
  export type PreviewSubscribeResponse2 = PreviewSubscribeResponses[keyof PreviewSubscribeResponses];
15621
+ export type GetBillingPromotionData = {
15622
+ body?: never;
15623
+ path?: never;
15624
+ query?: never;
15625
+ url: '/api/billing/promotion';
15626
+ };
15627
+ export type GetBillingPromotionErrors = {
15628
+ /**
15629
+ * `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.
15630
+ */
15631
+ 400: ErrorResponse;
15632
+ /**
15633
+ * `code` is `workspace_access_denied`: the selected workspace is unknown, deleted, or the user is not a member; the three look the same. This route also serves anonymous callers, so the session's other refusals fall back to an anonymous request. See the `WebSessionAuth` scheme.
15634
+ */
15635
+ 403: ErrorResponse;
15636
+ };
15637
+ export type GetBillingPromotionError = GetBillingPromotionErrors[keyof GetBillingPromotionErrors];
15638
+ export type GetBillingPromotionResponses = {
15639
+ /**
15640
+ * The promotion running right now, or null
15641
+ */
15642
+ 200: BillingPromotionResponse;
15643
+ };
15644
+ export type GetBillingPromotionResponse = GetBillingPromotionResponses[keyof GetBillingPromotionResponses];
13989
15645
  export type AcceptRetentionOfferData = {
13990
15646
  body: RetentionAcceptRequest;
13991
15647
  path?: never;
@@ -14308,6 +15964,10 @@ export type CreateTopupErrors = {
14308
15964
  * Internal server error
14309
15965
  */
14310
15966
  500: ErrorResponse;
15967
+ /**
15968
+ * `BILLING_SERVICE_ERROR`: billing could not decide the top-up right now (for example, the workspace's top-up limit could not be read); no billing operation was created. Retry after `Retry-After`.
15969
+ */
15970
+ 503: ErrorResponse;
14311
15971
  };
14312
15972
  export type CreateTopupError = CreateTopupErrors[keyof CreateTopupErrors];
14313
15973
  export type CreateTopupResponses = {
@@ -14628,6 +16288,10 @@ export type CreateTopupQuoteErrors = {
14628
16288
  * Internal server error
14629
16289
  */
14630
16290
  500: ErrorResponse;
16291
+ /**
16292
+ * `BILLING_SERVICE_ERROR`: billing could not quote right now (for example, the workspace's top-up limit could not be read). Retry after `Retry-After`.
16293
+ */
16294
+ 503: ErrorResponse;
14631
16295
  };
14632
16296
  export type CreateTopupQuoteError = CreateTopupQuoteErrors[keyof CreateTopupQuoteErrors];
14633
16297
  export type CreateTopupQuoteResponses = {
@@ -14655,7 +16319,8 @@ export type GetBillingUsageTimeSeriesData = {
14655
16319
  * `not_available` set. For every workspace `product_line` and
14656
16320
  * `model` are read from the ledger when the range starts on or
14657
16321
  * after the environment's ledger start, and from the invoice otherwise; a model the
14658
- * ledger has no name for is `unspecified`. Under Serverless the model
16322
+ * ledger has no name for is `unspecified/<api_name>` when its charges
16323
+ * name their partner and `unspecified` otherwise. Under Serverless the model
14659
16324
  * level is the deployment: `<deployment id>` for its GPU time and
14660
16325
  * `<deployment id>/storage` for its storage, each with a
14661
16326
  * `group_labels` entry naming the deployment and the `cost_kind`. Group keys for
@@ -14682,7 +16347,7 @@ export type GetBillingUsageTimeSeriesData = {
14682
16347
  */
14683
16348
  filter_product_line?: string;
14684
16349
  /**
14685
- * Keep only spend on this model (a key the `model` grouping returns, `unspecified` for none). See `filter_product_line`.
16350
+ * Keep only spend on this model (a key the `model` grouping returns, `unspecified/<api_name>` or `unspecified` for none). See `filter_product_line`.
14686
16351
  */
14687
16352
  filter_model?: string;
14688
16353
  /**
@@ -14693,6 +16358,35 @@ export type GetBillingUsageTimeSeriesData = {
14693
16358
  * Keep only spend from this source (a key the `source` grouping returns, or `unattributed`), or every source of one kind (`api_key` for every API key, `deployment` for every deployment). See `filter_product_line`.
14694
16359
  */
14695
16360
  filter_source?: string;
16361
+ /**
16362
+ * Keep one project's usage: a project id (`p-<uuid>`), `default` for
16363
+ * the workspace's default project (its own id reads as `default`), or
16364
+ * `unallocated` for deployment spend that no project's deployments
16365
+ * account for. Read only in a team workspace where Projects is on;
16366
+ * elsewhere it is ignored and the answer is the workspace's.
16367
+ *
16368
+ * A project read is served from the usage ledger only, for the
16369
+ * `product_line`, `model`, `person` and `source` groupings of a
16370
+ * workspace enabled for usage attribution; any other read answers an
16371
+ * empty series with `not_available` reason `filter_needs_ledger`.
16372
+ * Deployment spend is placed by the project's deployments, which the
16373
+ * server lists from the deployment service, deleted ones included.
16374
+ * Where it cannot list them, or the list is over 1,000, the answer is
16375
+ * an empty series with `not_available` reason
16376
+ * `deployments_unavailable` or `too_many_deployments`, never a
16377
+ * partial number.
16378
+ *
16379
+ * Owners and Workspace admins may read any project and
16380
+ * `unallocated`. A Project admin reads their project whole. Anyone
16381
+ * else reads only their own rows in the project. `unallocated` is
16382
+ * refused (403 `permission_denied`) to anyone but an owner or
16383
+ * Workspace admin; offer it only when GET /api/billing/capabilities
16384
+ * answers `can_view_unallocated_usage` true. A project id that is malformed is 400
16385
+ * `project_id_invalid`; one that is not in the workspace, or that the
16386
+ * caller may not view, is 404 `not_found`.
16387
+ *
16388
+ */
16389
+ project?: string;
14696
16390
  granularity?: 'hour' | 'day' | 'month';
14697
16391
  starting_on?: string;
14698
16392
  ending_before?: string;
@@ -14702,7 +16396,7 @@ export type GetBillingUsageTimeSeriesData = {
14702
16396
  };
14703
16397
  export type GetBillingUsageTimeSeriesErrors = {
14704
16398
  /**
14705
- * Invalid time range or filter value
16399
+ * Invalid time range, filter value or project id
14706
16400
  */
14707
16401
  400: ErrorResponse;
14708
16402
  /**
@@ -14713,6 +16407,10 @@ export type GetBillingUsageTimeSeriesErrors = {
14713
16407
  * 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.
14714
16408
  */
14715
16409
  403: ForbiddenError;
16410
+ /**
16411
+ * The project `project` names is not in the workspace, or the caller may not view it (`not_found`)
16412
+ */
16413
+ 404: ErrorResponse;
14716
16414
  /**
14717
16415
  * Upstream or internal error
14718
16416
  */
@@ -14893,6 +16591,36 @@ export type GetEmbeddingsResponses = {
14893
16591
  export type GetEmbeddingsResponse = GetEmbeddingsResponses[keyof GetEmbeddingsResponses];
14894
16592
  export type GetModelFoldersData = {
14895
16593
  body?: never;
16594
+ headers?: {
16595
+ /**
16596
+ * The project a request acts in. The operations that list it are the
16597
+ * ones that read it: they list workflows, runs or assets, create one,
16598
+ * export assets, clear the caller's queue or History, pick the
16599
+ * deployment a browser runs on, or serve the editor that deployment
16600
+ * (the node, extension and model lists). Absent means
16601
+ * the workspace's default project, which is how existing clients keep
16602
+ * working.
16603
+ *
16604
+ * An operation on one existing workflow, run or asset does not take
16605
+ * it: the row's own project decides. Any other operation that creates
16606
+ * a workflow, run or asset acts in the default project until it lists
16607
+ * this parameter.
16608
+ *
16609
+ * The project must be in the workspace the request resolves to. A
16610
+ * project that does not exist, or that the caller may not view, is 404
16611
+ * `not_found`; the two look the same. Where Projects is not enabled for
16612
+ * the workspace the header is ignored.
16613
+ *
16614
+ * A Cloud JWT that carries a `project_id` claim acts only in that
16615
+ * project. Without the header such a request acts in the claimed
16616
+ * project; a header naming any other project, the default project
16617
+ * included, is 403 `permission_denied`, and so is any such request
16618
+ * where Projects is not enabled for the workspace. The refusal says the
16619
+ * token is bound to another project, not what the caller's role allows.
16620
+ *
16621
+ */
16622
+ 'X-Comfy-Project-ID'?: string;
16623
+ };
14896
16624
  path?: never;
14897
16625
  query?: never;
14898
16626
  url: '/api/experiment/models';
@@ -14906,6 +16634,10 @@ export type GetModelFoldersErrors = {
14906
16634
  * `code` is `workspace_access_denied`: the selected workspace is unknown, deleted, or the user is not a member; the three look the same. This route also serves anonymous callers, so the session's other refusals fall back to an anonymous request. See the `WebSessionAuth` scheme.
14907
16635
  */
14908
16636
  403: ErrorResponse;
16637
+ /**
16638
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
16639
+ */
16640
+ 404: ErrorResponse;
14909
16641
  /**
14910
16642
  * Internal server error
14911
16643
  */
@@ -14921,6 +16653,36 @@ export type GetModelFoldersResponses = {
14921
16653
  export type GetModelFoldersResponse = GetModelFoldersResponses[keyof GetModelFoldersResponses];
14922
16654
  export type GetModelsInFolderData = {
14923
16655
  body?: never;
16656
+ headers?: {
16657
+ /**
16658
+ * The project a request acts in. The operations that list it are the
16659
+ * ones that read it: they list workflows, runs or assets, create one,
16660
+ * export assets, clear the caller's queue or History, pick the
16661
+ * deployment a browser runs on, or serve the editor that deployment
16662
+ * (the node, extension and model lists). Absent means
16663
+ * the workspace's default project, which is how existing clients keep
16664
+ * working.
16665
+ *
16666
+ * An operation on one existing workflow, run or asset does not take
16667
+ * it: the row's own project decides. Any other operation that creates
16668
+ * a workflow, run or asset acts in the default project until it lists
16669
+ * this parameter.
16670
+ *
16671
+ * The project must be in the workspace the request resolves to. A
16672
+ * project that does not exist, or that the caller may not view, is 404
16673
+ * `not_found`; the two look the same. Where Projects is not enabled for
16674
+ * the workspace the header is ignored.
16675
+ *
16676
+ * A Cloud JWT that carries a `project_id` claim acts only in that
16677
+ * project. Without the header such a request acts in the claimed
16678
+ * project; a header naming any other project, the default project
16679
+ * included, is 403 `permission_denied`, and so is any such request
16680
+ * where Projects is not enabled for the workspace. The refusal says the
16681
+ * token is bound to another project, not what the caller's role allows.
16682
+ *
16683
+ */
16684
+ 'X-Comfy-Project-ID'?: string;
16685
+ };
14924
16686
  path: {
14925
16687
  /**
14926
16688
  * The folder name to list models from
@@ -14940,7 +16702,7 @@ export type GetModelsInFolderErrors = {
14940
16702
  */
14941
16703
  403: ErrorResponse;
14942
16704
  /**
14943
- * Folder not found or no models in folder
16705
+ * Folder not found or no models in folder; or `code` `not_found` for a project `X-Comfy-Project-ID` names that does not exist or that the caller may not view
14944
16706
  */
14945
16707
  404: ErrorResponse;
14946
16708
  /**
@@ -15046,6 +16808,36 @@ export type GetNodeByIdResponses = {
15046
16808
  };
15047
16809
  export type GetExtensionsData = {
15048
16810
  body?: never;
16811
+ headers?: {
16812
+ /**
16813
+ * The project a request acts in. The operations that list it are the
16814
+ * ones that read it: they list workflows, runs or assets, create one,
16815
+ * export assets, clear the caller's queue or History, pick the
16816
+ * deployment a browser runs on, or serve the editor that deployment
16817
+ * (the node, extension and model lists). Absent means
16818
+ * the workspace's default project, which is how existing clients keep
16819
+ * working.
16820
+ *
16821
+ * An operation on one existing workflow, run or asset does not take
16822
+ * it: the row's own project decides. Any other operation that creates
16823
+ * a workflow, run or asset acts in the default project until it lists
16824
+ * this parameter.
16825
+ *
16826
+ * The project must be in the workspace the request resolves to. A
16827
+ * project that does not exist, or that the caller may not view, is 404
16828
+ * `not_found`; the two look the same. Where Projects is not enabled for
16829
+ * the workspace the header is ignored.
16830
+ *
16831
+ * A Cloud JWT that carries a `project_id` claim acts only in that
16832
+ * project. Without the header such a request acts in the claimed
16833
+ * project; a header naming any other project, the default project
16834
+ * included, is 403 `permission_denied`, and so is any such request
16835
+ * where Projects is not enabled for the workspace. The refusal says the
16836
+ * token is bound to another project, not what the caller's role allows.
16837
+ *
16838
+ */
16839
+ 'X-Comfy-Project-ID'?: string;
16840
+ };
15049
16841
  path?: never;
15050
16842
  query?: never;
15051
16843
  url: '/api/extensions';
@@ -15059,6 +16851,10 @@ export type GetExtensionsErrors = {
15059
16851
  * `code` is `workspace_access_denied`: the selected workspace is unknown, deleted, or the user is not a member; the three look the same. This route also serves anonymous callers, so the session's other refusals fall back to an anonymous request. See the `WebSessionAuth` scheme.
15060
16852
  */
15061
16853
  403: ErrorResponse;
16854
+ /**
16855
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
16856
+ */
16857
+ 404: ErrorResponse;
15062
16858
  };
15063
16859
  export type GetExtensionsError = GetExtensionsErrors[keyof GetExtensionsErrors];
15064
16860
  export type GetExtensionsResponses = {
@@ -15101,18 +16897,15 @@ export type GetFeaturesResponses = {
15101
16897
  */
15102
16898
  'agent-credit-usage-summary'?: 'control' | 'treatment';
15103
16899
  /**
15104
- * Authenticated assignment for the Agent free-use notice placement experiment. Current Cloud responses include it and default to control when the caller is unauthenticated, evaluation is unavailable, or no treatment is assigned. It remains optional in the client contract, as agent-starter-prompt-set does, so older environments mid-rolling-deploy and partial feature fixtures fail closed rather than decoding an absent field as the empty string, which is not a member of this enum.
16900
+ * Authenticated assignment for the Agent free-use notice placement experiment. Current Cloud responses include it and default to control when the caller is unauthenticated, evaluation is unavailable, or no treatment is assigned. It remains optional in the client contract so older environments mid-rolling-deploy and partial feature fixtures fail closed rather than decoding an absent field as the empty string, which is not a member of this enum.
15105
16901
  */
15106
16902
  'agent-free-use-message-placement'?: 'control' | 'top-banner' | 'near-composer' | 'above-input' | 'inside-input';
15107
- /**
15108
- * Authenticated assignment for the Agent starter-prompt experiment. Current Cloud responses include it and default to control when the caller is unauthenticated, evaluation is unavailable, or no treatment is assigned. It remains optional in the client contract so older environments and partial feature fixtures fail closed. Reading this field does not constitute experiment exposure; the frontend emits the custom exposure event only after rendering the starter prompt surface.
15109
- */
15110
- 'agent-starter-prompt-set'?: 'control' | 'test';
15111
16903
  /**
15112
16904
  * The signed-in caller's arm in the local agent free-credit experiment (PostHog flag agent-gratis-cents-local-experiment): control or treatment. It answers which arm the caller is in, not whether credit has been granted, and does not depend on the grant being issued.
15113
16905
  * Absent, never null or empty, when no arm is resolved: unauthenticated callers, a failed or unavailable flag evaluation, or no variant assigned yet. It has no default; a consumer treats absence as "no arm known" and shows no free-credit surface, without recording the caller as outside the experiment. Served on this HTTP response only, never in the WebSocket feature_flags push, and dynamic configuration cannot set it.
15114
16906
  */
15115
16907
  agent_gratis_local_arm?: 'control' | 'treatment';
16908
+ agent_proactive_greeting_assignment?: AgentProactiveGreetingAssignment;
15116
16909
  /**
15117
16910
  * Origin of the billing-web deployment paired with this Cloud environment (e.g. https://billing.comfy.org). Absent when BILLING_WEB_URL is not configured on the server, so a client can tell "not configured" from "configured as empty".
15118
16911
  */
@@ -15189,6 +16982,14 @@ export type GetFeaturesResponses = {
15189
16982
  * 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.
15190
16983
  */
15191
16984
  private_workflow_links_enabled?: boolean;
16985
+ /**
16986
+ * Served assignment for the prompt editor surface experiment: where the text widget's Expand opens a long prompt. Control opens a centred dialog; panel opens the prompt in the right side panel. 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 on the first Expand.
16987
+ */
16988
+ 'prompt-editor-surface'?: 'control' | 'panel';
16989
+ /**
16990
+ * Local ComfyUI only: a random id that is new on every server start. A client that reconnects and gets a different value knows the server restarted, so node definitions it loaded earlier may be stale. Not settable with --feature-flag.
16991
+ */
16992
+ server_boot_id?: string;
15192
16993
  /**
15193
16994
  * Global switch, the same for every caller and readable without credentials. When true, the frontend shows enterprise single sign-on (the SSO sign-in entry and SSO workspace states); when false it shows today's app. It gates no backend behaviour. Defaults to false.
15194
16995
  */
@@ -15507,6 +17308,36 @@ export type GetLegacyHistoryErrors = {
15507
17308
  };
15508
17309
  export type ManageHistoryData = {
15509
17310
  body: HistoryManageRequest;
17311
+ headers?: {
17312
+ /**
17313
+ * The project a request acts in. The operations that list it are the
17314
+ * ones that read it: they list workflows, runs or assets, create one,
17315
+ * export assets, clear the caller's queue or History, pick the
17316
+ * deployment a browser runs on, or serve the editor that deployment
17317
+ * (the node, extension and model lists). Absent means
17318
+ * the workspace's default project, which is how existing clients keep
17319
+ * working.
17320
+ *
17321
+ * An operation on one existing workflow, run or asset does not take
17322
+ * it: the row's own project decides. Any other operation that creates
17323
+ * a workflow, run or asset acts in the default project until it lists
17324
+ * this parameter.
17325
+ *
17326
+ * The project must be in the workspace the request resolves to. A
17327
+ * project that does not exist, or that the caller may not view, is 404
17328
+ * `not_found`; the two look the same. Where Projects is not enabled for
17329
+ * the workspace the header is ignored.
17330
+ *
17331
+ * A Cloud JWT that carries a `project_id` claim acts only in that
17332
+ * project. Without the header such a request acts in the claimed
17333
+ * project; a header naming any other project, the default project
17334
+ * included, is 403 `permission_denied`, and so is any such request
17335
+ * where Projects is not enabled for the workspace. The refusal says the
17336
+ * token is bound to another project, not what the caller's role allows.
17337
+ *
17338
+ */
17339
+ 'X-Comfy-Project-ID'?: string;
17340
+ };
15510
17341
  path?: never;
15511
17342
  query?: never;
15512
17343
  url: '/api/history';
@@ -15524,6 +17355,10 @@ export type ManageHistoryErrors = {
15524
17355
  * 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.
15525
17356
  */
15526
17357
  403: ForbiddenError;
17358
+ /**
17359
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
17360
+ */
17361
+ 404: ErrorResponse;
15527
17362
  /**
15528
17363
  * Internal server error
15529
17364
  */
@@ -16152,6 +17987,36 @@ export type CreateInputUploadUrlResponses = {
16152
17987
  export type CreateInputUploadUrlResponse = CreateInputUploadUrlResponses[keyof CreateInputUploadUrlResponses];
16153
17988
  export type InterruptJobData = {
16154
17989
  body?: never;
17990
+ headers?: {
17991
+ /**
17992
+ * The project a request acts in. The operations that list it are the
17993
+ * ones that read it: they list workflows, runs or assets, create one,
17994
+ * export assets, clear the caller's queue or History, pick the
17995
+ * deployment a browser runs on, or serve the editor that deployment
17996
+ * (the node, extension and model lists). Absent means
17997
+ * the workspace's default project, which is how existing clients keep
17998
+ * working.
17999
+ *
18000
+ * An operation on one existing workflow, run or asset does not take
18001
+ * it: the row's own project decides. Any other operation that creates
18002
+ * a workflow, run or asset acts in the default project until it lists
18003
+ * this parameter.
18004
+ *
18005
+ * The project must be in the workspace the request resolves to. A
18006
+ * project that does not exist, or that the caller may not view, is 404
18007
+ * `not_found`; the two look the same. Where Projects is not enabled for
18008
+ * the workspace the header is ignored.
18009
+ *
18010
+ * A Cloud JWT that carries a `project_id` claim acts only in that
18011
+ * project. Without the header such a request acts in the claimed
18012
+ * project; a header naming any other project, the default project
18013
+ * included, is 403 `permission_denied`, and so is any such request
18014
+ * where Projects is not enabled for the workspace. The refusal says the
18015
+ * token is bound to another project, not what the caller's role allows.
18016
+ *
18017
+ */
18018
+ 'X-Comfy-Project-ID'?: string;
18019
+ };
16155
18020
  path?: never;
16156
18021
  query?: never;
16157
18022
  url: '/api/interrupt';
@@ -16172,7 +18037,8 @@ export type InterruptJobErrors = {
16172
18037
  /**
16173
18038
  * `prompt_id` is not one of the caller's jobs in this workspace, or
16174
18039
  * is not a job ID (a 36-character UUID) at all. Code NOT_FOUND;
16175
- * nothing was cancelled.
18040
+ * nothing was cancelled. Or the project `X-Comfy-Project-ID` names
18041
+ * does not exist or the caller may not view it (`not_found`).
16176
18042
  *
16177
18043
  */
16178
18044
  404: ErrorResponse;
@@ -16305,9 +18171,12 @@ export type ListJobsData = {
16305
18171
  headers?: {
16306
18172
  /**
16307
18173
  * 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.
18174
+ * ones that read it: they list workflows, runs or assets, create one,
18175
+ * export assets, clear the caller's queue or History, pick the
18176
+ * deployment a browser runs on, or serve the editor that deployment
18177
+ * (the node, extension and model lists). Absent means
18178
+ * the workspace's default project, which is how existing clients keep
18179
+ * working.
16311
18180
  *
16312
18181
  * An operation on one existing workflow, run or asset does not take
16313
18182
  * it: the row's own project decides. Any other operation that creates
@@ -16319,13 +18188,20 @@ export type ListJobsData = {
16319
18188
  * `not_found`; the two look the same. Where Projects is not enabled for
16320
18189
  * the workspace the header is ignored.
16321
18190
  *
18191
+ * A Cloud JWT that carries a `project_id` claim acts only in that
18192
+ * project. Without the header such a request acts in the claimed
18193
+ * project; a header naming any other project, the default project
18194
+ * included, is 403 `permission_denied`, and so is any such request
18195
+ * where Projects is not enabled for the workspace. The refusal says the
18196
+ * token is bound to another project, not what the caller's role allows.
18197
+ *
16322
18198
  */
16323
18199
  'X-Comfy-Project-ID'?: string;
16324
18200
  };
16325
18201
  path?: never;
16326
18202
  query?: {
16327
18203
  /**
16328
- * Filter by one or more statuses (comma-separated). If not provided, returns all jobs.
18204
+ * Filter by one or more statuses (comma-separated). Use held_budget for jobs paused by a budget decision. Omit to return all jobs.
16329
18205
  */
16330
18206
  status?: string;
16331
18207
  /**
@@ -16433,11 +18309,11 @@ export type DeleteJobErrors = {
16433
18309
  */
16434
18310
  403: ForbiddenError;
16435
18311
  /**
16436
- * Job not found or does not belong to the user
18312
+ * Job not found, does not belong to the user, or is in a project where the caller may not delete it
16437
18313
  */
16438
18314
  404: ErrorResponse;
16439
18315
  /**
16440
- * A linked asset cannot be deleted because it is referenced by another resource, e.g. a workflow version (error code: ASSET_IN_USE); the job is left in place
18316
+ * A linked asset cannot be deleted because it is referenced by another resource, e.g. a workflow version, or because content moderation still holds it (error code: ASSET_IN_USE for both; a moderation hold is deliberately not distinguishable); the job and every linked asset are left in place
16441
18317
  */
16442
18318
  409: ErrorResponse;
16443
18319
  /**
@@ -16463,7 +18339,7 @@ export type GetJobDetailData = {
16463
18339
  };
16464
18340
  query?: {
16465
18341
  /**
16466
- * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller.
18342
+ * When present, each output item in the response receives a `short_url` field containing a short link for that asset. Omit this parameter (the default) to receive a response identical to the no-param baseline. The value selects the link's lifetime and auth model: use `ephemeral_tool_chain` for short-lived (≤5 minute) machine-to-machine handoffs — these are public bearer links where the link ID itself is the credential, so anyone holding the link can resolve it (intended for pasting into an agent/MCP tool chain); use `default` for durable (30 day) human-revisitable links, which are owner-gated and resolvable only by the authenticated owner. Links are always minted under the authenticated request owner's identity; the auth model is selected by the server and is never settable by the caller. A run in a project other than the default gets no `short_url` whatever the value: its outputs have no short link.
16467
18343
  *
16468
18344
  */
16469
18345
  short_link?: 'ephemeral_tool_chain' | 'default';
@@ -16677,6 +18553,36 @@ export type GetNodeReplacementsResponses = {
16677
18553
  export type GetNodeReplacementsResponse = GetNodeReplacementsResponses[keyof GetNodeReplacementsResponses];
16678
18554
  export type GetNodeInfoData = {
16679
18555
  body?: never;
18556
+ headers?: {
18557
+ /**
18558
+ * The project a request acts in. The operations that list it are the
18559
+ * ones that read it: they list workflows, runs or assets, create one,
18560
+ * export assets, clear the caller's queue or History, pick the
18561
+ * deployment a browser runs on, or serve the editor that deployment
18562
+ * (the node, extension and model lists). Absent means
18563
+ * the workspace's default project, which is how existing clients keep
18564
+ * working.
18565
+ *
18566
+ * An operation on one existing workflow, run or asset does not take
18567
+ * it: the row's own project decides. Any other operation that creates
18568
+ * a workflow, run or asset acts in the default project until it lists
18569
+ * this parameter.
18570
+ *
18571
+ * The project must be in the workspace the request resolves to. A
18572
+ * project that does not exist, or that the caller may not view, is 404
18573
+ * `not_found`; the two look the same. Where Projects is not enabled for
18574
+ * the workspace the header is ignored.
18575
+ *
18576
+ * A Cloud JWT that carries a `project_id` claim acts only in that
18577
+ * project. Without the header such a request acts in the claimed
18578
+ * project; a header naming any other project, the default project
18579
+ * included, is 403 `permission_denied`, and so is any such request
18580
+ * where Projects is not enabled for the workspace. The refusal says the
18581
+ * token is bound to another project, not what the caller's role allows.
18582
+ *
18583
+ */
18584
+ 'X-Comfy-Project-ID'?: string;
18585
+ };
16680
18586
  path?: never;
16681
18587
  query?: {
16682
18588
  /**
@@ -16706,6 +18612,10 @@ export type GetNodeInfoErrors = {
16706
18612
  * 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.
16707
18613
  */
16708
18614
  403: ForbiddenError;
18615
+ /**
18616
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
18617
+ */
18618
+ 404: ErrorResponse;
16709
18619
  };
16710
18620
  export type GetNodeInfoError = GetNodeInfoErrors[keyof GetNodeInfoErrors];
16711
18621
  export type GetNodeInfoResponses = {
@@ -16762,7 +18672,7 @@ export type ListProjectsErrors = {
16762
18672
  export type ListProjectsError = ListProjectsErrors[keyof ListProjectsErrors];
16763
18673
  export type ListProjectsResponses = {
16764
18674
  /**
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`.
18675
+ * 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`, `can_create: false` and, for a caller who could otherwise create, `denied_reasons: {can_create: frozen}`. Do not read a 200 as the plan including Projects; read `writable` on each project and `quota.can_create`.
16766
18676
  */
16767
18677
  200: ListProjectsResponse;
16768
18678
  };
@@ -16892,11 +18802,52 @@ export type UpdateProjectErrors = {
16892
18802
  export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors];
16893
18803
  export type UpdateProjectResponses = {
16894
18804
  /**
16895
- * Project updated
18805
+ * Project updated
18806
+ */
18807
+ 200: Project;
18808
+ };
18809
+ export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
18810
+ export type ListProjectMemberCandidatesData = {
18811
+ body?: never;
18812
+ path: {
18813
+ /**
18814
+ * Project ID
18815
+ */
18816
+ id: string;
18817
+ };
18818
+ query?: never;
18819
+ url: '/api/projects/{id}/member-candidates';
18820
+ };
18821
+ export type ListProjectMemberCandidatesErrors = {
18822
+ /**
18823
+ * `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.
18824
+ */
18825
+ 400: ErrorResponse;
18826
+ /**
18827
+ * Unauthorized
18828
+ */
18829
+ 401: ErrorResponse;
18830
+ /**
18831
+ * `permission_denied`: the caller lacks `project.members` write; `details.permission` names it. `project_frozen`: the project is frozen and takes no new members. Or `projects_not_available`: the workspace's plan does not include Projects, or Projects is turned off
18832
+ */
18833
+ 403: ErrorResponse;
18834
+ /**
18835
+ * `not_found`: the project does not exist, or the caller may not view it. The two look the same.
18836
+ */
18837
+ 404: ErrorResponse;
18838
+ /**
18839
+ * Internal server error
18840
+ */
18841
+ 500: ErrorResponse;
18842
+ };
18843
+ export type ListProjectMemberCandidatesError = ListProjectMemberCandidatesErrors[keyof ListProjectMemberCandidatesErrors];
18844
+ export type ListProjectMemberCandidatesResponses = {
18845
+ /**
18846
+ * The people the caller may add
16896
18847
  */
16897
- 200: Project;
18848
+ 200: ListProjectMemberCandidatesResponse;
16898
18849
  };
16899
- export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
18850
+ export type ListProjectMemberCandidatesResponse2 = ListProjectMemberCandidatesResponses[keyof ListProjectMemberCandidatesResponses];
16900
18851
  export type ListProjectMembersData = {
16901
18852
  body?: never;
16902
18853
  path: {
@@ -17069,9 +19020,12 @@ export type ExecutePromptData = {
17069
19020
  headers?: {
17070
19021
  /**
17071
19022
  * 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.
19023
+ * ones that read it: they list workflows, runs or assets, create one,
19024
+ * export assets, clear the caller's queue or History, pick the
19025
+ * deployment a browser runs on, or serve the editor that deployment
19026
+ * (the node, extension and model lists). Absent means
19027
+ * the workspace's default project, which is how existing clients keep
19028
+ * working.
17075
19029
  *
17076
19030
  * An operation on one existing workflow, run or asset does not take
17077
19031
  * it: the row's own project decides. Any other operation that creates
@@ -17083,8 +19037,19 @@ export type ExecutePromptData = {
17083
19037
  * `not_found`; the two look the same. Where Projects is not enabled for
17084
19038
  * the workspace the header is ignored.
17085
19039
  *
19040
+ * A Cloud JWT that carries a `project_id` claim acts only in that
19041
+ * project. Without the header such a request acts in the claimed
19042
+ * project; a header naming any other project, the default project
19043
+ * included, is 403 `permission_denied`, and so is any such request
19044
+ * where Projects is not enabled for the workspace. The refusal says the
19045
+ * token is bound to another project, not what the caller's role allows.
19046
+ *
17086
19047
  */
17087
19048
  'X-Comfy-Project-ID'?: string;
19049
+ /**
19050
+ * The Release the editor loaded its node list from, for a browser that picked a developer-platform deployment. When the deployment runs another Release now, the submission is refused with a 409 `RELEASE_CHANGED` before its workflow is validated, and nothing is queued. Without it the submission is answered as before.
19051
+ */
19052
+ 'Comfy-Loaded-Release'?: string;
17088
19053
  };
17089
19054
  path?: never;
17090
19055
  query?: never;
@@ -17092,7 +19057,7 @@ export type ExecutePromptData = {
17092
19057
  };
17093
19058
  export type ExecutePromptErrors = {
17094
19059
  /**
17095
- * Invalid prompt, or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
19060
+ * Invalid prompt, or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid). An `error` whose `details` is `deployment_not_permitted` says the run's project may not use the target, and nothing ran: `error.deployment_id` names a picked deployment that belongs to another project, and `error.target` `shared_cloud` says the project does not run on Comfy Cloud. The caller picks another target. It says nothing about the caller's role.
17096
19061
  */
17097
19062
  400: PromptErrorResponse;
17098
19063
  /**
@@ -17100,13 +19065,17 @@ export type ExecutePromptErrors = {
17100
19065
  */
17101
19066
  401: ErrorResponse;
17102
19067
  /**
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.
19068
+ * The account cannot run this submission; nothing was queued and retrying unchanged will not resolve the refusal. 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. When the free-tier master switch is enabled, `CLOUD_SUBSCRIPTION_REQUIRED` may carry `error.reason: google_sign_in_required` for the Google-session gate. This identifies the gate hit, not a promise of unused allowance or partner-node eligibility; later free-tier checks still apply. A hard cap responds with top-level `error_type: budget_exceeded`, `denied_reason` and `budget`. Only workspace Owners receive amounts and `blocking_budgets`.
17104
19069
  */
17105
- 402: PromptErrorResponse;
19070
+ 402: PromptPaymentRequired;
17106
19071
  /**
17107
19072
  * 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
19073
  */
17109
19074
  403: PromptErrorResponse;
19075
+ /**
19076
+ * The request's `Comfy-Loaded-Release` names a Release other than the one the picked deployment runs now (error.type `RELEASE_CHANGED`; error.release_id is the Release it runs now). Nothing was queued; reload that Release before submitting again. Answered before the workflow is validated.
19077
+ */
19078
+ 409: PromptErrorResponse;
17110
19079
  /**
17111
19080
  * Workflow JSON too large
17112
19081
  */
@@ -17120,7 +19089,7 @@ export type ExecutePromptErrors = {
17120
19089
  */
17121
19090
  500: PromptErrorResponse;
17122
19091
  /**
17123
- * Service unavailable
19092
+ * Service unavailable. A hard budget check outage carries `error_type: budget_check_unavailable` and `denied_reason`.
17124
19093
  */
17125
19094
  503: PromptErrorResponse;
17126
19095
  };
@@ -17178,6 +19147,26 @@ export type GetProvidersResponses = {
17178
19147
  200: ProviderCatalogResponse;
17179
19148
  };
17180
19149
  export type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses];
19150
+ export type ListPublicModelsData = {
19151
+ body?: never;
19152
+ path?: never;
19153
+ query?: never;
19154
+ url: '/api/public_models';
19155
+ };
19156
+ export type ListPublicModelsErrors = {
19157
+ /**
19158
+ * The catalog could not be read in full
19159
+ */
19160
+ 503: ErrorResponse;
19161
+ };
19162
+ export type ListPublicModelsError = ListPublicModelsErrors[keyof ListPublicModelsErrors];
19163
+ export type ListPublicModelsResponses = {
19164
+ /**
19165
+ * The public model catalog
19166
+ */
19167
+ 200: PublicModelsResponse;
19168
+ };
19169
+ export type ListPublicModelsResponse = ListPublicModelsResponses[keyof ListPublicModelsResponses];
17181
19170
  export type GetQueueInfoData = {
17182
19171
  body?: never;
17183
19172
  path?: never;
@@ -17212,6 +19201,36 @@ export type GetQueueInfoResponses = {
17212
19201
  export type GetQueueInfoResponse = GetQueueInfoResponses[keyof GetQueueInfoResponses];
17213
19202
  export type ManageQueueData = {
17214
19203
  body: QueueManageRequest;
19204
+ headers?: {
19205
+ /**
19206
+ * The project a request acts in. The operations that list it are the
19207
+ * ones that read it: they list workflows, runs or assets, create one,
19208
+ * export assets, clear the caller's queue or History, pick the
19209
+ * deployment a browser runs on, or serve the editor that deployment
19210
+ * (the node, extension and model lists). Absent means
19211
+ * the workspace's default project, which is how existing clients keep
19212
+ * working.
19213
+ *
19214
+ * An operation on one existing workflow, run or asset does not take
19215
+ * it: the row's own project decides. Any other operation that creates
19216
+ * a workflow, run or asset acts in the default project until it lists
19217
+ * this parameter.
19218
+ *
19219
+ * The project must be in the workspace the request resolves to. A
19220
+ * project that does not exist, or that the caller may not view, is 404
19221
+ * `not_found`; the two look the same. Where Projects is not enabled for
19222
+ * the workspace the header is ignored.
19223
+ *
19224
+ * A Cloud JWT that carries a `project_id` claim acts only in that
19225
+ * project. Without the header such a request acts in the claimed
19226
+ * project; a header naming any other project, the default project
19227
+ * included, is 403 `permission_denied`, and so is any such request
19228
+ * where Projects is not enabled for the workspace. The refusal says the
19229
+ * token is bound to another project, not what the caller's role allows.
19230
+ *
19231
+ */
19232
+ 'X-Comfy-Project-ID'?: string;
19233
+ };
17215
19234
  path?: never;
17216
19235
  query?: never;
17217
19236
  url: '/api/queue';
@@ -17229,6 +19248,10 @@ export type ManageQueueErrors = {
17229
19248
  * 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
19249
  */
17231
19250
  403: ForbiddenError;
19251
+ /**
19252
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
19253
+ */
19254
+ 404: ErrorResponse;
17232
19255
  /**
17233
19256
  * Internal server error
17234
19257
  */
@@ -17244,6 +19267,36 @@ export type ManageQueueResponses = {
17244
19267
  export type ManageQueueResponse = ManageQueueResponses[keyof ManageQueueResponses];
17245
19268
  export type GetReleaseUnsupportedPacksData = {
17246
19269
  body?: never;
19270
+ headers?: {
19271
+ /**
19272
+ * The project a request acts in. The operations that list it are the
19273
+ * ones that read it: they list workflows, runs or assets, create one,
19274
+ * export assets, clear the caller's queue or History, pick the
19275
+ * deployment a browser runs on, or serve the editor that deployment
19276
+ * (the node, extension and model lists). Absent means
19277
+ * the workspace's default project, which is how existing clients keep
19278
+ * working.
19279
+ *
19280
+ * An operation on one existing workflow, run or asset does not take
19281
+ * it: the row's own project decides. Any other operation that creates
19282
+ * a workflow, run or asset acts in the default project until it lists
19283
+ * this parameter.
19284
+ *
19285
+ * The project must be in the workspace the request resolves to. A
19286
+ * project that does not exist, or that the caller may not view, is 404
19287
+ * `not_found`; the two look the same. Where Projects is not enabled for
19288
+ * the workspace the header is ignored.
19289
+ *
19290
+ * A Cloud JWT that carries a `project_id` claim acts only in that
19291
+ * project. Without the header such a request acts in the claimed
19292
+ * project; a header naming any other project, the default project
19293
+ * included, is 403 `permission_denied`, and so is any such request
19294
+ * where Projects is not enabled for the workspace. The refusal says the
19295
+ * token is bound to another project, not what the caller's role allows.
19296
+ *
19297
+ */
19298
+ 'X-Comfy-Project-ID'?: string;
19299
+ };
17247
19300
  path?: never;
17248
19301
  query?: never;
17249
19302
  url: '/api/release/unsupported-packs';
@@ -17261,6 +19314,10 @@ export type GetReleaseUnsupportedPacksErrors = {
17261
19314
  * 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
19315
  */
17263
19316
  403: ForbiddenError;
19317
+ /**
19318
+ * The project `X-Comfy-Project-ID` names does not exist or the caller may not view it (`not_found`)
19319
+ */
19320
+ 404: ErrorResponse;
17264
19321
  };
17265
19322
  export type GetReleaseUnsupportedPacksError = GetReleaseUnsupportedPacksErrors[keyof GetReleaseUnsupportedPacksErrors];
17266
19323
  export type GetReleaseUnsupportedPacksResponses = {
@@ -17928,9 +19985,12 @@ export type UploadImageData = {
17928
19985
  headers?: {
17929
19986
  /**
17930
19987
  * 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.
19988
+ * ones that read it: they list workflows, runs or assets, create one,
19989
+ * export assets, clear the caller's queue or History, pick the
19990
+ * deployment a browser runs on, or serve the editor that deployment
19991
+ * (the node, extension and model lists). Absent means
19992
+ * the workspace's default project, which is how existing clients keep
19993
+ * working.
17934
19994
  *
17935
19995
  * An operation on one existing workflow, run or asset does not take
17936
19996
  * it: the row's own project decides. Any other operation that creates
@@ -17942,6 +20002,13 @@ export type UploadImageData = {
17942
20002
  * `not_found`; the two look the same. Where Projects is not enabled for
17943
20003
  * the workspace the header is ignored.
17944
20004
  *
20005
+ * A Cloud JWT that carries a `project_id` claim acts only in that
20006
+ * project. Without the header such a request acts in the claimed
20007
+ * project; a header naming any other project, the default project
20008
+ * included, is 403 `permission_denied`, and so is any such request
20009
+ * where Projects is not enabled for the workspace. The refusal says the
20010
+ * token is bound to another project, not what the caller's role allows.
20011
+ *
17945
20012
  */
17946
20013
  'X-Comfy-Project-ID'?: string;
17947
20014
  };
@@ -18006,9 +20073,12 @@ export type UploadMaskData = {
18006
20073
  headers?: {
18007
20074
  /**
18008
20075
  * 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.
20076
+ * ones that read it: they list workflows, runs or assets, create one,
20077
+ * export assets, clear the caller's queue or History, pick the
20078
+ * deployment a browser runs on, or serve the editor that deployment
20079
+ * (the node, extension and model lists). Absent means
20080
+ * the workspace's default project, which is how existing clients keep
20081
+ * working.
18012
20082
  *
18013
20083
  * An operation on one existing workflow, run or asset does not take
18014
20084
  * it: the row's own project decides. Any other operation that creates
@@ -18020,6 +20090,13 @@ export type UploadMaskData = {
18020
20090
  * `not_found`; the two look the same. Where Projects is not enabled for
18021
20091
  * the workspace the header is ignored.
18022
20092
  *
20093
+ * A Cloud JWT that carries a `project_id` claim acts only in that
20094
+ * project. Without the header such a request acts in the claimed
20095
+ * project; a header naming any other project, the default project
20096
+ * included, is 403 `permission_denied`, and so is any such request
20097
+ * where Projects is not enabled for the workspace. The refusal says the
20098
+ * token is bound to another project, not what the caller's role allows.
20099
+ *
18023
20100
  */
18024
20101
  'X-Comfy-Project-ID'?: string;
18025
20102
  };
@@ -18692,7 +20769,7 @@ export type ListCccWebsiteCardsErrors = {
18692
20769
  */
18693
20770
  409: unknown;
18694
20771
  /**
18695
- * Catalog unavailable or card budget exceeded
20772
+ * Catalog unavailable, card budget exceeded, or the pod busy. A page with a cursor waits at most 2 s for one of the few slots each pod keeps for cursor pages, then gets 503 with Retry-After: 1 and X-Comfy-Catalog-Busy: 1.
18696
20773
  */
18697
20774
  503: unknown;
18698
20775
  };
@@ -20229,6 +22306,32 @@ export type GetCccWebsiteRootPresentationResponses = {
20229
22306
  200: CccWebsiteRootPresentation;
20230
22307
  };
20231
22308
  export type GetCccWebsiteRootPresentationResponse = GetCccWebsiteRootPresentationResponses[keyof GetCccWebsiteRootPresentationResponses];
22309
+ export type GetCccWebsiteRootPublicUidsData = {
22310
+ body?: never;
22311
+ path?: never;
22312
+ query?: never;
22313
+ url: '/api/v1/catalog/root-public-uids';
22314
+ };
22315
+ export type GetCccWebsiteRootPublicUidsErrors = {
22316
+ /**
22317
+ * Any query parameter
22318
+ */
22319
+ 400: unknown;
22320
+ /**
22321
+ * Catalog unavailable, or more than 200000 public records
22322
+ */
22323
+ 503: unknown;
22324
+ };
22325
+ export type GetCccWebsiteRootPublicUidsResponses = {
22326
+ /**
22327
+ * Current Live revision and the public uids
22328
+ */
22329
+ 200: {
22330
+ revision_id: number;
22331
+ uids: Array<string>;
22332
+ };
22333
+ };
22334
+ export type GetCccWebsiteRootPublicUidsResponse = GetCccWebsiteRootPublicUidsResponses[keyof GetCccWebsiteRootPublicUidsResponses];
20232
22335
  export type GetCccTypeSchemaData = {
20233
22336
  body?: never;
20234
22337
  path: {
@@ -20255,6 +22358,92 @@ export type GetCccTypeSchemaResponses = {
20255
22358
  200: CccTypeSchema;
20256
22359
  };
20257
22360
  export type GetCccTypeSchemaResponse = GetCccTypeSchemaResponses[keyof GetCccTypeSchemaResponses];
22361
+ export type ListCccStaffAppsData = {
22362
+ body?: never;
22363
+ path?: never;
22364
+ query?: {
22365
+ limit?: number;
22366
+ cursor?: string;
22367
+ };
22368
+ url: '/api/v1/catalog/staff-apps';
22369
+ };
22370
+ export type ListCccStaffAppsErrors = {
22371
+ /**
22372
+ * Unknown or repeated parameter, a bad limit or a cursor from another limit; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
22373
+ */
22374
+ 400: ErrorResponse;
22375
+ /**
22376
+ * 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`.
22377
+ */
22378
+ 401: ErrorResponse;
22379
+ /**
22380
+ * 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.
22381
+ */
22382
+ 403: ForbiddenError;
22383
+ /**
22384
+ * The cursor belongs to a stale Draft snapshot
22385
+ */
22386
+ 409: unknown;
22387
+ /**
22388
+ * Dedicated catalog or account verification unavailable
22389
+ */
22390
+ 503: unknown;
22391
+ };
22392
+ export type ListCccStaffAppsError = ListCccStaffAppsErrors[keyof ListCccStaffAppsErrors];
22393
+ export type ListCccStaffAppsResponses = {
22394
+ /**
22395
+ * One page of app rows and the optional opaque next_cursor
22396
+ */
22397
+ 200: CccStaffAppsPage;
22398
+ };
22399
+ export type ListCccStaffAppsResponse = ListCccStaffAppsResponses[keyof ListCccStaffAppsResponses];
22400
+ export type GetCccStaffAppPictureData = {
22401
+ body?: never;
22402
+ path: {
22403
+ uid: string;
22404
+ version: string;
22405
+ };
22406
+ query?: never;
22407
+ url: '/api/v1/catalog/staff-apps/{uid}/picture/{version}';
22408
+ };
22409
+ export type GetCccStaffAppPictureErrors = {
22410
+ /**
22411
+ * `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.
22412
+ */
22413
+ 400: ErrorResponse;
22414
+ /**
22415
+ * 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`.
22416
+ */
22417
+ 401: ErrorResponse;
22418
+ /**
22419
+ * 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.
22420
+ */
22421
+ 403: ForbiddenError;
22422
+ /**
22423
+ * Not an app, no image picture, another version, unavailable, or a query string
22424
+ */
22425
+ 404: unknown;
22426
+ /**
22427
+ * Requested range is outside the file
22428
+ */
22429
+ 416: unknown;
22430
+ /**
22431
+ * Account verification unavailable
22432
+ */
22433
+ 503: unknown;
22434
+ };
22435
+ export type GetCccStaffAppPictureError = GetCccStaffAppPictureErrors[keyof GetCccStaffAppPictureErrors];
22436
+ export type GetCccStaffAppPictureResponses = {
22437
+ /**
22438
+ * The picture bytes; private no-store
22439
+ */
22440
+ 200: Blob | File;
22441
+ /**
22442
+ * Requested byte range (Range header) of the same bytes, after the same checks
22443
+ */
22444
+ 206: Blob | File;
22445
+ };
22446
+ export type GetCccStaffAppPictureResponse = GetCccStaffAppPictureResponses[keyof GetCccStaffAppPictureResponses];
20258
22447
  export type GetCccStateData = {
20259
22448
  body?: never;
20260
22449
  path?: never;
@@ -20373,6 +22562,10 @@ export type GetVhsQueryVideoErrors = {
20373
22562
  * Internal server error, such as the auth policy failing to look up the workspace `workspace_id` names.
20374
22563
  */
20375
22564
  500: ErrorResponse;
22565
+ /**
22566
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
22567
+ */
22568
+ 503: ErrorResponse;
20376
22569
  };
20377
22570
  export type GetVhsQueryVideoError = GetVhsQueryVideoErrors[keyof GetVhsQueryVideoErrors];
20378
22571
  export type GetVhsQueryVideoResponses = {
@@ -20468,6 +22661,10 @@ export type GetVhsViewAudioErrors = {
20468
22661
  * Internal server error
20469
22662
  */
20470
22663
  500: ErrorResponse;
22664
+ /**
22665
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
22666
+ */
22667
+ 503: ErrorResponse;
20471
22668
  };
20472
22669
  export type GetVhsViewAudioError = GetVhsViewAudioErrors[keyof GetVhsViewAudioErrors];
20473
22670
  export type GetVhsViewAudioResponses = {
@@ -20541,6 +22738,10 @@ export type GetVhsViewVideoErrors = {
20541
22738
  * Internal server error
20542
22739
  */
20543
22740
  500: ErrorResponse;
22741
+ /**
22742
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
22743
+ */
22744
+ 503: ErrorResponse;
20544
22745
  };
20545
22746
  export type GetVhsViewVideoError = GetVhsViewVideoErrors[keyof GetVhsViewVideoErrors];
20546
22747
  export type GetVhsViewVideoResponses = {
@@ -20641,6 +22842,10 @@ export type ViewFileErrors = {
20641
22842
  * Internal server error
20642
22843
  */
20643
22844
  500: ErrorResponse;
22845
+ /**
22846
+ * With `channel` or `res`: the pod's upload buffer budget, which the image's bytes and decoded pixels are charged to, is exhausted; retry after the Retry-After seconds. `code` is `UPLOAD_BUDGET_EXHAUSTED`. Also answered, with `code` `SERVICE_UNAVAILABLE` and `message` `authentication service unavailable`, when a store read failed while checking the credential; nothing was done, so the request is safe to resend.
22847
+ */
22848
+ 503: ErrorResponse;
20644
22849
  };
20645
22850
  export type ViewFileError = ViewFileErrors[keyof ViewFileErrors];
20646
22851
  export type ViewFileResponses = {
@@ -20720,6 +22925,10 @@ export type GetApiViewVideoAliasErrors = {
20720
22925
  * Internal server error
20721
22926
  */
20722
22927
  500: ErrorResponse;
22928
+ /**
22929
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
22930
+ */
22931
+ 503: ErrorResponse;
20723
22932
  };
20724
22933
  export type GetApiViewVideoAliasError = GetApiViewVideoAliasErrors[keyof GetApiViewVideoAliasErrors];
20725
22934
  export type GetApiViewVideoAliasResponses = {
@@ -20749,9 +22958,12 @@ export type ListWorkflowsData = {
20749
22958
  headers?: {
20750
22959
  /**
20751
22960
  * 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.
22961
+ * ones that read it: they list workflows, runs or assets, create one,
22962
+ * export assets, clear the caller's queue or History, pick the
22963
+ * deployment a browser runs on, or serve the editor that deployment
22964
+ * (the node, extension and model lists). Absent means
22965
+ * the workspace's default project, which is how existing clients keep
22966
+ * working.
20755
22967
  *
20756
22968
  * An operation on one existing workflow, run or asset does not take
20757
22969
  * it: the row's own project decides. Any other operation that creates
@@ -20763,6 +22975,13 @@ export type ListWorkflowsData = {
20763
22975
  * `not_found`; the two look the same. Where Projects is not enabled for
20764
22976
  * the workspace the header is ignored.
20765
22977
  *
22978
+ * A Cloud JWT that carries a `project_id` claim acts only in that
22979
+ * project. Without the header such a request acts in the claimed
22980
+ * project; a header naming any other project, the default project
22981
+ * included, is 403 `permission_denied`, and so is any such request
22982
+ * where Projects is not enabled for the workspace. The refusal says the
22983
+ * token is bound to another project, not what the caller's role allows.
22984
+ *
20766
22985
  */
20767
22986
  'X-Comfy-Project-ID'?: string;
20768
22987
  };
@@ -20820,9 +23039,12 @@ export type CreateWorkflowData = {
20820
23039
  headers?: {
20821
23040
  /**
20822
23041
  * 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.
23042
+ * ones that read it: they list workflows, runs or assets, create one,
23043
+ * export assets, clear the caller's queue or History, pick the
23044
+ * deployment a browser runs on, or serve the editor that deployment
23045
+ * (the node, extension and model lists). Absent means
23046
+ * the workspace's default project, which is how existing clients keep
23047
+ * working.
20826
23048
  *
20827
23049
  * An operation on one existing workflow, run or asset does not take
20828
23050
  * it: the row's own project decides. Any other operation that creates
@@ -20834,6 +23056,13 @@ export type CreateWorkflowData = {
20834
23056
  * `not_found`; the two look the same. Where Projects is not enabled for
20835
23057
  * the workspace the header is ignored.
20836
23058
  *
23059
+ * A Cloud JWT that carries a `project_id` claim acts only in that
23060
+ * project. Without the header such a request acts in the claimed
23061
+ * project; a header naming any other project, the default project
23062
+ * included, is 403 `permission_denied`, and so is any such request
23063
+ * where Projects is not enabled for the workspace. The refusal says the
23064
+ * token is bound to another project, not what the caller's role allows.
23065
+ *
20837
23066
  */
20838
23067
  'X-Comfy-Project-ID'?: string;
20839
23068
  };
@@ -21044,9 +23273,12 @@ export type ForkWorkflowData = {
21044
23273
  headers?: {
21045
23274
  /**
21046
23275
  * 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.
23276
+ * ones that read it: they list workflows, runs or assets, create one,
23277
+ * export assets, clear the caller's queue or History, pick the
23278
+ * deployment a browser runs on, or serve the editor that deployment
23279
+ * (the node, extension and model lists). Absent means
23280
+ * the workspace's default project, which is how existing clients keep
23281
+ * working.
21050
23282
  *
21051
23283
  * An operation on one existing workflow, run or asset does not take
21052
23284
  * it: the row's own project decides. Any other operation that creates
@@ -21058,6 +23290,13 @@ export type ForkWorkflowData = {
21058
23290
  * `not_found`; the two look the same. Where Projects is not enabled for
21059
23291
  * the workspace the header is ignored.
21060
23292
  *
23293
+ * A Cloud JWT that carries a `project_id` claim acts only in that
23294
+ * project. Without the header such a request acts in the claimed
23295
+ * project; a header naming any other project, the default project
23296
+ * included, is 403 `permission_denied`, and so is any such request
23297
+ * where Projects is not enabled for the workspace. The refusal says the
23298
+ * token is bound to another project, not what the caller's role allows.
23299
+ *
21061
23300
  */
21062
23301
  'X-Comfy-Project-ID'?: string;
21063
23302
  };
@@ -21470,7 +23709,7 @@ export type ListWorkspaceInvitesErrors = {
21470
23709
  */
21471
23710
  401: ErrorResponse;
21472
23711
  /**
21473
- * Owner role required
23712
+ * Owner role, or Workspace admin, required
21474
23713
  */
21475
23714
  403: ErrorResponse;
21476
23715
  /**
@@ -21502,7 +23741,7 @@ export type CreateWorkspaceInviteErrors = {
21502
23741
  */
21503
23742
  401: ErrorResponse;
21504
23743
  /**
21505
- * Owner role required or personal workspace (invites not allowed)
23744
+ * Owner role, or Workspace admin, required; or personal workspace (invites not allowed)
21506
23745
  */
21507
23746
  403: ErrorResponse;
21508
23747
  /**
@@ -21551,7 +23790,7 @@ export type RevokeWorkspaceInviteErrors = {
21551
23790
  */
21552
23791
  401: ErrorResponse;
21553
23792
  /**
21554
- * Owner role required
23793
+ * Owner role, or Workspace admin, required; or the caller is a Workspace admin and the invite is an owner invite
21555
23794
  */
21556
23795
  403: ErrorResponse;
21557
23796
  /**
@@ -21592,7 +23831,7 @@ export type ResendWorkspaceInviteErrors = {
21592
23831
  */
21593
23832
  401: ErrorResponse;
21594
23833
  /**
21595
- * Owner role required
23834
+ * Owner role, or Workspace admin, required; or the caller is a Workspace admin and the invite is an owner invite
21596
23835
  */
21597
23836
  403: ErrorResponse;
21598
23837
  /**
@@ -21763,7 +24002,7 @@ export type RemoveWorkspaceMemberErrors = {
21763
24002
  */
21764
24003
  401: ErrorResponse;
21765
24004
  /**
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`)
24005
+ * Owner role, or Workspace admin, required (`FORBIDDEN`); the caller is a Workspace admin and the member is an owner or another Workspace admin (`NOT_OWNER`); 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
24006
  */
21768
24007
  403: ErrorResponse;
21769
24008
  /**
@@ -22271,7 +24510,7 @@ export type SetWorkspaceDefaultDeploymentErrors = {
22271
24510
  */
22272
24511
  404: ErrorResponse;
22273
24512
  /**
22274
- * Validation error, including a deployment_id that is not one of the workspace's deployments or has been deleted
24513
+ * Validation error, including a deployment_id that is not one of the workspace's deployments or has been deleted. `code` `deployment_not_permitted` is a deployment that belongs to a project other than the default: the workspace default applies in the default project alone.
22275
24514
  */
22276
24515
  422: ErrorResponse;
22277
24516
  /**
@@ -22339,6 +24578,36 @@ export type ClearWorkspaceDeploymentResponses = {
22339
24578
  export type ClearWorkspaceDeploymentResponse = ClearWorkspaceDeploymentResponses[keyof ClearWorkspaceDeploymentResponses];
22340
24579
  export type PickWorkspaceDeploymentData = {
22341
24580
  body: PickWorkspaceDeploymentRequest;
24581
+ headers?: {
24582
+ /**
24583
+ * The project a request acts in. The operations that list it are the
24584
+ * ones that read it: they list workflows, runs or assets, create one,
24585
+ * export assets, clear the caller's queue or History, pick the
24586
+ * deployment a browser runs on, or serve the editor that deployment
24587
+ * (the node, extension and model lists). Absent means
24588
+ * the workspace's default project, which is how existing clients keep
24589
+ * working.
24590
+ *
24591
+ * An operation on one existing workflow, run or asset does not take
24592
+ * it: the row's own project decides. Any other operation that creates
24593
+ * a workflow, run or asset acts in the default project until it lists
24594
+ * this parameter.
24595
+ *
24596
+ * The project must be in the workspace the request resolves to. A
24597
+ * project that does not exist, or that the caller may not view, is 404
24598
+ * `not_found`; the two look the same. Where Projects is not enabled for
24599
+ * the workspace the header is ignored.
24600
+ *
24601
+ * A Cloud JWT that carries a `project_id` claim acts only in that
24602
+ * project. Without the header such a request acts in the claimed
24603
+ * project; a header naming any other project, the default project
24604
+ * included, is 403 `permission_denied`, and so is any such request
24605
+ * where Projects is not enabled for the workspace. The refusal says the
24606
+ * token is bound to another project, not what the caller's role allows.
24607
+ *
24608
+ */
24609
+ 'X-Comfy-Project-ID'?: string;
24610
+ };
22342
24611
  path: {
22343
24612
  /**
22344
24613
  * Workspace ID (w-{uuid} format)
@@ -22362,11 +24631,11 @@ export type PickWorkspaceDeploymentErrors = {
22362
24631
  */
22363
24632
  403: ErrorResponse;
22364
24633
  /**
22365
- * Workspace not found, or the caller is not a member of it
24634
+ * Workspace not found, or the caller is not a member of it; or `code` `not_found` for a project that does not exist or that the caller may not view
22366
24635
  */
22367
24636
  404: ErrorResponse;
22368
24637
  /**
22369
- * Validation error, including a deployment_id that is not one of the workspace's deployments or has been deleted
24638
+ * Validation error, including a deployment_id that is not one of the workspace's deployments or has been deleted. `code` `deployment_not_permitted` is a live deployment that belongs to a project other than the one the pick is made in; nothing is picked. It says which project the deployment is in, not what the caller's role allows.
22370
24639
  */
22371
24640
  422: ErrorResponse;
22372
24641
  /**
@@ -22388,6 +24657,36 @@ export type PickWorkspaceDeploymentResponses = {
22388
24657
  export type PickWorkspaceDeploymentResponse = PickWorkspaceDeploymentResponses[keyof PickWorkspaceDeploymentResponses];
22389
24658
  export type GetWorkspaceDeploymentCpuServerData = {
22390
24659
  body?: never;
24660
+ headers?: {
24661
+ /**
24662
+ * The project a request acts in. The operations that list it are the
24663
+ * ones that read it: they list workflows, runs or assets, create one,
24664
+ * export assets, clear the caller's queue or History, pick the
24665
+ * deployment a browser runs on, or serve the editor that deployment
24666
+ * (the node, extension and model lists). Absent means
24667
+ * the workspace's default project, which is how existing clients keep
24668
+ * working.
24669
+ *
24670
+ * An operation on one existing workflow, run or asset does not take
24671
+ * it: the row's own project decides. Any other operation that creates
24672
+ * a workflow, run or asset acts in the default project until it lists
24673
+ * this parameter.
24674
+ *
24675
+ * The project must be in the workspace the request resolves to. A
24676
+ * project that does not exist, or that the caller may not view, is 404
24677
+ * `not_found`; the two look the same. Where Projects is not enabled for
24678
+ * the workspace the header is ignored.
24679
+ *
24680
+ * A Cloud JWT that carries a `project_id` claim acts only in that
24681
+ * project. Without the header such a request acts in the claimed
24682
+ * project; a header naming any other project, the default project
24683
+ * included, is 403 `permission_denied`, and so is any such request
24684
+ * where Projects is not enabled for the workspace. The refusal says the
24685
+ * token is bound to another project, not what the caller's role allows.
24686
+ *
24687
+ */
24688
+ 'X-Comfy-Project-ID'?: string;
24689
+ };
22391
24690
  path: {
22392
24691
  /**
22393
24692
  * Workspace ID (w-{uuid} format)
@@ -22411,7 +24710,7 @@ export type GetWorkspaceDeploymentCpuServerErrors = {
22411
24710
  */
22412
24711
  403: ForbiddenError;
22413
24712
  /**
22414
- * Workspace not found, or the caller is not a member
24713
+ * Workspace not found, or the caller is not a member; or `code` `not_found` for a project that does not exist or that the caller may not view
22415
24714
  */
22416
24715
  404: ErrorResponse;
22417
24716
  /**
@@ -22481,6 +24780,67 @@ export type ListWorkspaceDeploymentsResponses = {
22481
24780
  200: WorkspaceDeploymentList;
22482
24781
  };
22483
24782
  export type ListWorkspaceDeploymentsResponse = ListWorkspaceDeploymentsResponses[keyof ListWorkspaceDeploymentsResponses];
24783
+ export type AddWorkspaceDeploymentBuildModelData = {
24784
+ body: AddDeploymentBuildModelRequest;
24785
+ path: {
24786
+ /**
24787
+ * Workspace ID (w-{uuid} format)
24788
+ */
24789
+ id: string;
24790
+ /**
24791
+ * One of the workspace's deployments (dep-{uuid} format)
24792
+ */
24793
+ deployment_id: string;
24794
+ };
24795
+ query?: never;
24796
+ url: '/api/workspaces/{id}/deployments/{deployment_id}/build-models';
24797
+ };
24798
+ export type AddWorkspaceDeploymentBuildModelErrors = {
24799
+ /**
24800
+ * `code` `INVALID_REQUEST`: a field is empty or the filename is not a safe relative path; or comfy-builder's own refusal of the save or the cut, with its status and body unchanged; or `code` `workspace_id_invalid` (see SessionWorkspaceIDInvalid).
24801
+ */
24802
+ 400: DeploymentModelsRefusalBody;
24803
+ /**
24804
+ * 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`.
24805
+ */
24806
+ 401: ErrorResponse;
24807
+ /**
24808
+ * 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.
24809
+ */
24810
+ 402: PlatformPassthroughBody;
24811
+ /**
24812
+ * 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.
24813
+ */
24814
+ 403: DeploymentModelsForbiddenBody;
24815
+ /**
24816
+ * Workspace not found, the caller is not a member, the deployment id is not one, the deployment is deleted, or comfy-builder does not name the Build its Release was cut from: ingest's own refusal, `code` `NOT_FOUND`. Or the platform's own 404, its body unchanged and without `code`.
24817
+ */
24818
+ 404: DeploymentModelsRefusalBody;
24819
+ /**
24820
+ * `code` `MODEL_NAME_TAKEN`: the Build already lists a model on this path (type and filename joined by `/`, so a subfolder may sit in either) from another upload, the filename given or taken from that upload's name or link. `code` `MODEL_NAME_UNKNOWN`: the Build lists an upload of this type with no filename and comfy-builder's newest 100 model uploads do not name it; give that model a filename in the Build. `code` `BUILD_CHANGED`: twice, another save changed the Build between this save and the cut, and the new Release does not stage this upload on this path. Or comfy-builder's own 409, unchanged: the save found the Build changed twice, or the workspace has reached its release limit.
24821
+ */
24822
+ 409: DeploymentModelsRefusalBody;
24823
+ /**
24824
+ * 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.
24825
+ */
24826
+ 429: PlatformPassthroughBody;
24827
+ /**
24828
+ * 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`.
24829
+ */
24830
+ 500: PlatformPassthroughBody;
24831
+ /**
24832
+ * 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.
24833
+ */
24834
+ 503: PlatformPassthroughBody;
24835
+ };
24836
+ export type AddWorkspaceDeploymentBuildModelError = AddWorkspaceDeploymentBuildModelErrors[keyof AddWorkspaceDeploymentBuildModelErrors];
24837
+ export type AddWorkspaceDeploymentBuildModelResponses = {
24838
+ /**
24839
+ * The new version was cut; poll it by its releaseId
24840
+ */
24841
+ 200: DeploymentBuildModelRelease;
24842
+ };
24843
+ export type AddWorkspaceDeploymentBuildModelResponse = AddWorkspaceDeploymentBuildModelResponses[keyof AddWorkspaceDeploymentBuildModelResponses];
22484
24844
  export type CreateWorkspaceDeploymentModelUploadData = {
22485
24845
  body: DeploymentModelUploadRequest;
22486
24846
  path: {
@@ -22510,7 +24870,7 @@ export type CreateWorkspaceDeploymentModelUploadErrors = {
22510
24870
  */
22511
24871
  403: DeploymentModelsForbiddenBody;
22512
24872
  /**
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.
24873
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22514
24874
  */
22515
24875
  404: PlatformPassthroughBody;
22516
24876
  /**
@@ -22563,7 +24923,7 @@ export type CompleteWorkspaceDeploymentModelUploadErrors = {
22563
24923
  */
22564
24924
  403: DeploymentModelsForbiddenBody;
22565
24925
  /**
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.
24926
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22567
24927
  */
22568
24928
  404: PlatformPassthroughBody;
22569
24929
  /**
@@ -22620,7 +24980,7 @@ export type RefreshWorkspaceDeploymentModelUploadPartsErrors = {
22620
24980
  */
22621
24981
  403: DeploymentModelsForbiddenBody;
22622
24982
  /**
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.
24983
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22624
24984
  */
22625
24985
  404: PlatformPassthroughBody;
22626
24986
  /**
@@ -22673,7 +25033,7 @@ export type ListWorkspaceDeploymentModelsErrors = {
22673
25033
  */
22674
25034
  403: DeploymentModelsForbiddenBody;
22675
25035
  /**
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.
25036
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22677
25037
  */
22678
25038
  404: PlatformPassthroughBody;
22679
25039
  /**
@@ -22690,7 +25050,7 @@ export type ListWorkspaceDeploymentModelsResponses = {
22690
25050
  /**
22691
25051
  * comfy-deploy's model list, unchanged
22692
25052
  */
22693
- 200: PlatformPassthroughBody;
25053
+ 200: DeploymentModelList;
22694
25054
  };
22695
25055
  export type ListWorkspaceDeploymentModelsResponse = ListWorkspaceDeploymentModelsResponses[keyof ListWorkspaceDeploymentModelsResponses];
22696
25056
  export type AddWorkspaceDeploymentModelData = {
@@ -22722,7 +25082,7 @@ export type AddWorkspaceDeploymentModelErrors = {
22722
25082
  */
22723
25083
  403: DeploymentModelsForbiddenBody;
22724
25084
  /**
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.
25085
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22726
25086
  */
22727
25087
  404: PlatformPassthroughBody;
22728
25088
  /**
@@ -22743,7 +25103,7 @@ export type AddWorkspaceDeploymentModelResponses = {
22743
25103
  /**
22744
25104
  * comfy-deploy's new entry, unchanged
22745
25105
  */
22746
- 202: PlatformPassthroughBody;
25106
+ 202: DeploymentModel;
22747
25107
  };
22748
25108
  export type AddWorkspaceDeploymentModelResponse = AddWorkspaceDeploymentModelResponses[keyof AddWorkspaceDeploymentModelResponses];
22749
25109
  export type RemoveWorkspaceDeploymentModelData = {
@@ -22779,7 +25139,7 @@ export type RemoveWorkspaceDeploymentModelErrors = {
22779
25139
  */
22780
25140
  403: DeploymentModelsForbiddenBody;
22781
25141
  /**
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.
25142
+ * 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, or on the add and remove is being deleted (`error` `NOT_FOUND`); on the add, the upload is not found (`error` `UPLOAD_NOT_FOUND`); on the remove, the entry is not found (`error` `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; one without it is the platform's. See DeploymentModelsRefusalBody.
22783
25143
  */
22784
25144
  404: PlatformPassthroughBody;
22785
25145
  /**
@@ -23441,6 +25801,10 @@ export type GetViewCompatAliasErrors = {
23441
25801
  * Internal server error
23442
25802
  */
23443
25803
  500: ErrorResponse;
25804
+ /**
25805
+ * The credential could not be checked because a store read failed, such as the session, user or workspace membership read timing out. Nothing was done, so the request is safe to resend after the Retry-After seconds. `code` is `SERVICE_UNAVAILABLE` and `message` is `authentication service unavailable`.
25806
+ */
25807
+ 503: ErrorResponse;
23444
25808
  };
23445
25809
  export type GetViewCompatAliasError = GetViewCompatAliasErrors[keyof GetViewCompatAliasErrors];
23446
25810
  export type GetViewCompatAliasResponses = {