@decartai/sdk 0.0.57 → 0.0.58

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.
@@ -10,7 +10,7 @@ const createProcessClient = (opts) => {
10
10
  const parsedInputs = model.inputSchema.safeParse(inputs);
11
11
  if (!parsedInputs.success) throw createInvalidInputError(`Invalid inputs for ${model.name}: ${parsedInputs.error.message}`);
12
12
  const processedInputs = {};
13
- for (const [key, value] of Object.entries(parsedInputs.data)) if (key === "data" || key === "start" || key === "end") processedInputs[key] = await fileInputToBlob(value);
13
+ for (const [key, value] of Object.entries(parsedInputs.data)) if (key === "data" || key === "start" || key === "end" || key === "reference_image") processedInputs[key] = await fileInputToBlob(value);
14
14
  else processedInputs[key] = value;
15
15
  return await sendRequest({
16
16
  baseUrl,
@@ -40,6 +40,11 @@ interface ImageEditingInputs {
40
40
  * Can be a File, Blob, ReadableStream, URL, or string URL.
41
41
  */
42
42
  data?: FileInput;
43
+ /**
44
+ * Optional reference image to guide the edit.
45
+ * Can be a File, Blob, ReadableStream, URL, or string URL.
46
+ */
47
+ reference_image?: FileInput;
43
48
  }
44
49
  /**
45
50
  * Model-specific input documentation for video models.
@@ -36,6 +36,11 @@ declare const modelInputSchemas: {
36
36
  type: z.ZodString;
37
37
  name: z.ZodString;
38
38
  }, z.core.$strip>]>;
39
+ 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<{
40
+ uri: z.ZodString;
41
+ type: z.ZodString;
42
+ name: z.ZodString;
43
+ }, z.core.$strip>]>>;
39
44
  seed: z.ZodOptional<z.ZodNumber>;
40
45
  resolution: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
41
46
  "720p": "720p";
@@ -69,6 +69,7 @@ const modelInputSchemas = {
69
69
  "lucy-pro-i2i": z.object({
70
70
  prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
71
71
  data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL)"),
72
+ reference_image: fileInputSchema.optional().describe("Optional reference image to guide the edit (File, Blob, ReadableStream, URL, or string URL)"),
72
73
  seed: z.number().optional().describe("The seed to use for the generation"),
73
74
  resolution: proResolutionSchema(),
74
75
  enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",