Skip to content

Commit 5c69122

Browse files
matthew29tangcopybara-github
authored andcommitted
docs: Update Veo and Imagen model id in README
PiperOrigin-RevId: 833548279
1 parent cc8ab95 commit 5c69122

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ from google.genai import types
11971197

11981198
# Generate Image
11991199
response1 = client.models.generate_images(
1200-
model='imagen-3.0-generate-002',
1200+
model='imagen-4.0-generate-001',
12011201
prompt='An umbrella in the foreground, and a rainy night sky in the background',
12021202
config=types.GenerateImagesConfig(
12031203
number_of_images=1,
@@ -1217,7 +1217,7 @@ from google.genai import types
12171217

12181218
# Upscale the generated image from above
12191219
response2 = client.models.upscale_image(
1220-
model='imagen-3.0-generate-001',
1220+
model='imagen-4.0-upscale-preview',
12211221
image=response1.generated_images[0].image,
12221222
upscale_factor='x2',
12231223
config=types.UpscaleImageConfig(
@@ -1278,7 +1278,7 @@ from google.genai import types
12781278

12791279
# Create operation
12801280
operation = client.models.generate_videos(
1281-
model='veo-2.0-generate-001',
1281+
model='veo-3.1-generate-preview',
12821282
prompt='A neon hologram of a cat driving at top speed',
12831283
config=types.GenerateVideosConfig(
12841284
number_of_videos=1,
@@ -1306,7 +1306,7 @@ image = types.Image.from_file("local/path/file.png")
13061306

13071307
# Create operation
13081308
operation = client.models.generate_videos(
1309-
model='veo-2.0-generate-001',
1309+
model='veo-3.1-generate-preview',
13101310
# Prompt is optional if image is provided
13111311
prompt='Night sky',
13121312
image=image,
@@ -1329,7 +1329,8 @@ video.show()
13291329

13301330
#### Generate Videos (Video to Video)
13311331

1332-
Currently, only Vertex supports Video to Video generation (Video extension).
1332+
Currently, only Gemini Developer API supports video extension on Veo 3.1 for
1333+
previously generated videos. Vertex supports video extension on Veo 2.0.
13331334

13341335
```python
13351336
from google.genai import types
@@ -1339,10 +1340,10 @@ video = types.Video.from_file("local/path/video.mp4")
13391340

13401341
# Create operation
13411342
operation = client.models.generate_videos(
1342-
model='veo-2.0-generate-001',
1343+
model='veo-3.1-generate-preview',
13431344
# Prompt is optional if Video is provided
13441345
prompt='Night sky',
1345-
# Input video must be in GCS
1346+
# Input video must be in GCS for Vertex or a URI for Gemini
13461347
video=types.Video(
13471348
uri="gs://bucket-name/inputs/videos/cat_driving.mp4",
13481349
),

0 commit comments

Comments
 (0)