n8n-nodes-piapi 0.1.0

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.
Files changed (94) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +41 -0
  3. package/dist/credentials/PiAPI.credentials.d.ts +8 -0
  4. package/dist/credentials/PiAPI.credentials.js +46 -0
  5. package/dist/credentials/PiAPI.credentials.js.map +1 -0
  6. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.d.ts +5 -0
  7. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js +237 -0
  8. package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js.map +1 -0
  9. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.d.ts +5 -0
  10. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js +270 -0
  11. package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js.map +1 -0
  12. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.d.ts +5 -0
  13. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js +186 -0
  14. package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js.map +1 -0
  15. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.d.ts +5 -0
  16. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js +359 -0
  17. package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js.map +1 -0
  18. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.d.ts +5 -0
  19. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js +398 -0
  20. package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js.map +1 -0
  21. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.d.ts +5 -0
  22. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js +190 -0
  23. package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js.map +1 -0
  24. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.d.ts +5 -0
  25. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js +140 -0
  26. package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js.map +1 -0
  27. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.d.ts +5 -0
  28. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js +150 -0
  29. package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js.map +1 -0
  30. package/dist/nodes/PiAPI/Hailuo/index.d.ts +4 -0
  31. package/dist/nodes/PiAPI/Hailuo/index.js +10 -0
  32. package/dist/nodes/PiAPI/Hailuo/index.js.map +1 -0
  33. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.d.ts +5 -0
  34. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js +227 -0
  35. package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js.map +1 -0
  36. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.d.ts +5 -0
  37. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js +142 -0
  38. package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js.map +1 -0
  39. package/dist/nodes/PiAPI/Hunyuan/index.d.ts +3 -0
  40. package/dist/nodes/PiAPI/Hunyuan/index.js +8 -0
  41. package/dist/nodes/PiAPI/Hunyuan/index.js.map +1 -0
  42. package/dist/nodes/PiAPI/Kling/KlingEffects.node.d.ts +5 -0
  43. package/dist/nodes/PiAPI/Kling/KlingEffects.node.js +175 -0
  44. package/dist/nodes/PiAPI/Kling/KlingEffects.node.js.map +1 -0
  45. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.d.ts +5 -0
  46. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js +411 -0
  47. package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js.map +1 -0
  48. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.d.ts +13 -0
  49. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js +276 -0
  50. package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js.map +1 -0
  51. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.d.ts +5 -0
  52. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js +206 -0
  53. package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js.map +1 -0
  54. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.d.ts +5 -0
  55. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js +426 -0
  56. package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js.map +1 -0
  57. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.d.ts +5 -0
  58. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js +93 -0
  59. package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js.map +1 -0
  60. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.d.ts +5 -0
  61. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js +242 -0
  62. package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +1 -0
  63. package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -0
  64. package/dist/nodes/PiAPI/Skyreels/index.js +6 -0
  65. package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -0
  66. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.d.ts +5 -0
  67. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js +125 -0
  68. package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js.map +1 -0
  69. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.d.ts +5 -0
  70. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js +262 -0
  71. package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js.map +1 -0
  72. package/dist/nodes/PiAPI/Trellis/index.d.ts +2 -0
  73. package/dist/nodes/PiAPI/Trellis/index.js +6 -0
  74. package/dist/nodes/PiAPI/Trellis/index.js.map +1 -0
  75. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.d.ts +5 -0
  76. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js +227 -0
  77. package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js.map +1 -0
  78. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.d.ts +5 -0
  79. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js +129 -0
  80. package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js.map +1 -0
  81. package/dist/nodes/PiAPI/piapi.svg +5 -0
  82. package/dist/nodes/PiAPI/shared/Constants.d.ts +30 -0
  83. package/dist/nodes/PiAPI/shared/Constants.js +262 -0
  84. package/dist/nodes/PiAPI/shared/Constants.js.map +1 -0
  85. package/dist/nodes/PiAPI/shared/GenericFunctions.d.ts +3 -0
  86. package/dist/nodes/PiAPI/shared/GenericFunctions.js +43 -0
  87. package/dist/nodes/PiAPI/shared/GenericFunctions.js.map +1 -0
  88. package/dist/nodes/PiAPI/shared/Interfaces.d.ts +102 -0
  89. package/dist/nodes/PiAPI/shared/Interfaces.js +3 -0
  90. package/dist/nodes/PiAPI/shared/Interfaces.js.map +1 -0
  91. package/dist/package.json +95 -0
  92. package/dist/tsconfig.tsbuildinfo +1 -0
  93. package/index.js +6 -0
  94. package/package.json +95 -0
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HailuoSubjectVideo = void 0;
4
+ const GenericFunctions_1 = require("../shared/GenericFunctions");
5
+ class HailuoSubjectVideo {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'Hailuo Subject Reference Video',
9
+ name: 'hailuoSubjectVideo',
10
+ icon: 'file:../piapi.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ description: 'Generate video from text and reference image of a person using Hailuo API',
14
+ defaults: {
15
+ name: 'Hailuo Subject Reference Video',
16
+ },
17
+ inputs: ["main"],
18
+ outputs: ["main"],
19
+ credentials: [
20
+ {
21
+ name: 'piAPIApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ {
27
+ displayName: 'Text Prompt',
28
+ name: 'prompt',
29
+ type: 'string',
30
+ typeOptions: {
31
+ rows: 4,
32
+ },
33
+ default: '',
34
+ required: true,
35
+ description: 'Text prompt for video generation (max 2000 characters)',
36
+ },
37
+ {
38
+ displayName: 'Reference Image URL',
39
+ name: 'imageUrl',
40
+ type: 'string',
41
+ default: '',
42
+ required: true,
43
+ description: 'URL of reference image with a human face (JPG/PNG, 300-4096px, aspect ratio 2:5 to 5:2, max 10MB)',
44
+ },
45
+ {
46
+ displayName: 'Expand Prompt',
47
+ name: 'expandPrompt',
48
+ type: 'boolean',
49
+ default: false,
50
+ description: 'Whether to expand the input prompt to add details',
51
+ },
52
+ {
53
+ displayName: 'Wait for Completion',
54
+ name: 'waitForCompletion',
55
+ type: 'boolean',
56
+ default: false,
57
+ description: 'Whether to wait for the video generation to complete',
58
+ },
59
+ {
60
+ displayName: 'Maximum Retries',
61
+ name: 'maxRetries',
62
+ type: 'number',
63
+ displayOptions: {
64
+ show: {
65
+ waitForCompletion: [true],
66
+ },
67
+ },
68
+ default: 20,
69
+ description: 'Maximum number of times to check task status',
70
+ },
71
+ {
72
+ displayName: 'Retry Interval (ms)',
73
+ name: 'retryInterval',
74
+ type: 'number',
75
+ displayOptions: {
76
+ show: {
77
+ waitForCompletion: [true],
78
+ },
79
+ },
80
+ default: 3000,
81
+ description: 'Time to wait between status checks in milliseconds',
82
+ },
83
+ ],
84
+ };
85
+ }
86
+ async execute() {
87
+ const items = this.getInputData();
88
+ const returnData = [];
89
+ for (let i = 0; i < items.length; i++) {
90
+ try {
91
+ const prompt = this.getNodeParameter('prompt', i);
92
+ const imageUrl = this.getNodeParameter('imageUrl', i);
93
+ const expandPrompt = this.getNodeParameter('expandPrompt', i, false);
94
+ const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
95
+ const maxRetries = waitForCompletion ? this.getNodeParameter('maxRetries', i, 20) : 0;
96
+ const retryInterval = waitForCompletion ? this.getNodeParameter('retryInterval', i, 3000) : 0;
97
+ const parameters = {
98
+ prompt,
99
+ image_url: imageUrl,
100
+ model: 's2v-01',
101
+ expand_prompt: expandPrompt,
102
+ };
103
+ const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', {
104
+ model: 'hailuo',
105
+ task_type: 'video_generation',
106
+ input: parameters,
107
+ config: {
108
+ service_mode: 'public',
109
+ },
110
+ });
111
+ if (waitForCompletion) {
112
+ const taskId = response.data.task_id;
113
+ const taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId, maxRetries, retryInterval);
114
+ returnData.push({
115
+ json: taskData,
116
+ });
117
+ }
118
+ else {
119
+ returnData.push({
120
+ json: response.data,
121
+ });
122
+ }
123
+ }
124
+ catch (error) {
125
+ if (this.continueOnFail()) {
126
+ returnData.push({
127
+ json: {
128
+ error: error.message,
129
+ },
130
+ });
131
+ continue;
132
+ }
133
+ throw error;
134
+ }
135
+ }
136
+ return [returnData];
137
+ }
138
+ }
139
+ exports.HailuoSubjectVideo = HailuoSubjectVideo;
140
+ //# sourceMappingURL=HailuoSubjectVideo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HailuoSubjectVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAGjF,MAAa,kBAAkB;IAA/B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,E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ACJ,MAAM,EACN,cAAc,EACd;oBACI,KAAK,EAAE,QAAQ;oBACf,SAAS,EAAE,kBAAkB;oBAC7B,KAAK,EAAE,UAAU;oBACjB,MAAM,EAAE;wBACJ,YAAY,EAAE,QAAQ;qBACzB;iBACJ,CACJ,CAAC;gBAEF,IAAI,iBAAiB,EAAE,CAAC;oBAEpB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;oBACrC,MAAM,QAAQ,GAAG,MAAM,wCAAqB,CAAC,IAAI,CAC7C,IAAI,EACJ,MAAM,EACN,UAAU,EACV,aAAa,CAChB,CAAC;oBACF,UAAU,CAAC,IAAI,CAAC;wBACZ,IAAI,EAAE,QAAQ;qBACjB,CAAC,CAAC;gBACP,CAAC;qBAAM,CAAC;oBAEJ,UAAU,CAAC,IAAI,CAAC;wBACZ,IAAI,EAAE,QAAQ,CAAC,IAAI;qBACtB,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,UAAU,CAAC,IAAI,CAAC;wBACZ,IAAI,EAAE;4BACF,KAAK,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACJ,CAAC,CAAC;oBACH,SAAS;gBACb,CAAC;gBACD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AAtJD,gDAsJC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class HailuoTextToVideo implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HailuoTextToVideo = void 0;
4
+ const GenericFunctions_1 = require("../shared/GenericFunctions");
5
+ class HailuoTextToVideo {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'Hailuo Text to Video',
9
+ name: 'hailuoTextToVideo',
10
+ icon: 'file:../piapi.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ description: 'Generate video from text prompt using Hailuo API',
14
+ defaults: {
15
+ name: 'Hailuo Text to Video',
16
+ },
17
+ inputs: ["main"],
18
+ outputs: ["main"],
19
+ credentials: [
20
+ {
21
+ name: 'piAPIApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ {
27
+ displayName: 'Text Prompt',
28
+ name: 'prompt',
29
+ type: 'string',
30
+ typeOptions: {
31
+ rows: 4,
32
+ },
33
+ default: '',
34
+ required: true,
35
+ description: 'Text prompt for video generation (max 2000 characters)',
36
+ },
37
+ {
38
+ displayName: 'Model',
39
+ name: 'model',
40
+ type: 'options',
41
+ options: [
42
+ {
43
+ name: 'Text to Video (t2v-01)',
44
+ value: 't2v-01',
45
+ description: 'Standard text-to-video model',
46
+ },
47
+ {
48
+ name: 'Text to Video Director (t2v-01-director)',
49
+ value: 't2v-01-director',
50
+ description: 'Text-to-video with camera movement control. Use [Pan left], [Push in], etc. in your prompt',
51
+ },
52
+ ],
53
+ default: 't2v-01',
54
+ description: 'The model to use for text-to-video generation',
55
+ },
56
+ {
57
+ displayName: 'Expand Prompt',
58
+ name: 'expandPrompt',
59
+ type: 'boolean',
60
+ default: false,
61
+ description: 'Whether to expand the input prompt to add details',
62
+ },
63
+ {
64
+ displayName: 'Wait for Completion',
65
+ name: 'waitForCompletion',
66
+ type: 'boolean',
67
+ default: false,
68
+ description: 'Whether to wait for the video generation to complete',
69
+ },
70
+ {
71
+ displayName: 'Maximum Retries',
72
+ name: 'maxRetries',
73
+ type: 'number',
74
+ displayOptions: {
75
+ show: {
76
+ waitForCompletion: [true],
77
+ },
78
+ },
79
+ default: 20,
80
+ description: 'Maximum number of times to check task status',
81
+ },
82
+ {
83
+ displayName: 'Retry Interval (ms)',
84
+ name: 'retryInterval',
85
+ type: 'number',
86
+ displayOptions: {
87
+ show: {
88
+ waitForCompletion: [true],
89
+ },
90
+ },
91
+ default: 3000,
92
+ description: 'Time to wait between status checks in milliseconds',
93
+ },
94
+ ],
95
+ };
96
+ }
97
+ async execute() {
98
+ const items = this.getInputData();
99
+ const returnData = [];
100
+ for (let i = 0; i < items.length; i++) {
101
+ try {
102
+ const prompt = this.getNodeParameter('prompt', i);
103
+ const model = this.getNodeParameter('model', i);
104
+ const expandPrompt = this.getNodeParameter('expandPrompt', i, false);
105
+ const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
106
+ const maxRetries = waitForCompletion ? this.getNodeParameter('maxRetries', i, 20) : 0;
107
+ const retryInterval = waitForCompletion ? this.getNodeParameter('retryInterval', i, 3000) : 0;
108
+ const parameters = {
109
+ prompt,
110
+ model,
111
+ expand_prompt: expandPrompt,
112
+ };
113
+ const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', {
114
+ model: 'hailuo',
115
+ task_type: 'video_generation',
116
+ input: parameters,
117
+ config: {
118
+ service_mode: 'public',
119
+ },
120
+ });
121
+ if (waitForCompletion) {
122
+ const taskId = response.data.task_id;
123
+ const taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId, maxRetries, retryInterval);
124
+ returnData.push({
125
+ json: taskData,
126
+ });
127
+ }
128
+ else {
129
+ returnData.push({
130
+ json: response.data,
131
+ });
132
+ }
133
+ }
134
+ catch (error) {
135
+ if (this.continueOnFail()) {
136
+ returnData.push({
137
+ json: {
138
+ error: error.message,
139
+ },
140
+ });
141
+ continue;
142
+ }
143
+ throw error;
144
+ }
145
+ }
146
+ return [returnData];
147
+ }
148
+ }
149
+ exports.HailuoTextToVideo = HailuoTextToVideo;
150
+ //# sourceMappingURL=HailuoTextToVideo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HailuoTextToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/H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M,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AAhKD,8CAgKC"}
@@ -0,0 +1,4 @@
1
+ import { HailuoTextToVideo } from './HailuoTextToVideo.node';
2
+ import { HailuoImageToVideo } from './HailuoImageToVideo.node';
3
+ import { HailuoSubjectVideo } from './HailuoSubjectVideo.node';
4
+ export { HailuoTextToVideo, HailuoImageToVideo, HailuoSubjectVideo, };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HailuoSubjectVideo = exports.HailuoImageToVideo = exports.HailuoTextToVideo = void 0;
4
+ const HailuoTextToVideo_node_1 = require("./HailuoTextToVideo.node");
5
+ Object.defineProperty(exports, "HailuoTextToVideo", { enumerable: true, get: function () { return HailuoTextToVideo_node_1.HailuoTextToVideo; } });
6
+ const HailuoImageToVideo_node_1 = require("./HailuoImageToVideo.node");
7
+ Object.defineProperty(exports, "HailuoImageToVideo", { enumerable: true, get: function () { return HailuoImageToVideo_node_1.HailuoImageToVideo; } });
8
+ const HailuoSubjectVideo_node_1 = require("./HailuoSubjectVideo.node");
9
+ Object.defineProperty(exports, "HailuoSubjectVideo", { enumerable: true, get: function () { return HailuoSubjectVideo_node_1.HailuoSubjectVideo; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Hailuo/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAKzD,kGALK,0CAAiB,OAKL;AAJrB,uEAA+D;AAK3D,mGALK,4CAAkB,OAKL;AAJtB,uEAA+D;AAK3D,mGALK,4CAAkB,OAKL"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class HunyuanImageToVideo implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HunyuanImageToVideo = void 0;
4
+ const GenericFunctions_1 = require("../shared/GenericFunctions");
5
+ class HunyuanImageToVideo {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'PiAPI Hunyuan Image to Video',
9
+ name: 'hunyuanImageToVideo',
10
+ icon: 'file:../piapi.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ description: 'Generate videos from images using PiAPI Hunyuan',
14
+ defaults: {
15
+ name: 'Hunyuan Image to Video',
16
+ },
17
+ inputs: ["main"],
18
+ outputs: ["main"],
19
+ credentials: [
20
+ {
21
+ name: 'piAPIApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ {
27
+ displayName: 'Task Type',
28
+ name: 'taskType',
29
+ type: 'options',
30
+ options: [
31
+ {
32
+ name: 'Image to Video Concat',
33
+ value: 'img2video-concat',
34
+ description: 'Generate videos based on images for better movement (20 steps, 85 FPS)',
35
+ },
36
+ {
37
+ name: 'Image to Video Replace',
38
+ value: 'img2video-replace',
39
+ description: 'Generate videos following the guiding image better (20 steps, 85 FPS)',
40
+ },
41
+ ],
42
+ default: 'img2video-concat',
43
+ description: 'Type of image-to-video transformation',
44
+ },
45
+ {
46
+ displayName: 'Prompt',
47
+ name: 'prompt',
48
+ type: 'string',
49
+ typeOptions: {
50
+ rows: 4,
51
+ },
52
+ default: '',
53
+ required: true,
54
+ description: 'Text prompt to guide the video generation',
55
+ },
56
+ {
57
+ displayName: 'Image Source',
58
+ name: 'imageSource',
59
+ type: 'options',
60
+ options: [
61
+ {
62
+ name: 'URL',
63
+ value: 'url',
64
+ description: 'Load image from URL',
65
+ },
66
+ {
67
+ name: 'Binary Data',
68
+ value: 'binaryData',
69
+ description: 'Use image from binary field',
70
+ },
71
+ ],
72
+ default: 'url',
73
+ description: 'Where to get the image from',
74
+ },
75
+ {
76
+ displayName: 'Image URL',
77
+ name: 'imageUrl',
78
+ type: 'string',
79
+ default: '',
80
+ required: true,
81
+ displayOptions: {
82
+ show: {
83
+ imageSource: ['url'],
84
+ },
85
+ },
86
+ description: 'URL of the image to transform into a video',
87
+ },
88
+ {
89
+ displayName: 'Binary Property',
90
+ name: 'binaryPropertyName',
91
+ type: 'string',
92
+ default: 'data',
93
+ required: true,
94
+ displayOptions: {
95
+ show: {
96
+ imageSource: ['binaryData'],
97
+ },
98
+ },
99
+ description: 'Name of the binary property containing the image',
100
+ },
101
+ {
102
+ displayName: 'Aspect Ratio',
103
+ name: 'aspectRatio',
104
+ type: 'options',
105
+ options: [
106
+ {
107
+ name: '16:9',
108
+ value: '16:9',
109
+ description: 'Landscape (544x960)',
110
+ },
111
+ {
112
+ name: '9:16',
113
+ value: '9:16',
114
+ description: 'Portrait (960x544)',
115
+ },
116
+ {
117
+ name: '1:1',
118
+ value: '1:1',
119
+ description: 'Square (720x720)',
120
+ },
121
+ ],
122
+ default: '16:9',
123
+ description: 'Aspect ratio of the generated video',
124
+ },
125
+ {
126
+ displayName: 'Wait for Completion',
127
+ name: 'waitForCompletion',
128
+ type: 'boolean',
129
+ default: false,
130
+ description: 'Whether to wait for the task to complete before returning',
131
+ },
132
+ ],
133
+ };
134
+ }
135
+ async execute() {
136
+ var _a;
137
+ const items = this.getInputData();
138
+ const returnData = [];
139
+ for (let i = 0; i < items.length; i++) {
140
+ const taskType = this.getNodeParameter('taskType', i);
141
+ const prompt = this.getNodeParameter('prompt', i);
142
+ const imageSource = this.getNodeParameter('imageSource', i);
143
+ const aspectRatio = this.getNodeParameter('aspectRatio', i);
144
+ const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
145
+ let imageBase64 = '';
146
+ if (imageSource === 'url') {
147
+ const imageUrl = this.getNodeParameter('imageUrl', i);
148
+ try {
149
+ new URL(imageUrl);
150
+ try {
151
+ const imageResponse = await this.helpers.request({
152
+ method: 'GET',
153
+ url: imageUrl,
154
+ encoding: null,
155
+ resolveWithFullResponse: true,
156
+ });
157
+ const buffer = Buffer.from(imageResponse.body);
158
+ const contentType = imageResponse.headers['content-type'] || 'image/png';
159
+ imageBase64 = `data:${contentType};base64,${buffer.toString('base64')}`;
160
+ }
161
+ catch (error) {
162
+ throw new Error(`Failed to download image from URL: ${error.message}`);
163
+ }
164
+ }
165
+ catch (error) {
166
+ throw new Error(`Invalid image URL: ${error.message}`);
167
+ }
168
+ }
169
+ else if (imageSource === 'binaryData') {
170
+ const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
171
+ const binaryItem = (_a = items[i].binary) === null || _a === void 0 ? void 0 : _a[binaryPropertyName];
172
+ if (!binaryItem) {
173
+ throw new Error(`No binary data found in property ${binaryPropertyName}`);
174
+ }
175
+ const binaryData = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
176
+ if (!binaryData) {
177
+ throw new Error(`No binary data found in property ${binaryPropertyName}`);
178
+ }
179
+ const binaryMimeType = binaryItem.mimeType || 'image/png';
180
+ imageBase64 = `data:${binaryMimeType};base64,${binaryData.toString('base64')}`;
181
+ }
182
+ const body = {
183
+ model: 'Qubico/hunyuan',
184
+ task_type: taskType,
185
+ input: {
186
+ prompt,
187
+ image: imageBase64,
188
+ aspect_ratio: aspectRatio,
189
+ },
190
+ config: {
191
+ webhook_config: {
192
+ endpoint: '',
193
+ secret: '',
194
+ },
195
+ },
196
+ };
197
+ try {
198
+ const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
199
+ if (response.code !== 200) {
200
+ throw new Error(`API Error: ${response.message}`);
201
+ }
202
+ const taskId = response.data.task_id;
203
+ let taskData = response.data;
204
+ if (waitForCompletion) {
205
+ taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId);
206
+ }
207
+ returnData.push({
208
+ json: taskData,
209
+ });
210
+ }
211
+ catch (error) {
212
+ if (this.continueOnFail()) {
213
+ returnData.push({
214
+ json: {
215
+ error: error.message,
216
+ },
217
+ });
218
+ continue;
219
+ }
220
+ throw error;
221
+ }
222
+ }
223
+ return [returnData];
224
+ }
225
+ }
226
+ exports.HunyuanImageToVideo = HunyuanImageToVideo;
227
+ //# sourceMappingURL=HunyuanImageToVideo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HunyuanImageToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,mBAAmB;IAAhC;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE;gBACN,IAAI,EAAE,wBAAwB;aACjC;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACL;4BACI,IAAI,EAAE,uBAAuB;4BAC7B,KAAK,EAAE,kBAAkB;4BACzB,WAAW,EAAE,wEAAwE;yBACxF;wBACD;4BACI,IAAI,EAAE,wBAAwB;4BAC9B,KAAK,EAAE,mBAAmB;4BAC1B,WAAW,EAAE,uEAAuE;yBACvF;qBACJ;oBACD,OAAO,EAAE,kBAAkB;oBAC3B,WAAW,EAAE,uCAAuC;iBACvD;gBACD;oBACI,WAAW,EAAE,QAAQ;oBACrB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACT,IAAI,EAAE,CAAC;qBACV;oBACD,OAAO,EAAE,E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,CAAC,CAAC;oBACH,SAAS;gBACb,CAAC;gBACD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AA7OD,kDA6OC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class HunyuanTextToVideo implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }