@civitai/orchestration-client 0.2.0-beta.124 → 0.2.0-beta.125

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.
@@ -97,6 +97,10 @@ export type AiToolkitTrainingInput = Omit<TrainingInput, 'engine'> & {
97
97
  * epoch resumes from this model instead of the base model, and the new epochs build on top of it.
98
98
  */
99
99
  continueFrom?: null | string;
100
+ /**
101
+ * What each epoch job records to its trace stream (`output.epochs[].traceUrl`): `none` (default), `logs` (plain-text console output)
102
+ * or `events` (NDJSON of console lines, step progress, phases and epoch checkpoints).
103
+ */
100
104
  trace: TrainingTraceMode;
101
105
  /**
102
106
  * Per-epoch surcharge (buzz) for the delivered checkpoint and its preview samples, billed on top of the per-step cost. Override where per-epoch samples are expensive (e.g. video).
@@ -272,6 +276,10 @@ export type AceStepAudioInput = {
272
276
  * Optional diffusion model (unet) override. Defaults to ACE-Step 1.5 turbo 2B.
273
277
  */
274
278
  diffusionModel?: null | string;
279
+ /**
280
+ * Optional cover image. When provided, the output is a WebM video
281
+ * with this image as the visual; otherwise, output is audio-only (MP3).
282
+ */
275
283
  cover?: AceStepAudioCover;
276
284
  /**
277
285
  * Optional text encoder (CLIP) override. Defaults to qwen_4b_ace15.
@@ -304,6 +312,9 @@ export type AceStepAudioInput = {
304
312
  };
305
313
  };
306
314
  export type AceStepAudioOutput = {
315
+ /**
316
+ * The generated output blob — VideoBlob (with background image) or AudioBlob (audio only).
317
+ */
307
318
  blob: Blob;
308
319
  };
309
320
  /**
@@ -318,6 +329,9 @@ export type AceStepAudioStep = Omit<WorkflowStep, '$type'> & {
318
329
  * Generates full songs from text descriptions and structured lyrics with ACE Step 1.5.
319
330
  */
320
331
  export type AceStepAudioStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
332
+ /**
333
+ * Input for the AceStepAudioStep step.
334
+ */
321
335
  input: AceStepAudioInput;
322
336
  $type: 'aceStepAudio';
323
337
  };
@@ -401,6 +415,9 @@ export type AgeClassificationStep = Omit<WorkflowStep, '$type'> & {
401
415
  * Age classification
402
416
  */
403
417
  export type AgeClassificationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
418
+ /**
419
+ * Input for the AgeClassificationStep step.
420
+ */
404
421
  input: AgeClassificationInput;
405
422
  $type: 'ageClassification';
406
423
  };
@@ -594,11 +611,14 @@ export type AudioCaptioningInput = {
594
611
  * Maximum number of tokens to generate for each ACE-Step request.
595
612
  */
596
613
  maxNewTokens: number;
614
+ includeCaption: boolean;
615
+ prepareForModeration: boolean;
597
616
  };
598
617
  export type AudioCaptioningOutput = {
599
618
  results: {
600
619
  [key: string]: AudioCaptioningOutputItem;
601
620
  };
621
+ hasAudio?: null | boolean;
602
622
  };
603
623
  export type AudioCaptioningOutputItem = {
604
624
  text: string;
@@ -609,6 +629,7 @@ export type AudioCaptioningOutputItem = {
609
629
  timeSignature?: null | string;
610
630
  duration?: null | string;
611
631
  language?: null | string;
632
+ finishReason?: null | string;
612
633
  };
613
634
  /**
614
635
  * Audio Captioning
@@ -622,9 +643,31 @@ export type AudioCaptioningStep = Omit<WorkflowStep, '$type'> & {
622
643
  * Audio Captioning
623
644
  */
624
645
  export type AudioCaptioningStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
646
+ /**
647
+ * Input for the AudioCaptioningStep step.
648
+ */
625
649
  input: AudioCaptioningInput;
626
650
  $type: 'audioCaptioning';
627
651
  };
652
+ export type AudioClassificationInput = {
653
+ mediaUrl: string;
654
+ };
655
+ export type AudioClassificationOutput = {
656
+ hasAudio: boolean;
657
+ model: string;
658
+ segments: Array<AudioClassificationSegment>;
659
+ classificationMilliseconds: number;
660
+ };
661
+ export type AudioClassificationSegment = {
662
+ blobKey: string;
663
+ name: string;
664
+ kind: string;
665
+ durationSeconds: number;
666
+ speechScore: number;
667
+ musicScore: number;
668
+ singingScore: number;
669
+ speechFraction: number;
670
+ };
628
671
  /**
629
672
  * An audio mixdown produced when the composition has no video.
630
673
  */
@@ -632,6 +675,57 @@ export type AudioComposeMediaOutput = Omit<ComposeMediaOutput, 'type'> & {
632
675
  audioBlob: AudioBlob;
633
676
  type: 'audio';
634
677
  };
