@civitai/client 0.2.0-beta.14 → 0.2.0-beta.16

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.
@@ -23,21 +23,45 @@ import type {
23
23
  InvokeImageResourceTrainingStepTemplateData,
24
24
  InvokeImageResourceTrainingStepTemplateResponses,
25
25
  InvokeImageResourceTrainingStepTemplateErrors,
26
- InvokeTrainingStepTemplateData,
27
- InvokeTrainingStepTemplateResponses,
28
- InvokeTrainingStepTemplateErrors,
29
26
  InvokeImageUploadStepTemplateData,
30
27
  InvokeImageUploadStepTemplateResponses,
31
28
  InvokeImageUploadStepTemplateErrors,
29
+ InvokeImageUpscalerStepTemplateData,
30
+ InvokeImageUpscalerStepTemplateResponses,
31
+ InvokeImageUpscalerStepTemplateErrors,
32
+ InvokeMediaHashStepTemplateData,
33
+ InvokeMediaHashStepTemplateResponses,
34
+ InvokeMediaHashStepTemplateErrors,
35
+ InvokeMediaRatingStepTemplateData,
36
+ InvokeMediaRatingStepTemplateResponses,
37
+ InvokeMediaRatingStepTemplateErrors,
32
38
  InvokeTextToImageStepTemplateData,
33
39
  InvokeTextToImageStepTemplateResponses,
34
40
  InvokeTextToImageStepTemplateErrors,
41
+ InvokeTrainingStepTemplateData,
42
+ InvokeTrainingStepTemplateResponses,
43
+ InvokeTrainingStepTemplateErrors,
35
44
  InvokeVideoEnhancementStepTemplateData,
36
45
  InvokeVideoEnhancementStepTemplateResponses,
37
46
  InvokeVideoEnhancementStepTemplateErrors,
47
+ InvokeVideoFrameExtractionStepTemplateData,
48
+ InvokeVideoFrameExtractionStepTemplateResponses,
49
+ InvokeVideoFrameExtractionStepTemplateErrors,
38
50
  InvokeVideoGenStepTemplateData,
39
51
  InvokeVideoGenStepTemplateResponses,
40
52
  InvokeVideoGenStepTemplateErrors,
53
+ InvokeVideoInterpolationStepTemplateData,
54
+ InvokeVideoInterpolationStepTemplateResponses,
55
+ InvokeVideoInterpolationStepTemplateErrors,
56
+ InvokeVideoMetadataStepTemplateData,
57
+ InvokeVideoMetadataStepTemplateResponses,
58
+ InvokeVideoMetadataStepTemplateErrors,
59
+ InvokeVideoUpscalerStepTemplateData,
60
+ InvokeVideoUpscalerStepTemplateResponses,
61
+ InvokeVideoUpscalerStepTemplateErrors,
62
+ InvokeWdTaggingStepTemplateData,
63
+ InvokeWdTaggingStepTemplateResponses,
64
+ InvokeWdTaggingStepTemplateErrors,
41
65
  InvalidateResourceData,
42
66
  InvalidateResourceResponses,
43
67
  InvalidateResourceErrors,
@@ -183,18 +207,6 @@ export declare const invokeImageResourceTrainingStepTemplate: <
183
207
  ThrowOnError,
184
208
  'fields'
185
209
  >;
186
- /**
187
- * AI Toolkit Training
188
- * Train models using AI Toolkit engine
189
- */
190
- export declare const invokeTrainingStepTemplate: <ThrowOnError extends boolean = false>(
191
- options?: Options<InvokeTrainingStepTemplateData, ThrowOnError>
192
- ) => import('./client').RequestResult<
193
- InvokeTrainingStepTemplateResponses,
194
- InvokeTrainingStepTemplateErrors,
195
- ThrowOnError,
196
- 'fields'
197
- >;
198
210
  /**
199
211
  * Image upload
200
212
  * Uploads an image to be used in a workflow
@@ -207,6 +219,38 @@ export declare const invokeImageUploadStepTemplate: <ThrowOnError extends boolea
207
219
  ThrowOnError,
208
220
  'fields'
209
221
  >;
222
+ export declare const invokeImageUpscalerStepTemplate: <ThrowOnError extends boolean = false>(
223
+ options?: Options<InvokeImageUpscalerStepTemplateData, ThrowOnError>
224
+ ) => import('./client').RequestResult<
225
+ InvokeImageUpscalerStepTemplateResponses,
226
+ InvokeImageUpscalerStepTemplateErrors,
227
+ ThrowOnError,
228
+ 'fields'
229
+ >;
230
+ /**
231
+ * MediaHash
232
+ * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
233
+ */
234
+ export declare const invokeMediaHashStepTemplate: <ThrowOnError extends boolean = false>(
235
+ options?: Options<InvokeMediaHashStepTemplateData, ThrowOnError>
236
+ ) => import('./client').RequestResult<
237
+ InvokeMediaHashStepTemplateResponses,
238
+ InvokeMediaHashStepTemplateErrors,
239
+ ThrowOnError,
240
+ 'fields'
241
+ >;
242
+ /**
243
+ * MediaRating
244
+ * Performs NSFW level detection and content safety classification on media content.
245
+ */
246
+ export declare const invokeMediaRatingStepTemplate: <ThrowOnError extends boolean = false>(
247
+ options?: Options<InvokeMediaRatingStepTemplateData, ThrowOnError>
248
+ ) => import('./client').RequestResult<
249
+ InvokeMediaRatingStepTemplateResponses,
250
+ InvokeMediaRatingStepTemplateErrors,
251
+ ThrowOnError,
252
+ 'fields'
253
+ >;
210
254
  /**
211
255
  * TextToImage
212
256
  * Generate images using text as input
@@ -219,6 +263,20 @@ export declare const invokeTextToImageStepTemplate: <ThrowOnError extends boolea
219
263
  ThrowOnError,
220
264
  'fields'
221
265
  >;
266
+ /**
267
+ * Training
268
+ * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
269
+ * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
270
+ * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
271
+ */
272
+ export declare const invokeTrainingStepTemplate: <ThrowOnError extends boolean = false>(
273
+ options?: Options<InvokeTrainingStepTemplateData, ThrowOnError>
274
+ ) => import('./client').RequestResult<
275
+ InvokeTrainingStepTemplateResponses,
276
+ InvokeTrainingStepTemplateErrors,
277
+ ThrowOnError,
278
+ 'fields'
279
+ >;
222
280
  /**
223
281
  * Upscale videos and/or interpolate frames
224
282
  */
@@ -230,6 +288,19 @@ export declare const invokeVideoEnhancementStepTemplate: <ThrowOnError extends b
230
288
  ThrowOnError,
231
289
  'fields'
232
290
  >;
291
+ /**
292
+ * Video Frame Extraction
293
+ * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
294
+ * /// Useful for generating video previews, storyboards, or analyzing video content.
295
+ */
296
+ export declare const invokeVideoFrameExtractionStepTemplate: <ThrowOnError extends boolean = false>(
297
+ options?: Options<InvokeVideoFrameExtractionStepTemplateData, ThrowOnError>
298
+ ) => import('./client').RequestResult<
299
+ InvokeVideoFrameExtractionStepTemplateResponses,
300
+ InvokeVideoFrameExtractionStepTemplateErrors,
301
+ ThrowOnError,
302
+ 'fields'
303
+ >;
233
304
  /**
234
305
  * Video generation
235
306
  * Generate videos through text/image inputs using any of our supported engines
@@ -242,6 +313,51 @@ export declare const invokeVideoGenStepTemplate: <ThrowOnError extends boolean =
242
313
  ThrowOnError,
243
314
  'fields'
244
315
  >;
316
+ /**
317
+ * Interpolate videos using VFI Mamba
318
+ */
319
+ export declare const invokeVideoInterpolationStepTemplate: <ThrowOnError extends boolean = false>(
320
+ options?: Options<InvokeVideoInterpolationStepTemplateData, ThrowOnError>
321
+ ) => import('./client').RequestResult<
322
+ InvokeVideoInterpolationStepTemplateResponses,
323
+ InvokeVideoInterpolationStepTemplateErrors,
324
+ ThrowOnError,
325
+ 'fields'
326
+ >;
327
+ /**
328
+ * Extract metadata from videos including width, height, FPS, and duration
329
+ */
330
+ export declare const invokeVideoMetadataStepTemplate: <ThrowOnError extends boolean = false>(
331
+ options?: Options<InvokeVideoMetadataStepTemplateData, ThrowOnError>
332
+ ) => import('./client').RequestResult<
333
+ InvokeVideoMetadataStepTemplateResponses,
334
+ InvokeVideoMetadataStepTemplateErrors,
335
+ ThrowOnError,
336
+ 'fields'
337
+ >;
338
+ /**
339
+ * Upscale videos using FlashVSR
340
+ */
341
+ export declare const invokeVideoUpscalerStepTemplate: <ThrowOnError extends boolean = false>(
342
+ options?: Options<InvokeVideoUpscalerStepTemplateData, ThrowOnError>
343
+ ) => import('./client').RequestResult<
344
+ InvokeVideoUpscalerStepTemplateResponses,
345
+ InvokeVideoUpscalerStepTemplateErrors,
346
+ ThrowOnError,
347
+ 'fields'
348
+ >;
349
+ /**
350
+ * WDTagging
351
+ * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
352
+ */
353
+ export declare const invokeWdTaggingStepTemplate: <ThrowOnError extends boolean = false>(
354
+ options?: Options<InvokeWdTaggingStepTemplateData, ThrowOnError>
355
+ ) => import('./client').RequestResult<
356
+ InvokeWdTaggingStepTemplateResponses,
357
+ InvokeWdTaggingStepTemplateErrors,
358
+ ThrowOnError,
359
+ 'fields'
360
+ >;
245
361
  /**
246
362
  * Invalidates the cache of a specific resource.
247
363
  */
@@ -155,10 +155,10 @@ export const invokeImageResourceTrainingStepTemplate = (options) => {
155
155
  });
