@civitai/client 0.2.0-beta.4 → 0.2.0-beta.40

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.
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client as _heyApiClient } from './client.gen';
3
3
  /**
4
- * Get blob by ID. This will return the blob as a binary stream.
4
+ * Get blob by ID. This will redirect to a cacheable content URL.
5
5
  */
6
6
  export const getBlob = (options) => {
7
7
  var _a;
@@ -32,6 +32,93 @@ export const headBlob = (options) => {
32
32
  ...options,
33
33
  });
34
34
  };
35
+ /**
36
+ * Get a presigned URL for browser uploads.
37
+ * The returned URL points to POST /v2/consumer/blobs with a signature for authentication.
38
+ */
39
+ export const getConsumerBlobUploadUrl = (options) => {
40
+ var _a;
41
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
42
+ security: [
43
+ {
44
+ scheme: 'bearer',
45
+ type: 'http',
46
+ },
47
+ ],
48
+ url: '/v2/consumer/blobs/upload',
49
+ ...options,
50
+ });
51
+ };
52
+ /**
53
+ * Upload a blob directly with on-the-fly moderation.
54
+ * Supports both authenticated requests (Bearer token) and presigned URLs (sig query param).
55
+ */
56
+ export const uploadConsumerBlob = (options) => {
57
+ var _a;
58
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
59
+ security: [
60
+ {
61
+ scheme: 'bearer',
62
+ type: 'http',
63
+ },
64
+ ],
65
+ url: '/v2/consumer/blobs',
66
+ ...options,
67
+ });
68
+ };
69
+ /**
70
+ * Serves cacheable blob content using a deterministic encrypted token
71
+ */
72
+ export const getBlobContent = (options) => {
73
+ var _a;
74
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
75
+ security: [
76
+ {
77
+ scheme: 'bearer',
78
+ type: 'http',
79
+ },
80
+ ],
81
+ url: '/v2/consumer/blobs/content/{encryptedToken}',
82
+ ...options,
83
+ });
84
+ };
85
+ /**
86
+ * Serves a blocked placeholder image with the specified dimensions
87
+ */
88
+ export const getBlockedContent = (options) => {
89
+ var _a;
90
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
91
+ security: [
92
+ {
93
+ scheme: 'bearer',
94
+ type: 'http',
95
+ },
96
+ ],
97
+ url: '/v2/consumer/blobs/blocked/{encryptedToken}',
98
+ ...options,
99
+ });
100
+ };
101
+ /**
102
+ * Workflow step for generating music using ACE Step 1.5.
103
+ * /// Produces full songs from text descriptions and structured lyrics.
104
+ */
105
+ export const invokeAceStepAudioStepTemplate = (options) => {
106
+ var _a;
107
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
108
+ security: [
109
+ {
110
+ scheme: 'bearer',
111
+ type: 'http',
112
+ },
113
+ ],
114
+ url: '/v2/consumer/recipes/aceStepAudio',
115
+ ...options,
116
+ headers: {
117
+ 'Content-Type': 'application/json',
118
+ ...options === null || options === void 0 ? void 0 : options.headers,
119
+ },
120
+ });
121
+ };
35
122
  /**
36
123
  * Age classification
37
124
  * Detects minors in media content. Returns a boolean value indicating whether the content contains minors as well as details on where minors are detected.
@@ -53,6 +140,28 @@ export const invokeAgeClassificationStepTemplate = (options) => {
53
140
  },
54
141
  });
55
142
  };
143
+ /**
144
+ * ChatCompletion
145
+ * Generate chat completions using language models with support for text and image inputs.
146
+ * /// Compatible with OpenAI Chat Completions API format.
147
+ */
148
+ export const invokeChatCompletionStepTemplate = (options) => {
149
+ var _a;
150
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
151
+ security: [
152
+ {
153
+ scheme: 'bearer',
154
+ type: 'http',
155
+ },
156
+ ],
157
+ url: '/v2/consumer/recipes/chatCompletion',
158
+ ...options,
159
+ headers: {
160
+ 'Content-Type': 'application/json',
161
+ ...options === null || options === void 0 ? void 0 : options.headers,
162
+ },
163
+ });
164
+ };
56
165
  /**
57
166
  * Comfy workflows
58
167
  * Runs a comfy workflow. Currently there are limited nodes available. Contact support for more information.
@@ -74,6 +183,26 @@ export const invokeComfyStepTemplate = (options) => {
74
183
  },
75
184
  });
76
185
  };
186
+ /**
187
+ * A workflow step that converts images to different formats and applies optional transforms.
188
+ */
189
+ export const invokeConvertImageStepTemplate = (options) => {
190
+ var _a;
191
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
192
+ security: [
193
+ {
194
+ scheme: 'bearer',
195
+ type: 'http',
196
+ },
197
+ ],
198
+ url: '/v2/consumer/recipes/convertImage',
199
+ ...options,
200
+ headers: {
201
+ 'Content-Type': 'application/json',
202
+ ...options === null || options === void 0 ? void 0 : options.headers,
203
+ },
204
+ });
205
+ };
77
206
  /**
78
207
  * Echo
79
208
  * A workflow step that takes a message string and retuns it.
@@ -159,6 +288,82 @@ export const invokeImageUploadStepTemplate = (options) => {
159
288
  },
160
289
  });
161
290
  };
291
+ export const invokeImageUpscalerStepTemplate = (options) => {
292
+ var _a;
293
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
294
+ security: [
295
+ {
296
+ scheme: 'bearer',
297
+ type: 'http',
298
+ },
299
+ ],
300
+ url: '/v2/consumer/recipes/imageUpscaler',
301
+ ...options,
302
+ headers: {
303
+ 'Content-Type': 'application/json',
304
+ ...options === null || options === void 0 ? void 0 : options.headers,
305
+ },
306
+ });
307
+ };
308
+ /**
309
+ * MediaHash
310
+ * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
311
+ */
312
+ export const invokeMediaHashStepTemplate = (options) => {
313
+ var _a;
314
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
315
+ security: [
316
+ {
317
+ scheme: 'bearer',
318
+ type: 'http',
319
+ },
320
+ ],
321
+ url: '/v2/consumer/recipes/mediaHash',
322
+ ...options,
323
+ headers: {
324
+ 'Content-Type': 'application/json',
325
+ ...options === null || options === void 0 ? void 0 : options.headers,
326
+ },
327
+ });
328
+ };
329
+ /**
330
+ * MediaRating
331
+ * Performs NSFW level detection and content safety classification on media content.
332
+ */
333
+ export const invokeMediaRatingStepTemplate = (options) => {
334
+ var _a;
335
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
336
+ security: [
337
+ {
338
+ scheme: 'bearer',
339
+ type: 'http',
340
+ },
341
+ ],
342
+ url: '/v2/consumer/recipes/mediaRating',
343
+ ...options,
344
+ headers: {
345
+ 'Content-Type': 'application/json',
346
+ ...options === null || options === void 0 ? void 0 : options.headers,
347
+ },
348
+ });
349
+ };
350
+ export const invokePreprocessImageStepTemplate = (options) => {
351
+ var _a;
352
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
353
+ security: [
354
+ {
355
+ scheme: 'bearer',
356
+ type: 'http',
357
+ },
358
+ ],
359
+ url: '/v2/consumer/recipes/preprocessImage',
360
+ ...options,
361
+ headers: {
362
+ 'Content-Type': 'application/json',
363
+ ...options === null || options === void 0 ? void 0 : options.headers,
364
+ },
365
+ });
366
+ };
162
367
  /**
163
368
  * TextToImage
164
369
  * Generate images using text as input
@@ -180,6 +385,71 @@ export const invokeTextToImageStepTemplate = (options) => {
180
385
  },
181
386
  });
182
387
  };
388
+ /**
389
+ * Text-to-Speech
390
+ * Synthesizes speech from text, supporting both voice cloning (Base mode with reference audio) and built-in speakers (CustomVoice mode).
391
+ */
392
+ export const invokeTextToSpeechStepTemplate = (options) => {
393
+ var _a;
394
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
395
+ security: [
396
+ {
397
+ scheme: 'bearer',
398
+ type: 'http',
399
+ },
400
+ ],
401
+ url: '/v2/consumer/recipes/textToSpeech',
402
+ ...options,
403
+ headers: {
404
+ 'Content-Type': 'application/json',
405
+ ...options === null || options === void 0 ? void 0 : options.headers,
406
+ },
407
+ });
408
+ };
409
+ /**
410
+ * Training
411
+ * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
412
+ * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
413
+ * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
414
+ */
415
+ export const invokeTrainingStepTemplate = (options) => {
416
+ var _a;
417
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
418
+ security: [
419
+ {
420
+ scheme: 'bearer',
421
+ type: 'http',
422
+ },
423
+ ],
424
+ url: '/v2/consumer/recipes/training',
425
+ ...options,
426
+ headers: {
427
+ 'Content-Type': 'application/json',
428
+ ...options === null || options === void 0 ? void 0 : options.headers,
429
+ },
430
+ });
431
+ };
432
+ /**
433
+ * Transcription
434
+ * Performs automatic speech recognition (ASR) on audio media, returning transcribed text with optional timestamps.
435
+ */
436
+ export const invokeTranscriptionStepTemplate = (options) => {
437
+ var _a;
438
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
439
+ security: [
440
+ {
441
+ scheme: 'bearer',
442
+ type: 'http',
443
+ },
444
+ ],
445
+ url: '/v2/consumer/recipes/transcription',
446
+ ...options,
447
+ headers: {
448
+ 'Content-Type': 'application/json',
449
+ ...options === null || options === void 0 ? void 0 : options.headers,
450
+ },
451
+ });
452
+ };
183
453
  /**
184
454
  * Upscale videos and/or interpolate frames
185
455
  */
