nickyni commited on
Commit
457734a
·
verified ·
1 Parent(s): c34f6d4

Upload examples/veo31_example.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. examples/veo31_example.py +29 -0
examples/veo31_example.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Veo 3.1 Cinematic Video Generation API Example via NexaAPI
3
+ Get your free API key at: https://nexa-api.com
4
+ Install: pip install nexaapi
5
+ """
6
+ from nexaapi import NexaAPI
7
+
8
+ # Initialize client - get your key at https://nexa-api.com
9
+ client = NexaAPI(api_key='YOUR_API_KEY')
10
+
11
+ # Generate a cinematic video
12
+ video = client.videos.generate(
13
+ model='veo-3.1',
14
+ prompt='Aerial drone shot of a mountain range at golden hour, cinematic 4K quality',
15
+ duration=8,
16
+ resolution='1080p'
17
+ )
18
+ print("Veo 3.1 - Generated Cinematic Video URL:")
19
+ print(video.data[0].url)
20
+
21
+ # Brand film
22
+ brand_video = client.videos.generate(
23
+ model='veo-3.1',
24
+ prompt='Ocean waves crashing on a rocky coastline, cinematic slow motion, golden hour',
25
+ duration=10,
26
+ resolution='1080p'
27
+ )
28
+ print("\nBrand Film URL:")
29
+ print(brand_video.data[0].url)