@civitai/orchestration-client 0.2.0-beta.101
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.
- package/README.md +47 -0
- package/dist/client/CivitaiClient.d.ts +8 -0
- package/dist/client/CivitaiClient.js +29 -0
- package/dist/generated/client/client.gen.d.ts +2 -0
- package/dist/generated/client/client.gen.js +237 -0
- package/dist/generated/client/index.d.ts +8 -0
- package/dist/generated/client/index.js +6 -0
- package/dist/generated/client/types.gen.d.ts +117 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +33 -0
- package/dist/generated/client/utils.gen.js +234 -0
- package/dist/generated/client.gen.d.ts +12 -0
- package/dist/generated/client.gen.js +3 -0
- package/dist/generated/core/auth.gen.d.ts +18 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +43 -0
- package/dist/generated/core/params.gen.js +100 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/core/pathSerializer.gen.js +106 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/core/serverSentEvents.gen.js +134 -0
- package/dist/generated/core/types.gen.d.ts +78 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +19 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/index.js +3 -0
- package/dist/generated/sdk.gen.d.ts +397 -0
- package/dist/generated/sdk.gen.js +1082 -0
- package/dist/generated/types.gen.d.ts +13600 -0
- package/dist/generated/types.gen.js +483 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/utils/Air.d.ts +23 -0
- package/dist/utils/Air.js +21 -0
- package/dist/utils/TimeSpan.d.ts +38 -0
- package/dist/utils/TimeSpan.js +108 -0
- package/dist/utils/handleError.d.ts +2 -0
- package/dist/utils/handleError.js +9 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/patch-json.d.ts +40 -0
- package/dist/utils/patch-json.js +175 -0
- package/package.json +56 -0
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client } from './client.gen';
|
|
3
|
+
/**
|
|
4
|
+
* Get blob by ID. This will redirect to a cacheable content URL.
|
|
5
|
+
*/
|
|
6
|
+
export const getBlob = (options) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
9
|
+
url: '/v2/consumer/blobs/{blobId}',
|
|
10
|
+
...options,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Handles HTTP HEAD requests for a specific blob, checking its existence and NSFW level.
|
|
15
|
+
*/
|
|
16
|
+
export const headBlob = (options) => {
|
|
17
|
+
var _a;
|
|
18
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).head({
|
|
19
|
+
url: '/v2/consumer/blobs/{blobId}',
|
|
20
|
+
...options,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Get a presigned URL for browser uploads.
|
|
25
|
+
* The returned URL points to POST /v2/consumer/blobs with a signature for authentication.
|
|
26
|
+
*/
|
|
27
|
+
export const getConsumerBlobUploadUrl = (options) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/consumer/blobs/upload', ...options });
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Upload a blob directly with on-the-fly moderation.
|
|
33
|
+
* Supports both authenticated requests (Bearer token) and presigned URLs (sig query param).
|
|
34
|
+
*/
|
|
35
|
+
export const uploadConsumerBlob = (options) => {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({ url: '/v2/consumer/blobs', ...options });
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Serves cacheable blob content using a deterministic encrypted token
|
|
41
|
+
*/
|
|
42
|
+
export const getBlobContent = (options) => {
|
|
43
|
+
var _a;
|
|
44
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
45
|
+
url: '/v2/consumer/blobs/content/{encryptedToken}',
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Serves a blocked placeholder image with the specified dimensions
|
|
51
|
+
*/
|
|
52
|
+
export const getBlockedContent = (options) => {
|
|
53
|
+
var _a;
|
|
54
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
55
|
+
url: '/v2/consumer/blobs/blocked/{encryptedToken}',
|
|
56
|
+
...options,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Streams an archive (zip or tar) of the blobs referenced by a signed archive token.
|
|
61
|
+
* Tokens are produced by the `blobArchive` workflow step.
|
|
62
|
+
*/
|
|
63
|
+
export const getBlobArchive = (options) => {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
66
|
+
url: '/v2/consumer/blobs/archive/{encryptedToken}',
|
|
67
|
+
...options,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Refresh a blob's URL and debounce its lifetime.
|
|
72
|
+
* Returns a fresh presigned URL and resets the 30-day TTL.
|
|
73
|
+
*/
|
|
74
|
+
export const refreshBlob = (options) => {
|
|
75
|
+
var _a;
|
|
76
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
77
|
+
url: '/v2/consumer/blobs/{blobId}/refresh',
|
|
78
|
+
...options,
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
export const invalidateUserCache = (options) => {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/civitai/{userId}', ...options });
|
|
84
|
+
};
|
|
85
|
+
export const invalidateUserTokens = (options) => {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/civitai/{userId}/tokens', ...options });
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Workflow step for generating music using ACE Step 1.5.
|
|
91
|
+
* /// Produces full songs from text descriptions and structured lyrics.
|
|
92
|
+
*/
|
|
93
|
+
export const invokeAceStepAudioStepTemplate = (options) => {
|
|
94
|
+
var _a;
|
|
95
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
96
|
+
url: '/v2/consumer/recipes/aceStepAudio',
|
|
97
|
+
...options,
|
|
98
|
+
headers: {
|
|
99
|
+
'Content-Type': 'application/json',
|
|
100
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Age classification
|
|
106
|
+
*
|
|
107
|
+
* Detects minors in media content. Returns a boolean value indicating whether the content contains minors as well as details on where minors are detected.
|
|
108
|
+
*/
|
|
109
|
+
export const invokeAgeClassificationStepTemplate = (options) => {
|
|
110
|
+
var _a;
|
|
111
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
112
|
+
url: '/v2/consumer/recipes/ageClassification',
|
|
113
|
+
...options,
|
|
114
|
+
headers: {
|
|
115
|
+
'Content-Type': 'application/json',
|
|
116
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Audio Captioning
|
|
122
|
+
*
|
|
123
|
+
* Generates music captions, lyrics, and metadata by running the ACE-Step captioner and transcriber models.
|
|
124
|
+
*/
|
|
125
|
+
export const invokeAudioCaptioningStepTemplate = (options) => {
|
|
126
|
+
var _a;
|
|
127
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
128
|
+
url: '/v2/consumer/recipes/audioCaptioning',
|
|
129
|
+
...options,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/json',
|
|
132
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
export const invokeBatchOcrSafetyClassificationStepTemplate = (options) => {
|
|
137
|
+
var _a;
|
|
138
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
139
|
+
url: '/v2/consumer/recipes/batchOCRSafetyClassification',
|
|
140
|
+
...options,
|
|
141
|
+
headers: {
|
|
142
|
+
'Content-Type': 'application/json',
|
|
143
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Bundles a set of blobs into a single archive (zip or tar) that callers can
|
|
149
|
+
* /// download from a signed streaming URL. Runs in-process in the orchestrator;
|
|
150
|
+
* /// no worker job is dispatched.
|
|
151
|
+
*/
|
|
152
|
+
export const invokeBlobArchiveStepTemplate = (options) => {
|
|
153
|
+
var _a;
|
|
154
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
155
|
+
url: '/v2/consumer/recipes/blobArchive',
|
|
156
|
+
...options,
|
|
157
|
+
headers: {
|
|
158
|
+
'Content-Type': 'application/json',
|
|
159
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* ChatCompletion
|
|
165
|
+
*
|
|
166
|
+
* Generate chat completions using language models with support for text and image inputs.
|
|
167
|
+
* /// Compatible with OpenAI Chat Completions API format.
|
|
168
|
+
*/
|
|
169
|
+
export const invokeChatCompletionStepTemplate = (options) => {
|
|
170
|
+
var _a;
|
|
171
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
172
|
+
url: '/v2/consumer/recipes/chatCompletion',
|
|
173
|
+
...options,
|
|
174
|
+
headers: {
|
|
175
|
+
'Content-Type': 'application/json',
|
|
176
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Comfy workflows
|
|
182
|
+
*
|
|
183
|
+
* Runs a comfy workflow. Currently there are limited nodes available. Contact support for more information.
|
|
184
|
+
*/
|
|
185
|
+
export const invokeComfyStepTemplate = (options) => {
|
|
186
|
+
var _a;
|
|
187
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
188
|
+
url: '/v2/consumer/recipes/comfy',
|
|
189
|
+
...options,
|
|
190
|
+
headers: {
|
|
191
|
+
'Content-Type': 'application/json',
|
|
192
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
export const invokeComfyNodepackSnapshotStepTemplate = (options) => {
|
|
197
|
+
var _a;
|
|
198
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
199
|
+
url: '/v2/consumer/recipes/comfyNodepackSnapshot',
|
|
200
|
+
...options,
|
|
201
|
+
headers: {
|
|
202
|
+
'Content-Type': 'application/json',
|
|
203
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Compose Media
|
|
209
|
+
*
|
|
210
|
+
* Composes multiple audio and/or video elements onto a single timeline and canvas: overlay and
|
|
211
|
+
* /// stack videos, scale and pad them to an output canvas, mix and place audio, and apply per-element
|
|
212
|
+
* /// transformers (fades, volume). Each element is placed at its own absolute or implicitly-sequenced
|
|
213
|
+
* /// start time. Produces a video blob when any element is video, otherwise an audio blob. Pair with
|
|
214
|
+
* /// text-to-speech, music, and video-generation steps to assemble narrated clips, multi-speaker
|
|
215
|
+
* /// scenes with cross-talk, or picture-in-picture compositions.
|
|
216
|
+
*/
|
|
217
|
+
export const invokeComposeMediaStepTemplate = (options) => {
|
|
218
|
+
var _a;
|
|
219
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
220
|
+
url: '/v2/consumer/recipes/composeMedia',
|
|
221
|
+
...options,
|
|
222
|
+
headers: {
|
|
223
|
+
'Content-Type': 'application/json',
|
|
224
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* A workflow step that converts images to different formats and applies optional transforms.
|
|
230
|
+
*/
|
|
231
|
+
export const invokeConvertImageStepTemplate = (options) => {
|
|
232
|
+
var _a;
|
|
233
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
234
|
+
url: '/v2/consumer/recipes/convertImage',
|
|
235
|
+
...options,
|
|
236
|
+
headers: {
|
|
237
|
+
'Content-Type': 'application/json',
|
|
238
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* CustomComfy
|
|
244
|
+
*
|
|
245
|
+
* Submit a raw ComfyUI workflow graph for execution. Every resource the
|
|
246
|
+
* /// workflow uses (checkpoints, loras, AND <c>comfy:nodepack</c> URNs for
|
|
247
|
+
* /// runtime-installable custom nodes) must be declared in <c>Resources</c> —
|
|
248
|
+
* /// the orchestrator does not scan the workflow. Billing happens after
|
|
249
|
+
* /// execution based on actual ComfyUI runtime; infra failures don't charge.
|
|
250
|
+
*/
|
|
251
|
+
export const invokeCustomComfyStepTemplate = (options) => {
|
|
252
|
+
var _a;
|
|
253
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
254
|
+
url: '/v2/consumer/recipes/customComfy',
|
|
255
|
+
...options,
|
|
256
|
+
headers: {
|
|
257
|
+
'Content-Type': 'application/json',
|
|
258
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Echo
|
|
264
|
+
*
|
|
265
|
+
* A workflow step that takes a message string and retuns it.
|
|
266
|
+
* /// This step is intended for testing purposes.
|
|
267
|
+
*/
|
|
268
|
+
export const invokeEchoStepTemplate = (options) => {
|
|
269
|
+
var _a;
|
|
270
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
271
|
+
url: '/v2/consumer/recipes/echo',
|
|
272
|
+
...options,
|
|
273
|
+
headers: {
|
|
274
|
+
'Content-Type': 'application/json',
|
|
275
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
276
|
+
},
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
export const invokeHumanoidImageMaskStepTemplate = (options) => {
|
|
280
|
+
var _a;
|
|
281
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
282
|
+
url: '/v2/consumer/recipes/humanoidImageMask',
|
|
283
|
+
...options,
|
|
284
|
+
headers: {
|
|
285
|
+
'Content-Type': 'application/json',
|
|
286
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* A workflow step that removes the background from an image using BiRefNet (builds a ComfyUI graph under the hood and runs it as a comfy job).
|
|
292
|
+
*/
|
|
293
|
+
export const invokeImageBackgroundRemovalStepTemplate = (options) => {
|
|
294
|
+
var _a;
|
|
295
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
296
|
+
url: '/v2/consumer/recipes/imageBackgroundRemoval',
|
|
297
|
+
...options,
|
|
298
|
+
headers: {
|
|
299
|
+
'Content-Type': 'application/json',
|
|
300
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Image Generation
|
|
306
|
+
*
|
|
307
|
+
* Generate images through text/image inputs using any of our supported engines
|
|
308
|
+
*/
|
|
309
|
+
export const invokeImageGenStepTemplate = (options) => {
|
|
310
|
+
var _a;
|
|
311
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
312
|
+
url: '/v2/consumer/recipes/imageGen',
|
|
313
|
+
...options,
|
|
314
|
+
headers: {
|
|
315
|
+
'Content-Type': 'application/json',
|
|
316
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
317
|
+
},
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* LORA Training
|
|
322
|
+
*
|
|
323
|
+
* Train LORA's
|
|
324
|
+
*/
|
|
325
|
+
export const invokeImageResourceTrainingStepTemplate = (options) => {
|
|
326
|
+
var _a;
|
|
327
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
328
|
+
url: '/v2/consumer/recipes/imageResourceTraining',
|
|
329
|
+
...options,
|
|
330
|
+
headers: {
|
|
331
|
+
'Content-Type': 'application/json',
|
|
332
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Converts a raster image to an SVG using a local StarVector or OmniSVG model.
|
|
338
|
+
*/
|
|
339
|
+
export const invokeImageToSvgStepTemplate = (options) => {
|
|
340
|
+
var _a;
|
|
341
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
342
|
+
url: '/v2/consumer/recipes/imageToSvg',
|
|
343
|
+
...options,
|
|
344
|
+
headers: {
|
|
345
|
+
'Content-Type': 'application/json',
|
|
346
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Image upload
|
|
352
|
+
*
|
|
353
|
+
* Uploads an image to be used in a workflow
|
|
354
|
+
*/
|
|
355
|
+
export const invokeImageUploadStepTemplate = (options) => {
|
|
356
|
+
var _a;
|
|
357
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
358
|
+
url: '/v2/consumer/recipes/imageUpload',
|
|
359
|
+
...options,
|
|
360
|
+
headers: {
|
|
361
|
+
'Content-Type': 'application/json',
|
|
362
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
363
|
+
},
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
export const invokeImageUpscalerStepTemplate = (options) => {
|
|
367
|
+
var _a;
|
|
368
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
369
|
+
url: '/v2/consumer/recipes/imageUpscaler',
|
|
370
|
+
...options,
|
|
371
|
+
headers: {
|
|
372
|
+
'Content-Type': 'application/json',
|
|
373
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
374
|
+
},
|
|
375
|
+
});
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Media Captioning
|
|
379
|
+
*
|
|
380
|
+
* Generates a descriptive caption for a single media item using the JoyCaption model.
|
|
381
|
+
*/
|
|
382
|
+
export const invokeMediaCaptioningStepTemplate = (options) => {
|
|
383
|
+
var _a;
|
|
384
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
385
|
+
url: '/v2/consumer/recipes/mediaCaptioning',
|
|
386
|
+
...options,
|
|
387
|
+
headers: {
|
|
388
|
+
'Content-Type': 'application/json',
|
|
389
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
390
|
+
},
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* MediaHash
|
|
395
|
+
*
|
|
396
|
+
* Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
|
|
397
|
+
*/
|
|
398
|
+
export const invokeMediaHashStepTemplate = (options) => {
|
|
399
|
+
var _a;
|
|
400
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
401
|
+
url: '/v2/consumer/recipes/mediaHash',
|
|
402
|
+
...options,
|
|
403
|
+
headers: {
|
|
404
|
+
'Content-Type': 'application/json',
|
|
405
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
406
|
+
},
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
/**
|
|
410
|
+
* MediaRating
|
|
411
|
+
*
|
|
412
|
+
* Performs NSFW level detection and content safety classification on media content.
|
|
413
|
+
*/
|
|
414
|
+
export const invokeMediaRatingStepTemplate = (options) => {
|
|
415
|
+
var _a;
|
|
416
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
417
|
+
url: '/v2/consumer/recipes/mediaRating',
|
|
418
|
+
...options,
|
|
419
|
+
headers: {
|
|
420
|
+
'Content-Type': 'application/json',
|
|
421
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
422
|
+
},
|
|
423
|
+
});
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Generate a complete song from a structured caption and lyrics with MiniMax Music 3.
|
|
427
|
+
*/
|
|
428
|
+
export const invokeMiniMaxMusic3StepTemplate = (options) => {
|
|
429
|
+
var _a;
|
|
430
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
431
|
+
url: '/v2/consumer/recipes/miniMaxMusic3',
|
|
432
|
+
...options,
|
|
433
|
+
headers: {
|
|
434
|
+
'Content-Type': 'application/json',
|
|
435
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
436
|
+
},
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* 3D model preview
|
|
441
|
+
*
|
|
442
|
+
* Renders screenshots of a 3D model from predefined or supplied camera poses.
|
|
443
|
+
*/
|
|
444
|
+
export const invokeModel3dPreviewStepTemplate = (options) => {
|
|
445
|
+
var _a;
|
|
446
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
447
|
+
url: '/v2/consumer/recipes/model3DPreview',
|
|
448
|
+
...options,
|
|
449
|
+
headers: {
|
|
450
|
+
'Content-Type': 'application/json',
|
|
451
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* ModelClamScan
|
|
457
|
+
*
|
|
458
|
+
* Runs ClamAV malware scanning against a model file.
|
|
459
|
+
*/
|
|
460
|
+
export const invokeModelClamScanStepTemplate = (options) => {
|
|
461
|
+
var _a;
|
|
462
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
463
|
+
url: '/v2/consumer/recipes/modelClamScan',
|
|
464
|
+
...options,
|
|
465
|
+
headers: {
|
|
466
|
+
'Content-Type': 'application/json',
|
|
467
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* ModelHash
|
|
473
|
+
*
|
|
474
|
+
* Computes Civitai content hashes (SHA256, AutoV1/2/3, Blake3, CRC32) of a model file.
|
|
475
|
+
*/
|
|
476
|
+
export const invokeModelHashStepTemplate = (options) => {
|
|
477
|
+
var _a;
|
|
478
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
479
|
+
url: '/v2/consumer/recipes/modelHash',
|
|
480
|
+
...options,
|
|
481
|
+
headers: {
|
|
482
|
+
'Content-Type': 'application/json',
|
|
483
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
484
|
+
},
|
|
485
|
+
});
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* ModelParseMetadata
|
|
489
|
+
*
|
|
490
|
+
* Extracts the embedded JSON metadata header from a safetensors model file.
|
|
491
|
+
*/
|
|
492
|
+
export const invokeModelParseMetadataStepTemplate = (options) => {
|
|
493
|
+
var _a;
|
|
494
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
495
|
+
url: '/v2/consumer/recipes/modelParseMetadata',
|
|
496
|
+
...options,
|
|
497
|
+
headers: {
|
|
498
|
+
'Content-Type': 'application/json',
|
|
499
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* ModelPickleScan
|
|
505
|
+
*
|
|
506
|
+
* Runs picklescan against a model file to detect dangerous pickle imports.
|
|
507
|
+
*/
|
|
508
|
+
export const invokeModelPickleScanStepTemplate = (options) => {
|
|
509
|
+
var _a;
|
|
510
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
511
|
+
url: '/v2/consumer/recipes/modelPickleScan',
|
|
512
|
+
...options,
|
|
513
|
+
headers: {
|
|
514
|
+
'Content-Type': 'application/json',
|
|
515
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
516
|
+
},
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
/**
|
|
520
|
+
* 3D model generation
|
|
521
|
+
*
|
|
522
|
+
* Generate 3D models through text or image inputs using any of our supported engines.
|
|
523
|
+
*/
|
|
524
|
+
export const invokePolyGenStepTemplate = (options) => {
|
|
525
|
+
var _a;
|
|
526
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
527
|
+
url: '/v2/consumer/recipes/polyGen',
|
|
528
|
+
...options,
|
|
529
|
+
headers: {
|
|
530
|
+
'Content-Type': 'application/json',
|
|
531
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Prepare Resource
|
|
537
|
+
*
|
|
538
|
+
* Loads a resource into a provider so later work needing it does not pay the cold-start download. Succeeds immediately when the resource is already available on the fleet.
|
|
539
|
+
*/
|
|
540
|
+
export const invokePrepareResourceStepTemplate = (options) => {
|
|
541
|
+
var _a;
|
|
542
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
543
|
+
url: '/v2/consumer/recipes/prepareResource',
|
|
544
|
+
...options,
|
|
545
|
+
headers: {
|
|
546
|
+
'Content-Type': 'application/json',
|
|
547
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
548
|
+
},
|
|
549
|
+
});
|
|
550
|
+
};
|
|
551
|
+
export const invokePreprocessImageStepTemplate = (options) => {
|
|
552
|
+
var _a;
|
|
553
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
554
|
+
url: '/v2/consumer/recipes/preprocessImage',
|
|
555
|
+
...options,
|
|
556
|
+
headers: {
|
|
557
|
+
'Content-Type': 'application/json',
|
|
558
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
559
|
+
},
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
export const invokePreprocessVideoStepTemplate = (options) => {
|
|
563
|
+
var _a;
|
|
564
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
565
|
+
url: '/v2/consumer/recipes/preprocessVideo',
|
|
566
|
+
...options,
|
|
567
|
+
headers: {
|
|
568
|
+
'Content-Type': 'application/json',
|
|
569
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
570
|
+
},
|
|
571
|
+
});
|
|
572
|
+
};
|
|
573
|
+
/**
|
|
574
|
+
* PromptEnhancement
|
|
575
|
+
*
|
|
576
|
+
* Analyzes and enhances user prompts for a specific AI ecosystem.
|
|
577
|
+
* /// Returns detected issues, recommendations, and improved prompt variants.
|
|
578
|
+
*/
|
|
579
|
+
export const invokePromptEnhancementStepTemplate = (options) => {
|
|
580
|
+
var _a;
|
|
581
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
582
|
+
url: '/v2/consumer/recipes/promptEnhancement',
|
|
583
|
+
...options,
|
|
584
|
+
headers: {
|
|
585
|
+
'Content-Type': 'application/json',
|
|
586
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
587
|
+
},
|
|
588
|
+
});
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* Qwen Image Bench
|
|
592
|
+
*
|
|
593
|
+
* Scores generated images against their prompts using Qwen-Image-Bench.
|
|
594
|
+
*/
|
|
595
|
+
export const invokeQwenImageBenchStepTemplate = (options) => {
|
|
596
|
+
var _a;
|
|
597
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
598
|
+
url: '/v2/consumer/recipes/qwenImageBench',
|
|
599
|
+
...options,
|
|
600
|
+
headers: {
|
|
601
|
+
'Content-Type': 'application/json',
|
|
602
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
603
|
+
},
|
|
604
|
+
});
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Repeat workflow step.
|
|
608
|
+
*/
|
|
609
|
+
export const invokeRepeatStepTemplate = (options) => {
|
|
610
|
+
var _a;
|
|
611
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
612
|
+
url: '/v2/consumer/recipes/repeat',
|
|
613
|
+
...options,
|
|
614
|
+
headers: {
|
|
615
|
+
'Content-Type': 'application/json',
|
|
616
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
617
|
+
},
|
|
618
|
+
});
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* ShieldstralModeration
|
|
622
|
+
*
|
|
623
|
+
* Evaluate text or generation prompts against configurable natural-language Shieldstral policies.
|
|
624
|
+
* /// Generates one single-token yes/no ChatCompletion job per policy and returns normalized policy scores.
|
|
625
|
+
*/
|
|
626
|
+
export const invokeShieldstralModerationStepTemplate = (options) => {
|
|
627
|
+
var _a;
|
|
628
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
629
|
+
url: '/v2/consumer/recipes/shieldstralModeration',
|
|
630
|
+
...options,
|
|
631
|
+
headers: {
|
|
632
|
+
'Content-Type': 'application/json',
|
|
633
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
634
|
+
},
|
|
635
|
+
});
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* TextToImage
|
|
639
|
+
*
|
|
640
|
+
* Generate images using text as input
|
|
641
|
+
*/
|
|
642
|
+
export const invokeTextToImageStepTemplate = (options) => {
|
|
643
|
+
var _a;
|
|
644
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
645
|
+
url: '/v2/consumer/recipes/textToImage',
|
|
646
|
+
...options,
|
|
647
|
+
headers: {
|
|
648
|
+
'Content-Type': 'application/json',
|
|
649
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
650
|
+
},
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Text-to-Speech
|
|
655
|
+
*
|
|
656
|
+
* Synthesizes speech from text, supporting both voice cloning (Base mode with reference audio) and built-in speakers (CustomVoice mode).
|
|
657
|
+
*/
|
|
658
|
+
export const invokeTextToSpeechStepTemplate = (options) => {
|
|
659
|
+
var _a;
|
|
660
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
661
|
+
url: '/v2/consumer/recipes/textToSpeech',
|
|
662
|
+
...options,
|
|
663
|
+
headers: {
|
|
664
|
+
'Content-Type': 'application/json',
|
|
665
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
666
|
+
},
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
/**
|
|
670
|
+
* Training
|
|
671
|
+
*
|
|
672
|
+
* A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
|
|
673
|
+
* /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
|
|
674
|
+
* /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
|
|
675
|
+
*/
|
|
676
|
+
export const invokeTrainingStepTemplate = (options) => {
|
|
677
|
+
var _a;
|
|
678
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
679
|
+
url: '/v2/consumer/recipes/training',
|
|
680
|
+
...options,
|
|
681
|
+
headers: {
|
|
682
|
+
'Content-Type': 'application/json',
|
|
683
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
684
|
+
},
|
|
685
|
+
});
|
|
686
|
+
};
|
|
687
|
+
/**
|
|
688
|
+
* Transcoding
|
|
689
|
+
*/
|
|
690
|
+
export const invokeTranscodeStepTemplate = (options) => {
|
|
691
|
+
var _a;
|
|
692
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
693
|
+
url: '/v2/consumer/recipes/transcode',
|
|
694
|
+
...options,
|
|
695
|
+
headers: {
|
|
696
|
+
'Content-Type': 'application/json',
|
|
697
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
698
|
+
},
|
|
699
|
+
});
|
|
700
|
+
};
|
|
701
|
+
/**
|
|
702
|
+
* Transcription
|
|
703
|
+
*
|
|
704
|
+
* Performs automatic speech recognition (ASR) on audio media, returning transcribed text with optional timestamps.
|
|
705
|
+
*/
|
|
706
|
+
export const invokeTranscriptionStepTemplate = (options) => {
|
|
707
|
+
var _a;
|
|
708
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
709
|
+
url: '/v2/consumer/recipes/transcription',
|
|
710
|
+
...options,
|
|
711
|
+
headers: {
|
|
712
|
+
'Content-Type': 'application/json',
|
|
713
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
714
|
+
},
|
|
715
|
+
});
|
|
716
|
+
};
|
|
717
|
+
export const invokeTryOnUStepTemplate = (options) => {
|
|
718
|
+
var _a;
|
|
719
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
720
|
+
url: '/v2/consumer/recipes/tryOnU',
|
|
721
|
+
...options,
|
|
722
|
+
headers: {
|
|
723
|
+
'Content-Type': 'application/json',
|
|
724
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
725
|
+
},
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* Tracks a prompted foreground object across a video and returns a lossless animated WebP with transparency.
|
|
730
|
+
*/
|
|
731
|
+
export const invokeVideoBackgroundRemovalStepTemplate = (options) => {
|
|
732
|
+
var _a;
|
|
733
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
734
|
+
url: '/v2/consumer/recipes/videoBackgroundRemoval',
|
|
735
|
+
...options,
|
|
736
|
+
headers: {
|
|
737
|
+
'Content-Type': 'application/json',
|
|
738
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
739
|
+
},
|
|
740
|
+
});
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* Upscale videos and/or interpolate frames
|
|
744
|
+
*/
|
|
745
|
+
export const invokeVideoEnhancementStepTemplate = (options) => {
|
|
746
|
+
var _a;
|
|
747
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
748
|
+
url: '/v2/consumer/recipes/videoEnhancement',
|
|
749
|
+
...options,
|
|
750
|
+
headers: {
|
|
751
|
+
'Content-Type': 'application/json',
|
|
752
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
753
|
+
},
|
|
754
|
+
});
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* Video Frame Extraction
|
|
758
|
+
*
|
|
759
|
+
* Extracts unique frames from a video at a specified rate, filtering near-duplicates by perceptual hash.
|
|
760
|
+
*/
|
|
761
|
+
export const invokeVideoFrameExtractionStepTemplate = (options) => {
|
|
762
|
+
var _a;
|
|
763
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
764
|
+
url: '/v2/consumer/recipes/videoFrameExtraction',
|
|
765
|
+
...options,
|
|
766
|
+
headers: {
|
|
767
|
+
'Content-Type': 'application/json',
|
|
768
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
769
|
+
},
|
|
770
|
+
});
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* Video generation
|
|
774
|
+
*
|
|
775
|
+
* Generate videos through text/image inputs using any of our supported engines
|
|
776
|
+
*/
|
|
777
|
+
export const invokeVideoGenStepTemplate = (options) => {
|
|
778
|
+
var _a;
|
|
779
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
780
|
+
url: '/v2/consumer/recipes/videoGen',
|
|
781
|
+
...options,
|
|
782
|
+
headers: {
|
|
783
|
+
'Content-Type': 'application/json',
|
|
784
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
785
|
+
},
|
|
786
|
+
});
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Interpolate videos using VFI Mamba
|
|
790
|
+
*/
|
|
791
|
+
export const invokeVideoInterpolationStepTemplate = (options) => {
|
|
792
|
+
var _a;
|
|
793
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
794
|
+
url: '/v2/consumer/recipes/videoInterpolation',
|
|
795
|
+
...options,
|
|
796
|
+
headers: {
|
|
797
|
+
'Content-Type': 'application/json',
|
|
798
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
799
|
+
},
|
|
800
|
+
});
|
|
801
|
+
};
|
|
802
|
+
/**
|
|
803
|
+
* Extract metadata from videos including width, height, FPS, and duration
|
|
804
|
+
*/
|
|
805
|
+
export const invokeVideoMetadataStepTemplate = (options) => {
|
|
806
|
+
var _a;
|
|
807
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
808
|
+
url: '/v2/consumer/recipes/videoMetadata',
|
|
809
|
+
...options,
|
|
810
|
+
headers: {
|
|
811
|
+
'Content-Type': 'application/json',
|
|
812
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
813
|
+
},
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* Upscale videos using FlashVSR
|
|
818
|
+
*/
|
|
819
|
+
export const invokeVideoUpscalerStepTemplate = (options) => {
|
|
820
|
+
var _a;
|
|
821
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
822
|
+
url: '/v2/consumer/recipes/videoUpscaler',
|
|
823
|
+
...options,
|
|
824
|
+
headers: {
|
|
825
|
+
'Content-Type': 'application/json',
|
|
826
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
827
|
+
},
|
|
828
|
+
});
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* WDTagging
|
|
832
|
+
*
|
|
833
|
+
* Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
|
|
834
|
+
*/
|
|
835
|
+
export const invokeWdTaggingStepTemplate = (options) => {
|
|
836
|
+
var _a;
|
|
837
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
838
|
+
url: '/v2/consumer/recipes/wdTagging',
|
|
839
|
+
...options,
|
|
840
|
+
headers: {
|
|
841
|
+
'Content-Type': 'application/json',
|
|
842
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
843
|
+
},
|
|
844
|
+
});
|
|
845
|
+
};
|
|
846
|
+
/**
|
|
847
|
+
* WebScrape
|
|
848
|
+
*
|
|
849
|
+
* Fetches and renders a single web page, returning its content as markdown and/or HTML.
|
|
850
|
+
*/
|
|
851
|
+
export const invokeWebScrapeStepTemplate = (options) => {
|
|
852
|
+
var _a;
|
|
853
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
854
|
+
url: '/v2/consumer/recipes/webScrape',
|
|
855
|
+
...options,
|
|
856
|
+
headers: {
|
|
857
|
+
'Content-Type': 'application/json',
|
|
858
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
859
|
+
},
|
|
860
|
+
});
|
|
861
|
+
};
|
|
862
|
+
/**
|
|
863
|
+
* WebSearch
|
|
864
|
+
*
|
|
865
|
+
* Searches the web, returning result titles, URLs and descriptions, optionally with the scraped content of each result page.
|
|
866
|
+
*/
|
|
867
|
+
export const invokeWebSearchStepTemplate = (options) => {
|
|
868
|
+
var _a;
|
|
869
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
870
|
+
url: '/v2/consumer/recipes/webSearch',
|
|
871
|
+
...options,
|
|
872
|
+
headers: {
|
|
873
|
+
'Content-Type': 'application/json',
|
|
874
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
875
|
+
},
|
|
876
|
+
});
|
|
877
|
+
};
|
|
878
|
+
/**
|
|
879
|
+
* XGuardModeration
|
|
880
|
+
*
|
|
881
|
+
* Evaluate text or generation prompts against XGuard content moderation policies.
|
|
882
|
+
* /// Generates one ChatCompletion job per label and aggregates results with logprob-based scoring.
|
|
883
|
+
*/
|
|
884
|
+
export const invokeXGuardModerationStepTemplate = (options) => {
|
|
885
|
+
var _a;
|
|
886
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
887
|
+
url: '/v2/consumer/recipes/xGuardModeration',
|
|
888
|
+
...options,
|
|
889
|
+
headers: {
|
|
890
|
+
'Content-Type': 'application/json',
|
|
891
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
892
|
+
},
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
export const queryResources = (options) => {
|
|
896
|
+
var _a;
|
|
897
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
898
|
+
url: '/v2/resources',
|
|
899
|
+
...options,
|
|
900
|
+
});
|
|
901
|
+
};
|
|
902
|
+
/**
|
|
903
|
+
* Get an existing resource.
|
|
904
|
+
*/
|
|
905
|
+
export const getResource = (options) => {
|
|
906
|
+
var _a;
|
|
907
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
908
|
+
url: '/v2/resources/{air}',
|
|
909
|
+
...options,
|
|
910
|
+
});
|
|
911
|
+
};
|
|
912
|
+
/**
|
|
913
|
+
* List services, optionally filtered.
|
|
914
|
+
*/
|
|
915
|
+
export const listServices = (options) => {
|
|
916
|
+
var _a;
|
|
917
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
918
|
+
url: '/v2/services',
|
|
919
|
+
...options,
|
|
920
|
+
});
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* Get a single service by id, e.g. "image/flux2/klein/createImage/9b", with its bucketed
|
|
924
|
+
* history over the window.
|
|
925
|
+
*/
|
|
926
|
+
export const getService = (options) => {
|
|
927
|
+
var _a;
|
|
928
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
929
|
+
url: '/v2/services/{serviceId}',
|
|
930
|
+
...options,
|
|
931
|
+
});
|
|
932
|
+
};
|
|
933
|
+
export const getStreamingBlob = (options) => {
|
|
934
|
+
var _a;
|
|
935
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
936
|
+
url: '/v2/consumer/streaming-blobs/{blobKey}',
|
|
937
|
+
...options,
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
/**
|
|
941
|
+
* Query workflows
|
|
942
|
+
*/
|
|
943
|
+
export const queryWorkflows = (options) => {
|
|
944
|
+
var _a;
|
|
945
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
946
|
+
url: '/v2/consumer/workflows',
|
|
947
|
+
...options,
|
|
948
|
+
});
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* Submit workflow
|
|
952
|
+
*/
|
|
953
|
+
export const submitWorkflow = (options) => {
|
|
954
|
+
var _a;
|
|
955
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
956
|
+
url: '/v2/consumer/workflows',
|
|
957
|
+
...options,
|
|
958
|
+
headers: {
|
|
959
|
+
'Content-Type': 'application/json',
|
|
960
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
961
|
+
},
|
|
962
|
+
});
|
|
963
|
+
};
|
|
964
|
+
/**
|
|
965
|
+
* Delete workflow
|
|
966
|
+
*
|
|
967
|
+
* This will delete a workflow. This may trigger a refund if the work requested with this workflow has not yet started
|
|
968
|
+
*/
|
|
969
|
+
export const deleteWorkflow = (options) => {
|
|
970
|
+
var _a;
|
|
971
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({
|
|
972
|
+
url: '/v2/consumer/workflows/{workflowId}',
|
|
973
|
+
...options,
|
|
974
|
+
});
|
|
975
|
+
};
|
|
976
|
+
/**
|
|
977
|
+
* Get workflow
|
|
978
|
+
*/
|
|
979
|
+
export const getWorkflow = (options) => {
|
|
980
|
+
var _a;
|
|
981
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
982
|
+
url: '/v2/consumer/workflows/{workflowId}',
|
|
983
|
+
...options,
|
|
984
|
+
});
|
|
985
|
+
};
|
|
986
|
+
/**
|
|
987
|
+
* Patch workflow
|
|
988
|
+
*
|
|
989
|
+
* Patches a worfklow using JSON Patch. This can currently be used to cancel a worfklow, update metadata and add additional tags
|
|
990
|
+
*/
|
|
991
|
+
export const patchWorkflow = (options) => {
|
|
992
|
+
var _a;
|
|
993
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
|
|
994
|
+
url: '/v2/consumer/workflows/{workflowId}',
|
|
995
|
+
...options,
|
|
996
|
+
headers: {
|
|
997
|
+
'Content-Type': 'application/json-patch+json',
|
|
998
|
+
...options.headers,
|
|
999
|
+
},
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
1002
|
+
/**
|
|
1003
|
+
* Update workflow
|
|
1004
|
+
*
|
|
1005
|
+
* Updates a worfklow. This can currently be used to cancel a worfklow or override metadata and/or tags
|
|
1006
|
+
*/
|
|
1007
|
+
export const updateWorkflow = (options) => {
|
|
1008
|
+
var _a;
|
|
1009
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
|
|
1010
|
+
url: '/v2/consumer/workflows/{workflowId}',
|
|
1011
|
+
...options,
|
|
1012
|
+
headers: {
|
|
1013
|
+
'Content-Type': 'application/json',
|
|
1014
|
+
...options.headers,
|
|
1015
|
+
},
|
|
1016
|
+
});
|
|
1017
|
+
};
|
|
1018
|
+
/**
|
|
1019
|
+
* Delete all workflow tags
|
|
1020
|
+
*/
|
|
1021
|
+
export const removeAllWorkflowTags = (options) => {
|
|
1022
|
+
var _a;
|
|
1023
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags', ...options });
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Add workflow tag
|
|
1027
|
+
*
|
|
1028
|
+
* Adds a tag to a workflow
|
|
1029
|
+
*/
|
|
1030
|
+
export const addWorkflowTag = (options) => {
|
|
1031
|
+
var _a;
|
|
1032
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
1033
|
+
url: '/v2/consumer/workflows/{workflowId}/tags',
|
|
1034
|
+
...options,
|
|
1035
|
+
headers: {
|
|
1036
|
+
'Content-Type': 'application/json',
|
|
1037
|
+
...options.headers,
|
|
1038
|
+
},
|
|
1039
|
+
});
|
|
1040
|
+
};
|
|
1041
|
+
/**
|
|
1042
|
+
* Delete workflow tag
|
|
1043
|
+
*/
|
|
1044
|
+
export const removeWorkflowTag = (options) => {
|
|
1045
|
+
var _a;
|
|
1046
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags/{tag}', ...options });
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Get the status of a workflow step
|
|
1050
|
+
*/
|
|
1051
|
+
export const getWorkflowStep = (options) => {
|
|
1052
|
+
var _a;
|
|
1053
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
1054
|
+
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
1055
|
+
...options,
|
|
1056
|
+
});
|
|
1057
|
+
};
|
|
1058
|
+
export const patchWorkflowStep = (options) => {
|
|
1059
|
+
var _a;
|
|
1060
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
|
|
1061
|
+
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
1062
|
+
...options,
|
|
1063
|
+
headers: {
|
|
1064
|
+
'Content-Type': 'application/json-patch+json',
|
|
1065
|
+
...options.headers,
|
|
1066
|
+
},
|
|
1067
|
+
});
|
|
1068
|
+
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Updates a step within a particular workflow.
|
|
1071
|
+
*/
|
|
1072
|
+
export const updateWorkflowStep = (options) => {
|
|
1073
|
+
var _a;
|
|
1074
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
|
|
1075
|
+
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
1076
|
+
...options,
|
|
1077
|
+
headers: {
|
|
1078
|
+
'Content-Type': 'application/json',
|
|
1079
|
+
...options.headers,
|
|
1080
|
+
},
|
|
1081
|
+
});
|
|
1082
|
+
};
|