n8n-nodes-piapi 0.1.2 → 0.1.3
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/README.md +7 -0
- package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.js +259 -0
- package/dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.js.map +1 -0
- package/dist/nodes/PiAPI/{Skyreels/SkytreelsImageToVideo.node.d.ts → Faceswap/FaceswapImageToImage.node.d.ts} +1 -1
- package/dist/nodes/PiAPI/Faceswap/FaceswapImageToImage.node.js +278 -0
- package/dist/nodes/PiAPI/Faceswap/FaceswapImageToImage.node.js.map +1 -0
- package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.js +297 -0
- package/dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/FileUpload/FileUpload.node.d.ts +5 -0
- package/dist/nodes/PiAPI/FileUpload/FileUpload.node.js +215 -0
- package/dist/nodes/PiAPI/FileUpload/FileUpload.node.js.map +1 -0
- package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.d.ts +5 -0
- package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.js +209 -0
- package/dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.js.map +1 -0
- package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.d.ts +5 -0
- package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.js +241 -0
- package/dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.js.map +1 -0
- package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.js +426 -0
- package/dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.js.map +1 -0
- package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.js +243 -0
- package/dist/nodes/PiAPI/Qubico/QubicoSegment.node.js.map +1 -0
- package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.d.ts +5 -0
- package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.js +188 -0
- package/dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.js +335 -0
- package/dist/nodes/PiAPI/Skyreels/PiAPISkyreels.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/SkyreelsImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Skyreels/{SkytreelsImageToVideo.node.js → SkyreelsImageToVideo.node.js} +4 -4
- package/dist/nodes/PiAPI/Skyreels/SkyreelsImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -2
- package/dist/nodes/PiAPI/Skyreels/index.js +3 -3
- package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -1
- package/dist/nodes/PiAPI/TTS/TextToSpeech.node.d.ts +5 -0
- package/dist/nodes/PiAPI/TTS/TextToSpeech.node.js +214 -0
- package/dist/nodes/PiAPI/TTS/TextToSpeech.node.js.map +1 -0
- package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.d.ts +5 -0
- package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.js +194 -0
- package/dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.js.map +1 -0
- package/dist/nodes/PiAPI/shared/Interfaces.d.ts +179 -5
- package/dist/package.json +14 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -3
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +0 -1
@@ -0,0 +1,194 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.VideoUpscale = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
6
|
+
class VideoUpscale {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: 'PiAPI Video Upscale',
|
10
|
+
name: 'videoUpscale',
|
11
|
+
icon: 'file:../piapi.svg',
|
12
|
+
group: ['transform'],
|
13
|
+
version: 1,
|
14
|
+
description: 'Enhance video resolution using PiAPI Video Upscale',
|
15
|
+
defaults: {
|
16
|
+
name: 'Video Upscale',
|
17
|
+
},
|
18
|
+
inputs: ["main"],
|
19
|
+
outputs: ["main"],
|
20
|
+
credentials: [
|
21
|
+
{
|
22
|
+
name: 'piAPIApi',
|
23
|
+
required: true,
|
24
|
+
},
|
25
|
+
],
|
26
|
+
properties: [
|
27
|
+
{
|
28
|
+
displayName: 'Video Input Method',
|
29
|
+
name: 'videoInputMethod',
|
30
|
+
type: 'options',
|
31
|
+
options: [
|
32
|
+
{
|
33
|
+
name: 'URL',
|
34
|
+
value: 'url',
|
35
|
+
},
|
36
|
+
{
|
37
|
+
name: 'Binary Data',
|
38
|
+
value: 'binaryData',
|
39
|
+
},
|
40
|
+
],
|
41
|
+
default: 'url',
|
42
|
+
description: 'Method to input the video data',
|
43
|
+
},
|
44
|
+
{
|
45
|
+
displayName: 'Video Binary Property',
|
46
|
+
name: 'videoBinaryPropertyName',
|
47
|
+
type: 'string',
|
48
|
+
default: 'data',
|
49
|
+
required: true,
|
50
|
+
displayOptions: {
|
51
|
+
show: {
|
52
|
+
videoInputMethod: ['binaryData'],
|
53
|
+
},
|
54
|
+
},
|
55
|
+
description: 'Name of the binary property containing the video data',
|
56
|
+
},
|
57
|
+
{
|
58
|
+
displayName: 'Video URL',
|
59
|
+
name: 'videoUrl',
|
60
|
+
type: 'string',
|
61
|
+
default: '',
|
62
|
+
required: true,
|
63
|
+
displayOptions: {
|
64
|
+
show: {
|
65
|
+
videoInputMethod: ['url'],
|
66
|
+
},
|
67
|
+
},
|
68
|
+
description: 'URL of the video to upscale (MP4 format only)',
|
69
|
+
},
|
70
|
+
{
|
71
|
+
displayName: 'Video Requirements',
|
72
|
+
name: 'videoRequirements',
|
73
|
+
type: 'notice',
|
74
|
+
default: 'The video must meet these requirements:\n- Maximum resolution: 720p (1280×720)\n- Frame count: Between 10 and 240 frames\n- File size: Maximum 10MB\n- Format: MP4 only\n- Service currently only supports 2x upscaling (doubles both width and height)',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
displayName: 'Pricing Information',
|
78
|
+
name: 'pricingInfo',
|
79
|
+
type: 'notice',
|
80
|
+
default: 'Cost: $0.0003 per frame processed\nExample: A 60-frame video will cost $0.018',
|
81
|
+
},
|
82
|
+
{
|
83
|
+
displayName: 'Wait For Completion',
|
84
|
+
name: 'waitForCompletion',
|
85
|
+
type: 'boolean',
|
86
|
+
default: false,
|
87
|
+
description: 'Whether to wait for the video upscaling process to complete before continuing',
|
88
|
+
},
|
89
|
+
{
|
90
|
+
displayName: 'Max Retries',
|
91
|
+
name: 'maxRetries',
|
92
|
+
type: 'number',
|
93
|
+
default: 30,
|
94
|
+
description: 'Maximum number of retries to check task status',
|
95
|
+
displayOptions: {
|
96
|
+
show: {
|
97
|
+
waitForCompletion: [true],
|
98
|
+
},
|
99
|
+
},
|
100
|
+
},
|
101
|
+
{
|
102
|
+
displayName: 'Retry Interval',
|
103
|
+
name: 'retryInterval',
|
104
|
+
type: 'number',
|
105
|
+
default: 5000,
|
106
|
+
description: 'Interval between retries in milliseconds',
|
107
|
+
displayOptions: {
|
108
|
+
show: {
|
109
|
+
waitForCompletion: [true],
|
110
|
+
},
|
111
|
+
},
|
112
|
+
},
|
113
|
+
],
|
114
|
+
};
|
115
|
+
}
|
116
|
+
async execute() {
|
117
|
+
var _a, _b;
|
118
|
+
const items = this.getInputData();
|
119
|
+
const returnData = [];
|
120
|
+
for (let i = 0; i < items.length; i++) {
|
121
|
+
try {
|
122
|
+
const videoInputMethod = this.getNodeParameter('videoInputMethod', i);
|
123
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, false);
|
124
|
+
let videoData;
|
125
|
+
if (videoInputMethod === 'url') {
|
126
|
+
videoData = this.getNodeParameter('videoUrl', i);
|
127
|
+
}
|
128
|
+
else {
|
129
|
+
const videoBinaryPropertyName = this.getNodeParameter('videoBinaryPropertyName', i);
|
130
|
+
const videoBinaryData = this.helpers.assertBinaryData(i, videoBinaryPropertyName);
|
131
|
+
if (videoBinaryData.mimeType && !videoBinaryData.mimeType.includes('video/mp4')) {
|
132
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The provided binary data is not an MP4 video', { itemIndex: i });
|
133
|
+
}
|
134
|
+
const base64String = Buffer.from(await this.helpers.getBinaryDataBuffer(i, videoBinaryPropertyName)).toString('base64');
|
135
|
+
videoData = `data:${videoBinaryData.mimeType};base64,${base64String}`;
|
136
|
+
}
|
137
|
+
const requestBody = {
|
138
|
+
model: 'Qubico/video-toolkit',
|
139
|
+
task_type: 'upscale',
|
140
|
+
input: {
|
141
|
+
video: videoData,
|
142
|
+
},
|
143
|
+
};
|
144
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', requestBody);
|
145
|
+
const taskId = (_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id;
|
146
|
+
if (!taskId) {
|
147
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Failed to get a valid task ID from the API');
|
148
|
+
}
|
149
|
+
let executionData;
|
150
|
+
if (waitForCompletion) {
|
151
|
+
const maxRetries = this.getNodeParameter('maxRetries', i, 30);
|
152
|
+
const retryInterval = this.getNodeParameter('retryInterval', i, 5000);
|
153
|
+
executionData = await GenericFunctions_1.waitForTaskCompletion.call(this, taskId, maxRetries, retryInterval);
|
154
|
+
}
|
155
|
+
else {
|
156
|
+
executionData = {
|
157
|
+
task_id: taskId,
|
158
|
+
status: ((_b = response.data) === null || _b === void 0 ? void 0 : _b.status) || 'pending',
|
159
|
+
};
|
160
|
+
}
|
161
|
+
returnData.push({
|
162
|
+
json: executionData,
|
163
|
+
});
|
164
|
+
}
|
165
|
+
catch (error) {
|
166
|
+
if (error.message && error.message.includes('failed to get valid video')) {
|
167
|
+
const errorMessage = 'The API could not process the provided video. Please ensure the video meets these requirements: maximum 720p resolution, 10-240 frames, maximum 10MB file size, and MP4 format.';
|
168
|
+
if (this.continueOnFail()) {
|
169
|
+
returnData.push({
|
170
|
+
json: {
|
171
|
+
error: errorMessage,
|
172
|
+
details: error.message,
|
173
|
+
},
|
174
|
+
});
|
175
|
+
continue;
|
176
|
+
}
|
177
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), errorMessage);
|
178
|
+
}
|
179
|
+
if (this.continueOnFail()) {
|
180
|
+
returnData.push({
|
181
|
+
json: {
|
182
|
+
error: error.message,
|
183
|
+
},
|
184
|
+
});
|
185
|
+
continue;
|
186
|
+
}
|
187
|
+
throw error;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
return [returnData];
|
191
|
+
}
|
192
|
+
}
|
193
|
+
exports.VideoUpscale = VideoUpscale;
|
194
|
+
//# sourceMappingURL=VideoUpscale.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"VideoUpscale.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/VideoUpscale/VideoUpscale.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAEtB,iEAAiF;AAGjF,MAAa,YAAY;IAAzB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,oDAAoD;YACjE,Q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;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AAlOD,oCAkOC"}
|
@@ -86,11 +86,15 @@ export interface HailuoSubjectVideoParams extends HailuoBaseParams {
|
|
86
86
|
image_url: string;
|
87
87
|
}
|
88
88
|
export interface SkyreelsImageToVideoParams {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
89
|
+
model: string;
|
90
|
+
task_type: string;
|
91
|
+
input: {
|
92
|
+
prompt: string;
|
93
|
+
negative_prompt?: string;
|
94
|
+
image: string;
|
95
|
+
aspect_ratio?: string;
|
96
|
+
guidance_scale?: number;
|
97
|
+
};
|
94
98
|
}
|
95
99
|
export interface Trellis3DModelParams {
|
96
100
|
image: string;
|
@@ -100,3 +104,173 @@ export interface Trellis3DModelParams {
|
|
100
104
|
ss_guidance_strength?: number;
|
101
105
|
slat_guidance_strength?: number;
|
102
106
|
}
|
107
|
+
export interface FaceswapImageParams {
|
108
|
+
model: string;
|
109
|
+
task_type: string;
|
110
|
+
input: {
|
111
|
+
target_image: string;
|
112
|
+
swap_image: string;
|
113
|
+
swap_faces_index?: string;
|
114
|
+
target_faces_index?: string;
|
115
|
+
};
|
116
|
+
}
|
117
|
+
export interface FaceswapVideoParams {
|
118
|
+
model: string;
|
119
|
+
task_type: string;
|
120
|
+
input: {
|
121
|
+
swap_image: string;
|
122
|
+
target_video: string;
|
123
|
+
swap_faces_index?: string;
|
124
|
+
target_faces_index?: string;
|
125
|
+
};
|
126
|
+
}
|
127
|
+
export interface MMAudioVideoToAudioParams {
|
128
|
+
model: string;
|
129
|
+
task_type: string;
|
130
|
+
input: {
|
131
|
+
prompt: string;
|
132
|
+
negative_prompt?: string;
|
133
|
+
video: string;
|
134
|
+
steps?: number;
|
135
|
+
seed?: number;
|
136
|
+
};
|
137
|
+
config: {
|
138
|
+
webhook_config?: {
|
139
|
+
endpoint?: string;
|
140
|
+
secret?: string;
|
141
|
+
};
|
142
|
+
};
|
143
|
+
}
|
144
|
+
export interface DiffRhythmAudioParams {
|
145
|
+
model: string;
|
146
|
+
task_type: string;
|
147
|
+
input: {
|
148
|
+
lyrics?: string;
|
149
|
+
style_prompt?: string;
|
150
|
+
style_audio?: string;
|
151
|
+
};
|
152
|
+
config: {
|
153
|
+
webhook_config?: {
|
154
|
+
endpoint?: string;
|
155
|
+
secret?: string;
|
156
|
+
};
|
157
|
+
};
|
158
|
+
}
|
159
|
+
export interface TTSParams {
|
160
|
+
model: string;
|
161
|
+
task_type: string;
|
162
|
+
input: {
|
163
|
+
gen_text: string;
|
164
|
+
ref_audio: string;
|
165
|
+
ref_text?: string;
|
166
|
+
};
|
167
|
+
config: {
|
168
|
+
service_mode: string;
|
169
|
+
webhook_config?: {
|
170
|
+
endpoint?: string;
|
171
|
+
secret?: string;
|
172
|
+
};
|
173
|
+
};
|
174
|
+
}
|
175
|
+
export interface MidjourneyImagineParams {
|
176
|
+
model: string;
|
177
|
+
task_type: string;
|
178
|
+
input: {
|
179
|
+
prompt: string;
|
180
|
+
aspect_ratio?: string;
|
181
|
+
process_mode?: string;
|
182
|
+
skip_prompt_check?: boolean;
|
183
|
+
};
|
184
|
+
config?: {
|
185
|
+
webhook_config?: {
|
186
|
+
endpoint?: string;
|
187
|
+
secret?: string;
|
188
|
+
};
|
189
|
+
service_mode?: string;
|
190
|
+
};
|
191
|
+
}
|
192
|
+
export interface MidjourneyUpscaleParams {
|
193
|
+
model: string;
|
194
|
+
task_type: string;
|
195
|
+
input: {
|
196
|
+
origin_task_id: string;
|
197
|
+
index: string;
|
198
|
+
};
|
199
|
+
config?: {
|
200
|
+
webhook_config?: {
|
201
|
+
endpoint?: string;
|
202
|
+
secret?: string;
|
203
|
+
};
|
204
|
+
service_mode?: string;
|
205
|
+
};
|
206
|
+
}
|
207
|
+
export interface MidjourneyDescribeParams {
|
208
|
+
model: string;
|
209
|
+
task_type: string;
|
210
|
+
input: {
|
211
|
+
image_url: string;
|
212
|
+
process_mode?: string;
|
213
|
+
bot_id?: number;
|
214
|
+
};
|
215
|
+
config?: {
|
216
|
+
webhook_config?: {
|
217
|
+
endpoint?: string;
|
218
|
+
secret?: string;
|
219
|
+
};
|
220
|
+
service_mode?: string;
|
221
|
+
};
|
222
|
+
}
|
223
|
+
export interface VideoUpscaleParams {
|
224
|
+
model: string;
|
225
|
+
task_type: string;
|
226
|
+
input: {
|
227
|
+
video: string;
|
228
|
+
};
|
229
|
+
config?: {
|
230
|
+
webhook_config?: {
|
231
|
+
endpoint?: string;
|
232
|
+
secret?: string;
|
233
|
+
};
|
234
|
+
};
|
235
|
+
}
|
236
|
+
export interface ImageUpscaleParams {
|
237
|
+
model: string;
|
238
|
+
task_type: string;
|
239
|
+
input: {
|
240
|
+
image: string;
|
241
|
+
scale?: number;
|
242
|
+
};
|
243
|
+
config?: {
|
244
|
+
webhook_config?: {
|
245
|
+
endpoint?: string;
|
246
|
+
secret?: string;
|
247
|
+
};
|
248
|
+
};
|
249
|
+
}
|
250
|
+
export interface RemoveBackgroundParams {
|
251
|
+
model: string;
|
252
|
+
task_type: string;
|
253
|
+
input: {
|
254
|
+
image: string;
|
255
|
+
};
|
256
|
+
config?: {
|
257
|
+
webhook_config?: {
|
258
|
+
endpoint?: string;
|
259
|
+
secret?: string;
|
260
|
+
};
|
261
|
+
};
|
262
|
+
}
|
263
|
+
export interface QubicoSegmentParams {
|
264
|
+
model: string;
|
265
|
+
task_type: string;
|
266
|
+
input: {
|
267
|
+
image: string;
|
268
|
+
prompt: string;
|
269
|
+
negative_prompt: string;
|
270
|
+
segment_factor: number;
|
271
|
+
};
|
272
|
+
}
|
273
|
+
export interface FileUploadParams {
|
274
|
+
file_name: string;
|
275
|
+
file_data: string;
|
276
|
+
}
|
package/dist/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "n8n-nodes-piapi",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.3",
|
4
4
|
"description": "PiAPI workflow nodes",
|
5
5
|
"keywords": [
|
6
6
|
"n8n-community-node-package",
|
@@ -67,8 +67,19 @@
|
|
67
67
|
"dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js",
|
68
68
|
"dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js",
|
69
69
|
"dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js",
|
70
|
-
"dist/nodes/PiAPI/Skyreels/
|
71
|
-
"dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js"
|
70
|
+
"dist/nodes/PiAPI/Skyreels/SkyreelsImageToVideo.node.js",
|
71
|
+
"dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js",
|
72
|
+
"dist/nodes/PiAPI/Faceswap/FaceswapImageToImage.node.js",
|
73
|
+
"dist/nodes/PiAPI/Faceswap/FaceswapVideoToVideo.node.js",
|
74
|
+
"dist/nodes/PiAPI/MMAudio/MMAudioVideoToAudio.node.js",
|
75
|
+
"dist/nodes/PiAPI/DiffRhythm/DiffRhythmAudioGeneration.node.js",
|
76
|
+
"dist/nodes/PiAPI/TTS/TextToSpeech.node.js",
|
77
|
+
"dist/nodes/PiAPI/Midjourney/PiAPIMidjourney.node.js",
|
78
|
+
"dist/nodes/PiAPI/VideoUpscale/VideoUpscale.node.js",
|
79
|
+
"dist/nodes/PiAPI/ImageUpscale/ImageUpscale.node.js",
|
80
|
+
"dist/nodes/PiAPI/RemoveBackground/RemoveBackground.node.js",
|
81
|
+
"dist/nodes/PiAPI/Qubico/QubicoSegment.node.js",
|
82
|
+
"dist/nodes/PiAPI/FileUpload/FileUpload.node.js"
|
72
83
|
]
|
73
84
|
},
|
74
85
|
"devDependencies": {
|