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.
- package/LICENSE.md +19 -0
- package/README.md +41 -0
- package/dist/credentials/PiAPI.credentials.d.ts +8 -0
- package/dist/credentials/PiAPI.credentials.js +46 -0
- package/dist/credentials/PiAPI.credentials.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js +237 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js +270 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js +186 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js +359 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js.map +1 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js +398 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js +190 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js +140 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js +150 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/index.d.ts +4 -0
- package/dist/nodes/PiAPI/Hailuo/index.js +10 -0
- package/dist/nodes/PiAPI/Hailuo/index.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js +227 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js +142 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/index.d.ts +3 -0
- package/dist/nodes/PiAPI/Hunyuan/index.js +8 -0
- package/dist/nodes/PiAPI/Hunyuan/index.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.js +175 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js +411 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.d.ts +13 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js +276 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js +206 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js +426 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js +93 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js +242 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -0
- package/dist/nodes/PiAPI/Skyreels/index.js +6 -0
- package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.d.ts +5 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js +125 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js.map +1 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js +262 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js.map +1 -0
- package/dist/nodes/PiAPI/Trellis/index.d.ts +2 -0
- package/dist/nodes/PiAPI/Trellis/index.js +6 -0
- package/dist/nodes/PiAPI/Trellis/index.js.map +1 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js +227 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js +129 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/piapi.svg +5 -0
- package/dist/nodes/PiAPI/shared/Constants.d.ts +30 -0
- package/dist/nodes/PiAPI/shared/Constants.js +262 -0
- package/dist/nodes/PiAPI/shared/Constants.js.map +1 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.d.ts +3 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.js +43 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.js.map +1 -0
- package/dist/nodes/PiAPI/shared/Interfaces.d.ts +102 -0
- package/dist/nodes/PiAPI/shared/Interfaces.js +3 -0
- package/dist/nodes/PiAPI/shared/Interfaces.js.map +1 -0
- package/dist/package.json +95 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +6 -0
- package/package.json +95 -0
@@ -0,0 +1,276 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.KlingLipSync = void 0;
|
4
|
+
exports.loadTtsVoices = loadTtsVoices;
|
5
|
+
exports.loadTtsEmotions = loadTtsEmotions;
|
6
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
7
|
+
const VOICE_EMOTIONS_MAP = {
|
8
|
+
"Rock": {
|
9
|
+
name: "Rock",
|
10
|
+
emotions: ["Happy", "Sad", "Angry", "Neutral"]
|
11
|
+
},
|
12
|
+
"Funny": {
|
13
|
+
name: "Funny",
|
14
|
+
emotions: ["Happy", "Excited", "Neutral"]
|
15
|
+
},
|
16
|
+
"Gentle": {
|
17
|
+
name: "Gentle",
|
18
|
+
emotions: ["Calm", "Sad", "Neutral"]
|
19
|
+
},
|
20
|
+
};
|
21
|
+
async function loadTtsVoices() {
|
22
|
+
try {
|
23
|
+
const response = await this.helpers.request({
|
24
|
+
method: 'GET',
|
25
|
+
url: 'https://klingai.com/api/lip/sync/ttsList?type=',
|
26
|
+
json: true,
|
27
|
+
});
|
28
|
+
if (!response || !Array.isArray(response)) {
|
29
|
+
return Object.keys(VOICE_EMOTIONS_MAP).map(voice => ({
|
30
|
+
name: voice,
|
31
|
+
value: voice,
|
32
|
+
}));
|
33
|
+
}
|
34
|
+
return response.map((voice) => ({
|
35
|
+
name: voice,
|
36
|
+
value: voice,
|
37
|
+
}));
|
38
|
+
}
|
39
|
+
catch (error) {
|
40
|
+
return Object.keys(VOICE_EMOTIONS_MAP).map(voice => ({
|
41
|
+
name: voice,
|
42
|
+
value: voice,
|
43
|
+
}));
|
44
|
+
}
|
45
|
+
}
|
46
|
+
async function loadTtsEmotions() {
|
47
|
+
const currentVoice = this.getCurrentNodeParameter('ttsVoice');
|
48
|
+
if (!currentVoice || !VOICE_EMOTIONS_MAP[currentVoice]) {
|
49
|
+
return [{ name: 'Neutral', value: 'Neutral' }];
|
50
|
+
}
|
51
|
+
const emotions = VOICE_EMOTIONS_MAP[currentVoice].emotions;
|
52
|
+
return emotions.map(emotion => ({
|
53
|
+
name: emotion,
|
54
|
+
value: emotion
|
55
|
+
}));
|
56
|
+
}
|
57
|
+
class KlingLipSync {
|
58
|
+
constructor() {
|
59
|
+
this.methods = {
|
60
|
+
loadOptions: {
|
61
|
+
loadTtsVoices,
|
62
|
+
loadTtsEmotions,
|
63
|
+
},
|
64
|
+
};
|
65
|
+
this.description = {
|
66
|
+
displayName: 'PiAPI Kling Lip Sync',
|
67
|
+
name: 'klingLipSync',
|
68
|
+
icon: 'file:../piapi.svg',
|
69
|
+
group: ['transform'],
|
70
|
+
version: 1,
|
71
|
+
description: 'Apply lip sync to a Kling video with text-to-speech or audio',
|
72
|
+
defaults: {
|
73
|
+
name: 'Kling Lip Sync',
|
74
|
+
},
|
75
|
+
inputs: ["main"],
|
76
|
+
outputs: ["main"],
|
77
|
+
credentials: [
|
78
|
+
{
|
79
|
+
name: 'piAPIApi',
|
80
|
+
required: true,
|
81
|
+
},
|
82
|
+
],
|
83
|
+
properties: [
|
84
|
+
{
|
85
|
+
displayName: 'Original Task ID',
|
86
|
+
name: 'originTaskId',
|
87
|
+
type: 'string',
|
88
|
+
default: '',
|
89
|
+
required: true,
|
90
|
+
description: 'The task ID of the original Kling video',
|
91
|
+
},
|
92
|
+
{
|
93
|
+
displayName: 'Audio Source',
|
94
|
+
name: 'audioSource',
|
95
|
+
type: 'options',
|
96
|
+
options: [
|
97
|
+
{
|
98
|
+
name: 'Text-to-Speech',
|
99
|
+
value: 'tts',
|
100
|
+
description: 'Generate audio from text using TTS',
|
101
|
+
},
|
102
|
+
{
|
103
|
+
name: 'Audio URL',
|
104
|
+
value: 'audioUrl',
|
105
|
+
description: 'Use existing audio file from URL',
|
106
|
+
},
|
107
|
+
],
|
108
|
+
default: 'tts',
|
109
|
+
description: 'Source of audio for lip syncing',
|
110
|
+
},
|
111
|
+
{
|
112
|
+
displayName: 'TTS Text',
|
113
|
+
name: 'ttsText',
|
114
|
+
type: 'string',
|
115
|
+
typeOptions: {
|
116
|
+
rows: 4,
|
117
|
+
},
|
118
|
+
default: '',
|
119
|
+
required: true,
|
120
|
+
displayOptions: {
|
121
|
+
show: {
|
122
|
+
audioSource: ['tts'],
|
123
|
+
},
|
124
|
+
},
|
125
|
+
description: 'Text to convert to speech',
|
126
|
+
},
|
127
|
+
{
|
128
|
+
displayName: 'Voice',
|
129
|
+
name: 'ttsVoice',
|
130
|
+
type: 'options',
|
131
|
+
typeOptions: {
|
132
|
+
loadOptionsMethod: 'loadTtsVoices',
|
133
|
+
},
|
134
|
+
default: 'Rock',
|
135
|
+
required: true,
|
136
|
+
displayOptions: {
|
137
|
+
show: {
|
138
|
+
audioSource: ['tts'],
|
139
|
+
},
|
140
|
+
},
|
141
|
+
description: 'Voice to use for text-to-speech',
|
142
|
+
},
|
143
|
+
{
|
144
|
+
displayName: 'Emotion',
|
145
|
+
name: 'ttsEmotion',
|
146
|
+
type: 'options',
|
147
|
+
typeOptions: {
|
148
|
+
loadOptionsMethod: 'loadTtsEmotions',
|
149
|
+
},
|
150
|
+
default: 'Neutral',
|
151
|
+
required: false,
|
152
|
+
displayOptions: {
|
153
|
+
show: {
|
154
|
+
audioSource: ['tts'],
|
155
|
+
},
|
156
|
+
},
|
157
|
+
description: 'Emotional style for the selected voice',
|
158
|
+
},
|
159
|
+
{
|
160
|
+
displayName: 'Speech Speed',
|
161
|
+
name: 'ttsSpeed',
|
162
|
+
type: 'number',
|
163
|
+
typeOptions: {
|
164
|
+
minValue: 0.8,
|
165
|
+
maxValue: 2,
|
166
|
+
numberPrecision: 1,
|
167
|
+
},
|
168
|
+
default: 1,
|
169
|
+
displayOptions: {
|
170
|
+
show: {
|
171
|
+
audioSource: ['tts'],
|
172
|
+
},
|
173
|
+
},
|
174
|
+
description: 'Speed of the speech (0.8-2)',
|
175
|
+
},
|
176
|
+
{
|
177
|
+
displayName: 'Audio URL',
|
178
|
+
name: 'audioUrl',
|
179
|
+
type: 'string',
|
180
|
+
default: '',
|
181
|
+
required: true,
|
182
|
+
displayOptions: {
|
183
|
+
show: {
|
184
|
+
audioSource: ['audioUrl'],
|
185
|
+
},
|
186
|
+
},
|
187
|
+
description: 'URL to your audio file (mp3, wav, flac, ogg)',
|
188
|
+
},
|
189
|
+
{
|
190
|
+
displayName: 'Wait for Completion',
|
191
|
+
name: 'waitForCompletion',
|
192
|
+
type: 'boolean',
|
193
|
+
default: false,
|
194
|
+
description: 'Whether to wait for the task to complete before returning',
|
195
|
+
},
|
196
|
+
],
|
197
|
+
};
|
198
|
+
}
|
199
|
+
async execute() {
|
200
|
+
const items = this.getInputData();
|
201
|
+
const returnData = [];
|
202
|
+
for (let i = 0; i < items.length; i++) {
|
203
|
+
try {
|
204
|
+
const originTaskId = this.getNodeParameter('originTaskId', i);
|
205
|
+
const audioSource = this.getNodeParameter('audioSource', i);
|
206
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, false);
|
207
|
+
const body = {
|
208
|
+
model: 'kling',
|
209
|
+
task_type: 'lip_sync',
|
210
|
+
input: {
|
211
|
+
origin_task_id: originTaskId,
|
212
|
+
},
|
213
|
+
config: {
|
214
|
+
webhook_config: {
|
215
|
+
endpoint: '',
|
216
|
+
secret: '',
|
217
|
+
},
|
218
|
+
},
|
219
|
+
};
|
220
|
+
if (audioSource === 'tts') {
|
221
|
+
const ttsText = this.getNodeParameter('ttsText', i);
|
222
|
+
const ttsVoice = this.getNodeParameter('ttsVoice', i);
|
223
|
+
const ttsEmotion = this.getNodeParameter('ttsEmotion', i, 'Neutral');
|
224
|
+
const ttsSpeed = this.getNodeParameter('ttsSpeed', i);
|
225
|
+
let voiceWithEmotion = ttsVoice;
|
226
|
+
if (ttsEmotion && ttsEmotion !== 'Neutral') {
|
227
|
+
voiceWithEmotion = `${ttsVoice}-${ttsEmotion}`;
|
228
|
+
}
|
229
|
+
body.input.tts_text = ttsText;
|
230
|
+
body.input.tts_timbre = voiceWithEmotion;
|
231
|
+
body.input.tts_speed = ttsSpeed;
|
232
|
+
body.input.local_dubbing_url = '';
|
233
|
+
}
|
234
|
+
else {
|
235
|
+
const audioUrl = this.getNodeParameter('audioUrl', i);
|
236
|
+
try {
|
237
|
+
new URL(audioUrl);
|
238
|
+
}
|
239
|
+
catch (error) {
|
240
|
+
throw new Error(`Invalid audio URL: ${error.message}`);
|
241
|
+
}
|
242
|
+
body.input.tts_text = '';
|
243
|
+
body.input.tts_timbre = '';
|
244
|
+
body.input.tts_speed = 1;
|
245
|
+
body.input.local_dubbing_url = audioUrl;
|
246
|
+
}
|
247
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
248
|
+
if (response.code !== 200) {
|
249
|
+
throw new Error(`API Error: ${response.message}`);
|
250
|
+
}
|
251
|
+
const taskId = response.data.task_id;
|
252
|
+
let taskData = response.data;
|
253
|
+
if (waitForCompletion) {
|
254
|
+
taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId);
|
255
|
+
}
|
256
|
+
returnData.push({
|
257
|
+
json: taskData,
|
258
|
+
});
|
259
|
+
}
|
260
|
+
catch (error) {
|
261
|
+
if (this.continueOnFail()) {
|
262
|
+
returnData.push({
|
263
|
+
json: {
|
264
|
+
error: error.message,
|
265
|
+
},
|
266
|
+
});
|
267
|
+
continue;
|
268
|
+
}
|
269
|
+
throw error;
|
270
|
+
}
|
271
|
+
}
|
272
|
+
return [returnData];
|
273
|
+
}
|
274
|
+
}
|
275
|
+
exports.KlingLipSync = KlingLipSync;
|
276
|
+
//# sourceMappingURL=KlingLipSync.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"KlingLipSync.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Kling/KlingLipSync.node.ts"],"names":[],"mappings":";;;AAoCA,sCA4BC;AAGD,0CAYC;AArED,iEAAiF;AASjF,MAAM,kBAAkB,GAAiC;IACrD,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;KACjD;IACD,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;KAC5C;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC;KACvC;CAEJ,CAAC;AAGK,KAAK,UAAU,aAAa;IAC/B,IAAI,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACxC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,gDAAgD;YACrD,IAAI,EAAE,IAAI;SACb,CAAC,CAAC;QA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AQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBACrC,IAAI,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;gBAG7B,IAAI,iBAAiB,EAAE,CAAC;oBACpB,QAAQ,GAAG,MAAM,wCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBAC9D,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,QAAQ;iBACjB,CAAC,CAAC;YACP,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;AAxOD,oCAwOC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class KlingTextToVideo implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,206 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.KlingTextToVideo = void 0;
|
4
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
5
|
+
class KlingTextToVideo {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'PiAPI Kling Text to Video',
|
9
|
+
name: 'klingTextToVideo',
|
10
|
+
icon: 'file:../piapi.svg',
|
11
|
+
group: ['transform'],
|
12
|
+
version: 1,
|
13
|
+
description: 'Generate videos from text using PiAPI Kling',
|
14
|
+
defaults: {
|
15
|
+
name: 'Kling 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: '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',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
displayName: 'Negative Prompt',
|
39
|
+
name: 'negativePrompt',
|
40
|
+
type: 'string',
|
41
|
+
typeOptions: {
|
42
|
+
rows: 4,
|
43
|
+
},
|
44
|
+
default: '',
|
45
|
+
description: 'Negative prompt to avoid certain elements in the video',
|
46
|
+
},
|
47
|
+
{
|
48
|
+
displayName: 'Duration',
|
49
|
+
name: 'duration',
|
50
|
+
type: 'options',
|
51
|
+
options: [
|
52
|
+
{
|
53
|
+
name: '5 Seconds',
|
54
|
+
value: 5,
|
55
|
+
},
|
56
|
+
{
|
57
|
+
name: '10 Seconds',
|
58
|
+
value: 10,
|
59
|
+
},
|
60
|
+
],
|
61
|
+
default: 5,
|
62
|
+
description: 'Duration of the generated video',
|
63
|
+
},
|
64
|
+
{
|
65
|
+
displayName: 'Aspect Ratio',
|
66
|
+
name: 'aspectRatio',
|
67
|
+
type: 'options',
|
68
|
+
options: [
|
69
|
+
{
|
70
|
+
name: 'Landscape (16:9)',
|
71
|
+
value: '16:9',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
name: 'Portrait (9:16)',
|
75
|
+
value: '9:16',
|
76
|
+
},
|
77
|
+
{
|
78
|
+
name: 'Square (1:1)',
|
79
|
+
value: '1:1',
|
80
|
+
},
|
81
|
+
],
|
82
|
+
default: '16:9',
|
83
|
+
description: 'Aspect ratio of the generated video',
|
84
|
+
},
|
85
|
+
{
|
86
|
+
displayName: 'Mode',
|
87
|
+
name: 'mode',
|
88
|
+
type: 'options',
|
89
|
+
options: [
|
90
|
+
{
|
91
|
+
name: 'Standard',
|
92
|
+
value: 'std',
|
93
|
+
},
|
94
|
+
{
|
95
|
+
name: 'Professional',
|
96
|
+
value: 'pro',
|
97
|
+
},
|
98
|
+
],
|
99
|
+
default: 'std',
|
100
|
+
description: 'Generation mode of the video',
|
101
|
+
},
|
102
|
+
{
|
103
|
+
displayName: 'Version',
|
104
|
+
name: 'version',
|
105
|
+
type: 'options',
|
106
|
+
options: [
|
107
|
+
{
|
108
|
+
name: 'V1.0',
|
109
|
+
value: '1.0',
|
110
|
+
},
|
111
|
+
{
|
112
|
+
name: 'V1.5',
|
113
|
+
value: '1.5',
|
114
|
+
},
|
115
|
+
{
|
116
|
+
name: 'V1.6',
|
117
|
+
value: '1.6',
|
118
|
+
},
|
119
|
+
],
|
120
|
+
default: '1.6',
|
121
|
+
description: 'Model version to use',
|
122
|
+
},
|
123
|
+
{
|
124
|
+
displayName: 'CFG Scale',
|
125
|
+
name: 'cfgScale',
|
126
|
+
type: 'number',
|
127
|
+
typeOptions: {
|
128
|
+
minValue: 0,
|
129
|
+
maxValue: 1,
|
130
|
+
numberPrecision: 2,
|
131
|
+
},
|
132
|
+
default: 0.5,
|
133
|
+
description: 'How strongly the video adheres to the prompt (between 0-1, recommended: 0.5)',
|
134
|
+
},
|
135
|
+
{
|
136
|
+
displayName: 'Wait for Completion',
|
137
|
+
name: 'waitForCompletion',
|
138
|
+
type: 'boolean',
|
139
|
+
default: false,
|
140
|
+
description: 'Whether to wait for the task to complete before returning',
|
141
|
+
},
|
142
|
+
],
|
143
|
+
};
|
144
|
+
}
|
145
|
+
async execute() {
|
146
|
+
const items = this.getInputData();
|
147
|
+
const returnData = [];
|
148
|
+
for (let i = 0; i < items.length; i++) {
|
149
|
+
const prompt = this.getNodeParameter('prompt', i);
|
150
|
+
const negativePrompt = this.getNodeParameter('negativePrompt', i, '');
|
151
|
+
const duration = this.getNodeParameter('duration', i);
|
152
|
+
const aspectRatio = this.getNodeParameter('aspectRatio', i);
|
153
|
+
const mode = this.getNodeParameter('mode', i);
|
154
|
+
const version = this.getNodeParameter('version', i);
|
155
|
+
const cfgScale = this.getNodeParameter('cfgScale', i);
|
156
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, false);
|
157
|
+
const body = {
|
158
|
+
model: 'kling',
|
159
|
+
task_type: 'video_generation',
|
160
|
+
input: {
|
161
|
+
prompt,
|
162
|
+
negative_prompt: negativePrompt,
|
163
|
+
duration,
|
164
|
+
aspect_ratio: aspectRatio,
|
165
|
+
mode,
|
166
|
+
version,
|
167
|
+
cfg_scale: cfgScale,
|
168
|
+
},
|
169
|
+
config: {
|
170
|
+
webhook_config: {
|
171
|
+
endpoint: '',
|
172
|
+
secret: '',
|
173
|
+
},
|
174
|
+
},
|
175
|
+
};
|
176
|
+
try {
|
177
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
178
|
+
if (response.code !== 200) {
|
179
|
+
throw new Error(`API Error: ${response.message}`);
|
180
|
+
}
|
181
|
+
const taskId = response.data.task_id;
|
182
|
+
let taskData = response.data;
|
183
|
+
if (waitForCompletion) {
|
184
|
+
taskData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId);
|
185
|
+
}
|
186
|
+
returnData.push({
|
187
|
+
json: taskData,
|
188
|
+
});
|
189
|
+
}
|
190
|
+
catch (error) {
|
191
|
+
if (this.continueOnFail()) {
|
192
|
+
returnData.push({
|
193
|
+
json: {
|
194
|
+
error: error.message,
|
195
|
+
},
|
196
|
+
});
|
197
|
+
continue;
|
198
|
+
}
|
199
|
+
throw error;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
return [returnData];
|
203
|
+
}
|
204
|
+
}
|
205
|
+
exports.KlingTextToVideo = KlingTextToVideo;
|
206
|
+
//# sourceMappingURL=KlingTextToVideo.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"KlingTextToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Kling/KlingTextToVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,gBAAgB;IAA7B;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE;gBACN,IAAI,EAAE,qBAAqB;aAC9B;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,QAAQ;oBACrB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACT,IAAI,EAAE,CAAC;qBACV;oBACD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,kCAAkC;iBAClD;gBACD;oBACI,WAAW,EAAE,iBAAiB;oBAC9B,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACT,IAAI,EAAE,CAAC;qBACV;oBACD,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,wDAAwD;iBACxE;gBACD;oBACI,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACL;4BACI,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,CAAC;yBACX;wBACD;4BACI,IAAI,EAAE,YAAY;4BAClB,KAAK,EAAE,EAAE;yBACZ;qBACJ;oBACD,OAAO,EA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