156
156
  };
157
157
  /**
158
- * AI Toolkit Training
159
- * Train models using AI Toolkit engine
158
+ * Image upload
159
+ * Uploads an image to be used in a workflow
160
160
  */
161
- export const invokeTrainingStepTemplate = (options) => {
161
+ export const invokeImageUploadStepTemplate = (options) => {
162
162
  var _a;
163
163
  return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
164
164
  security: [
@@ -167,7 +167,24 @@ export const invokeTrainingStepTemplate = (options) => {
167
167
  type: 'http',
168
168
  },
169
169
  ],
170
- url: '/v2/consumer/recipes/training',
170
+ url: '/v2/consumer/recipes/imageUpload',
171
+ ...options,
172
+ headers: {
173
+ 'Content-Type': 'application/json',
174
+ ...options === null || options === void 0 ? void 0 : options.headers,
175
+ },
176
+ });
177
+ };
178
+ export const invokeImageUpscalerStepTemplate = (options) => {
179
+ var _a;
180
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
181
+ security: [
182
+ {
183
+ scheme: 'bearer',
184
+ type: 'http',
185
+ },
186
+ ],
187
+ url: '/v2/consumer/recipes/imageUpscaler',
171
188
  ...options,
172
189
  headers: {
173
190
  'Content-Type': 'application/json',
@@ -176,10 +193,10 @@ export const invokeTrainingStepTemplate = (options) => {
176
193
  });
177
194
  };