@@ -200,6 +470,28 @@ export const invokeVideoEnhancementStepTemplate = (options) => {
200
470
  },
201
471
  });
202
472
  };
473
+ /**
474
+ * Video Frame Extraction
475
+ * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
476
+ * /// Useful for generating video previews, storyboards, or analyzing video content.
477
+ */
478
+ export const invokeVideoFrameExtractionStepTemplate = (options) => {
479
+ var _a;
480
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
481
+ security: [
482
+ {
483
+ scheme: 'bearer',
484
+ type: 'http',
485
+ },
486
+ ],
487
+ url: '/v2/consumer/recipes/videoFrameExtraction',
488
+ ...options,
489
+ headers: {
490
+ 'Content-Type': 'application/json',
491
+ ...options === null || options === void 0 ? void 0 : options.headers,
492
+ },
493
+ });
494
+ };
203
495
  /**
204
496
  * Video generation
205
497
  * Generate videos through text/image inputs using any of our supported engines
@@ -221,6 +513,87 @@ export const invokeVideoGenStepTemplate = (options) => {
221
513
  },
222
514
  });
223
515
  };
516
+ /**
517
+ * Interpolate videos using VFI Mamba
518
+ */
519
+ export const invokeVideoInterpolationStepTemplate = (options) => {
520
+ var _a;
521
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
522
+ security: [
523
+ {
524
+ scheme: 'bearer',
525
+ type: 'http',
526
+ },
527
+ ],
528
+ url: '/v2/consumer/recipes/videoInterpolation',
529
+ ...options,
530
+ headers: {
531
+ 'Content-Type': 'application/json',
532
+ ...options === null || options === void 0 ? void 0 : options.headers,
533
+ },
534
+ });
535
+ };
536
+ /**
537
+ * Extract metadata from videos including width, height, FPS, and duration
538
+ */
539
+ export const invokeVideoMetadataStepTemplate = (options) => {
540
+ var _a;
541
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
542
+ security: [
543
+ {
544
+ scheme: 'bearer',
545
+ type: 'http',
546
+ },
547
+ ],
548
+ url: '/v2/consumer/recipes/videoMetadata',
549
+ ...options,
550
+ headers: {
551
+ 'Content-Type': 'application/json',
552
+ ...options === null || options === void 0 ? void 0 : options.headers,
553
+ },
554
+ });
555
+ };
556
+ /**
557
+ * Upscale videos using FlashVSR
558
+ */
559
+ export const invokeVideoUpscalerStepTemplate = (options) => {
560
+ var _a;
561
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
562
+ security: [
563
+ {
564
+ scheme: 'bearer',
565
+ type: 'http',
566
+ },
567
+ ],
568
+ url: '/v2/consumer/recipes/videoUpscaler',
569
+ ...options,
570
+ headers: {
571
+ 'Content-Type': 'application/json',
572
+ ...options === null || options === void 0 ? void 0 : options.headers,
573
+ },
574
+ });
575
+ };
576
+ /**
577
+ * WDTagging
578
+ * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
579
+ */
580
+ export const invokeWdTaggingStepTemplate = (options) => {
581
+ var _a;
582
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
583
+ security: [
584
+ {
585
+ scheme: 'bearer',
586
+ type: 'http',
587
+ },
588
+ ],
589
+ url: '/v2/consumer/recipes/wdTagging',
590
+ ...options,
591
+ headers: {
592
+ 'Content-Type': 'application/json',
593
+ ...options === null || options === void 0 ? void 0 : options.headers,
594
+ },
595
+ });
596
+ };
224
597
  /**
225
598
  * Invalidates the cache of a specific resource.
226
599
  */
@@ -253,6 +626,19 @@ export const getResource = (options) => {
253
626
  ...options,
254
627
  });
255
628
  };
629
+ export const getStreamingBlob = (options) => {
630
+ var _a;
631
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : _heyApiClient).get({
632
+ security: [
633
+ {
634
+ scheme: 'bearer',
635
+ type: 'http',
636
+ },
637
+ ],
638
+ url: '/v2/consumer/streaming-blobs/{blobKey}',
639
+ ...options,
640
+ });
641
+ };
256
642
  /**
257
643
  * Query workflows
258
644
  */