n8n-nodes-apexapi 0.1.7 → 0.1.8

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.
@@ -200,13 +200,28 @@ class ApexApi {
200
200
  description: 'Output resolution. Higher resolutions depend on the model (e.g. Seedance Fast tops out at 720p) — the API returns a clear error if unsupported.',
201
201
  },
202
202
  {
203
- displayName: 'Duration (Seconds)',
203
+ displayName: 'Duration',
204
204
  name: 'videoDuration',
205
+ type: 'options',
206
+ displayOptions: { show: { resource: ['video'], operation: ['generate'] } },
207
+ options: [
208
+ { name: '5 seconds', value: '5' },
209
+ { name: '10 seconds', value: '10' },
210
+ { name: 'Custom…', value: 'custom' },
211
+ ],
212
+ default: '5',
213
+ description: 'Clip length. Supported values depend on the model — the API validates and errors clearly if a model does not support the chosen length.',
214
+ },
215
+ {
216
+ displayName: 'Custom Duration (Seconds)',
217
+ name: 'videoDurationCustom',
205
218
  type: 'number',
206
219
  typeOptions: { minValue: 1, maxValue: 60 },
207
- displayOptions: { show: { resource: ['video'], operation: ['generate'] } },
220
+ displayOptions: {
221
+ show: { resource: ['video'], operation: ['generate'], videoDuration: ['custom'] },
222
+ },
208
223
  default: 5,
209
- description: 'Clip length in seconds. Supported values depend on the model (commonly 5 or 10) — the API validates.',
224
+ description: '1–60 seconds. The model/provider enforces its own supported values.',
210
225
  },
211
226
  {
212
227
  displayName: 'Job ID',
@@ -333,7 +348,9 @@ class ApexApi {
333
348
  prompt: this.getNodeParameter('prompt', i),
334
349
  aspectRatio: this.getNodeParameter('videoAspectRatio', i, ''),
335
350
  resolution: this.getNodeParameter('videoResolution', i, ''),
336
- duration: this.getNodeParameter('videoDuration', i, 5),
351
+ duration: this.getNodeParameter('videoDuration', i, '5') === 'custom'
352
+ ? this.getNodeParameter('videoDurationCustom', i, 5)
353
+ : Number(this.getNodeParameter('videoDuration', i, '5')),
337
354
  audio: options.audio,
338
355
  imageUrl: options.imageUrl || undefined,
339
356
  endImageUrl: options.endImageUrl || undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-apexapi",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "n8n community node for ApexApi — call 14 AI providers (OpenAI, Anthropic, Google, Mistral, and more) through one OpenAI-compatible API.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",