@decartai/sdk 0.0.59 → 0.0.61

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.
@@ -86,7 +86,7 @@ interface VideoEditInputs {
86
86
  reference_image?: FileInput;
87
87
  }
88
88
  /**
89
- * Model-specific input documentation for lucy-2-v2v.
89
+ * Model-specific input documentation for Lucy 2.1 video editing models.
90
90
  * Requires prompt (can be empty string). Optional reference_image can also be provided.
91
91
  */
92
92
  interface VideoEdit2Inputs {
@@ -143,7 +143,7 @@ interface PromptInput {
143
143
  * This allows different models to have field-specific documentation while maintaining type safety.
144
144
  * Specific models are checked first, then falls back to category-based selection.
145
145
  */
146
- type ModelSpecificInputs<T extends ModelDefinition> = T["name"] extends "lucy-pro-i2i" | "lucy-image-2" ? ImageEditingInputs : T["name"] extends "lucy-restyle-v2v" | "lucy-restyle-2" ? VideoRestyleInputs : T["name"] extends "lucy-2-v2v" | "lucy-2" | "lucy-2.1" ? VideoEdit2Inputs : T["name"] extends "lucy-pro-v2v" | "lucy-clip" ? VideoEditInputs : T["name"] extends ImageModels ? ImageGenerationInputs : T["name"] extends VideoModels ? VideoModelInputs : PromptInput;
146
+ type ModelSpecificInputs<T extends ModelDefinition> = T["name"] extends "lucy-pro-i2i" | "lucy-image-2" ? ImageEditingInputs : T["name"] extends "lucy-restyle-v2v" | "lucy-restyle-2" ? VideoRestyleInputs : T["name"] extends "lucy-2.1" | "lucy-2.1-vton" ? VideoEdit2Inputs : T["name"] extends "lucy-pro-v2v" | "lucy-clip" ? VideoEditInputs : T["name"] extends ImageModels ? ImageGenerationInputs : T["name"] extends VideoModels ? VideoModelInputs : PromptInput;
147
147
  interface ProcessInputs {
148
148
  /**
149
149
  * Random seed for reproducible results.
@@ -1,10 +1,10 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/shared/model.d.ts
4
- declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"lucy_2_rt">, z.ZodLiteral<"live_avatar">]>;
5
- declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">, z.ZodLiteral<"lucy-2-v2v">]>;
4
+ declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>;
5
+ declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
6
6
  declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
7
- declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"lucy_2_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">, z.ZodLiteral<"lucy-2-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
7
+ declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
8
8
  type Model = z.infer<typeof modelSchema>;
9
9
  type RealTimeModels = z.infer<typeof realtimeModels>;
10
10
  type VideoModels = z.infer<typeof videoModels>;
@@ -64,7 +64,7 @@ declare const modelInputSchemas: {
64
64
  resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
65
65
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
66
66
  }, z.core.$strip>;
67
- readonly "lucy-2": z.ZodObject<{
67
+ readonly "lucy-2.1": z.ZodObject<{
68
68
  prompt: z.ZodString;
69
69
  reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
70
70
  uri: z.ZodString;
@@ -80,7 +80,7 @@ declare const modelInputSchemas: {
80
80
  resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
81
81
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
82
82
  }, z.core.$strip>;
83
- readonly "lucy-2.1": z.ZodObject<{
83
+ readonly "lucy-2.1-vton": z.ZodObject<{
84
84
  prompt: z.ZodString;
85
85
  reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
86
86
  uri: z.ZodString;
@@ -126,6 +126,22 @@ declare const modelInputSchemas: {
126
126
  resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
127
127
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
128
128
  }, z.core.$strip>;
129
+ readonly "lucy-vton-latest": z.ZodObject<{
130
+ prompt: z.ZodString;
131
+ reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
132
+ uri: z.ZodString;
133
+ type: z.ZodString;
134
+ name: z.ZodString;
135
+ }, z.core.$strip>]>>;
136
+ data: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
137
+ uri: z.ZodString;
138
+ type: z.ZodString;
139
+ name: z.ZodString;
140
+ }, z.core.$strip>]>;
141
+ seed: z.ZodOptional<z.ZodNumber>;
142
+ resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
143
+ enhance_prompt: z.ZodOptional<z.ZodBoolean>;
144
+ }, z.core.$strip>;
129
145
  readonly "lucy-restyle-latest": z.ZodObject<{
130
146
  prompt: z.ZodOptional<z.ZodString>;
131
147
  reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
@@ -242,22 +258,6 @@ declare const modelInputSchemas: {
242
258
  resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
243
259
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
244
260
  }, z.core.$strip>;
245
- readonly "lucy-2-v2v": z.ZodObject<{
246
- prompt: z.ZodString;
247
- reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
248
- uri: z.ZodString;
249
- type: z.ZodString;
250
- name: z.ZodString;
251
- }, z.core.$strip>]>>;
252
- data: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
253
- uri: z.ZodString;
254
- type: z.ZodString;
255
- name: z.ZodString;
256
- }, z.core.$strip>]>;
257
- seed: z.ZodOptional<z.ZodNumber>;
258
- resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
259
- enhance_prompt: z.ZodOptional<z.ZodBoolean>;
260
- }, z.core.$strip>;
261
261
  };
262
262
  type ModelInputSchemas = typeof modelInputSchemas;
263
263
  type ModelDefinition<T extends Model = Model> = {
@@ -298,7 +298,6 @@ declare const models: {
298
298
  * Get a realtime streaming model identifier.
299
299
  *
300
300
  * Available options:
301
- * - `"lucy-2"` - Lucy 2 realtime video editing (720p)
302
301
  * - `"lucy-2.1"` - Lucy 2.1 realtime video editing
303
302
  * - `"lucy-2.1-vton"` - Lucy 2.1 virtual try-on
304
303
  * - `"lucy-restyle-2"` - Realtime video restyling
@@ -312,8 +311,8 @@ declare const models: {
312
311
  *
313
312
  * Available options:
314
313
  * - `"lucy-clip"` - Video-to-video editing
315
- * - `"lucy-2"` - Long-form video editing (720p)
316
314
  * - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
315
+ * - `"lucy-2.1-vton"` - Virtual try-on video editing
317
316
  * - `"lucy-restyle-2"` - Video restyling
318
317
  * - `"lucy-motion"` - Motion generation
319
318
  */
@@ -10,11 +10,9 @@ const MODEL_ALIASES = {
10
10
  mirage: "lucy-restyle",
11
11
  mirage_v2: "lucy-restyle-2",
12
12
  lucy_v2v_720p_rt: "lucy",
13
- lucy_2_rt: "lucy-2",
14
13
  live_avatar: "live-avatar",
15
14
  "lucy-pro-v2v": "lucy-clip",
16
15
  "lucy-restyle-v2v": "lucy-restyle-2",
17
- "lucy-2-v2v": "lucy-2",
18
16
  "lucy-pro-i2i": "lucy-image-2"
19
17
  };
20
18
  const _warnedAliases = /* @__PURE__ */ new Set();
@@ -27,7 +25,6 @@ function warnDeprecated(model) {
27
25
  }
28
26
  const realtimeModels = z.union([
29
27
  z.literal("lucy"),
30
- z.literal("lucy-2"),
31
28
  z.literal("lucy-2.1"),
32
29
  z.literal("lucy-2.1-vton"),
33
30
  z.literal("lucy-restyle"),
@@ -39,22 +36,21 @@ const realtimeModels = z.union([
39
36
  z.literal("mirage"),
40
37
  z.literal("mirage_v2"),
41
38
  z.literal("lucy_v2v_720p_rt"),
42
- z.literal("lucy_2_rt"),
43
39
  z.literal("live_avatar")
44
40
  ]);
45
41
  const videoModels = z.union([
46
42
  z.literal("lucy-clip"),
47
- z.literal("lucy-2"),
48
43
  z.literal("lucy-2.1"),
44
+ z.literal("lucy-2.1-vton"),
49
45
  z.literal("lucy-restyle-2"),
50
46
  z.literal("lucy-motion"),
51
47
  z.literal("lucy-latest"),
48
+ z.literal("lucy-vton-latest"),
52
49
  z.literal("lucy-restyle-latest"),
53
50
  z.literal("lucy-clip-latest"),
54
51
  z.literal("lucy-motion-latest"),
55
52
  z.literal("lucy-pro-v2v"),
56
- z.literal("lucy-restyle-v2v"),
57
- z.literal("lucy-2-v2v")
53
+ z.literal("lucy-restyle-v2v")
58
54
  ]);
59
55
  const imageModels = z.union([
60
56
  z.literal("lucy-image-2"),
@@ -138,8 +134,8 @@ const modelInputSchemas = {
138
134
  "lucy-clip": videoEditSchema,
139
135
  "lucy-image-2": imageEditSchema,
140
136
  "lucy-restyle-2": restyleSchema,
141
- "lucy-2": videoEdit2Schema,
142
137
  "lucy-2.1": videoEdit2Schema,
138
+ "lucy-2.1-vton": videoEdit2Schema,
143
139
  "lucy-motion": z.object({
144
140
  data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
145
141
  trajectory: z.array(z.object({
@@ -151,6 +147,7 @@ const modelInputSchemas = {
151
147
  resolution: motionResolutionSchema
152
148
  }),
153
149
  "lucy-latest": videoEdit2Schema,
150
+ "lucy-vton-latest": videoEdit2Schema,
154
151
  "lucy-restyle-latest": restyleSchema,
155
152
  "lucy-clip-latest": videoEditSchema,
156
153
  "lucy-motion-latest": z.object({
@@ -166,8 +163,7 @@ const modelInputSchemas = {
166
163
  "lucy-image-latest": imageEditSchema,
167
164
  "lucy-pro-v2v": videoEditSchema,
168
165
  "lucy-pro-i2i": imageEditSchema,
169
- "lucy-restyle-v2v": restyleSchema,
170
- "lucy-2-v2v": videoEdit2Schema
166
+ "lucy-restyle-v2v": restyleSchema
171
167
  };
172
168
  const modelDefinitionSchema = z.object({
173
169
  name: z.string(),
@@ -188,14 +184,6 @@ const _models = {
188
184
  height: 704,
189
185
  inputSchema: z.object({})
190
186
  },
191
- "lucy-2": {
192
- urlPath: "/v1/stream",
193
- name: "lucy-2",
194
- fps: 20,
195
- width: 1280,
196
- height: 720,
197
- inputSchema: z.object({})
198
- },
199
187
  "lucy-2.1": {
200
188
  urlPath: "/v1/stream",
201
189
  name: "lucy-2.1",
@@ -284,14 +272,6 @@ const _models = {
284
272
  height: 704,
285
273
  inputSchema: z.object({})
286
274
  },
287
- lucy_2_rt: {
288
- urlPath: "/v1/stream",
289
- name: "lucy_2_rt",
290
- fps: 20,
291
- width: 1280,
292
- height: 720,
293
- inputSchema: z.object({})
294
- },
295
275
  live_avatar: {
296
276
  urlPath: "/v1/stream",
297
277
  name: "live_avatar",
@@ -340,15 +320,6 @@ const _models = {
340
320
  height: 704,
341
321
  inputSchema: modelInputSchemas["lucy-clip"]
342
322
  },
343
- "lucy-2": {
344
- urlPath: "/v1/generate/lucy-2",
345
- queueUrlPath: "/v1/jobs/lucy-2",
346
- name: "lucy-2",
347
- fps: 20,
348
- width: 1280,
349
- height: 720,
350
- inputSchema: modelInputSchemas["lucy-2"]
351
- },
352
323
  "lucy-2.1": {
353
324
  urlPath: "/v1/generate/lucy-2.1",
354
325
  queueUrlPath: "/v1/jobs/lucy-2.1",
@@ -358,6 +329,15 @@ const _models = {
358
329
  height: 624,
359
330
  inputSchema: modelInputSchemas["lucy-2.1"]
360
331
  },
332
+ "lucy-2.1-vton": {
333
+ urlPath: "/v1/generate/lucy-2.1-vton",
334
+ queueUrlPath: "/v1/jobs/lucy-2.1-vton",
335
+ name: "lucy-2.1-vton",
336
+ fps: 20,
337
+ width: 1088,
338
+ height: 624,
339
+ inputSchema: modelInputSchemas["lucy-2.1-vton"]
340
+ },
361
341
  "lucy-restyle-2": {
362
342
  urlPath: "/v1/generate/lucy-restyle-2",
363
343
  queueUrlPath: "/v1/jobs/lucy-restyle-2",
@@ -385,6 +365,15 @@ const _models = {
385
365
  height: 624,
386
366
  inputSchema: modelInputSchemas["lucy-latest"]
387
367
  },
368
+ "lucy-vton-latest": {
369
+ urlPath: "/v1/generate/lucy-vton-latest",
370
+ queueUrlPath: "/v1/jobs/lucy-vton-latest",
371
+ name: "lucy-vton-latest",
372
+ fps: 20,
373
+ width: 1088,
374
+ height: 624,
375
+ inputSchema: modelInputSchemas["lucy-vton-latest"]
376
+ },
388
377
  "lucy-restyle-latest": {
389
378
  urlPath: "/v1/generate/lucy-restyle-latest",
390
379
  queueUrlPath: "/v1/jobs/lucy-restyle-latest",
@@ -429,15 +418,6 @@ const _models = {
429
418
  width: 1280,
430
419
  height: 704,
431
420
  inputSchema: modelInputSchemas["lucy-restyle-v2v"]
432
- },
433
- "lucy-2-v2v": {
434
- urlPath: "/v1/generate/lucy-2-v2v",
435
- queueUrlPath: "/v1/jobs/lucy-2-v2v",
436
- name: "lucy-2-v2v",
437
- fps: 20,
438
- width: 1280,
439
- height: 720,
440
- inputSchema: modelInputSchemas["lucy-2-v2v"]
441
421
  }
442
422
  }
443
423
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",