678
+ export type AudioModerationInput = {
679
+ mediaUrl: string;
680
+ /**
681
+ * auto classifies each segment on CPU and sends speech to ASR when the language is supported, everything else to ACE-Step.
682
+ */
683
+ transcriber: 'auto' | 'aceStep' | 'asr';
684
+ language?: null | string;
685
+ };
686
+ export type AudioModerationOutput = {
687
+ lyrics: string;
688
+ sexualizedMinors: boolean;
689
+ score: null | number;
690
+ model: null | string;
691
+ policyHash: null | string;
692
+ hasAudio?: null | boolean;
693
+ skippedReason?: null | string;
694
+ readonly blocked: boolean;
695
+ };
696
+ /**
697
+ * Transcribe every audio track and classify the lyrics for sexualized minors.
698
+ */
699
+ export type AudioModerationStep = Omit<WorkflowStep, '$type'> & {
700
+ input: AudioModerationInput;
701
+ output?: AudioModerationOutput;
702
+ $type: 'audioModeration';
703
+ };
704
+ /**
705
+ * Transcribe every audio track and classify the lyrics for sexualized minors.
706
+ */
707
+ export type AudioModerationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
708
+ /**
709
+ * Input for the AudioModerationStep step.
710
+ */
711
+ input: AudioModerationInput;
712
+ $type: 'audioModeration';
713
+ };
714
+ export type AudioTextModerationInput = {
715
+ lyrics?: null | string;
716
+ audioCaptioning?: AudioCaptioningOutput;
717
+ transcription?: TranscriptionOutput;
718
+ };
719
+ export type AudioTextModerationOutput = {
720
+ lyrics: string;
721
+ sexualizedMinors: boolean;
722
+ score: null | number;
723
+ model: null | string;
724
+ policyHash: null | string;
725
+ hasAudio?: null | boolean;
726
+ skippedReason?: null | string;
727
+ readonly blocked: boolean;
728
+ };
635
729
  export type AvailableResourceAvailability = Omit<ResourceAvailability, 'status'> & {
636
730
  workers: number;
637
731
  status: 'available';
@@ -652,6 +746,10 @@ export type AvifOutputFormat = Omit<ImageOutputFormat, 'format'> & {
652
746
  * are kept. Video only; needs an alpha-capable container (webp) and a transparent canvas background to carry the transparency.
653
747
  */
654
748
  export type BackgroundRemovalTransformer = Omit<MediaTransformer, 'type'> & {
749
+ /**
750
+ * Shadow handling. Sources with painted soft drop shadows need Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.ShadowRemoval.Gentle
751
+ * (the default) or Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.ShadowRemoval.Aggressive.
752
+ */
655
753
  shadowRemoval?: ShadowRemoval;
656
754
  /**
657
755
  * Also seed the fill from the frame centre, for artwork with an enclosed background-coloured
@@ -746,6 +844,9 @@ export type BlobArchiveStep = Omit<WorkflowStep, '$type'> & {
746
844
  * Runs in-process in the orchestrator; no worker job is dispatched.
747
845
  */
748
846
  export type BlobArchiveStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
847
+ /**
848
+ * Input for the BlobArchiveStep step.
849
+ */
749
850
  input: BlobArchiveInput;
750
851
  $type: 'blobArchive';
751
852
  };
@@ -860,6 +961,9 @@ export type BucketResponse = {
860
961
  successRate?: null | number;
861
962
  canceledRate: number;
862
963
  userErrorRate: number;
964
+ /**
965
+ * Per-request spend over succeeded steps — see Civitai.Orchestration.Api.Controllers.v2.Consumers.Services.MetricsResponse.CostBuzz.
966
+ */
863
967
  costBuzz?: PercentilesResponse;
864
968
  latencySeconds?: PercentilesResponse;
865
969
  };
@@ -872,9 +976,12 @@ export declare const BuzzClientAccount: {
872
976
  export type BuzzClientAccount = (typeof BuzzClientAccount)[keyof typeof BuzzClientAccount];
873
977
  export type ChatCompletionChoice = {
874
978
  index: number;
979
+ /**
980
+ * An assistant message representing a prior response.
981
+ */
875
982
  message: AssistantMessage;
876
983
  finishReason?: null | string;
877
- logprobs?: null;
984
+ logprobs?: unknown;
878
985
  };
879
986
  /**
880
987
  * Accepts both camelCase (`imageUrl`) and snake_case (`image_url`) type discriminators.
@@ -887,7 +994,7 @@ export type ChatCompletionContentPart = {
887
994
  export type ChatCompletionFunction = {
888
995
  name: string;
889
996
  description?: null | string;
890
- parameters?: null;
997
+ parameters?: unknown;
891
998
  strict?: null | boolean;
892
999
  };
893
1000
  export type ChatCompletionFunctionCall = {
@@ -900,6 +1007,9 @@ export type ChatCompletionFunctionCall = {
900
1007
  */
901
1008
  export type ChatCompletionGeneratedImage = {
902
1009
  type?: string;
1010
+ /**
1011
+ * Currently always a base64 data URI.
1012
+ */
903
1013
  image_url: ChatCompletionGeneratedImageUrl;
904
1014
  };
905
1015
  /**
@@ -998,13 +1108,20 @@ export type ChatCompletionInput = {
998
1108
  * Controls which (if any) tool is called by the model.
999
1109
  * Can be "auto", "none", "required", or an object specifying a particular function.
1000
1110
  */
1001
- tool_choice?: null;
1111
+ tool_choice?: unknown;
1002
1112
  /**
1003
1113
  * Output modalities, "text" and/or "image"; defaults to text-only. Including "image" routes the request to the
1004
1114
  * image generation pipeline and returns generated images on the assistant message.
1005
1115
  */
1006
1116
  modalities?: null | Array<string>;
1117
+ /**
1118
+ * Image-generation parameters. Only consulted when Civitai.Orchestration.Grains.Workflows.Steps.ChatCompletion.ChatCompletionInput.Modalities contains "image".
1119
+ */
1007
1120
  image_config?: ChatCompletionImageConfig;
1121
+ /**
1122
+ * OpenAI-compatible response_format (`json_object` or `json_schema`). When set, the parsed content is exposed on
1123
+ * Civitai.Orchestration.Grains.Workflows.Steps.ChatCompletion.ChatCompletionOutput.Parsed so later steps can reference fields via `$ref` paths such as `output.parsed.lyrics`.
1124
+ */
1008
1125
  responseFormat?: ChatCompletionResponseFormat;
1009
1126
  };
1010
1127
  export type ChatCompletionJsonSchema = {
@@ -1034,7 +1151,7 @@ export type ChatCompletionOutput = {
1034
1151
  * Parsed JSON of `Choices[0].Message.Content`, populated when the request used a JSON `response_format`
1035
1152
  * and the content parsed. Reachable from later steps via `$ref` paths like `output.parsed.<field>`.
1036
1153
  */
1037
- parsed?: null;
1154
+ parsed?: unknown;
1038
1155
  };
1039
1156
  /**
1040
1157
  * OpenAI-compatible response_format. For `json_object` or `json_schema` the content is parsed server-side and
@@ -1045,12 +1162,18 @@ export type ChatCompletionResponseFormat = {
1045
1162
  * OpenAI-compatible value: `text`, `json_object`, or `json_schema`.
1046
1163
  */
1047
1164
  type: string;
1165
+ /**
1166
+ * Required when Civitai.Orchestration.Grains.Workflows.Steps.ChatCompletion.ChatCompletionResponseFormat.Type is `json_schema`. Ignored otherwise.
1167
+ */
1048
1168
  jsonSchema?: ChatCompletionJsonSchema;
1049
1169
  };
1050
1170
  /**
1051
1171
  * ChatCompletion
1052
1172
  */
1053
1173
  export type ChatCompletionStep = Omit<WorkflowStep, '$type'> & {
1174
+ /**
1175
+ * Input for a chat completion step, compatible with OpenAI Chat Completions API.
1176
+ */
1054
1177
  input: ChatCompletionInput;
1055
1178
  output?: ChatCompletionOutput;
1056
1179
  $type: 'chatCompletion';
@@ -1059,6 +1182,9 @@ export type ChatCompletionStep = Omit<WorkflowStep, '$type'> & {
1059
1182
  * ChatCompletion
1060
1183
  */
1061
1184
  export type ChatCompletionStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
1185
+ /**
1186
+ * Input for the ChatCompletionStep step.
1187
+ */
1062
1188
  input: ChatCompletionInput;
1063
1189
  $type: 'chatCompletion';
1064
1190
  };
@@ -1074,7 +1200,7 @@ export type ChatCompletionTool = {
1074
1200
  /**
1075
1201
  * Server-tool parameters for providers such as OpenRouter.
1076
1202
  */
1077
- parameters?: null;
1203
+ parameters?: unknown;
1078
1204
  };
1079
1205
  export type ChatCompletionToolCall = {
1080
1206
  id: string;
@@ -1085,6 +1211,9 @@ export type ChatCompletionUsage = {
1085
1211
  promptTokens: number;
1086
1212
  completionTokens: number;
1087
1213
  totalTokens: number;
1214
+ /**
1215
+ * Breakdown of Civitai.Orchestration.Grains.Workflows.Steps.ChatCompletion.ChatCompletionUsage.CompletionTokens, present when the provider reports one.
1216
+ */
1088
1217
  completionTokensDetails?: ChatCompletionTokensDetails;
1089
1218
  };
1090
1219
  export type ChromaAiToolkitTrainingInput = Omit<AiToolkitTrainingInput, 'engine' | 'ecosystem'> & {
@@ -1631,7 +1760,13 @@ export type ComfyHiDreamI1ImageGenInput = Omit<ComfyImageGenInput, 'engine' | 'e
1631
1760
  prompt: string;
1632
1761
  negativePrompt?: null | string;
1633
1762
  variant?: HiDreamI1Variant;
1763
+ /**
1764
+ * Defaults to fp8, except for the full variant which is only available in fp16.
1765
+ */
1634
1766
  precision?: HiDreamI1Precision;
1767
+ /**
1768
+ * Defaults to lcm for fast and dev, uni_pc for full.
1769
+ */
1635
1770
  sampler?: ComfySampler;
1636
1771
  /**
1637
1772
  * Defaults to 16 for fast, 28 for dev and 50 for full.
@@ -2384,6 +2519,9 @@ export type ComfyMingDesignImageGenInput = Omit<
2384
2519
  operation: null | string;
2385
2520
  prompt: string;
2386
2521
  negativePrompt?: null | string;
2522
+ /**
2523
+ * Defaults to Euler for generation, LCM for editing.
2524
+ */
2387
2525
  sampler?: ComfySampler;
2388
2526
  scheduler?: ComfyScheduler;
2389
2527
  steps?: number;
@@ -2582,16 +2720,36 @@ export type ComfyNodepackSnapshotResult = {
2582
2720
  * Declare this, not the bare pack URN, on a customComfy step's `resources`.
2583
2721
  */
2584
2722
  layerAir: string;
2723
+ /**
2724
+ * Tar of the pack's site-packages + custom_nodes install delta; mounted by spine workers to skip pip.
2725
+ */
2585
2726
  layer: Blob;
2727
+ /**
2728
+ * The full ComfyUI /object_info with the pack installed; ComfyCloud diffs it against its baseline for the editor.
2729
+ */
2586
2730
  objectInfo: Blob;
2731
+ /**
2732
+ * Tar of the pack's WEB_DIRECTORY (extension JS) for the editor.
2733
+ */
2587
2734
  web: Blob;
2588
2735
  };
2589
2736
  export type ComfyNodepackSnapshotStep = Omit<WorkflowStep, '$type'> & {
2737
+ /**
2738
+ * Installs ComfyUI custom nodepacks on a comfy image and captures the resolved install and editor metadata as
2739
+ * reusable blobs. Runs on a real worker so compiled deps match the fleet the consumer will run on.
2740
+ */
2590
2741
  input: ComfyNodepackSnapshotInput;
2742
+ /**
2743
+ * One result per installed pack, each carrying the captured install layer, full /object_info and web assets as
2744
+ * blobs that consumers read directly from orchestrator blob storage.
2745
+ */
2591
2746
  output?: ComfyNodepackSnapshotOutput;
2592
2747
  $type: 'comfyNodepackSnapshot';
2593
2748
  };
2594
2749
  export type ComfyNodepackSnapshotStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
2750
+ /**
2751
+ * Input for the ComfyNodepackSnapshotStep step.
2752
+ */
2595
2753
  input: ComfyNodepackSnapshotInput;
2596
2754
  $type: 'comfyNodepackSnapshot';
2597
2755
  };
@@ -2941,6 +3099,9 @@ export type ComfyStep = Omit<WorkflowStep, '$type'> & {
2941
3099
  * Comfy workflows
2942
3100
  */
2943
3101
  export type ComfyStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
3102
+ /**
3103
+ * Input for the ComfyStep step.
3104
+ */
2944
3105
  input: ComfyInput;
2945
3106
  $type: 'comfy';
2946
3107
  };
@@ -3025,6 +3186,10 @@ export type ComfyTrainingInput = Omit<TrainingInput, 'engine'> & {
3025
3186
  * epoch resumes from this model instead of the base model, and the new epochs build on top of it.
3026
3187
  */
3027
3188
  continueFrom?: null | string;
3189
+ /**
3190
+ * What each epoch job records to its trace stream (`output.epochs[].traceUrl`): `none` (default), `logs` (plain-text console output)
3191
+ * or `events` (NDJSON of console lines, step progress, phases and epoch checkpoints).
3192
+ */
3028
3193
  trace: TrainingTraceMode;
3029
3194
  /**
3030
3195
  * Per-epoch surcharge (buzz) for the delivered checkpoint and its preview samples, billed on top of the per-step cost. Override where per-epoch samples are expensive (e.g. video).
@@ -3166,6 +3331,10 @@ export type ComposeMediaElementInput = {
3166
3331
  * Ignored when Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.ComposeMediaElementInput.At is set.
3167
3332
  */
3168
3333
  offset?: number;
3334
+ /**
3335
+ * Spatial placement of this element on the output canvas. Ignored for audio elements and for
3336
+ * all-audio compositions.
3337
+ */
3169
3338
  layout?: MediaLayout;
3170
3339
  /**
3171
3340
  * Ordered per-element transformers (fades, volume, ...) applied in array order.
@@ -3178,7 +3347,15 @@ export type ComposeMediaInput = {
3178
3347
  * `zOrder` then array order. To stitch videos end-to-end, list them with no `at`/`offset`.
3179
3348
  */
3180
3349
  elements: Array<ComposeMediaElementInput>;
3350
+ /**
3351
+ * Output geometry for video output; when omitted, derived from the elements (largest video, fastest frame rate).
3352
+ * Supplying a canvas does not by itself force video output — see Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.ComposeMediaInput.Output.
3353
+ */
3181
3354
  canvas?: MediaCanvas;
3355
+ /**
3356
+ * Desired output kind and container. When omitted, the kind is derived from the elements and
3357
+ * the container defaults to MP4 (video) or Ogg (audio).
3358
+ */
3182
3359
  output?: ComposeMediaOutputSpec;
3183
3360
  /**
3184
3361
  * Divide the audio mix by the number of overlapping elements to avoid clipping. Defaults to false.
@@ -3198,7 +3375,14 @@ export type ComposeMediaOutput = {
3198
3375
  * Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.ComposeMediaOutputSpec.Type unset to derive the kind from the elements.
3199
3376
  */
3200
3377
  export type ComposeMediaOutputSpec = {
3378
+ /**
3379
+ * Forces the output kind. When null, it is derived from the elements: video if any element is
3380
+ * video or a canvas is supplied, otherwise audio.
3381
+ */
3201
3382
  type?: MediaOutputType;
3383
+ /**
3384
+ * Output container. Civitai.Orchestration.Grains.Workflows.Steps.ComposeMedia.MediaContainer.Auto selects MP4 for video and Ogg for audio.
3385
+ */
3202
3386
  container?: MediaContainer;
3203
3387
  };
3204
3388
  /**
@@ -3223,6 +3407,9 @@ export type ComposeMediaStep = Omit<WorkflowStep, '$type'> & {
3223
3407
  * Compose Media
3224
3408
  */
3225
3409
  export type ComposeMediaStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
3410
+ /**
3411
+ * Input for the ComposeMediaStep step.
3412
+ */
3226
3413
  input: ComposeMediaInput;
3227
3414
  $type: 'composeMedia';
3228
3415
  };
@@ -3266,6 +3453,9 @@ export type ConvertImageStep = Omit<WorkflowStep, '$type'> & {
3266
3453
  * A workflow step that converts images to different formats and applies optional transforms.
3267
3454
  */
3268
3455
  export type ConvertImageStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
3456
+ /**
3457
+ * Input for the ConvertImageStep step.
3458
+ */
3269
3459
  input: ConvertImageInput;
3270
3460
  $type: 'convertImage';
3271
3461
  };
@@ -3288,6 +3478,10 @@ export type CustomComfyInput = {
3288
3478
  * the orchestrator does not inspect or validate node contents.
3289
3479
  */
3290
3480
  workflow: unknown;
3481
+ /**
3482
+ * How much of the ComfyUI `/ws` activity the worker records to a streaming blob the consumer can tail
3483
+ * live (URL on `output.traceUrl`). Civitai.Orchestration.Grains.Workflows.Steps.CustomComfy.TraceMode.None (default) records nothing.
3484
+ */
3291
3485
  trace: TraceMode;
3292
3486
  /**
3293
3487
  * When set, the scheduler prefers a worker that already holds this session's ComfyUI container.
@@ -3335,6 +3529,9 @@ export type CustomComfyStep = Omit<WorkflowStep, '$type'> & {
3335
3529
  * CustomComfy
3336
3530
  */
3337
3531
  export type CustomComfyStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
3532
+ /**
3533
+ * Input for the CustomComfyStep step.
3534
+ */
3338
3535
  input: CustomComfyInput;
3339
3536
  $type: 'customComfy';
3340
3537
  };
@@ -3444,6 +3641,9 @@ export type EchoStep = Omit<WorkflowStep, '$type'> & {
3444
3641
  * Echo
3445
3642
  */
3446
3643
  export type EchoStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
3644
+ /**
3645
+ * Input for the EchoStep step.
3646
+ */
3447
3647
  input: EchoInput;
3448
3648
  $type: 'echo';
3449
3649
  };
@@ -4050,6 +4250,53 @@ export type Flux3KleinAiToolkitTrainingInput = Omit<
4050
4250
  */
4051
4251
  batchSize?: null | number;
4052
4252
  };
4253
+ export type Flux3MaxImageToVideoInput = Omit<
4254
+ Flux3MaxVideoGenInput,
4255
+ 'engine' | 'version' | 'operation'
4256
+ > & {
4257
+ /**
4258
+ * Either A URL, A DataURL or a Base64 string
4259
+ */
4260
+ image: string;
4261
+ /**
4262
+ * Either A URL, A DataURL or a Base64 string
4263
+ */
4264
+ endImage?: null | string;
4265
+ operation: 'imageToVideo';
4266
+ version: 'v3.0-max';
4267
+ engine: 'flux';
4268
+ };
4269
+ export type Flux3MaxKeyframesToVideoInput = Omit<
4270
+ Flux3MaxVideoGenInput,
4271
+ 'engine' | 'version' | 'operation'
4272
+ > & {
4273
+ keyframes: Array<Flux3Keyframe>;
4274
+ operation: 'keyframesToVideo';
4275
+ version: 'v3.0-max';
4276
+ engine: 'flux';
4277
+ };
4278
+ export type Flux3MaxTextToVideoInput = Omit<
4279
+ Flux3MaxVideoGenInput,
4280
+ 'engine' | 'version' | 'operation'
4281
+ > & {
4282
+ operation: 'textToVideo';
4283
+ version: 'v3.0-max';
4284
+ engine: 'flux';
4285
+ };
4286
+ export type Flux3MaxVideoGenInput = Omit<Flux3VideoGenInput, 'engine' | 'version'> & {
4287
+ operation: string;
4288
+ duration?: number;
4289
+ resolution?: '720p' | '1080p';
4290
+ aspectRatio?: 'auto' | '21:9' | '2:1' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16';
4291
+ generateAudio?: boolean;
4292
+ /**
4293
+ * Higher reasoning effort increases generation time.
4294
+ */
4295
+ reasoningLevel?: 'low' | 'high';
4296
+ seed?: null | number;
4297
+ version: 'v3.0-max';
4298
+ engine: 'flux';
4299
+ };
4053
4300
  /**
4054
4301
  * Re-render a previously generated draft at full-quality 1080p with audio.
4055
4302
  */
@@ -4597,6 +4844,9 @@ export type HaiperVideoGenCameraMovement =
4597
4844
  (typeof HaiperVideoGenCameraMovement)[keyof typeof HaiperVideoGenCameraMovement];
4598
4845
  export type HaiperVideoGenInput = Omit<VideoGenInput, 'engine'> & {
4599
4846
  negativePrompt?: null | string;
4847
+ /**
4848
+ * Get or set camera movement. This is only available when targeting the v1.5 Model
4849
+ */
4600
4850
  cameraMovement?: HaiperVideoGenCameraMovement;
4601
4851
  seed?: number;
4602
4852
  duration?: 2 | 4 | 8;
@@ -4997,6 +5247,9 @@ export type ImageBackgroundRemovalInput = {
4997
5247
  * Either A URL, A DataURL or a Base64 string
4998
5248
  */
4999
5249
  image: string;
5250
+ /**
5251
+ * The output image format. Defaults to PNG, which preserves transparency.
5252
+ */
5000
5253
  format?: ImageBackgroundRemovalFormat;
5001
5254
  };
5002
5255
  export type ImageBackgroundRemovalOutput = {
@@ -5014,6 +5267,9 @@ export type ImageBackgroundRemovalStep = Omit<WorkflowStep, '$type'> & {
5014
5267
  * Removes the background from an image using BiRefNet.
5015
5268
  */
5016
5269
  export type ImageBackgroundRemovalStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5270
+ /**
5271
+ * Input for the ImageBackgroundRemovalStep step.
5272
+ */
5017
5273
  input: ImageBackgroundRemovalInput;
5018
5274
  $type: 'imageBackgroundRemoval';
5019
5275
  };
@@ -5061,6 +5317,9 @@ export type ImageGenStep = Omit<WorkflowStep, '$type'> & {
5061
5317
  * Image Generation
5062
5318
  */
5063
5319
  export type ImageGenStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5320
+ /**
5321
+ * Input for the ImageGenStep step.
5322
+ */
5064
5323
  input: ImageGenInput;
5065
5324
  $type: 'imageGen';
5066
5325
  };
@@ -5124,6 +5383,9 @@ export type ImageResourceTrainingInput = {
5124
5383
  negativePrompt?: null | string;
5125
5384
  };
5126
5385
  export type ImageResourceTrainingOutput = {
5386
+ /**
5387
+ * The status of age classification
5388
+ */
5127
5389
  moderationStatus: ImageResouceTrainingModerationStatus;
5128
5390
  epochs: Array<EpochResult>;
5129
5391
  sampleImagesPrompts: Array<string>;
@@ -5149,6 +5411,9 @@ export type ImageResourceTrainingStep = Omit<WorkflowStep, '$type'> & {
5149
5411
  * LORA Training
5150
5412
  */
5151
5413
  export type ImageResourceTrainingStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5414
+ /**
5415
+ * Input for the ImageResourceTrainingStep step.
5416
+ */
5152
5417
  input: ImageResourceTrainingInput;
5153
5418
  $type: 'imageResourceTraining';
5154
5419
  };
@@ -5252,6 +5517,9 @@ export type ImageScanningStep = Omit<WorkflowStep, '$type'> & {
5252
5517
  * Image scanning
5253
5518
  */
5254
5519
  export type ImageScanningStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5520
+ /**
5521
+ * Input for the ImageScanningStep step.
5522
+ */
5255
5523
  input: ImageScanningInput;
5256
5524
  $type: 'imageScanning';
5257
5525
  };
@@ -5291,6 +5559,9 @@ export type ImageToSvgStep = Omit<WorkflowStep, '$type'> & {
5291
5559
  * Converts a raster image to an SVG using a local StarVector or OmniSVG model.
5292
5560
  */
5293
5561
  export type ImageToSvgStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5562
+ /**
5563
+ * Input for the ImageToSvgStep step.
5564
+ */
5294
5565
  input: ImageToSvgInput;
5295
5566
  $type: 'imageToSvg';
5296
5567
  };
@@ -5377,6 +5648,9 @@ export type ImageUpscalerStep = Omit<WorkflowStep, '$type'> & {
5377
5648
  $type: 'imageUpscaler';
5378
5649
  };
5379
5650
  export type ImageUpscalerStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
5651
+ /**
5652
+ * Input for the ImageUpscalerStep step.
5653
+ */
5380
5654
  input: ImageUpscalerInput;
5381
5655
  $type: 'imageUpscaler';
5382
5656
  };
@@ -5695,7 +5969,7 @@ export type Krea2StyleReference = {
5695
5969
  */
5696
5970
  export type Krea3ImageGenInput = Omit<ImageGenInput, 'engine'> & {
5697
5971
  prompt: string;
5698
- thinkingMode?: 'instant' | 'medium';
5972
+ thinkingMode?: 'instant' | 'medium' | 'ultra';
5699
5973
  /**
5700
5974
  * Omit for text-to-image, or provide up to six images to edit.
5701
5975
  */
@@ -5793,6 +6067,32 @@ export type LightricksVideoGenInput = Omit<VideoGenInput, 'engine'> & {
5793
6067
  enhancePrompt?: boolean;
5794
6068
  engine: 'lightricks';
5795
6069
  };
6070
+ /**
6071
+ * Qwen3 Base: speaks in a voice cloned from Civitai.Orchestration.Grains.Workflows.Steps.LiveTextToSpeech.LiveQwen3BaseTTSInput.RefAudioUrl, like `textToSpeech`'s `base` operation.
6072
+ */
6073
+ export type LiveQwen3BaseTtsInput = Omit<
6074
+ LiveQwen3TextToSpeechInput,
6075
+ 'engine' | 'ecosystem' | 'operation'
6076
+ > & {
6077
+ /**
6078
+ * Reference audio AIR URN or external URL for voice cloning.
6079
+ * Accepts AIR URNs (existing resources) or HTTP(S) URLs.
6080
+ */
6081
+ refAudioUrl: string;
6082
+ /**
6083
+ * Transcript of the reference audio.
6084
+ * Required unless XVectorOnlyMode is true.
6085
+ */
6086
+ refText?: null | string;
6087
+ /**
6088
+ * If true, clones from the speaker embedding alone and ignores refText.
6089
+ * Defaults to true on live: in-context mode has been seen generating to the token cap on short sentences.
6090
+ */
6091
+ xVectorOnlyMode?: boolean;
6092
+ operation: 'base';
6093
+ ecosystem: 'qwen3';
6094
+ engine: 'vllm-omni';
6095
+ };
5796
6096
  export type LiveQwen3CustomVoiceTtsInput = Omit<
5797
6097
  LiveQwen3TextToSpeechInput,
5798
6098
  'engine' | 'ecosystem' | 'operation'
@@ -5881,6 +6181,9 @@ export type LiveTextToSpeechOutput = {
5881
6181
  * Live text to speech
5882
6182
  */
5883
6183
  export type LiveTextToSpeechStep = Omit<WorkflowStep, '$type'> & {
6184
+ /**
6185
+ * Mirrors `textToSpeech` inputs, but only for voices proven to stream with low first-audio latency.
6186
+ */
5884
6187
  input: LiveTextToSpeechInput;
5885
6188
  output?: LiveTextToSpeechOutput;
5886
6189
  $type: 'liveTextToSpeech';
@@ -5889,6 +6192,9 @@ export type LiveTextToSpeechStep = Omit<WorkflowStep, '$type'> & {
5889
6192
  * Live text to speech
5890
6193
  */
5891
6194
  export type LiveTextToSpeechStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6195
+ /**
6196
+ * Input for the LiveTextToSpeechStep step.
6197
+ */
5892
6198
  input: LiveTextToSpeechInput;
5893
6199
  $type: 'liveTextToSpeech';
5894
6200
  };
@@ -5953,6 +6259,9 @@ export type LiveTranscriptionStep = Omit<WorkflowStep, '$type'> & {
5953
6259
  * Live transcription
5954
6260
  */
5955
6261
  export type LiveTranscriptionStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6262
+ /**
6263
+ * Input for the LiveTranscriptionStep step.
6264
+ */
5956
6265
  input: LiveTranscriptionInput;
5957
6266
  $type: 'liveTranscription';
5958
6267
  };
@@ -6118,6 +6427,9 @@ export type MediaCaptioningStep = Omit<WorkflowStep, '$type'> & {
6118
6427
  * Media Captioning
6119
6428
  */
6120
6429
  export type MediaCaptioningStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6430
+ /**
6431
+ * Input for the MediaCaptioningStep step.
6432
+ */
6121
6433
  input: MediaCaptioningInput;
6122
6434
  $type: 'mediaCaptioning';
6123
6435
  };
@@ -6169,6 +6481,9 @@ export type MediaHashStep = Omit<WorkflowStep, '$type'> & {
6169
6481
  * MediaHash
6170
6482
  */
6171
6483
  export type MediaHashStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6484
+ /**
6485
+ * Input for the MediaHashStep step.
6486
+ */
6172
6487
  input: MediaHashInput;
6173
6488
  $type: 'mediaHash';
6174
6489
  };
@@ -6199,6 +6514,9 @@ export type MediaLayout = {
6199
6514
  * Uniform scale applied to the element before placement. `1.0` keeps the fitted size.
6200
6515
  */
6201
6516
  scale?: number;
6517
+ /**
6518
+ * How a video element is fitted into the output canvas when its aspect ratio differs.
6519
+ */
6202
6520
  fit?: MediaFit;
6203
6521
  };
6204
6522
  /**
@@ -6263,16 +6581,34 @@ export type MediaRatingOutput = {
6263
6581
  labels?: null | Array<string>;
6264
6582
  ageClassification?: AgeClassificationResult;
6265
6583
  faceRecognition?: FaceRecognitionResult;
6584
+ /**
6585
+ * Represents AI vs real image recognition results.
6586
+ */
6266
6587
  aiRecognition?: AiRecognitionResult;
6588
+ /**
6589
+ * Represents anime vs real image recognition results.
6590
+ */
6267
6591
  animeRecognition?: AnimeRecognitionResult;
6268
6592
  /**
6269
6593
  * Potential CSAM signal from conditional age classification on R-or-higher content.
6270
6594
  * Null means the image was below R or age classification failed.
6271
6595
  */
6272
6596
  csam?: null | boolean;
6597
+ /**
6598
+ * Represents human vs non-human image recognition results.
6599
+ */
6273
6600
  humanRecognition?: HumanRecognitionResult;
6601
+ /**
6602
+ * Body-only apparent-age and child-risk results (if requested).
6603
+ */
6274
6604
  bodyAgeClassification?: BodyAgeClassificationResult;
6605
+ /**
6606
+ * Anime apparent-age and child-risk results (if requested).
6607
+ */
6275
6608
  animeBodyAgeClassification?: AnimeBodyAgeClassificationResult;
6609
+ /**
6610
+ * Joint face-and-body apparent-age results for photo and anime content (if requested).
6611
+ */
6276
6612
  jointAgeClassification?: JointAgeClassificationResult;
6277
6613
  };
6278
6614
  /**
@@ -6287,6 +6623,9 @@ export type MediaRatingStep = Omit<WorkflowStep, '$type'> & {
6287
6623
  * MediaRating
6288
6624
  */
6289
6625
  export type MediaRatingStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6626
+ /**
6627
+ * Input for the MediaRatingStep step.
6628
+ */
6290
6629
  input: MediaRatingInput;
6291
6630
  $type: 'mediaRating';
6292
6631
  };
@@ -6309,6 +6648,9 @@ export type MergeField = {
6309
6648
  * from every item of a list; nested `[*]` flatten into one list.
6310
6649
  */
6311
6650
  path: string;
6651
+ /**
6652
+ * How a merge field combines its values. Null values are skipped, except by `any` and `all`, which count them as false.
6653
+ */
6312
6654
  reduce: MergeReducer;
6313
6655
  /**
6314
6656
  * For `group`: the property of each item to group by.
@@ -6327,6 +6669,9 @@ export type MergeField = {
6327
6669
  includeIndex: boolean;
6328
6670
  };
6329
6671
  export type MergeInput = {
6672
+ /**
6673
+ * What to do when a source item selected by a `[*]` has no output, e.g. a repeat iteration that failed.
6674
+ */
6330
6675
  onMissing: MergeMissingBehavior;
6331
6676
  /**
6332
6677
  * The fields of the merged result, keyed by the name each appears under in the output.
@@ -6351,7 +6696,7 @@ export type MergeOutput = {
6351
6696
  * The merged values, keyed by the field names of the input. Their shape follows the requested reducers.
6352
6697
  */
6353
6698
  fields: {
6354
- [key: string]: null;
6699
+ [key: string]: unknown;
6355
6700
  };
6356
6701
  /**
6357
6702
  * The number of source items selected by the first `[*]` of the fields' paths.
@@ -6400,6 +6745,9 @@ export type MergeStep = Omit<WorkflowStep, '$type'> & {
6400
6745
  * Merge
6401
6746
  */
6402
6747
  export type MergeStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
6748
+ /**
6749
+ * Input for the MergeStep step.
6750
+ */
6403
6751
  input: MergeInput;
6404
6752
  $type: 'merge';
6405
6753
  };
@@ -6543,7 +6891,14 @@ export type MetricsResponse = {
6543
6891
  * rejection. Kept out of the success rate so refusing disallowed requests does not mark a service unhealthy.
6544
6892
  */
6545
6893
  userErrorRate: number;
6894
+ /**
6895
+ * What callers actually paid per request, over succeeded requests only. Not a unit price and not comparable
6896
+ * between services; use Civitai.Orchestration.Api.Controllers.v2.Consumers.Services.ServiceResponse.Estimate for an exact quote.
6897
+ */
6546
6898
  costBuzz?: PercentilesResponse;
6899
+ /**
6900
+ * Null for services that never create a job to time, such as imageUpload.
6901
+ */
6547
6902
  latencySeconds?: PercentilesResponse;
6548
6903
  };
6549
6904
  export type MingAiToolkitTrainingInput = Omit<AiToolkitTrainingInput, 'engine' | 'ecosystem'> & {
@@ -6725,6 +7080,9 @@ export type MiniMaxMusic3Step = Omit<WorkflowStep, '$type'> & {
6725
7080
  * Generate a complete song from a structured caption and lyrics with MiniMax Music 3.
6726
7081
  */
6727
7082
  export type MiniMaxMusic3StepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7083
+ /**
7084
+ * Input for the MiniMaxMusic3Step step.
7085
+ */
6728
7086
  input: MiniMaxMusic3Input;
6729
7087
  $type: 'miniMaxMusic3';
6730
7088
  };
@@ -6788,6 +7146,9 @@ export type Model3dPreviewStep = Omit<WorkflowStep, '$type'> & {
6788
7146
  * 3D model preview
6789
7147
  */
6790
7148
  export type Model3dPreviewStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7149
+ /**
7150
+ * Input for the Model3DPreviewStep step.
7151
+ */
6791
7152
  input: Model3dPreviewInput;
6792
7153
  $type: 'model3DPreview';
6793
7154
  };
@@ -6797,6 +7158,9 @@ export type ModelClamScanInput = {
6797
7158
  export type ModelClamScanOutput = {
6798
7159
  exitCode?: null | number;
6799
7160
  output?: null | string;
7161
+ /**
7162
+ * Classified scan result derived from the ClamAV exit code.
7163
+ */
6800
7164
  status?: ModelClamScanStatus;
6801
7165
  /**
6802
7166
  * True when ClamAV reported one or more infected files (exit code 1).
@@ -6824,6 +7188,9 @@ export type ModelClamScanStep = Omit<WorkflowStep, '$type'> & {
6824
7188
  * ModelClamScan
6825
7189
  */
6826
7190
  export type ModelClamScanStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7191
+ /**
7192
+ * Input for the ModelClamScanStep step.
7193
+ */
6827
7194
  input: ModelClamScanInput;
6828
7195
  $type: 'modelClamScan';
6829
7196
  };
@@ -6868,6 +7235,9 @@ export type ModelHashStep = Omit<WorkflowStep, '$type'> & {
6868
7235
  * ModelHash
6869
7236
  */
6870
7237
  export type ModelHashStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7238
+ /**
7239
+ * Input for the ModelHashStep step.
7240
+ */
6871
7241
  input: ModelHashInput;
6872
7242
  $type: 'modelHash';
6873
7243
  };
@@ -6893,6 +7263,9 @@ export type ModelParseMetadataStep = Omit<WorkflowStep, '$type'> & {
6893
7263
  * ModelParseMetadata
6894
7264
  */
6895
7265
  export type ModelParseMetadataStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7266
+ /**
7267
+ * Input for the ModelParseMetadataStep step.
7268
+ */
6896
7269
  input: ModelParseMetadataInput;
6897
7270
  $type: 'modelParseMetadata';
6898
7271
  };
@@ -6941,6 +7314,9 @@ export type ModelPickleScanStep = Omit<WorkflowStep, '$type'> & {
6941
7314
  * ModelPickleScan
6942
7315
  */
6943
7316
  export type ModelPickleScanStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7317
+ /**
7318
+ * Input for the ModelPickleScanStep step.
7319
+ */
6944
7320
  input: ModelPickleScanInput;
6945
7321
  $type: 'modelPickleScan';
6946
7322
  };
@@ -7406,13 +7782,37 @@ export type PolyGenInput = {
7406
7782
  engine: string;
7407
7783
  };
7408
7784
  export type PolyGenOutput = {
7785
+ /**
7786
+ * Generated 3D model in GLB format. Null when the engine only produces FBX (Tripo with quad enabled).
7787
+ */
7409
7788
  model?: Model3dBlob;
7789
+ /**
7790
+ * Generated 3D model in FBX format, when the engine produces one.
7791
+ */
7410
7792
  fbxModel?: Model3dBlob;
7793
+ /**
7794
+ * Preview thumbnail image of the generated model, when the engine produces one.
7795
+ */
7411
7796
  thumbnail?: ImageBlob;
7797
+ /**
7798
+ * Rigged character in GLB format, when rigging is enabled.
7799
+ */
7412
7800
  riggedModel?: Model3dBlob;
7801
+ /**
7802
+ * Rigged character in FBX format, when rigging is enabled.
7803
+ */
7413
7804
  riggedFbxModel?: Model3dBlob;
7805
+ /**
7806
+ * Animated 3D model in GLB format, when animation is enabled.
7807
+ */
7414
7808
  animatedModel?: Model3dBlob;
7809
+ /**
7810
+ * Animated 3D model in FBX format, when animation is enabled.
7811
+ */
7415
7812
  animatedFbxModel?: Model3dBlob;
7813
+ /**
7814
+ * Basic walking and running animations, when rigging is enabled.
7815
+ */
7416
7816
  basicAnimations?: BasicAnimationsBlobs;
7417
7817
  };
7418
7818
  /**
@@ -7427,6 +7827,9 @@ export type PolyGenStep = Omit<WorkflowStep, '$type'> & {
7427
7827
  * 3D model generation
7428
7828
  */
7429
7829
  export type PolyGenStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
7830
+ /**
7831
+ * Input for the PolyGenStep step.
7832
+ */
7430
7833
  input: PolyGenInput;
7431
7834
  $type: 'polyGen';
7432
7835
  };
@@ -7611,6 +8014,9 @@ export type PreprocessImageStep = Omit<WorkflowStep, '$type'> & {
7611
8014
  $type: 'preprocessImage';
7612
8015
  };
7613
8016
  export type PreprocessImageStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
8017
+ /**
8018
+ * Input for the PreprocessImageStep step.
8019
+ */
7614
8020
  input: PreprocessImageInput;
7615
8021
  $type: 'preprocessImage';
7616
8022
  };
@@ -7698,6 +8104,9 @@ export type PreprocessVideoStep = Omit<WorkflowStep, '$type'> & {
7698
8104
  $type: 'preprocessVideo';
7699
8105
  };
7700
8106
  export type PreprocessVideoStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
8107
+ /**
8108
+ * Input for the PreprocessVideoStep step.
8109
+ */
7701
8110
  input: PreprocessVideoInput;
7702
8111
  $type: 'preprocessVideo';
7703
8112
  };
@@ -7755,6 +8164,9 @@ export type PromptEnhancementStep = Omit<WorkflowStep, '$type'> & {
7755
8164
  * PromptEnhancement
7756
8165
  */
7757
8166
  export type PromptEnhancementStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
8167
+ /**
8168
+ * Input for the PromptEnhancementStep step.
8169
+ */
7758
8170
  input: PromptEnhancementInput;
7759
8171
  $type: 'promptEnhancement';
7760
8172
  };
@@ -7803,6 +8215,9 @@ export type PromptModerationStep = Omit<WorkflowStep, '$type'> & {
7803
8215
  * PromptModeration
7804
8216
  */
7805
8217
  export type PromptModerationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
8218
+ /**
8219
+ * Input for the PromptModerationStep step.
8220
+ */
7806
8221
  input: PromptModerationInput;
7807
8222
  $type: 'promptModeration';
7808
8223
  };
@@ -8123,6 +8538,9 @@ export type QwenImageBenchStep = Omit<WorkflowStep, '$type'> & {
8123
8538
  * Qwen Image Bench
8124
8539
  */
8125
8540
  export type QwenImageBenchStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
8541
+ /**
8542
+ * Input for the QwenImageBenchStep step.
8543
+ */
8126
8544
  input: QwenImageBenchInput;
8127
8545
  $type: 'qwenImageBench';
8128
8546
  };
@@ -8146,7 +8564,13 @@ export type RepeatForClause = {
8146
8564
  as: string;
8147
8565
  };
8148
8566
  export type RepeatInput = {
8567
+ /**
8568
+ * The "for" clause that specifies what array to iterate over and how to reference items.
8569
+ */
8149
8570
  for: RepeatForClause;
8571
+ /**
8572
+ * The template of the workflow step to execute for each item in the iteration.
8573
+ */
8150
8574
  template: WorkflowStepTemplate;
8151
8575
  };
8152
8576
  export type RepeatOutput = {
@@ -8214,6 +8638,9 @@ export type ResourceInfo = {
8214
8638
  * NSFW covers X and XXX, whereas mature content also includes R.
8215
8639
  */
8216
8640
  hasNSFWContentRestriction: boolean;
8641
+ /**
8642
+ * License fee charged per use.
8643
+ */
8217
8644
  fee?: ResourceFee;
8218
8645
  /**
8219
8646
  * False makes the resource ineligible for compensation.
@@ -8228,6 +8655,9 @@ export type ResourceInfo = {
8228
8655
  * attribution follows ownership transfers instead of being resolved retroactively.
8229
8656
  */
8230
8657
  userId?: null | number;
8658
+ /**
8659
+ * Whether this resource can be generated with right now, across the whole fleet.
8660
+ */
8231
8661
  availability?: ResourceAvailability;
8232
8662
  /**
8233
8663
  * Promoted resources download in the High lane for free, whatever lane the job asked for.
@@ -8612,9 +9042,24 @@ export type ServiceResponse = {
8612
9042
  strengths?: null | string;
8613
9043
  weaknesses?: null | string;
8614
9044
  releasedAt?: null | string;
9045
+ /**
9046
+ * What this consumes and produces. Independent of Civitai.Orchestration.Api.Controllers.v2.Consumers.Services.ServiceResponse.Category, and null for
9047
+ * services with no meaningful modality.
9048
+ */
8615
9049
  modalities?: ModalitiesResponse;
9050
+ /**
9051
+ * Health over the requested window. Always present: a service with no traffic reports
9052
+ * "unknown" rather than nothing, so callers never have to distinguish absent from healthy.
9053
+ */
8616
9054
  status: ServiceStatus;
9055
+ /**
9056
+ * Null when nothing ran in the window.
9057
+ */
8617
9058
  metrics?: MetricsResponse;
9059
+ /**
9060
+ * The metric time series over the window. Only present when a single service is requested —
9061
+ * the list omits it to stay cheap.
9062
+ */
8618
9063
  history?: ServiceHistory;
8619
9064
  };
8620
9065
  export declare const ServiceStatus: {
@@ -8670,6 +9115,9 @@ export type ShieldstralModerationStep = Omit<WorkflowStep, '$type'> & {
8670
9115
  * ShieldstralModeration
8671
9116
  */
8672
9117
  export type ShieldstralModerationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9118
+ /**
9119
+ * Input for the ShieldstralModerationStep step.
9120
+ */
8673
9121
  input: ShieldstralModerationInput;
8674
9122
  $type: 'shieldstralModeration';
8675
9123
  };
@@ -8724,6 +9172,9 @@ export type SoniloAudioGenOutput = {
8724
9172
  * Generate music or a standalone sound effect from a text prompt with Sonilo.
8725
9173
  */
8726
9174
  export type SoniloAudioGenStep = Omit<WorkflowStep, '$type'> & {
9175
+ /**
9176
+ * Text-to-audio via Sonilo; `operation` picks music or a standalone sound effect.
9177
+ */
8727
9178
  input: SoniloAudioGenInput;
8728
9179
  output?: SoniloAudioGenOutput;
8729
9180
  $type: 'soniloAudioGen';
@@ -8732,6 +9183,9 @@ export type SoniloAudioGenStep = Omit<WorkflowStep, '$type'> & {
8732
9183
  * Generate music or a standalone sound effect from a text prompt with Sonilo.
8733
9184
  */
8734
9185
  export type SoniloAudioGenStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9186
+ /**
9187
+ * Input for the SoniloAudioGenStep step.
9188
+ */
8735
9189
  input: SoniloAudioGenInput;
8736
9190
  $type: 'soniloAudioGen';
8737
9191
  };
@@ -8837,6 +9291,9 @@ export type TextToImageInput = {
8837
9291
  */
8838
9292
  imageMetadata?: null | string;
8839
9293
  engine?: null | string;
9294
+ /**
9295
+ * The format in which to output images, Png and WebP may charge an additional cost
9296
+ */
8840
9297
  outputFormat?: OutputFormat;
8841
9298
  /**
8842
9299
  * An optional source image to trigger img-to-img
@@ -8862,6 +9319,9 @@ export type TextToImageStep = Omit<WorkflowStep, '$type'> & {
8862
9319
  * TextToImage
8863
9320
  */
8864
9321
  export type TextToImageStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9322
+ /**
9323
+ * Input for the TextToImageStep step.
9324
+ */
8865
9325
  input: TextToImageInput;
8866
9326
  $type: 'textToImage';
8867
9327
  };
@@ -8896,6 +9356,9 @@ export type TextToSpeechStep = Omit<WorkflowStep, '$type'> & {
8896
9356
  * Text-to-Speech
8897
9357
  */
8898
9358
  export type TextToSpeechStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9359
+ /**
9360
+ * Input for the TextToSpeechStep step.
9361
+ */
8899
9362
  input: TextToSpeechInput;
8900
9363
  $type: 'textToSpeech';
8901
9364
  };
@@ -8927,6 +9390,9 @@ export type TrainingData = {
8927
9390
  export type TrainingInput = {
8928
9391
  engine: string;
8929
9392
  trainingData: TrainingData;
9393
+ /**
9394
+ * Sample generation configuration for preview outputs during training
9395
+ */
8930
9396
  samples?: TrainingInputSamples;
8931
9397
  /**
8932
9398
  * Whether this run uses step-based pricing rather than the legacy flat per-epoch price.
@@ -8973,6 +9439,10 @@ export type TrainingOutputEpochResult = {
8973
9439
  * The epoch number (1-based)
8974
9440
  */
8975
9441
  epochNumber: number;
9442
+ /**
9443
+ * The trained model blob for this epoch. `available` is false (and there is no URL) while the
9444
+ * epoch is still pending or training.
9445
+ */
8976
9446
  model: Blob;
8977
9447
  /**
8978
9448
  * Sample outputs (images/videos/audio) generated with this epoch's model
@@ -8996,6 +9466,9 @@ export type TrainingStep = Omit<WorkflowStep, '$type'> & {
8996
9466
  * Training
8997
9467
  */
8998
9468
  export type TrainingStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9469
+ /**
9470
+ * Input for the TrainingStep step.
9471
+ */
8999
9472
  input: TrainingInput;
9000
9473
  $type: 'training';
9001
9474
  };
@@ -9086,6 +9559,9 @@ export type TranscodeStep = Omit<WorkflowStep, '$type'> & {
9086
9559
  * Transcoding
9087
9560
  */
9088
9561
  export type TranscodeStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9562
+ /**
9563
+ * Input for the TranscodeStep step.
9564
+ */
9089
9565
  input: TranscodeInput;
9090
9566
  $type: 'transcode';
9091
9567
  };
@@ -9112,6 +9588,10 @@ export type TranscriptionOutput = {
9112
9588
  */
9113
9589
  timeStamps: Array<TranscriptionTimeStamp>;
9114
9590
  elapsedSeconds: number;
9591
+ /**
9592
+ * False when the media has no audio track; null when the worker did not check.
9593
+ */
9594
+ hasAudio?: null | boolean;
9115
9595
  };
9116
9596
  /**
9117
9597
  * Transcription
@@ -9125,6 +9605,9 @@ export type TranscriptionStep = Omit<WorkflowStep, '$type'> & {
9125
9605
  * Transcription
9126
9606
  */
9127
9607
  export type TranscriptionStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9608
+ /**
9609
+ * Input for the TranscriptionStep step.
9610
+ */
9128
9611
  input: TranscriptionInput;
9129
9612
  $type: 'transcription';
9130
9613
  };
@@ -9246,6 +9729,11 @@ export type UpdateWorkflowRequest = {
9246
9729
  * Set to true to remove the mature content restriction on the workflow.
9247
9730
  */
9248
9731
  allowMatureContent?: null | boolean;
9732
+ /**
9733
+ * Raise the download priority for resources this workflow needs but the fleet does not hold.
9734
+ * Only Civitai.Orchestration.Grains.Workflows.Priority.High may be requested, and it carries a Buzz charge for each cold
9735
+ * resource above the free size threshold.
9736
+ */
9249
9737
  downloadPriority?: Priority;
9250
9738
  };
9251
9739
  export declare const UpdateWorkflowStatus: {
@@ -9332,6 +9820,9 @@ export type Veo3VideoGenInput = Omit<VideoGenInput, 'engine'> & {
9332
9820
  seed?: null | number;
9333
9821
  fastMode?: boolean;
9334
9822
  images?: Array<string>;
9823
+ /**
9824
+ * Google retired the Veo 3.0 endpoints on 2026-08-28; requests with `3.0` are rejected with 400. Use `3.1`.
9825
+ */
9335
9826
  version?: Veo3Version;
9336
9827
  mode?: Veo3GenerationMode;
9337
9828
  };
@@ -9361,6 +9852,9 @@ export type VideoBackgroundRemovalStep = Omit<WorkflowStep, '$type'> & {
9361
9852
  * Tracks a prompted foreground object across a video and returns a lossless animated WebP with transparency.
9362
9853
  */
9363
9854
  export type VideoBackgroundRemovalStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9855
+ /**
9856
+ * Input for the VideoBackgroundRemovalStep step.
9857
+ */
9364
9858
  input: VideoBackgroundRemovalInput;
9365
9859
  $type: 'videoBackgroundRemoval';
9366
9860
  };
@@ -9408,6 +9902,9 @@ export type VideoEnhancementStep = Omit<WorkflowStep, '$type'> & {
9408
9902
  * Upscale videos and/or interpolate frames
9409
9903
  */
9410
9904
  export type VideoEnhancementStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9905
+ /**
9906
+ * Input for the VideoEnhancementStep step.
9907
+ */
9411
9908
  input: VideoEnhancementInput;
9412
9909
  $type: 'videoEnhancement';
9413
9910
  };
@@ -9451,6 +9948,9 @@ export type VideoFrameExtractionStep = Omit<WorkflowStep, '$type'> & {
9451
9948
  * Video Frame Extraction
9452
9949
  */
9453
9950
  export type VideoFrameExtractionStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9951
+ /**
9952
+ * Input for the VideoFrameExtractionStep step.
9953
+ */
9454
9954
  input: VideoFrameExtractionInput;
9455
9955
  $type: 'videoFrameExtraction';
9456
9956
  };
@@ -9469,6 +9969,10 @@ export type VideoGenOutput = {
9469
9969
  * Civitai.Orchestration.Grains.Workflows.Steps.VideoGen.VideoGenOutput.Video is always the primary slot. Null/empty for single-output engines.
9470
9970
  */
9471
9971
  additionalVideos?: null | Array<VideoBlob>;
9972
+ /**
9973
+ * Encrypted draft cache produced by a FLUX-3 draft generation. Pass its url as the draftCache
9974
+ * input of a later draftEnhance step to re-render the draft at full quality.
9975
+ */
9472
9976
  draftCache?: Blob;
9473
9977
  };
9474
9978
  /**
@@ -9483,6 +9987,9 @@ export type VideoGenStep = Omit<WorkflowStep, '$type'> & {
9483
9987
  * Video generation
9484
9988
  */
9485
9989
  export type VideoGenStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
9990
+ /**
9991
+ * Input for the VideoGenStep step.
9992
+ */
9486
9993
  input: VideoGenInput;
9487
9994
  $type: 'videoGen';
9488
9995
  };
@@ -9506,6 +10013,9 @@ export type VideoInterpolationStep = Omit<WorkflowStep, '$type'> & {
9506
10013
  * Interpolate videos using VFI Mamba
9507
10014
  */
9508
10015
  export type VideoInterpolationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10016
+ /**
10017
+ * Input for the VideoInterpolationStep step.
10018
+ */
9509
10019
  input: VideoInterpolationInput;
9510
10020
  $type: 'videoInterpolation';
9511
10021
  };
@@ -9530,6 +10040,9 @@ export type VideoMetadataStep = Omit<WorkflowStep, '$type'> & {
9530
10040
  * Extract metadata from videos including width, height, FPS, and duration
9531
10041
  */
9532
10042
  export type VideoMetadataStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10043
+ /**
10044
+ * Input for the VideoMetadataStep step.
10045
+ */
9533
10046
  input: VideoMetadataInput;
9534
10047
  $type: 'videoMetadata';
9535
10048
  };
@@ -9552,6 +10065,9 @@ export type VideoUpscalerStep = Omit<WorkflowStep, '$type'> & {
9552
10065
  * Upscale videos using FlashVSR
9553
10066
  */
9554
10067
  export type VideoUpscalerStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10068
+ /**
10069
+ * Input for the VideoUpscalerStep step.
10070
+ */
9555
10071
  input: VideoUpscalerInput;
9556
10072
  $type: 'videoUpscaler';
9557
10073
  };
@@ -9684,6 +10200,9 @@ export type WdTaggingStep = Omit<WorkflowStep, '$type'> & {
9684
10200
  * WDTagging
9685
10201
  */
9686
10202
  export type WdTaggingStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10203
+ /**
10204
+ * Input for the WDTaggingStep step.
10205
+ */
9687
10206
  input: WdTaggingInput;
9688
10207
  $type: 'wdTagging';
9689
10208
  };
@@ -10245,6 +10764,9 @@ export type WebScrapeStep = Omit<WorkflowStep, '$type'> & {
10245
10764
  * WebScrape
10246
10765
  */
10247
10766
  export type WebScrapeStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10767
+ /**
10768
+ * Input for the WebScrapeStep step.
10769
+ */
10248
10770
  input: WebScrapeInput;
10249
10771
  $type: 'webScrape';
10250
10772
  };
@@ -10291,6 +10813,9 @@ export type WebSearchStep = Omit<WorkflowStep, '$type'> & {
10291
10813
  * WebSearch
10292
10814
  */
10293
10815
  export type WebSearchStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
10816
+ /**
10817
+ * Input for the WebSearchStep step.
10818
+ */
10294
10819
  input: WebSearchInput;
10295
10820
  $type: 'webSearch';
10296
10821
  };
@@ -10326,14 +10851,27 @@ export type Workflow = {
10326
10851
  };
10327
10852
  readonly steps: Array<WorkflowStep>;
10328
10853
  callbacks: Array<WorkflowCallback>;
10854
+ /**
10855
+ * Optional tips for either civitai or the creators involved in this workflow.
10856
+ */
10329
10857
  tips: WorkflowTips;
10858
+ /**
10859
+ * Get a summary of the actual cost consumed by this workflow.
10860
+ * On dry-run requests, this will contain the estimated cost.
10861
+ */
10330
10862
  cost: WorkflowCost;
10863
+ /**
10864
+ * An optional limit in what content is safe to return
10865
+ */
10331
10866
  nsfwLevel?: NsfwLevel;
10332
10867
  /**
10333
10868
  * Opts the workflow in to new features or behaviours that are not yet stable.
10334
10869
  */
10335
10870
  experimental?: null | boolean;
10336
10871
  allowMatureContent?: null | boolean;
10872
+ /**
10873
+ * Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
10874
+ */
10337
10875
  upgradeMode: WorkflowUpgradeMode;
10338
10876
  currencies: Array<BuzzClientAccount>;
10339
10877
  /**
@@ -10359,7 +10897,14 @@ export type Workflow = {
10359
10897
  * Soft delete: the telemetry document is kept until its TTL for operators, but consumer reads treat the workflow as gone.
10360
10898
  */
10361
10899
  deletedAt?: null | string;
10900
+ /**
10901
+ * Download lane for resources this workflow needs but the fleet does not hold. Resolved from
10902
+ * membership at submission unless the consumer paid to pin it to Civitai.Orchestration.Grains.Workflows.Priority.High.
10903
+ */
10362
10904
  downloadPriority?: Priority;
10905
+ /**
10906
+ * How a workflow is paid for.
10907
+ */
10363
10908
  tier: WorkflowTier;
10364
10909
  fund?: null | string;
10365
10910
  };
@@ -10439,6 +10984,9 @@ export type WorkflowEvent = {
10439
10984
  status: WorkflowStatus;
10440
10985
  timestamp: string;
10441
10986
  readonly $type: string;
10987
+ /**
10988
+ * Only present when the callback requests detailed events.
10989
+ */
10442
10990
  details?: WorkflowEventDetails;
10443
10991
  };
10444
10992
  /**
@@ -10446,10 +10994,10 @@ export type WorkflowEvent = {
10446
10994
  */
10447
10995
  export type WorkflowEventDetails = {
10448
10996
  metadata?: null | {
10449
- [key: string]: null;
10997
+ [key: string]: unknown;
10450
10998
  };
10451
10999
  arguments?: null | {
10452
- [key: string]: null;
11000
+ [key: string]: unknown;
10453
11001
  };
10454
11002
  createdAt: string;
10455
11003
  completedAt?: null | string;
@@ -10462,10 +11010,10 @@ export type WorkflowEventStepDetails = {
10462
11010
  startedAt?: null | string;
10463
11011
  completedAt?: null | string;
10464
11012
  metadata?: null | {
10465
- [key: string]: null;
11013
+ [key: string]: unknown;
10466
11014
  };
10467
- input?: null;
10468
- output?: null;
11015
+ input?: unknown;
11016
+ output?: unknown;
10469
11017
  cost?: null | number;
10470
11018
  };
10471
11019
  export declare const WorkflowStatus: {
@@ -10503,6 +11051,10 @@ export type WorkflowStep = {
10503
11051
  * the step is preparing.
10504
11052
  */
10505
11053
  preparation?: null | Array<WorkflowStepPreparationResource>;
11054
+ /**
11055
+ * The step's queue position, aggregated across its jobs (worst support, fewest preceding jobs,
11056
+ * earliest estimated start, latest estimated completion). Null once the step starts processing.
11057
+ */
10506
11058
  queuePosition?: WorkflowStepQueuePosition;
10507
11059
  /**
10508
11060
  * Non-fatal warnings about this step, such as a requested model that is scheduled for retirement.
@@ -10515,6 +11067,9 @@ export type WorkflowStepEvent = {
10515
11067
  name: string;
10516
11068
  status: WorkflowStatus;
10517
11069
  readonly $type: string;
11070
+ /**
11071
+ * Only present when the callback requests detailed events.
11072
+ */
10518
11073
  details?: WorkflowStepEventDetails;
10519
11074
  /**
10520
11075
  * Every resource download this step is waiting on, gating resource first. Only set while preparing.
@@ -10533,10 +11088,10 @@ export type WorkflowStepEventDetails = {
10533
11088
  estimatedProgressRate?: null | number;
10534
11089
  retries: number;
10535
11090
  metadata?: null | {
10536
- [key: string]: null;
11091
+ [key: string]: unknown;
10537
11092
  };
10538
- input?: null;
10539
- output?: null;
11093
+ input?: unknown;
11094
+ output?: unknown;
10540
11095
  /**
10541
11096
  * Every resource download this step is waiting on, gating resource first. Only set while preparing.
10542
11097
  */
@@ -10625,12 +11180,26 @@ export type WorkflowTemplate = {
10625
11180
  tags?: null | Array<string>;
10626
11181
  steps: Array<WorkflowStepTemplate>;
10627
11182
  callbacks?: null | Array<WorkflowCallback>;
11183
+ /**
11184
+ * Optional tips for either civitai or the creators involved in this workflow.
11185
+ */
10628
11186
  tips?: WorkflowTips;
10629
11187
  arguments?: null | {
10630
11188
  [key: string]: unknown;
10631
11189
  };
11190
+ /**
11191
+ * An optional limit in what content is safe to return
11192
+ */
10632
11193
  nsfwLevel?: NsfwLevel;
11194
+ /**
11195
+ * Download urgency for resources the fleet does not hold; omit to derive it from membership.
11196
+ * Only Civitai.Orchestration.Grains.Workflows.Priority.High may be requested, and it carries a Buzz charge per cold resource above the free size threshold.
11197
+ */
10633
11198
  downloadPriority?: Priority;
11199
+ /**
11200
+ * Run this workflow on the free tier. Only steps using a model offered on the free tier are
11201
+ * accepted; they cost no Buzz, count against a per-user quota and run behind all paid work.
11202
+ */
10634
11203
  tier?: WorkflowTier;
10635
11204
  /**
10636
11205
  * Opts the workflow in to new features or behaviours that are not yet stable.
@@ -10640,6 +11209,9 @@ export type WorkflowTemplate = {
10640
11209
  * When false, no content marked as mature is returned; additional payment options are available for such workflows.
10641
11210
  */
10642
11211
  allowMatureContent?: null | boolean;
11212
+ /**
11213
+ * Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
11214
+ */
10643
11215
  upgradeMode?: WorkflowUpgradeMode;
10644
11216
  /**
10645
11217
  * Limit the currencies that can be used to pay for this workflow.
@@ -10787,6 +11359,9 @@ export type XGuardModerationStep = Omit<WorkflowStep, '$type'> & {
10787
11359
  * XGuardModeration
10788
11360
  */
10789
11361
  export type XGuardModerationStepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
11362
+ /**
11363
+ * Input for the XGuardModerationStep step.
11364
+ */
10790
11365
  input: XGuardModerationInput;
10791
11366
  $type: 'xGuardModeration';
10792
11367
  };
@@ -10797,6 +11372,10 @@ export type XGuardPromptModerationInput = Omit<XGuardModerationInput, 'mode'> &
10797
11372
  * Additional instructions are unsupported by the fixed Civitai Scan contract.
10798
11373
  */
10799
11374
  instructions?: null | string;
11375
+ /**
11376
+ * Only Combined is supported: both prompts are sent as JSON, negative terms act as exclusions (excluding adulthood is an age-down cue).
11377
+ * For positive-only input use Combined with an empty negative prompt.
11378
+ */
10800
11379
  scope: XGuardPromptScope;
10801
11380
  mode: 'prompt';
10802
11381
  };
@@ -10913,6 +11492,9 @@ export type YuE2SampleOverride = {
10913
11492
  * Generate a song from style and lyrics with YuE2.
10914
11493
  */
10915
11494
  export type YuE2Step = Omit<WorkflowStep, '$type'> & {
11495
+ /**
11496
+ * YuE2 text-to-music generation with optional ABC score planning.
11497
+ */
10916
11498
  input: YuE2Input;
10917
11499
  output?: YuE2Output;
10918
11500
  $type: 'yuE2';
@@ -10921,6 +11503,9 @@ export type YuE2Step = Omit<WorkflowStep, '$type'> & {
10921
11503
  * Generate a song from style and lyrics with YuE2.
10922
11504
  */
10923
11505
  export type YuE2StepTemplate = Omit<WorkflowStepTemplate, '$type'> & {
11506
+ /**
11507
+ * Input for the YuE2Step step.
11508
+ */
10924
11509
  input: YuE2Input;
10925
11510
  $type: 'yuE2';
10926
11511
  };
@@ -11113,6 +11698,10 @@ export type AiToolkitTrainingInputWritable = Omit<TrainingInputWritable2, 'engin
11113
11698
  * epoch resumes from this model instead of the base model, and the new epochs build on top of it.
11114
11699
  */
11115
11700
  continueFrom?: null | string;
11701
+ /**
11702
+ * What each epoch job records to its trace stream (`output.epochs[].traceUrl`): `none` (default), `logs` (plain-text console output)
11703
+ * or `events` (NDJSON of console lines, step progress, phases and epoch checkpoints).
11704
+ */
11116
11705
  trace: TrainingTraceMode;
11117
11706
  engine: 'ai-toolkit';
11118
11707
  };
@@ -11202,6 +11791,32 @@ export type AssistantMessageWritable = Omit<ChatCompletionMessageWritable, 'role
11202
11791
  reasoning?: null | string;
11203
11792
  role: 'assistant';
11204
11793
  };
11794
+ export type AudioModerationOutputWritable = {
11795
+ lyrics: string;
11796
+ sexualizedMinors: boolean;
11797
+ score: null | number;
11798
+ model: null | string;
11799
+ policyHash: null | string;
11800
+ hasAudio?: null | boolean;
11801
+ skippedReason?: null | string;
11802
+ };
11803
+ /**
11804
+ * Transcribe every audio track and classify the lyrics for sexualized minors.
11805
+ */
11806
+ export type AudioModerationStepWritable = Omit<WorkflowStepWritable, '$type'> & {
11807
+ input: AudioModerationInput;
11808
+ output?: AudioModerationOutputWritable;
11809
+ $type: 'audioModeration';
11810
+ };
11811
+ export type AudioTextModerationOutputWritable = {
11812
+ lyrics: string;
11813
+ sexualizedMinors: boolean;
11814
+ score: null | number;
11815
+ model: null | string;
11816
+ policyHash: null | string;
11817
+ hasAudio?: null | boolean;
11818
+ skippedReason?: null | string;
11819
+ };
11205
11820
  export type BooguAiToolkitTrainingInputWritable = Omit<
11206
11821
  AiToolkitTrainingInputWritable,
11207
11822
  'engine' | 'ecosystem'
@@ -11215,9 +11830,12 @@ export type BooguAiToolkitTrainingInputWritable = Omit<
11215
11830
  };
11216
11831
  export type ChatCompletionChoiceWritable = {
11217
11832
  index: number;
11833
+ /**
11834
+ * An assistant message representing a prior response.
11835
+ */
11218
11836
  message: AssistantMessageWritable;
11219
11837
  finishReason?: null | string;
11220
- logprobs?: null;
11838
+ logprobs?: unknown;
11221
11839
  };
11222
11840
  /**
11223
11841
  * Accepts both camelCase (`imageUrl`) and snake_case (`image_url`) type discriminators.
@@ -11241,12 +11859,15 @@ export type ChatCompletionOutputWritable = {
11241
11859
  * Parsed JSON of `Choices[0].Message.Content`, populated when the request used a JSON `response_format`
11242
11860
  * and the content parsed. Reachable from later steps via `$ref` paths like `output.parsed.<field>`.
11243
11861
  */
11244
- parsed?: null;
11862
+ parsed?: unknown;
11245
11863
  };
11246
11864
  /**
11247
11865
  * ChatCompletion
11248
11866
  */
11249
11867
  export type ChatCompletionStepWritable = Omit<WorkflowStepWritable, '$type'> & {
11868
+ /**
11869
+ * Input for a chat completion step, compatible with OpenAI Chat Completions API.
11870
+ */
11250
11871
  input: ChatCompletionInput;
11251
11872
  output?: ChatCompletionOutputWritable;
11252
11873
  $type: 'chatCompletion';
@@ -11411,6 +12032,10 @@ export type ComfyTrainingInputWritable = Omit<TrainingInputWritable2, 'engine'>
11411
12032
  * epoch resumes from this model instead of the base model, and the new epochs build on top of it.
11412
12033
  */
11413
12034
  continueFrom?: null | string;
12035
+ /**
12036
+ * What each epoch job records to its trace stream (`output.epochs[].traceUrl`): `none` (default), `logs` (plain-text console output)
12037
+ * or `events` (NDJSON of console lines, step progress, phases and epoch checkpoints).
12038
+ */
11414
12039
  trace: TrainingTraceMode;
11415
12040
  resolution?: number;
11416
12041
  noHalfVae?: boolean;
@@ -12052,6 +12677,9 @@ export type PreprocessImageStepWritable = Omit<WorkflowStepWritable, '$type'> &
12052
12677
  $type: 'preprocessImage';
12053
12678
  };
12054
12679
  export type PreprocessImageStepTemplateWritable = Omit<WorkflowStepTemplateWritable, '$type'> & {
12680
+ /**
12681
+ * Input for the PreprocessImageStep step.
12682
+ */
12055
12683
  input: PreprocessImageInputWritable;
12056
12684
  $type: 'preprocessImage';
12057
12685
  };
@@ -12141,6 +12769,9 @@ export type PreprocessVideoStepWritable = Omit<WorkflowStepWritable, '$type'> &
12141
12769
  $type: 'preprocessVideo';
12142
12770
  };
12143
12771
  export type PreprocessVideoStepTemplateWritable = Omit<WorkflowStepTemplateWritable, '$type'> & {
12772
+ /**
12773
+ * Input for the PreprocessVideoStep step.
12774
+ */
12144
12775
  input: PreprocessVideoInputWritable;
12145
12776
  $type: 'preprocessVideo';
12146
12777
  };
@@ -12228,6 +12859,9 @@ export type SdxlAiToolkitTrainingInputWritable = Omit<
12228
12859
  export type TrainingInputWritable = {
12229
12860
  engine: string;
12230
12861
  trainingData: TrainingData;
12862
+ /**
12863
+ * Sample generation configuration for preview outputs during training
12864
+ */
12231
12865
  samples?: TrainingInputSamples;
12232
12866
  };
12233
12867
  /**
@@ -12242,6 +12876,9 @@ export type TrainingStepWritable = Omit<WorkflowStepWritable, '$type'> & {
12242
12876
  * Training
12243
12877
  */
12244
12878
  export type TrainingStepTemplateWritable = Omit<WorkflowStepTemplateWritable, '$type'> & {
12879
+ /**
12880
+ * Input for the TrainingStep step.
12881
+ */
12245
12882
  input: TrainingInputWritable;
12246
12883
  $type: 'training';
12247
12884
  };
@@ -12274,14 +12911,27 @@ export type WorkflowWritable = {
12274
12911
  [key: string]: unknown;
12275
12912
  };
12276
12913
  callbacks: Array<WorkflowCallback>;
12914
+ /**
12915
+ * Optional tips for either civitai or the creators involved in this workflow.
12916
+ */
12277
12917
  tips: WorkflowTips;
12918
+ /**
12919
+ * Get a summary of the actual cost consumed by this workflow.
12920
+ * On dry-run requests, this will contain the estimated cost.
12921
+ */
12278
12922
  cost: WorkflowCostWritable;
12923
+ /**
12924
+ * An optional limit in what content is safe to return
12925
+ */
12279
12926
  nsfwLevel?: NsfwLevel;
12280
12927
  /**
12281
12928
  * Opts the workflow in to new features or behaviours that are not yet stable.
12282
12929
  */
12283
12930
  experimental?: null | boolean;
12284
12931
  allowMatureContent?: null | boolean;
12932
+ /**
12933
+ * Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
12934
+ */
12285
12935
  upgradeMode: WorkflowUpgradeMode;
12286
12936
  currencies: Array<BuzzClientAccount>;
12287
12937
  /**
@@ -12307,7 +12957,14 @@ export type WorkflowWritable = {
12307
12957
  * Soft delete: the telemetry document is kept until its TTL for operators, but consumer reads treat the workflow as gone.
12308
12958
  */
12309
12959
  deletedAt?: null | string;
12960
+ /**
12961
+ * Download lane for resources this workflow needs but the fleet does not hold. Resolved from
12962
+ * membership at submission unless the consumer paid to pin it to Civitai.Orchestration.Grains.Workflows.Priority.High.
12963
+ */
12310
12964
  downloadPriority?: Priority;
12965
+ /**
12966
+ * How a workflow is paid for.
12967
+ */
12311
12968
  tier: WorkflowTier;
12312
12969
  fund?: null | string;
12313
12970
  };
@@ -12342,12 +12999,18 @@ export type WorkflowEventWritable = {
12342
12999
  workflowId: string;
12343
13000
  status: WorkflowStatus;
12344
13001
  timestamp: string;
13002
+ /**
13003
+ * Only present when the callback requests detailed events.
13004
+ */
12345
13005
  details?: WorkflowEventDetails;
12346
13006
  };
12347
13007
  export type WorkflowStepEventWritable = {
12348
13008
  workflowId: string;
12349
13009
  name: string;
12350
13010
  status: WorkflowStatus;
13011
+ /**
13012
+ * Only present when the callback requests detailed events.
13013
+ */
12351
13014
  details?: WorkflowStepEventDetails;
12352
13015
  /**
12353
13016
  * Every resource download this step is waiting on, gating resource first. Only set while preparing.
@@ -12451,6 +13114,9 @@ export type ZImageTurboAiToolkitTrainingInputWritable = Omit<
12451
13114
  export type TrainingInputWritable2 = {
12452
13115
  engine: string;
12453
13116
  trainingData: TrainingData;
13117
+ /**
13118
+ * Sample generation configuration for preview outputs during training
13119
+ */
12454
13120
  samples?: TrainingInputSamples;
12455
13121
  /**
12456
13122
  * Whether this run uses step-based pricing rather than the legacy flat per-epoch price.
@@ -12484,6 +13150,10 @@ export type WorkflowStepWritable = {
12484
13150
  * the step is preparing.
12485
13151
  */
12486
13152
  preparation?: null | Array<WorkflowStepPreparationResource>;
13153
+ /**
13154
+ * The step's queue position, aggregated across its jobs (worst support, fewest preceding jobs,
13155
+ * earliest estimated start, latest estimated completion). Null once the step starts processing.
13156
+ */
12487
13157
  queuePosition?: WorkflowStepQueuePosition;
12488
13158
  /**
12489
13159
  * Non-fatal warnings about this step, such as a requested model that is scheduled for retirement.
@@ -13165,6 +13835,123 @@ export type InvokeAudioCaptioningStepTemplateResponses = {
13165
13835
  };
13166
13836
  export type InvokeAudioCaptioningStepTemplateResponse =
13167
13837
  InvokeAudioCaptioningStepTemplateResponses[keyof InvokeAudioCaptioningStepTemplateResponses];
13838
+ export type InvokeAudioClassificationStepTemplateData = {
13839
+ body?: AudioClassificationInput;
13840
+ path?: never;
13841
+ query?: {
13842
+ experimental?: boolean;
13843
+ allowMatureContent?: boolean;
13844
+ whatif?: boolean;
13845
+ ephemeral?: boolean;
13846
+ /**
13847
+ * How a workflow is paid for.
13848
+ */
13849
+ tier?: WorkflowTier;
13850
+ };
13851
+ url: '/v2/consumer/recipes/audioClassification';
13852
+ };
13853
+ export type InvokeAudioClassificationStepTemplateErrors = {
13854
+ /**
13855
+ * Bad Request
13856
+ */
13857
+ 400: ProblemDetails;
13858
+ /**
13859
+ * Unauthorized
13860
+ */
13861
+ 401: ProblemDetails;
13862
+ /**
13863
+ * Forbidden
13864
+ */
13865
+ 403: ProblemDetails;
13866
+ };
13867
+ export type InvokeAudioClassificationStepTemplateError =
13868
+ InvokeAudioClassificationStepTemplateErrors[keyof InvokeAudioClassificationStepTemplateErrors];
13869
+ export type InvokeAudioClassificationStepTemplateResponses = {
13870
+ /**
13871
+ * OK
13872
+ */
13873
+ 200: AudioClassificationOutput;
13874
+ };
13875
+ export type InvokeAudioClassificationStepTemplateResponse =
13876
+ InvokeAudioClassificationStepTemplateResponses[keyof InvokeAudioClassificationStepTemplateResponses];
13877
+ export type InvokeAudioModerationStepTemplateData = {
13878
+ body?: AudioModerationInput;
13879
+ path?: never;
13880
+ query?: {
13881
+ experimental?: boolean;
13882
+ allowMatureContent?: boolean;
13883
+ whatif?: boolean;
13884
+ ephemeral?: boolean;
13885
+ /**
13886
+ * How a workflow is paid for.
13887
+ */
13888
+ tier?: WorkflowTier;
13889
+ };
13890
+ url: '/v2/consumer/recipes/audioModeration';
13891
+ };
13892
+ export type InvokeAudioModerationStepTemplateErrors = {
13893
+ /**
13894
+ * Bad Request
13895
+ */
13896
+ 400: ProblemDetails;
13897
+ /**
13898
+ * Unauthorized
13899
+ */
13900
+ 401: ProblemDetails;
13901
+ /**
13902
+ * Forbidden
13903
+ */
13904
+ 403: ProblemDetails;
13905
+ };
13906
+ export type InvokeAudioModerationStepTemplateError =
13907
+ InvokeAudioModerationStepTemplateErrors[keyof InvokeAudioModerationStepTemplateErrors];
13908
+ export type InvokeAudioModerationStepTemplateResponses = {
13909
+ /**
13910
+ * OK
13911
+ */
13912
+ 200: AudioModerationOutput;
13913
+ };
13914
+ export type InvokeAudioModerationStepTemplateResponse =
13915
+ InvokeAudioModerationStepTemplateResponses[keyof InvokeAudioModerationStepTemplateResponses];
13916
+ export type InvokeAudioTextModerationStepTemplateData = {
13917
+ body?: AudioTextModerationInput;
13918
+ path?: never;
13919
+ query?: {
13920
+ experimental?: boolean;
13921
+ allowMatureContent?: boolean;
13922
+ whatif?: boolean;
13923
+ ephemeral?: boolean;
13924
+ /**
13925
+ * How a workflow is paid for.
13926
+ */
13927
+ tier?: WorkflowTier;
13928
+ };
13929
+ url: '/v2/consumer/recipes/audioTextModeration';
13930
+ };
13931
+ export type InvokeAudioTextModerationStepTemplateErrors = {
13932
+ /**
13933
+ * Bad Request
13934
+ */
13935
+ 400: ProblemDetails;
13936
+ /**
13937
+ * Unauthorized
13938
+ */
13939
+ 401: ProblemDetails;
13940
+ /**
13941
+ * Forbidden
13942
+ */
13943
+ 403: ProblemDetails;
13944
+ };
13945
+ export type InvokeAudioTextModerationStepTemplateError =
13946
+ InvokeAudioTextModerationStepTemplateErrors[keyof InvokeAudioTextModerationStepTemplateErrors];
13947
+ export type InvokeAudioTextModerationStepTemplateResponses = {
13948
+ /**
13949
+ * OK
13950
+ */
13951
+ 200: AudioTextModerationOutput;
13952
+ };
13953
+ export type InvokeAudioTextModerationStepTemplateResponse =
13954
+ InvokeAudioTextModerationStepTemplateResponses[keyof InvokeAudioTextModerationStepTemplateResponses];
13168
13955
  export type InvokeBatchOcrSafetyClassificationStepTemplateData = {
13169
13956
  body?: BatchOcrSafetyClassificationInput;
13170
13957
  path?: never;
@@ -13244,6 +14031,9 @@ export type InvokeBlobArchiveStepTemplateResponses = {
13244
14031
  export type InvokeBlobArchiveStepTemplateResponse =
13245
14032
  InvokeBlobArchiveStepTemplateResponses[keyof InvokeBlobArchiveStepTemplateResponses];
13246
14033
  export type InvokeChatCompletionStepTemplateData = {
14034
+ /**
14035
+ * Input for a chat completion step, compatible with OpenAI Chat Completions API.
14036
+ */
13247
14037
  body?: ChatCompletionInput;
13248
14038
  path?: never;
13249
14039
  query?: {
@@ -13322,6 +14112,10 @@ export type InvokeComfyStepTemplateResponses = {
13322
14112
  export type InvokeComfyStepTemplateResponse =
13323
14113
  InvokeComfyStepTemplateResponses[keyof InvokeComfyStepTemplateResponses];
13324
14114
  export type InvokeComfyNodepackSnapshotStepTemplateData = {
14115
+ /**
14116
+ * Installs ComfyUI custom nodepacks on a comfy image and captures the resolved install and editor metadata as
14117
+ * reusable blobs. Runs on a real worker so compiled deps match the fleet the consumer will run on.
14118
+ */
13325
14119
  body?: ComfyNodepackSnapshotInput;
13326
14120
  path?: never;
13327
14121
  query?: {
@@ -13354,7 +14148,8 @@ export type InvokeComfyNodepackSnapshotStepTemplateError =
13354
14148
  InvokeComfyNodepackSnapshotStepTemplateErrors[keyof InvokeComfyNodepackSnapshotStepTemplateErrors];
13355
14149
  export type InvokeComfyNodepackSnapshotStepTemplateResponses = {
13356
14150
  /**
13357
- * OK
14151
+ * One result per installed pack, each carrying the captured install layer, full /object_info and web assets as
14152
+ * blobs that consumers read directly from orchestrator blob storage.
13358
14153
  */
13359
14154
  200: ComfyNodepackSnapshotOutput;
13360
14155
  };
@@ -13829,6 +14624,9 @@ export type InvokeImageUpscalerStepTemplateResponses = {
13829
14624
  export type InvokeImageUpscalerStepTemplateResponse =
13830
14625
  InvokeImageUpscalerStepTemplateResponses[keyof InvokeImageUpscalerStepTemplateResponses];
13831
14626
  export type InvokeLiveTextToSpeechStepTemplateData = {
14627
+ /**
14628
+ * Mirrors `textToSpeech` inputs, but only for voices proven to stream with low first-audio latency.
14629
+ */
13832
14630
  body?: LiveTextToSpeechInput;
13833
14631
  path?: never;
13834
14632
  query?: {
@@ -14648,6 +15446,9 @@ export type InvokeShieldstralModerationStepTemplateResponses = {
14648
15446
  export type InvokeShieldstralModerationStepTemplateResponse =
14649
15447
  InvokeShieldstralModerationStepTemplateResponses[keyof InvokeShieldstralModerationStepTemplateResponses];
14650
15448
  export type InvokeSoniloAudioGenStepTemplateData = {
15449
+ /**
15450
+ * Text-to-audio via Sonilo; `operation` picks music or a standalone sound effect.
15451
+ */
14651
15452
  body?: SoniloAudioGenInput;
14652
15453
  path?: never;
14653
15454
  query?: {
@@ -15350,6 +16151,9 @@ export type InvokeXGuardModerationStepTemplateResponses = {
15350
16151
  export type InvokeXGuardModerationStepTemplateResponse =
15351
16152
  InvokeXGuardModerationStepTemplateResponses[keyof InvokeXGuardModerationStepTemplateResponses];
15352
16153
  export type InvokeYuE2StepTemplateData = {
16154
+ /**
16155
+ * YuE2 text-to-music generation with optional ABC score planning.
16156
+ */
15353
16157
  body?: YuE2Input;
15354
16158
  path?: never;
15355
16159
  query?: {
@@ -15559,7 +16363,7 @@ export type GetServiceErrors = {
15559
16363
  export type GetServiceError = GetServiceErrors[keyof GetServiceErrors];
15560
16364
  export type GetServiceResponses = {
15561
16365
  /**
15562
- * OK
16366
+ * A service we offer.
15563
16367
  */
15564
16368
  200: ServiceResponse;
15565
16369
  };
@@ -15776,8 +16580,7 @@ export type GetWorkflowData = {
15776
16580
  */
15777
16581
  wait?: number;
15778
16582
  /**
15779
- * What wait waits for: `completion` (the default) returns once the workflow reaches a
15780
- * final status, `change` as soon as its status or any of its steps changes.
16583
+ * What a held read of a workflow waits for before it returns.
15781
16584
  */
15782
16585
  until?: WorkflowWaitUntil;
15783
16586
  /**