@civitai/orchestration-client 0.2.8 → 0.2.11

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.
@@ -10,20 +10,76 @@ export function createCivitaiClient(config) {
10
10
  Authorization: `Bearer ${config.auth}`,
11
11
  },
12
12
  }));
13
- client.interceptors.response.use(async (response) => {
14
- if (!response.ok) {
15
- const error = (response.status === 400
16
- ? await response
17
- .json()
18
- .catch(() => ({ status: response.status, detail: response.statusText }))
19
- : { status: response.status, detail: response.statusText });
20
- const newResponse = new Response(JSON.stringify(error), {
21
- status: response.status,
22
- statusText: response.statusText,
23
- });
24
- return newResponse;
25
- }
13
+ client.interceptors.response.use(normalizeErrorResponse);
14
+ return client;
15
+ }
16
+ /**
17
+ * Guarantees that an error response's body is a JSON object with a numeric `status`, so the
18
+ * generated client's `error` is always `ProblemDetails`-shaped.
19
+ *
20
+ * A body that already satisfies this is left untouched: the original response (headers, url and
21
+ * body) is returned as-is. Otherwise a replacement response is built that keeps the original
22
+ * headers, with `Content-Type`/`Content-Length` corrected when the body is replaced.
23
+ *
24
+ * This runs as a response interceptor rather than an error interceptor because the generated
25
+ * fetch client passes the original error to every error interceptor instead of chaining them, so
26
+ * normalization there would not reach interceptors registered by consumers.
27
+ */
28
+ async function normalizeErrorResponse(response) {
29
+ // `new Response` only accepts 200-599, and only error statuses carry a problem body.
30
+ if (response.status < 400 || response.status > 599)
26
31
  return response;
32
+ let text = '';
33
+ try {
34
+ text = await response.clone().text();
35
+ }
36
+ catch (_a) {
37
+ // An unreadable body is treated as empty.
38
+ }
39
+ const parsed = parseJson(text);
40
+ const headers = new Headers(response.headers);
41
+ let problem;
42
+ if (isObject(parsed)) {
43
+ if (typeof parsed.status === 'number')
44
+ return response;
45
+ // A JSON error body that isn't problem details (e.g. an OpenAI-style `{ error: {...} }`).
46
+ problem = { ...parsed, status: response.status };
47
+ }
48
+ else {
49
+ problem = { status: response.status, detail: describeNonJsonBody(response, text, parsed) };
50
+ headers.set('Content-Type', 'application/json');
51
+ }
52
+ headers.delete('Content-Length');
53
+ return new Response(JSON.stringify(problem), {
54
+ status: response.status,
55
+ statusText: response.statusText,
56
+ headers,
27
57
  });
28
- return client;
58
+ }
59
+ /**
60
+ * A plain-text body is a human-readable explanation, so it becomes `detail`. Markup (e.g. a
61
+ * gateway's HTML error page) and empty bodies are not, so they fall back to the reason phrase.
62
+ */
63
+ function describeNonJsonBody(response, text, parsed) {
64
+ var _a;
65
+ const mediaType = (_a = response.headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.split(';')[0].trim().toLowerCase();
66
+ const trimmed = text.trim();
67
+ if (mediaType === 'text/plain' && trimmed)
68
+ return trimmed;
69
+ if (typeof parsed === 'string' && parsed.trim())
70
+ return parsed.trim();
71
+ return response.statusText;
72
+ }
73
+ function parseJson(text) {
74
+ if (!text)
75
+ return undefined;
76
+ try {
77
+ return JSON.parse(text);
78
+ }
79
+ catch (_a) {
80
+ return undefined;
81
+ }
82
+ }
83
+ function isObject(value) {
84
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
29
85
  }
@@ -39,6 +39,7 @@ export {
39
39
  invokeGitHubRunnerStepTemplate,
40
40
  invokeHumanoidImageMaskStepTemplate,
41
41
  invokeImageBackgroundRemovalStepTemplate,
42
+ invokeImageFaceFixStepTemplate,
42
43
  invokeImageGenStepTemplate,
43
44
  invokeImageResourceTrainingStepTemplate,
44
45
  invokeImageScanningStepTemplate,
@@ -69,8 +70,10 @@ export {
69
70
  invokePromptModerationStepTemplate,
70
71
  invokeQwenImageBenchStepTemplate,
71
72
  invokeRepeatStepTemplate,
73
+ invokeSeedAudioGenStepTemplate,
72
74
  invokeShieldstralModerationStepTemplate,
73
75
  invokeSoniloAudioGenStepTemplate,
76
+ invokeStickerTrackStepTemplate,
74
77
  invokeTextToImageStepTemplate,
75
78
  invokeTextToSpeechStepTemplate,
76
79
  invokeTrainingStepTemplate,
@@ -84,6 +87,8 @@ export {
84
87
  invokeVideoInterpolationStepTemplate,
85
88
  invokeVideoMetadataStepTemplate,
86
89
  invokeVideoUpscalerStepTemplate,
90
+ invokeWasmStepTemplate,
91
+ invokeWatermarkDetectionStepTemplate,
87
92
  invokeWdTaggingStepTemplate,
88
93
  invokeWebScrapeStepTemplate,
89
94
  invokeWebSearchStepTemplate,
@@ -534,7 +539,6 @@ export {
534
539
  type FundTemplate,
535
540
  type FundUpdate,
536
541
  type Gemini25FlashCreateImageGenInput,
537
- type Gemini25FlashEditImageGenInput,
538
542
  type Gemini25FlashImageGenInput,
539
543
  type GeminiImageGenInput,
540
544
  GeminiOmniModel,
@@ -645,10 +649,12 @@ export {
645
649
  type HumanoidImageMaskInput,
646
650
  type HumanoidImageMaskOutput,
647
651
  type HumanRecognitionResult,
648
- type Hunyuan3dComfyPolyGenInput,
649
- type Hunyuan3dImageTo3dComfyPolyGenInput,
650
- type Hunyuan3dShapeGenComfyPolyGenInput,
651
- type Hunyuan3dTexGenComfyPolyGenInput,
652
+ type Hunyuan3dFalPolyGenInput,
653
+ type Hunyuan3Dv36FalPolyGenInput,
654
+ type Hunyuan3Dv36ImageTo3dFalPolyGenInput,
655
+ type Hunyuan3Dv36TextTo3dFalPolyGenInput,
656
+ Hunyuan3dView,
657
+ type Hunyuan3dViewImage,
652
658
  type HunyuanVdeoGenInput,
653
659
  type Ideogram45CreateFalImageGenInput,
654
660
  type Ideogram45EditFalImageGenInput,
@@ -667,6 +673,10 @@ export {
667
673
  type ImageBackgroundRemovalStep,
668
674
  type ImageBackgroundRemovalStepTemplate,
669
675
  type ImageBlob,
676
+ type ImageFaceFixInput,
677
+ type ImageFaceFixOutput,
678
+ type ImageFaceFixStep,
679
+ type ImageFaceFixStepTemplate,
670
680
  type ImageGenInput,
671
681
  type ImageGenInputLora,
672
682
  type ImageGenInputWritable,
@@ -676,7 +686,6 @@ export {
676
686
  type ImageGenStepTemplate,
677
687
  type ImageJobControlNet,
678
688
  type ImageJobNetworkParams,
679
- type Imagen4ImageGenInput,
680
689
  type ImageOutputFormat,
681
690
  ImageResouceTrainingModerationStatus,
682
691
  type ImageResourceTrainingInput,
@@ -817,6 +826,11 @@ export {
817
826
  type InvokeImageBackgroundRemovalStepTemplateErrors,
818
827
  type InvokeImageBackgroundRemovalStepTemplateResponse,
819
828
  type InvokeImageBackgroundRemovalStepTemplateResponses,
829
+ type InvokeImageFaceFixStepTemplateData,
830
+ type InvokeImageFaceFixStepTemplateError,
831
+ type InvokeImageFaceFixStepTemplateErrors,
832
+ type InvokeImageFaceFixStepTemplateResponse,
833
+ type InvokeImageFaceFixStepTemplateResponses,
820
834
  type InvokeImageGenStepTemplateData,
821
835
  type InvokeImageGenStepTemplateError,
822
836
  type InvokeImageGenStepTemplateErrors,
@@ -967,6 +981,11 @@ export {
967
981
  type InvokeRepeatStepTemplateErrors,
968
982
  type InvokeRepeatStepTemplateResponse,
969
983
  type InvokeRepeatStepTemplateResponses,
984
+ type InvokeSeedAudioGenStepTemplateData,
985
+ type InvokeSeedAudioGenStepTemplateError,
986
+ type InvokeSeedAudioGenStepTemplateErrors,
987
+ type InvokeSeedAudioGenStepTemplateResponse,
988
+ type InvokeSeedAudioGenStepTemplateResponses,
970
989
  type InvokeShieldstralModerationStepTemplateData,
971
990
  type InvokeShieldstralModerationStepTemplateError,
972
991
  type InvokeShieldstralModerationStepTemplateErrors,
@@ -977,6 +996,11 @@ export {
977
996
  type InvokeSoniloAudioGenStepTemplateErrors,
978
997
  type InvokeSoniloAudioGenStepTemplateResponse,
979
998
  type InvokeSoniloAudioGenStepTemplateResponses,
999
+ type InvokeStickerTrackStepTemplateData,
1000
+ type InvokeStickerTrackStepTemplateError,
1001
+ type InvokeStickerTrackStepTemplateErrors,
1002
+ type InvokeStickerTrackStepTemplateResponse,
1003
+ type InvokeStickerTrackStepTemplateResponses,
980
1004
  type InvokeTextToImageStepTemplateData,
981
1005
  type InvokeTextToImageStepTemplateError,
982
1006
  type InvokeTextToImageStepTemplateErrors,
@@ -1042,6 +1066,16 @@ export {
1042
1066
  type InvokeVideoUpscalerStepTemplateErrors,
1043
1067
  type InvokeVideoUpscalerStepTemplateResponse,
1044
1068
  type InvokeVideoUpscalerStepTemplateResponses,
1069
+ type InvokeWasmStepTemplateData,
1070
+ type InvokeWasmStepTemplateError,
1071
+ type InvokeWasmStepTemplateErrors,
1072
+ type InvokeWasmStepTemplateResponse,
1073
+ type InvokeWasmStepTemplateResponses,
1074
+ type InvokeWatermarkDetectionStepTemplateData,
1075
+ type InvokeWatermarkDetectionStepTemplateError,
1076
+ type InvokeWatermarkDetectionStepTemplateErrors,
1077
+ type InvokeWatermarkDetectionStepTemplateResponse,
1078
+ type InvokeWatermarkDetectionStepTemplateResponses,
1045
1079
  type InvokeWdTaggingStepTemplateData,
1046
1080
  type InvokeWdTaggingStepTemplateError,
1047
1081
  type InvokeWdTaggingStepTemplateErrors,
@@ -1196,9 +1230,6 @@ export {
1196
1230
  type MiniMaxMusic3Output,
1197
1231
  type MiniMaxMusic3Step,
1198
1232
  type MiniMaxMusic3StepTemplate,
1199
- type MiniMaxVideoGenInput,
1200
- MiniMaxVideoGenModel,
1201
- type MochiVideoGenInput,
1202
1233
  type ModalitiesResponse,
1203
1234
  type Model3dBlob,
1204
1235
  type Model3dPreviewCameraPose,
@@ -1255,17 +1286,9 @@ export {
1255
1286
  type OcrStepTemplate,
1256
1287
  type OmniSvgImageToSvgInput,
1257
1288
  type OmniVoiceTextToSpeechInput,
1258
- type OpenAiDallE2CreateImageGenInput,
1259
- type OpenAiDallE2EditImageInput,
1260
- type OpenAiDallE2ImageGenInput,
1261
- type OpenAiDallE3CreateImageGenInput,
1262
- type OpenAiDallE3ImageGenInput,
1263
1289
  type OpenAiGpt15CreateImageInput,
1264
1290
  type OpenAiGpt15EditImageInput,
1265
1291
  type OpenAiGpt15ImageGenInput,
1266
- type OpenAiGpt1CreateImageInput,
1267
- type OpenAiGpt1EditImageInput,
1268
- type OpenAiGpt1ImageGenInput,
1269
1292
  type OpenAiGpt25FlareCreateImageInput,
1270
1293
  type OpenAiGpt25FlareEditImageInput,
1271
1294
  type OpenAiGpt25FlareImageGenInput,
@@ -1495,9 +1518,6 @@ export {
1495
1518
  ResourceFeeType,
1496
1519
  type ResourceInfo,
1497
1520
  ResourceView,
1498
- type ReveCreateFalImageGenInput,
1499
- type ReveEditFalImageGenInput,
1500
- type ReveFalImageGenInput,
1501
1521
  SafeMode,
1502
1522
  Scheduler,
1503
1523
  type Sd1AiToolkitTrainingInput,
@@ -1516,9 +1536,17 @@ export {
1516
1536
  type SdxlVariantImageGenInput,
1517
1537
  SeedanceModel,
1518
1538
  type SeedanceVideoGenInput,
1539
+ type SeedAudioDubbingInput,
1540
+ type SeedAudioGenerateInput,
1541
+ type SeedAudioGenInput,
1542
+ type SeedAudioGenOutput,
1543
+ type SeedAudioGenStep,
1544
+ type SeedAudioGenStepTemplate,
1545
+ type SeedAudioSeparationInput,
1519
1546
  type SeedreamImageGenInput,
1520
1547
  SeedreamVersion,
1521
1548
  type ServiceHistory,
1549
+ ServiceHosting,
1522
1550
  type ServiceResponse,
1523
1551
  ServiceStatus,
1524
1552
  SettlementCurrency,
@@ -1537,10 +1565,12 @@ export {
1537
1565
  type SoniloAudioGenStepTemplate,
1538
1566
  type SoniloMusicInput,
1539
1567
  type SoniloSoundEffectInput,
1540
- type Sora2ImageToVideoInput,
1541
- type Sora2TextToVideoInput,
1542
- type SoraVideoGenInput,
1543
1568
  type StarVectorImageToSvgInput,
1569
+ type StickerPlacement,
1570
+ type StickerTrackInput,
1571
+ type StickerTrackOutput,
1572
+ type StickerTrackStep,
1573
+ type StickerTrackStepTemplate,
1544
1574
  type StreamingBlobAppendResponse,
1545
1575
  type SubmitWorkflowData,
1546
1576
  type SubmitWorkflowError,
@@ -1694,7 +1724,6 @@ export {
1694
1724
  type Wan22ImageGenInput,
1695
1725
  type Wan22VideoGenInput,
1696
1726
  type Wan25FalImageGenInput,
1697
- type Wan25FalImageToImageInput,
1698
1727
  type Wan25FalImageToVideoInput,
1699
1728
  type Wan25FalTextToImageInput,
1700
1729
  type Wan25FalTextToVideoInput,
@@ -1721,7 +1750,23 @@ export {
1721
1750
  type Wan30VideoGenInput,
1722
1751
  type WanImageGenInput,
1723
1752
  type WanVideoGenInput,
1753
+ type WasmInput,
1754
+ type WasmOutput,
1755
+ type WasmStep,
1756
+ type WasmStepTemplate,
1757
+ type WasmtimeAudioFile,
1758
+ type WasmtimeFile,
1759
+ type WasmtimeImageFile,
1760
+ type WasmtimeLimits,
1761
+ type WasmtimeVideoFile,
1762
+ type WasmtimeWasmInput,
1724
1763
  type Watermark,
1764
+ type WatermarkDetectionAudio,
1765
+ type WatermarkDetectionInput,
1766
+ type WatermarkDetectionOutput,
1767
+ type WatermarkDetectionStep,
1768
+ type WatermarkDetectionStepTemplate,
1769
+ type WatermarkDetectionVisual,
1725
1770
  type WatermarkTransform,
1726
1771
  type WdTaggingInput,
1727
1772
  type WdTaggingOutput,
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- export { addWorkflowTag, appendStreamingBlob, createFund, deleteFund, deleteWorkflow, depositIntoFund, getBlob, getBlobArchive, getBlobContent, getBlockedContent, getConsumerBlobUploadUrl, getFreeTier, getFund, getResource, getService, getStreamingBlob, getWorkflow, getWorkflowStep, headBlob, invalidateUserCache, invalidateUserTokens, invokeAceStepAudioStepTemplate, invokeAgeClassificationStepTemplate, invokeArchiveExtractionStepTemplate, invokeAudioCaptioningStepTemplate, invokeAudioClassificationStepTemplate, invokeAudioModerationStepTemplate, invokeAudioTextModerationStepTemplate, invokeBatchOcrSafetyClassificationStepTemplate, invokeBlobArchiveStepTemplate, invokeChatCompletionStepTemplate, invokeComfyNodepackSnapshotStepTemplate, invokeComfyStepTemplate, invokeComposeMediaStepTemplate, invokeConvertImageStepTemplate, invokeCustomComfyStepTemplate, invokeEchoStepTemplate, invokeGitHubRunnerStepTemplate, invokeHumanoidImageMaskStepTemplate, invokeImageBackgroundRemovalStepTemplate, invokeImageGenStepTemplate, invokeImageResourceTrainingStepTemplate, invokeImageScanningStepTemplate, invokeImageToSvgStepTemplate, invokeImageUploadStepTemplate, invokeImageUpscalerStepTemplate, invokeLiveTextToSpeechStepTemplate, invokeLiveTranscriptionStepTemplate, invokeLyricsAlignmentStepTemplate, invokeMediaCaptioningStepTemplate, invokeMediaHashStepTemplate, invokeMediaRatingStepTemplate, invokeMergeStepTemplate, invokeMiniMaxMusic3StepTemplate, invokeModel3dPreviewStepTemplate, invokeModelAnalysisStepTemplate, invokeModelClamScanStepTemplate, invokeModelHashStepTemplate, invokeModelParseMetadataStepTemplate, invokeModelPickleScanStepTemplate, invokeMultimodalEmbeddingStepTemplate, invokeOcrStepTemplate, invokePolyGenStepTemplate, invokePrepareResourceStepTemplate, invokePreprocessImageStepTemplate, invokePreprocessVideoStepTemplate, invokePromptEnhancementStepTemplate, invokePromptModerationStepTemplate, invokeQwenImageBenchStepTemplate, invokeRepeatStepTemplate, invokeShieldstralModerationStepTemplate, invokeSoniloAudioGenStepTemplate, invokeTextToImageStepTemplate, invokeTextToSpeechStepTemplate, invokeTrainingStepTemplate, invokeTranscodeStepTemplate, invokeTranscriptionStepTemplate, invokeTryOnUStepTemplate, invokeVideoBackgroundRemovalStepTemplate, invokeVideoEnhancementStepTemplate, invokeVideoFrameExtractionStepTemplate, invokeVideoGenStepTemplate, invokeVideoInterpolationStepTemplate, invokeVideoMetadataStepTemplate, invokeVideoUpscalerStepTemplate, invokeWdTaggingStepTemplate, invokeWebScrapeStepTemplate, invokeWebSearchStepTemplate, invokeXGuardModerationStepTemplate, invokeYuE2StepTemplate, listServices, patchWorkflow, patchWorkflowStep, queryResources, queryWorkflows, refreshBlob, refundFund, removeAllWorkflowTags, removeWorkflowTag, submitWorkflow, updateFund, updateWorkflow, updateWorkflowStep, uploadConsumerBlob, } from './sdk.gen.js';
3
- export { AnimalPoseBboxDetector, AnimalPoseEstimator, AnylineMergeWith, ArchiveEntryMediaType, ArchiveEntryRejectionReason, ArchiveFormat, BlurRegionMode, BuzzClientAccount, CoarseMode, ComfySampler, ComfyScheduler, ContainerFormat, DensePoseColormap, DensePoseModel, DepthAnythingCheckpoint, DepthAnythingV2Checkpoint, DwPoseBboxDetector, DwPoseEstimator, EmbeddingPrecision, FileFormat, GeminiOmniModel, GeminiOmniResolution, HaiperVideoGenAspectRatio, HaiperVideoGenCameraMovement, HaiperVideoGenModel, HiDreamI1Precision, HiDreamI1Variant, HumanoidImageMaskCategory, ImageBackgroundRemovalFormat, ImageBackgroundRemovalModel, ImageGenOutputFormat, ImageResouceTrainingModerationStatus, ImageTransformer, JobSupport, KlingMode, KlingModel, KlingV3Operation, KlingVideoGenAspectRatio, KlingVideoGenDuration, LeresBoost, LightricksAspectRatio, LyricsAlignmentStatus, MediaContainer, MediaFit, MediaHashType, MediaOutputType, MergeMissingBehavior, MergeReducer, Metric3dBackbone, MiniMaxH3Model, MiniMaxVideoGenModel, ModelClamScanStatus, ModelPickleScanStatus, NsfwLevel, OutputFormat, Priority, ResourceFeeType, ResourceView, SafeMode, Scheduler, SdCppSampleMethod, SdCppSchedule, SdCppUCacheMode, SeedanceModel, SeedreamVersion, ServiceStatus, SettlementCurrency, ShadowRemoval, TraceMode, TrainingModerationStatus, TrainingTraceMode, TransactionType, UpdateWorkflowStatus, Veo3AspectRatio, Veo3GenerationMode, Veo3Version, ViduVideoGenModel, ViduVideoGenStyle, WorkflowStatus, WorkflowStepWarningCode, WorkflowTier, WorkflowUpgradeMode, WorkflowWaitUntil, XGuardPromptScope, ZoeDepthEnvironment, } from './types.gen.js';
2
+ export { addWorkflowTag, appendStreamingBlob, createFund, deleteFund, deleteWorkflow, depositIntoFund, getBlob, getBlobArchive, getBlobContent, getBlockedContent, getConsumerBlobUploadUrl, getFreeTier, getFund, getResource, getService, getStreamingBlob, getWorkflow, getWorkflowStep, headBlob, invalidateUserCache, invalidateUserTokens, invokeAceStepAudioStepTemplate, invokeAgeClassificationStepTemplate, invokeArchiveExtractionStepTemplate, invokeAudioCaptioningStepTemplate, invokeAudioClassificationStepTemplate, invokeAudioModerationStepTemplate, invokeAudioTextModerationStepTemplate, invokeBatchOcrSafetyClassificationStepTemplate, invokeBlobArchiveStepTemplate, invokeChatCompletionStepTemplate, invokeComfyNodepackSnapshotStepTemplate, invokeComfyStepTemplate, invokeComposeMediaStepTemplate, invokeConvertImageStepTemplate, invokeCustomComfyStepTemplate, invokeEchoStepTemplate, invokeGitHubRunnerStepTemplate, invokeHumanoidImageMaskStepTemplate, invokeImageBackgroundRemovalStepTemplate, invokeImageFaceFixStepTemplate, invokeImageGenStepTemplate, invokeImageResourceTrainingStepTemplate, invokeImageScanningStepTemplate, invokeImageToSvgStepTemplate, invokeImageUploadStepTemplate, invokeImageUpscalerStepTemplate, invokeLiveTextToSpeechStepTemplate, invokeLiveTranscriptionStepTemplate, invokeLyricsAlignmentStepTemplate, invokeMediaCaptioningStepTemplate, invokeMediaHashStepTemplate, invokeMediaRatingStepTemplate, invokeMergeStepTemplate, invokeMiniMaxMusic3StepTemplate, invokeModel3dPreviewStepTemplate, invokeModelAnalysisStepTemplate, invokeModelClamScanStepTemplate, invokeModelHashStepTemplate, invokeModelParseMetadataStepTemplate, invokeModelPickleScanStepTemplate, invokeMultimodalEmbeddingStepTemplate, invokeOcrStepTemplate, invokePolyGenStepTemplate, invokePrepareResourceStepTemplate, invokePreprocessImageStepTemplate, invokePreprocessVideoStepTemplate, invokePromptEnhancementStepTemplate, invokePromptModerationStepTemplate, invokeQwenImageBenchStepTemplate, invokeRepeatStepTemplate, invokeSeedAudioGenStepTemplate, invokeShieldstralModerationStepTemplate, invokeSoniloAudioGenStepTemplate, invokeStickerTrackStepTemplate, invokeTextToImageStepTemplate, invokeTextToSpeechStepTemplate, invokeTrainingStepTemplate, invokeTranscodeStepTemplate, invokeTranscriptionStepTemplate, invokeTryOnUStepTemplate, invokeVideoBackgroundRemovalStepTemplate, invokeVideoEnhancementStepTemplate, invokeVideoFrameExtractionStepTemplate, invokeVideoGenStepTemplate, invokeVideoInterpolationStepTemplate, invokeVideoMetadataStepTemplate, invokeVideoUpscalerStepTemplate, invokeWasmStepTemplate, invokeWatermarkDetectionStepTemplate, invokeWdTaggingStepTemplate, invokeWebScrapeStepTemplate, invokeWebSearchStepTemplate, invokeXGuardModerationStepTemplate, invokeYuE2StepTemplate, listServices, patchWorkflow, patchWorkflowStep, queryResources, queryWorkflows, refreshBlob, refundFund, removeAllWorkflowTags, removeWorkflowTag, submitWorkflow, updateFund, updateWorkflow, updateWorkflowStep, uploadConsumerBlob, } from './sdk.gen.js';
3
+ export { AnimalPoseBboxDetector, AnimalPoseEstimator, AnylineMergeWith, ArchiveEntryMediaType, ArchiveEntryRejectionReason, ArchiveFormat, BlurRegionMode, BuzzClientAccount, CoarseMode, ComfySampler, ComfyScheduler, ContainerFormat, DensePoseColormap, DensePoseModel, DepthAnythingCheckpoint, DepthAnythingV2Checkpoint, DwPoseBboxDetector, DwPoseEstimator, EmbeddingPrecision, FileFormat, GeminiOmniModel, GeminiOmniResolution, HaiperVideoGenAspectRatio, HaiperVideoGenCameraMovement, HaiperVideoGenModel, HiDreamI1Precision, HiDreamI1Variant, HumanoidImageMaskCategory, Hunyuan3dView, ImageBackgroundRemovalFormat, ImageBackgroundRemovalModel, ImageGenOutputFormat, ImageResouceTrainingModerationStatus, ImageTransformer, JobSupport, KlingMode, KlingModel, KlingV3Operation, KlingVideoGenAspectRatio, KlingVideoGenDuration, LeresBoost, LightricksAspectRatio, LyricsAlignmentStatus, MediaContainer, MediaFit, MediaHashType, MediaOutputType, MergeMissingBehavior, MergeReducer, Metric3dBackbone, MiniMaxH3Model, ModelClamScanStatus, ModelPickleScanStatus, NsfwLevel, OutputFormat, Priority, ResourceFeeType, ResourceView, SafeMode, Scheduler, SdCppSampleMethod, SdCppSchedule, SdCppUCacheMode, SeedanceModel, SeedreamVersion, ServiceHosting, ServiceStatus, SettlementCurrency, ShadowRemoval, TraceMode, TrainingModerationStatus, TrainingTraceMode, TransactionType, UpdateWorkflowStatus, Veo3AspectRatio, Veo3GenerationMode, Veo3Version, ViduVideoGenModel, ViduVideoGenStyle, WorkflowStatus, WorkflowStepWarningCode, WorkflowTier, WorkflowUpgradeMode, WorkflowWaitUntil, XGuardPromptScope, ZoeDepthEnvironment, } from './types.gen.js';
@@ -118,6 +118,9 @@ import type {
118
118
  InvokeImageBackgroundRemovalStepTemplateData,
119
119
  InvokeImageBackgroundRemovalStepTemplateErrors,
120
120
  InvokeImageBackgroundRemovalStepTemplateResponses,
121
+ InvokeImageFaceFixStepTemplateData,
122
+ InvokeImageFaceFixStepTemplateErrors,
123
+ InvokeImageFaceFixStepTemplateResponses,
121
124
  InvokeImageGenStepTemplateData,
122
125
  InvokeImageGenStepTemplateErrors,
123
126
  InvokeImageGenStepTemplateResponses,
@@ -208,12 +211,18 @@ import type {
208
211
  InvokeRepeatStepTemplateData,
209
212
  InvokeRepeatStepTemplateErrors,
210
213
  InvokeRepeatStepTemplateResponses,
214
+ InvokeSeedAudioGenStepTemplateData,
215
+ InvokeSeedAudioGenStepTemplateErrors,
216
+ InvokeSeedAudioGenStepTemplateResponses,
211
217
  InvokeShieldstralModerationStepTemplateData,
212
218
  InvokeShieldstralModerationStepTemplateErrors,
213
219
  InvokeShieldstralModerationStepTemplateResponses,
214
220
  InvokeSoniloAudioGenStepTemplateData,
215
221
  InvokeSoniloAudioGenStepTemplateErrors,
216
222
  InvokeSoniloAudioGenStepTemplateResponses,
223
+ InvokeStickerTrackStepTemplateData,
224
+ InvokeStickerTrackStepTemplateErrors,
225
+ InvokeStickerTrackStepTemplateResponses,
217
226
  InvokeTextToImageStepTemplateData,
218
227
  InvokeTextToImageStepTemplateErrors,
219
228
  InvokeTextToImageStepTemplateResponses,
@@ -253,6 +262,12 @@ import type {
253
262
  InvokeVideoUpscalerStepTemplateData,
254
263
  InvokeVideoUpscalerStepTemplateErrors,
255
264
  InvokeVideoUpscalerStepTemplateResponses,
265
+ InvokeWasmStepTemplateData,
266
+ InvokeWasmStepTemplateErrors,
267
+ InvokeWasmStepTemplateResponses,
268
+ InvokeWatermarkDetectionStepTemplateData,
269
+ InvokeWatermarkDetectionStepTemplateErrors,
270
+ InvokeWatermarkDetectionStepTemplateResponses,
256
271
  InvokeWdTaggingStepTemplateData,
257
272
  InvokeWdTaggingStepTemplateErrors,
258
273
  InvokeWdTaggingStepTemplateResponses,
@@ -328,7 +343,8 @@ export type Options<
328
343
  meta?: Record<string, unknown>;
329
344
  };
330
345
  /**
331
- * Get blob by ID. This will redirect to a cacheable content URL.
346
+ * Get blob by ID. An image, video or audio blob read inline redirects to a cacheable content URL; anything else,
347
+ * and any download, redirects to a short-lived storage URL.
332
348
  */
333
349
  export declare const getBlob: <ThrowOnError extends boolean = false>(
334
350
  options: Options<GetBlobData, ThrowOnError>
@@ -699,7 +715,7 @@ export declare const invokeEchoStepTemplate: <ThrowOnError extends boolean = fal
699
715
  /**
700
716
  * GitHubRunner
701
717
  *
702
- * Runs one GitHub Actions job on a GPU worker. Its input hands over the job and its secrets, so it is restricted to managers and must be in an ephemeral workflow.
718
+ * Runs one GitHub Actions job on a worker. Its input hands over the job and its secrets, so it is restricted to managers and the config must be encrypted for the fleet.
703
719
  */
704
720
  export declare const invokeGitHubRunnerStepTemplate: <ThrowOnError extends boolean = false>(
705
721
  options?: Options<InvokeGitHubRunnerStepTemplateData, ThrowOnError>
@@ -730,6 +746,17 @@ export declare const invokeImageBackgroundRemovalStepTemplate: <
730
746
  ThrowOnError,
731
747
  'fields'
732
748
  >;
749
+ /**
750
+ * Detects the faces in an image and regenerates them with an SD1 or SDXL-family checkpoint.
751
+ */
752
+ export declare const invokeImageFaceFixStepTemplate: <ThrowOnError extends boolean = false>(
753
+ options?: Options<InvokeImageFaceFixStepTemplateData, ThrowOnError>
754
+ ) => import('./client/types.gen.js').RequestResult<
755
+ InvokeImageFaceFixStepTemplateResponses,
756
+ InvokeImageFaceFixStepTemplateErrors,
757
+ ThrowOnError,
758
+ 'fields'
759
+ >;
733
760
  /**
734
761
  * Image Generation
735
762
  *
@@ -1097,6 +1124,17 @@ export declare const invokeRepeatStepTemplate: <ThrowOnError extends boolean = f
1097
1124
  ThrowOnError,
1098
1125
  'fields'
1099
1126
  >;
1127
+ /**
1128
+ * Generate speech, music and ambience, dub a video into another language, or separate audio into tracks with BytePlus Seed Audio.
1129
+ */
1130
+ export declare const invokeSeedAudioGenStepTemplate: <ThrowOnError extends boolean = false>(
1131
+ options?: Options<InvokeSeedAudioGenStepTemplateData, ThrowOnError>
1132
+ ) => import('./client/types.gen.js').RequestResult<
1133
+ InvokeSeedAudioGenStepTemplateResponses,
1134
+ InvokeSeedAudioGenStepTemplateErrors,
1135
+ ThrowOnError,
1136
+ 'fields'
1137
+ >;
1100
1138
  /**
1101
1139
  * ShieldstralModeration
1102
1140
  *
@@ -1124,6 +1162,17 @@ export declare const invokeSoniloAudioGenStepTemplate: <ThrowOnError extends boo
1124
1162
  ThrowOnError,
1125
1163
  'fields'
1126
1164
  >;
1165
+ /**
1166
+ * Keeps a sticker placed on the first tracked frame of a video on the character's head or eyes, returning a per-frame JSON track.
1167
+ */
1168
+ export declare const invokeStickerTrackStepTemplate: <ThrowOnError extends boolean = false>(
1169
+ options?: Options<InvokeStickerTrackStepTemplateData, ThrowOnError>
1170
+ ) => import('./client/types.gen.js').RequestResult<
1171
+ InvokeStickerTrackStepTemplateResponses,
1172
+ InvokeStickerTrackStepTemplateErrors,
1173
+ ThrowOnError,
1174
+ 'fields'
1175
+ >;
1127
1176
  /**
1128
1177
  * TextToImage
1129
1178
  *
@@ -1278,6 +1327,28 @@ export declare const invokeVideoUpscalerStepTemplate: <ThrowOnError extends bool
1278
1327
  ThrowOnError,
1279
1328
  'fields'
1280
1329
  >;
1330
+ /**
1331
+ * Runs a WebAssembly module as a WASI command with its arguments, environment, stdin and read-only files under /input, and no network.
1332
+ */
1333
+ export declare const invokeWasmStepTemplate: <ThrowOnError extends boolean = false>(
1334
+ options?: Options<InvokeWasmStepTemplateData, ThrowOnError>
1335
+ ) => import('./client/types.gen.js').RequestResult<
1336
+ InvokeWasmStepTemplateResponses,
1337
+ InvokeWasmStepTemplateErrors,
1338
+ ThrowOnError,
1339
+ 'fields'
1340
+ >;
1341
+ /**
1342
+ * Checks an image, a video or an audio file for the invisible watermark Civitai puts on what it generates.
1343
+ */
1344
+ export declare const invokeWatermarkDetectionStepTemplate: <ThrowOnError extends boolean = false>(
1345
+ options?: Options<InvokeWatermarkDetectionStepTemplateData, ThrowOnError>
1346
+ ) => import('./client/types.gen.js').RequestResult<
1347
+ InvokeWatermarkDetectionStepTemplateResponses,
1348
+ InvokeWatermarkDetectionStepTemplateErrors,
1349
+ ThrowOnError,
1350
+ 'fields'
1351
+ >;
1281
1352
  /**
1282
1353
  * WDTagging
1283
1354
  *
@@ -1,7 +1,8 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client } from './client.gen.js';
3
3
  /**
4
- * Get blob by ID. This will redirect to a cacheable content URL.
4
+ * Get blob by ID. An image, video or audio blob read inline redirects to a cacheable content URL; anything else,
5
+ * and any download, redirects to a short-lived storage URL.
5
6
  */
6
7
  export const getBlob = (options) => {
7
8
  var _a;
@@ -404,7 +405,7 @@ export const invokeEchoStepTemplate = (options) => {
404
405
  /**
405
406
  * GitHubRunner
406
407
  *
407
- * Runs one GitHub Actions job on a GPU worker. Its input hands over the job and its secrets, so it is restricted to managers and must be in an ephemeral workflow.
408
+ * Runs one GitHub Actions job on a worker. Its input hands over the job and its secrets, so it is restricted to managers and the config must be encrypted for the fleet.
408
409
  */
409
410
  export const invokeGitHubRunnerStepTemplate = (options) => {
410
411
  var _a;
@@ -442,6 +443,20 @@ export const invokeImageBackgroundRemovalStepTemplate = (options) => {
442
443
  },
443
444
  });
444
445
  };
446
+ /**
447
+ * Detects the faces in an image and regenerates them with an SD1 or SDXL-family checkpoint.
448
+ */
449
+ export const invokeImageFaceFixStepTemplate = (options) => {
450
+ var _a;
451
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
452
+ url: '/v2/consumer/recipes/imageFaceFix',
453
+ ...options,
454
+ headers: {
455
+ 'Content-Type': 'application/json',
456
+ ...options === null || options === void 0 ? void 0 : options.headers,
457
+ },
458
+ });
459
+ };
445
460
  /**
446
461
  * Image Generation
447
462
  *
@@ -897,6 +912,20 @@ export const invokeRepeatStepTemplate = (options) => {
897
912
  },
898
913
  });
899
914
  };
915
+ /**
916
+ * Generate speech, music and ambience, dub a video into another language, or separate audio into tracks with BytePlus Seed Audio.
917
+ */
918
+ export const invokeSeedAudioGenStepTemplate = (options) => {
919
+ var _a;
920
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
921
+ url: '/v2/consumer/recipes/seedAudioGen',
922
+ ...options,
923
+ headers: {
924
+ 'Content-Type': 'application/json',
925
+ ...options === null || options === void 0 ? void 0 : options.headers,
926
+ },
927
+ });
928
+ };
900
929
  /**
901
930
  * ShieldstralModeration
902
931
  *
@@ -928,6 +957,20 @@ export const invokeSoniloAudioGenStepTemplate = (options) => {
928
957
  },
929
958
  });
930
959
  };
960
+ /**
961
+ * Keeps a sticker placed on the first tracked frame of a video on the character's head or eyes, returning a per-frame JSON track.
962
+ */
963
+ export const invokeStickerTrackStepTemplate = (options) => {
964
+ var _a;
965
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
966
+ url: '/v2/consumer/recipes/stickerTrack',
967
+ ...options,
968
+ headers: {
969
+ 'Content-Type': 'application/json',
970
+ ...options === null || options === void 0 ? void 0 : options.headers,
971
+ },
972
+ });
973
+ };
931
974
  /**
932
975
  * TextToImage
933
976
  *
@@ -1119,6 +1162,34 @@ export const invokeVideoUpscalerStepTemplate = (options) => {
1119
1162
  },
1120
1163
  });
1121
1164
  };
1165
+ /**
1166
+ * Runs a WebAssembly module as a WASI command with its arguments, environment, stdin and read-only files under /input, and no network.
1167
+ */
1168
+ export const invokeWasmStepTemplate = (options) => {
1169
+ var _a;
1170
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
1171
+ url: '/v2/consumer/recipes/wasm',
1172
+ ...options,
1173
+ headers: {
1174
+ 'Content-Type': 'application/json',
1175
+ ...options === null || options === void 0 ? void 0 : options.headers,
1176
+ },
1177
+ });
1178
+ };
1179
+ /**
1180
+ * Checks an image, a video or an audio file for the invisible watermark Civitai puts on what it generates.
1181
+ */
1182
+ export const invokeWatermarkDetectionStepTemplate = (options) => {
1183
+ var _a;
1184
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
1185
+ url: '/v2/consumer/recipes/watermarkDetection',
1186
+ ...options,
1187
+ headers: {
1188
+ 'Content-Type': 'application/json',
1189
+ ...options === null || options === void 0 ? void 0 : options.headers,
1190
+ },
1191
+ });
1192
+ };
1122
1193
  /**
1123
1194
  * WDTagging
1124
1195
  *