@civitai/client 0.2.0-beta.1 → 0.2.0-beta.3
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.
|
@@ -94,13 +94,6 @@ export declare const BuzzClientAccount: {
|
|
|
94
94
|
readonly GENERATION: 'generation';
|
|
95
95
|
};
|
|
96
96
|
export type BuzzClientAccount = (typeof BuzzClientAccount)[keyof typeof BuzzClientAccount];
|
|
97
|
-
export type CivitaiWanVideoGenInput = WanVideoGenInput & {
|
|
98
|
-
width?: number;
|
|
99
|
-
height?: number;
|
|
100
|
-
model?: string | null;
|
|
101
|
-
} & {
|
|
102
|
-
provider: 'civitai';
|
|
103
|
-
};
|
|
104
97
|
export type ComfyInput = {
|
|
105
98
|
/**
|
|
106
99
|
* Get the comfy workflow that needs to be executed
|
|
@@ -228,12 +221,6 @@ export type EpochResult = {
|
|
|
228
221
|
*/
|
|
229
222
|
blobUrl: string;
|
|
230
223
|
};
|
|
231
|
-
export type FalWanVideoGenInput = WanVideoGenInput & {
|
|
232
|
-
aspectRatio?: '1:1' | '16:9' | '9:16';
|
|
233
|
-
enablePromptExpansion?: boolean;
|
|
234
|
-
} & {
|
|
235
|
-
provider: 'fal';
|
|
236
|
-
};
|
|
237
224
|
export declare const FileFormat: {
|
|
238
225
|
readonly UNKNOWN: 'unknown';
|
|
239
226
|
readonly SAFE_TENSOR: 'safeTensor';
|
|
@@ -243,13 +230,15 @@ export declare const FileFormat: {
|
|
|
243
230
|
readonly ONNX: 'onnx';
|
|
244
231
|
};
|
|
245
232
|
export type FileFormat = (typeof FileFormat)[keyof typeof FileFormat];
|
|
246
|
-
export type Flux1KontextDevImageGenInput = Flux1KontextImageGenInput & {
|
|
233
|
+
export type Flux1KontextDevImageGenInput = Flux1KontextImageGenInput & {
|
|
234
|
+
readonly model: string;
|
|
235
|
+
} & {
|
|
247
236
|
model: 'dev';
|
|
248
237
|
};
|
|
249
238
|
export type Flux1KontextImageGenInput = ImageGenInput & {
|
|
250
239
|
engine: 'flux1-kontext';
|
|
251
240
|
} & {
|
|
252
|
-
model: string;
|
|
241
|
+
readonly model: string;
|
|
253
242
|
prompt: string;
|
|
254
243
|
images?: Array<string>;
|
|
255
244
|
aspectRatio?: '21:9' | '16:9' | '4:3' | '3:2' | '1:1' | '2:3' | '3:4' | '9:16' | '9:21';
|
|
@@ -260,10 +249,14 @@ export type Flux1KontextImageGenInput = ImageGenInput & {
|
|
|
260
249
|
} & {
|
|
261
250
|
engine: 'flux1-kontext';
|
|
262
251
|
};
|
|
263
|
-
export type Flux1KontextMaxImageGenInput = Flux1KontextImageGenInput & {
|
|
252
|
+
export type Flux1KontextMaxImageGenInput = Flux1KontextImageGenInput & {
|
|
253
|
+
readonly model: string;
|
|
254
|
+
} & {
|
|
264
255
|
model: 'max';
|
|
265
256
|
};
|
|
266
|
-
export type Flux1KontextProImageGenInput = Flux1KontextImageGenInput & {
|
|
257
|
+
export type Flux1KontextProImageGenInput = Flux1KontextImageGenInput & {
|
|
258
|
+
readonly model: string;
|
|
259
|
+
} & {
|
|
267
260
|
model: 'pro';
|
|
268
261
|
};
|
|
269
262
|
export type FluxDevFastImageResourceTrainingInput = ImageResourceTrainingInput & {
|
|
@@ -367,6 +360,10 @@ export type ImageBlob = Blob & {
|
|
|
367
360
|
export type ImageGenInput = {
|
|
368
361
|
engine: string;
|
|
369
362
|
};
|
|
363
|
+
export type ImageGenInputLora = {
|
|
364
|
+
air: string;
|
|
365
|
+
strength?: number;
|
|
366
|
+
};
|
|
370
367
|
export type ImageGenOutput = {
|
|
371
368
|
/**
|
|
372
369
|
* A collection of output images.
|
|
@@ -1209,6 +1206,10 @@ export type TransactionSummary = {
|
|
|
1209
1206
|
* Get a list of individual transactions.
|
|
1210
1207
|
*/
|
|
1211
1208
|
list?: Array<TransactionInfo>;
|
|
1209
|
+
/**
|
|
1210
|
+
* A boolean returned with whatif requests to indicate whether the user has nsufficient buzz to run a workflow.
|
|
1211
|
+
*/
|
|
1212
|
+
insufficientBuzz?: boolean | null;
|
|
1212
1213
|
};
|
|
1213
1214
|
export declare const TransactionType: {
|
|
1214
1215
|
readonly DEBIT: 'debit';
|
|
@@ -1283,6 +1284,10 @@ export type UpdateWorkflowRequest = {
|
|
|
1283
1284
|
* An optional set of new tags to set on the workflow.
|
|
1284
1285
|
*/
|
|
1285
1286
|
tags?: Array<string> | null;
|
|
1287
|
+
/**
|
|
1288
|
+
* Set to true to remove the mature content restriction on the workflow.
|
|
1289
|
+
*/
|
|
1290
|
+
allowMatureContent?: boolean | null;
|
|
1286
1291
|
};
|
|
1287
1292
|
/**
|
|
1288
1293
|
* Available statuses for updating workflows.
|
|
@@ -1456,10 +1461,118 @@ export declare const ViduVideoGenStyle: {
|
|
|
1456
1461
|
readonly ANIME: 'anime';
|
|
1457
1462
|
};
|
|
1458
1463
|
export type ViduVideoGenStyle = (typeof ViduVideoGenStyle)[keyof typeof ViduVideoGenStyle];
|
|
1464
|
+
export type Wan21CivitaiVideoGenInput = Wan21VideoGenInput & {
|
|
1465
|
+
width?: number;
|
|
1466
|
+
height?: number;
|
|
1467
|
+
model?: string | null;
|
|
1468
|
+
images?: Array<string>;
|
|
1469
|
+
} & {
|
|
1470
|
+
provider: 'civitai';
|
|
1471
|
+
};
|
|
1472
|
+
export type Wan21FalVideoGenInput = Wan21VideoGenInput & {
|
|
1473
|
+
aspectRatio?: '1:1' | '16:9' | '9:16';
|
|
1474
|
+
enablePromptExpansion?: boolean;
|
|
1475
|
+
} & {
|
|
1476
|
+
provider: 'fal';
|
|
1477
|
+
};
|
|
1478
|
+
export type Wan21VideoGenInput = WanVideoGenInput & {
|
|
1479
|
+
provider: string | null;
|
|
1480
|
+
} & {
|
|
1481
|
+
version: 'v2.1';
|
|
1482
|
+
};
|
|
1483
|
+
export type Wan225bFalImageGenInput = Wan225bImageGenInput & {} & {
|
|
1484
|
+
provider: 'fal';
|
|
1485
|
+
};
|
|
1486
|
+
export type Wan225bFalImageToVideoInput = Wan225bFalVideoGenInput & {
|
|
1487
|
+
images?: Array<string>;
|
|
1488
|
+
} & {
|
|
1489
|
+
operation: 'image-to-video';
|
|
1490
|
+
};
|
|
1491
|
+
export type Wan225bFalTextToVideoInput = Wan225bFalVideoGenInput & {} & {
|
|
1492
|
+
operation: 'text-to-video';
|
|
1493
|
+
};
|
|
1494
|
+
export type Wan225bFalVideoGenInput = Wan225bVideoGenInput & {
|
|
1495
|
+
operation: string | null;
|
|
1496
|
+
resolution?: '480p' | '580p' | '720p';
|
|
1497
|
+
aspectRatio?: '1:1' | '16:9' | '9:16' | 'auto';
|
|
1498
|
+
enablePromptExpansion?: boolean;
|
|
1499
|
+
useDistill?: boolean;
|
|
1500
|
+
interpolatorModel?: 'none' | 'film' | 'rife';
|
|
1501
|
+
negativePrompt?: string | null;
|
|
1502
|
+
enableSafetyChecker?: boolean;
|
|
1503
|
+
numInferenceSteps?: number;
|
|
1504
|
+
} & {
|
|
1505
|
+
provider: 'fal';
|
|
1506
|
+
};
|
|
1507
|
+
export type Wan225bImageGenInput = WanImageGenInput & {
|
|
1508
|
+
provider: string | null;
|
|
1509
|
+
steps?: number;
|
|
1510
|
+
shift?: number;
|
|
1511
|
+
} & {
|
|
1512
|
+
version: 'v2.2-5b';
|
|
1513
|
+
};
|
|
1514
|
+
export type Wan225bVideoGenInput = WanVideoGenInput & {
|
|
1515
|
+
provider: string | null;
|
|
1516
|
+
} & {
|
|
1517
|
+
version: 'v2.2-5b';
|
|
1518
|
+
};
|
|
1519
|
+
export type Wan22FalImageGenInput = Wan22ImageGenInput & {
|
|
1520
|
+
acceleration?: 'none' | 'fast' | 'faster';
|
|
1521
|
+
} & {
|
|
1522
|
+
provider: 'fal';
|
|
1523
|
+
};
|
|
1524
|
+
export type Wan22FalImageToVideoInput = Wan22FalVideoGenInput & {
|
|
1525
|
+
images?: Array<string>;
|
|
1526
|
+
} & {
|
|
1527
|
+
operation: 'image-to-video';
|
|
1528
|
+
};
|
|
1529
|
+
export type Wan22FalTextToVideoInput = Wan22FalVideoGenInput & {} & {
|
|
1530
|
+
operation: 'text-to-video';
|
|
1531
|
+
};
|
|
1532
|
+
export type Wan22FalVideoGenInput = Wan22VideoGenInput & {
|
|
1533
|
+
operation: string | null;
|
|
1534
|
+
resolution?: '480p' | '720p';
|
|
1535
|
+
aspectRatio?: '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '4:5' | '5:4';
|
|
1536
|
+
enablePromptExpansion?: boolean;
|
|
1537
|
+
shift?: number;
|
|
1538
|
+
interpolatorModel?: 'film' | 'rife';
|
|
1539
|
+
useTurbo?: boolean;
|
|
1540
|
+
negativePrompt?: string | null;
|
|
1541
|
+
enableSafetyChecker?: boolean;
|
|
1542
|
+
} & {
|
|
1543
|
+
provider: 'fal';
|
|
1544
|
+
};
|
|
1545
|
+
export type Wan22ImageGenInput = WanImageGenInput & {
|
|
1546
|
+
provider: string | null;
|
|
1547
|
+
steps?: number;
|
|
1548
|
+
} & {
|
|
1549
|
+
version: 'v2.2';
|
|
1550
|
+
};
|
|
1551
|
+
export type Wan22VideoGenInput = WanVideoGenInput & {
|
|
1552
|
+
provider: string | null;
|
|
1553
|
+
} & {
|
|
1554
|
+
version: 'v2.2';
|
|
1555
|
+
};
|
|
1556
|
+
export type WanImageGenInput = ImageGenInput & {
|
|
1557
|
+
engine: 'wan';
|
|
1558
|
+
} & {
|
|
1559
|
+
version: string | null;
|
|
1560
|
+
prompt: string;
|
|
1561
|
+
negativePrompt?: string | null;
|
|
1562
|
+
guidanceScale?: number;
|
|
1563
|
+
seed?: number | null;
|
|
1564
|
+
quantity?: number;
|
|
1565
|
+
imageSize?: string;
|
|
1566
|
+
enablePromptExpansion?: boolean;
|
|
1567
|
+
enableSafetyChecker?: boolean;
|
|
1568
|
+
loras?: Array<ImageGenInputLora>;
|
|
1569
|
+
} & {
|
|
1570
|
+
engine: 'wan';
|
|
1571
|
+
};
|
|
1459
1572
|
export type WanVideoGenInput = VideoGenInput & {
|
|
1460
1573
|
engine: 'wan';
|
|
1461
1574
|
} & {
|
|
1462
|
-
|
|
1575
|
+
version: string | null;
|
|
1463
1576
|
/**
|
|
1464
1577
|
* Either A URL, A DataURL or a Base64 string
|
|
1465
1578
|
*/
|
|
@@ -1471,7 +1584,6 @@ export type WanVideoGenInput = VideoGenInput & {
|
|
|
1471
1584
|
steps?: number;
|
|
1472
1585
|
loras?: Array<VideoGenInputLora>;
|
|
1473
1586
|
} & {
|
|
1474
|
-
provider: 'wan';
|
|
1475
1587
|
engine: 'wan';
|
|
1476
1588
|
};
|
|
1477
1589
|
/**
|
|
@@ -1527,6 +1639,11 @@ export type Workflow = {
|
|
|
1527
1639
|
* Get or set whether this workflow is experimental
|
|
1528
1640
|
*/
|
|
1529
1641
|
experimental?: boolean | null;
|
|
1642
|
+
/**
|
|
1643
|
+
* Gets or sets a value indicating whether mature content is allowed in this workflow.
|
|
1644
|
+
*/
|
|
1645
|
+
allowMatureContent?: boolean | null;
|
|
1646
|
+
upgradeMode?: WorkflowUpgradeMode;
|
|
1530
1647
|
};
|
|
1531
1648
|
/**
|
|
1532
1649
|
* Details of a callback setup for a workflow.
|
|
@@ -1736,6 +1853,7 @@ export type WorkflowStepJobEvent = {
|
|
|
1736
1853
|
progress?: number | null;
|
|
1737
1854
|
reason?: string | null;
|
|
1738
1855
|
blockedReason?: string | null;
|
|
1856
|
+
matureContent?: boolean | null;
|
|
1739
1857
|
};
|
|
1740
1858
|
/**
|
|
1741
1859
|
* Details of the workflow step job's queue position.
|
|
@@ -1816,6 +1934,13 @@ export type WorkflowTemplate = {
|
|
|
1816
1934
|
* Get or set whether this workflow is experimental
|
|
1817
1935
|
*/
|
|
1818
1936
|
experimental?: boolean | null;
|
|
1937
|
+
/**
|
|
1938
|
+
* Get or set whether this workflow should allow mature content.
|
|
1939
|
+
* When set to false, the workflow will not return any content that is marked as mature.
|
|
1940
|
+
* Additional payment options are available for workflows that do not allow mature content.
|
|
1941
|
+
*/
|
|
1942
|
+
allowMatureContent?: boolean | null;
|
|
1943
|
+
upgradeMode?: WorkflowUpgradeMode;
|
|
1819
1944
|
};
|
|
1820
1945
|
export type WorkflowTips = {
|
|
1821
1946
|
/**
|
|
@@ -1827,6 +1952,17 @@ export type WorkflowTips = {
|
|
|
1827
1952
|
*/
|
|
1828
1953
|
creators: number;
|
|
1829
1954
|
};
|
|
1955
|
+
/**
|
|
1956
|
+
* Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
|
|
1957
|
+
*/
|
|
1958
|
+
export declare const WorkflowUpgradeMode: {
|
|
1959
|
+
readonly MANUAL: 'manual';
|
|
1960
|
+
readonly AUTOMATIC: 'automatic';
|
|
1961
|
+
};
|
|
1962
|
+
/**
|
|
1963
|
+
* Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
|
|
1964
|
+
*/
|
|
1965
|
+
export type WorkflowUpgradeMode = (typeof WorkflowUpgradeMode)[keyof typeof WorkflowUpgradeMode];
|
|
1830
1966
|
export type GetBlobData = {
|
|
1831
1967
|
body?: never;
|
|
1832
1968
|
path: {
|
|
@@ -1836,6 +1972,10 @@ export type GetBlobData = {
|
|
|
1836
1972
|
blobId: string;
|
|
1837
1973
|
};
|
|
1838
1974
|
query?: {
|
|
1975
|
+
/**
|
|
1976
|
+
* The id of the workflow to obtain
|
|
1977
|
+
*/
|
|
1978
|
+
workflowId?: string;
|
|
1839
1979
|
/**
|
|
1840
1980
|
* A maximum nsfw level. If this is specified and the blob does not have a NSFW level specified or the NSFW level exceeds our max then we'll return an error
|
|
1841
1981
|
*/
|
|
@@ -2204,6 +2344,10 @@ export type QueryWorkflowsData = {
|
|
|
2204
2344
|
* Whether to return data from oldest to newest
|
|
2205
2345
|
*/
|
|
2206
2346
|
ascending?: boolean;
|
|
2347
|
+
/**
|
|
2348
|
+
* When set to true, any blob that has mature won't be available and won't have a URL
|
|
2349
|
+
*/
|
|
2350
|
+
hideMatureContent?: boolean;
|
|
2207
2351
|
};
|
|
2208
2352
|
url: '/v2/consumer/workflows';
|
|
2209
2353
|
};
|
|
@@ -2235,6 +2379,10 @@ export type SubmitWorkflowData = {
|
|
|
2235
2379
|
* Whether to actually submit the workflow or return an estimate on what would happen upon submission
|
|
2236
2380
|
*/
|
|
2237
2381
|
whatif?: boolean;
|
|
2382
|
+
/**
|
|
2383
|
+
* When set to true, any blob that has mature won't be available and won't have a URL
|
|
2384
|
+
*/
|
|
2385
|
+
hideMatureContent?: boolean;
|
|
2238
2386
|
};
|
|
2239
2387
|
url: '/v2/consumer/workflows';
|
|
2240
2388
|
};
|
|
@@ -2312,6 +2460,10 @@ export type GetWorkflowData = {
|
|
|
2312
2460
|
* In which case the client should use the token to query the status of the workflow.
|
|
2313
2461
|
*/
|
|
2314
2462
|
wait?: boolean;
|
|
2463
|
+
/**
|
|
2464
|
+
* When set to true, any blob that has mature won't be available and won't have a URL
|
|
2465
|
+
*/
|
|
2466
|
+
hideMatureContent?: boolean;
|
|
2315
2467
|
};
|
|
2316
2468
|
url: '/v2/consumer/workflows/{workflowId}';
|
|
2317
2469
|
};
|
|
@@ -2348,6 +2500,10 @@ export type PatchWorkflowData = {
|
|
|
2348
2500
|
url: '/v2/consumer/workflows/{workflowId}';
|
|
2349
2501
|
};
|
|
2350
2502
|
export type PatchWorkflowErrors = {
|
|
2503
|
+
/**
|
|
2504
|
+
* Bad Request
|
|
2505
|
+
*/
|
|
2506
|
+
400: ProblemDetails;
|
|
2351
2507
|
/**
|
|
2352
2508
|
* Unauthorized
|
|
2353
2509
|
*/
|
|
@@ -178,3 +178,10 @@ export const WorkflowStatus = {
|
|
|
178
178
|
EXPIRED: 'expired',
|
|
179
179
|
CANCELED: 'canceled',
|
|
180
180
|
};
|
|
181
|
+
/**
|
|
182
|
+
* Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment.
|
|
183
|
+
*/
|
|
184
|
+
export const WorkflowUpgradeMode = {
|
|
185
|
+
MANUAL: 'manual',
|
|
186
|
+
AUTOMATIC: 'automatic',
|
|
187
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export function handleError(error) {
|
|
2
2
|
if (typeof error === 'string')
|
|
3
3
|
return error;
|
|
4
|
-
const
|
|
4
|
+
const errors = error.errors && Array.isArray(error.errors)
|
|
5
|
+
? error.errors
|
|
6
|
+
: undefined;
|
|
7
|
+
const message = errors ? errors.messages.join('\n') : error.detail;
|
|
5
8
|
return message === null ? undefined : message;
|
|
6
9
|
}
|