File size: 907 Bytes
e524895
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Veo 3.1 Cinematic Video Generation API Example via NexaAPI
// Get your free API key at: https://nexa-api.com
// Install: npm install nexaapi

import NexaAPI from 'nexaapi';

const client = new NexaAPI({ apiKey: 'YOUR_API_KEY' });

async function main() {
  // Generate a cinematic video
  const video = await client.videos.generate({
    model: 'veo-3.1',
    prompt: 'Aerial drone shot of a mountain range at golden hour, cinematic 4K quality',
    duration: 8,
    resolution: '1080p'
  });
  console.log('Veo 3.1 - Generated Cinematic Video URL:');
  console.log(video.data[0].url);

  // Brand film
  const brandVideo = await client.videos.generate({
    model: 'veo-3.1',
    prompt: 'Ocean waves crashing on a rocky coastline, cinematic slow motion, golden hour',
    duration: 10,
    resolution: '1080p'
  });
  console.log('\nBrand Film URL:');
  console.log(brandVideo.data[0].url);
}

main();