@decartai/sdk 0.1.3 → 0.1.5

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.
@@ -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.1" | "lucy-2.1-vton" | "lucy-vton-2" | "lucy-vton" | "lucy-2.1-vton-2" | "lucy-vton-latest" ? 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" | "lucy-vton-2" | "lucy-vton-3" | "lucy-vton" | "lucy-2.1-vton-2" | "lucy-vton-latest" ? 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.
@@ -6,6 +6,7 @@ declare const canonicalModelSchema: z.ZodEnum<{
6
6
  "lucy-2.1": "lucy-2.1";
7
7
  "lucy-2.1-vton": "lucy-2.1-vton";
8
8
  "lucy-vton-2": "lucy-vton-2";
9
+ "lucy-vton-3": "lucy-vton-3";
9
10
  "lucy-restyle-2": "lucy-restyle-2";
10
11
  "lucy-clip": "lucy-clip";
11
12
  "lucy-image-2": "lucy-image-2";
@@ -25,10 +26,10 @@ declare const modelAliases: {
25
26
  };
26
27
  /** @internal Test-only helper to reset deprecation warning tracking */
27
28
 
28
- declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">]>;
29
- declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
29
+ declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">]>;
30
+ declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
30
31
  declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
31
- declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">, 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">]>]>;
32
+ declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-vton">, z.ZodLiteral<"lucy-2.1-vton-2">, 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">]>]>;
32
33
  type Model = z.infer<typeof modelSchema>;
33
34
  type RealTimeModels = z.infer<typeof realtimeModels>;
34
35
  type VideoModels = z.infer<typeof videoModels>;
@@ -150,6 +151,22 @@ declare const modelInputSchemas: {
150
151
  resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
151
152
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
152
153
  }, z.core.$strip>;