178
195
  /**
179
- * Image upload
180
- * Uploads an image to be used in a workflow
196
+ * MediaHash
197
+ * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
181
198
  */
182
- export const invokeImageUploadStepTemplate = (options) => {
199
+ export const invokeMediaHashStepTemplate = (options) => {
183
200
  var _a;
184
201
  return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
185
202
  security: [
@@ -188,7 +205,28 @@ export const invokeImageUploadStepTemplate = (options) => {
188
205
  type: 'http',
189
206
  },
190
207
  ],
191
- url: '/v2/consumer/recipes/imageUpload',
208
+ url: '/v2/consumer/recipes/mediaHash',
209
+ ...options,
210
+ headers: {
211
+ 'Content-Type': 'application/json',
212
+ ...options === null || options === void 0 ? void 0 : options.headers,
213
+ },
214
+ });
215
+ };
216
+ /**
217
+ * MediaRating
218
+ * Performs NSFW level detection and content safety classification on media content.
219
+ */
220
+ export const invokeMediaRatingStepTemplate = (options) => {
221
+ var _a;
222
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
223
+ security: [
224
+ {
225
+ scheme: 'bearer',
226
+ type: 'http',
227
+ },
228
+ ],
229
+ url: '/v2/consumer/recipes/mediaRating',
192
230
  ...options,
193
231
  headers: {
194
232
  'Content-Type': 'application/json',
@@ -217,6 +255,29 @@ export const invokeTextToImageStepTemplate = (options) => {
217
255
  },
218
256
  });