154
+ readonly "lucy-vton-3": z.ZodObject<{
155
+ prompt: z.ZodString;
156
+ 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<{
157
+ uri: z.ZodString;
158
+ type: z.ZodString;
159
+ name: z.ZodString;
160
+ }, z.core.$strip>]>>;
161
+ 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<{
162
+ uri: z.ZodString;
163
+ type: z.ZodString;
164
+ name: z.ZodString;
165
+ }, z.core.$strip>]>;
166
+ seed: z.ZodOptional<z.ZodNumber>;
167
+ resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
168
+ enhance_prompt: z.ZodOptional<z.ZodBoolean>;
169
+ }, z.core.$strip>;
153
170
  readonly "lucy-latest": z.ZodObject<{
154
171
  prompt: z.ZodString;
155
172
  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<{
@@ -380,6 +397,7 @@ declare const models: {
380
397
  * - `"lucy-2.1"` - Lucy 2.1 realtime video editing
381
398
  * - `"lucy-2.1-vton"` - Lucy 2.1 virtual try-on
382
399
  * - `"lucy-vton-2"` - Lucy virtual try-on 2
400
+ * - `"lucy-vton-3"` - Lucy virtual try-on 3
383
401
  * - `"lucy-restyle-2"` - Realtime video restyling
384
402
  */
385
403
  realtime: <T extends RealTimeModels>(model: T) => ModelDefinition<T>;
@@ -391,6 +409,7 @@ declare const models: {
391
409
  * - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
392
410
  * - `"lucy-2.1-vton"` - Virtual try-on video editing
393
411
  * - `"lucy-vton-2"` - Virtual try-on 2 video editing
412
+ * - `"lucy-vton-3"` - Virtual try-on 3 video editing
394
413
  * - `"lucy-restyle-2"` - Video restyling
395
414
  */
396
415
  video: <T extends VideoModels>(model: T) => ModelDefinition<T> & {
@@ -5,6 +5,7 @@ const CANONICAL_MODEL_NAMES = [
5
5
  "lucy-2.1",
6
6
  "lucy-2.1-vton",
7
7
  "lucy-vton-2",
8
+ "lucy-vton-3",
8
9
  "lucy-restyle-2",
9
10
  "lucy-clip",
10
11
  "lucy-image-2"
@@ -13,6 +14,7 @@ const CANONICAL_REALTIME_MODEL_NAMES = [
13
14
  "lucy-2.1",
14
15
  "lucy-2.1-vton",
15
16
  "lucy-vton-2",
17
+ "lucy-vton-3",
16
18
  "lucy-restyle-2"
17
19
  ];
18
20
  const CANONICAL_VIDEO_MODEL_NAMES = [
@@ -20,6 +22,7 @@ const CANONICAL_VIDEO_MODEL_NAMES = [
20
22
  "lucy-2.1",
21
23
  "lucy-2.1-vton",
22
24
  "lucy-vton-2",
25
+ "lucy-vton-3",
23
26
  "lucy-restyle-2"
24
27
  ];
25
28
  const CANONICAL_IMAGE_MODEL_NAMES = ["lucy-image-2"];
@@ -51,6 +54,7 @@ const realtimeModels = z.union([
51
54
  z.literal("lucy-2.1"),
52
55
  z.literal("lucy-2.1-vton"),
53
56
  z.literal("lucy-vton-2"),
57
+ z.literal("lucy-vton-3"),
54
58
  z.literal("lucy-restyle-2"),
55
59
  z.literal("lucy-latest"),
56
60
  z.literal("lucy-vton-latest"),
@@ -64,6 +68,7 @@ const videoModels = z.union([
64
68
  z.literal("lucy-2.1"),
65
69
  z.literal("lucy-2.1-vton"),
66
70
  z.literal("lucy-vton-2"),
71
+ z.literal("lucy-vton-3"),
67
72
  z.literal("lucy-restyle-2"),
68
73
  z.literal("lucy-latest"),
69
74
  z.literal("lucy-vton-latest"),
@@ -145,7 +150,7 @@ const proResolutionSchema = () => {
145
150
  */
146
151
  const v2vResolutionSchema = z.literal("720p").optional().describe("The resolution to use for the generation").default("720p");
147
152
  const videoEditSchema = z.object({
148
- prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
153
+ prompt: z.string().min(1).describe("The prompt to use for the generation"),
149
154
  data: fileInputSchema.describe("The video data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
150
155
  reference_image: fileInputSchema.optional().describe("Optional reference image to guide what to add to the video (File, Blob, ReadableStream, URL, or string URL)"),
151
156
  seed: z.number().optional().describe("The seed to use for the generation"),
@@ -161,7 +166,7 @@ const imageEditSchema = z.object({
161
166
  enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
162
167
  });
163
168
  const restyleSchema = z.object({
164
- prompt: z.string().min(1).max(1e3).optional().describe("Text prompt for the video editing"),
169
+ prompt: z.string().min(1).optional().describe("Text prompt for the video editing"),
165
170
  reference_image: fileInputSchema.optional().describe("Reference image to transform into a prompt (File, Blob, ReadableStream, URL, or string URL)"),
166
171
  data: fileInputSchema.describe("Video file to process (File, Blob, ReadableStream, URL, or string URL)"),
167
172
  seed: z.number().optional().describe("Seed for the video generation"),
@@ -169,7 +174,7 @@ const restyleSchema = z.object({
169
174
  enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt (only valid with text prompt, defaults to true on backend)")
170
175
  }).refine((data) => data.prompt !== void 0 !== (data.reference_image !== void 0), { message: "Must provide either 'prompt' or 'reference_image', but not both" }).refine((data) => !(data.reference_image !== void 0 && data.enhance_prompt !== void 0), { message: "'enhance_prompt' is only valid when using 'prompt', not 'reference_image'" });
171
176
  const videoEdit2Schema = z.object({
172
- prompt: z.string().max(1e3).describe("Text prompt for the video editing. Send an empty string if you want no text prompt."),
177
+ prompt: z.string().describe("Text prompt for the video editing. Send an empty string if you want no text prompt."),
173
178
  reference_image: fileInputSchema.optional().describe("Optional reference image to guide the edit (File, Blob, ReadableStream, URL, or string URL)"),
174
179
  data: fileInputSchema.describe("Video file to process (File, Blob, ReadableStream, URL, or string URL)"),
175
180
  seed: z.number().optional().describe("The seed to use for the generation"),
@@ -183,6 +188,7 @@ const modelInputSchemas = {
183
188
  "lucy-2.1": videoEdit2Schema,
184
189
  "lucy-2.1-vton": videoEdit2Schema,
185
190
  "lucy-vton-2": videoEdit2Schema,
191
+ "lucy-vton-3": videoEdit2Schema,
186
192
  "lucy-latest": videoEdit2Schema,
187
193
  "lucy-vton-latest": videoEdit2Schema,
188
194
  "lucy-restyle-latest": restyleSchema,
@@ -247,6 +253,17 @@ const _models = {
247
253
  height: 624,
248
254
  inputSchema: z.object({})
249
255
  },
256
+ "lucy-vton-3": {
257
+ urlPath: "/v1/stream",
258
+ name: "lucy-vton-3",
259
+ fps: {
260
+ ideal: 30,
261
+ max: 30
262
+ },
263
+ width: 1088,
264
+ height: 624,
265
+ inputSchema: z.object({})
266
+ },
250
267
  "lucy-restyle-2": {
251
268
  urlPath: "/v1/stream",
252
269
  name: "lucy-restyle-2",
@@ -391,6 +408,15 @@ const _models = {
391
408
  height: 624,
392
409
  inputSchema: modelInputSchemas["lucy-vton-2"]
393
410
  },
411
+ "lucy-vton-3": {
412
+ urlPath: "/v1/generate/lucy-vton-3",
413
+ queueUrlPath: "/v1/jobs/lucy-vton-3",
414
+ name: "lucy-vton-3",
415
+ fps: 20,
416
+ width: 1088,
417
+ height: 624,
418
+ inputSchema: modelInputSchemas["lucy-vton-3"]
419
+ },
394
420
  "lucy-restyle-2": {
395
421
  urlPath: "/v1/generate/lucy-restyle-2",
396
422
  queueUrlPath: "/v1/jobs/lucy-restyle-2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",