219
257
  };
258
+ /**
259
+ * Training
260
+ * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
261
+ * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
262
+ * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
263
+ */
264
+ export const invokeTrainingStepTemplate = (options) => {
265
+ var _a;
266
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
267
+ security: [
268
+ {
269
+ scheme: 'bearer',
270
+ type: 'http',
271
+ },
272
+ ],
273
+ url: '/v2/consumer/recipes/training',
274
+ ...options,
275
+ headers: {
276
+ 'Content-Type': 'application/json',
277
+ ...options === null || options === void 0 ? void 0 : options.headers,
278
+ },
279
+ });
280
+ };
220
281
  /**
221
282
  * Upscale videos and/or interpolate frames
222
283
  */
@@ -237,6 +298,28 @@ export const invokeVideoEnhancementStepTemplate = (options) => {
237
298
  },
238
299
  });
239
300
  };
301
+ /**
302
+ * Video Frame Extraction
303
+ * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
304
+ * /// Useful for generating video previews, storyboards, or analyzing video content.
305
+ */
306
+ export const invokeVideoFrameExtractionStepTemplate = (options) => {
307
+ var _a;
308
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
309
+ security: [
310
+ {
311
+ scheme: 'bearer',
312
+ type: 'http',
313
+ },
314
+ ],
315
+ url: '/v2/consumer/recipes/videoFrameExtraction',
316
+ ...options,
317
+ headers: {
318
+ 'Content-Type': 'application/json',
319
+ ...options === null || options === void 0 ? void 0 : options.headers,
320
+ },
321
+ });
322
+ };
240
323
  /**
241
324
  * Video generation
242
325
  * Generate videos through text/image inputs using any of our supported engines
@@ -258,6 +341,87 @@ export const invokeVideoGenStepTemplate = (options) => {
258
341
  },
259
342
  });
260
343
  };
344
+ /**
345
+ * Interpolate videos using VFI Mamba
346
+ */
347
+ export const invokeVideoInterpolationStepTemplate = (options) => {
348
+ var _a;
349
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
350
+ security: [
351
+ {
352
+ scheme: 'bearer',
353
+ type: 'http',
354
+ },
355
+ ],
356
+ url: '/v2/consumer/recipes/videoInterpolation',
357
+ ...options,
358
+ headers: {
359
+ 'Content-Type': 'application/json',
360
+ ...options === null || options === void 0 ? void 0 : options.headers,
361
+ },
362
+ });
363
+ };
364
+ /**
365
+ * Extract metadata from videos including width, height, FPS, and duration
366
+ */
367
+ export const invokeVideoMetadataStepTemplate = (options) => {
368
+ var _a;
369
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
370
+ security: [
371
+ {
372
+ scheme: 'bearer',
373
+ type: 'http',
374
+ },
375
+ ],
376
+ url: '/v2/consumer/recipes/videoMetadata',
377
+ ...options,
378
+ headers: {
379
+ 'Content-Type': 'application/json',
380
+ ...options === null || options === void 0 ? void 0 : options.headers,
381
+ },
382
+ });
383
+ };
384
+ /**
385
+ * Upscale videos using FlashVSR
386
+ */
387
+ export const invokeVideoUpscalerStepTemplate = (options) => {
388
+ var _a;
389
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
390
+ security: [
391
+ {
392
+ scheme: 'bearer',
393
+ type: 'http',
394
+ },
395
+ ],
396
+ url: '/v2/consumer/recipes/videoUpscaler',
397
+ ...options,
398
+ headers: {
399
+ 'Content-Type': 'application/json',
400
+ ...options === null || options === void 0 ? void 0 : options.headers,
401
+ },
402
+ });
403
+ };
404
+ /**
405
+ * WDTagging
406
+ * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
407
+ */
408
+ export const invokeWdTaggingStepTemplate = (options) => {
409
+ var _a;
410
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
411
+ security: [
412
+ {
413
+ scheme: 'bearer',
414
+ type: 'http',
415
+ },
416
+ ],
417
+ url: '/v2/consumer/recipes/wdTagging',
418
+ ...options,
419
+ headers: {
420
+ 'Content-Type': 'application/json',
421
+ ...options === null || options === void 0 ? void 0 : options.headers,
422
+ },
423
+ });
424
+ };
261
425
  /**
262
426
  * Invalidates the cache of a specific resource.
263
427
  */