This documentation page is also available as an interactive notebook. You can launch the notebook in
Kaggle or Colab, or download it for use with an IDE or local Jupyter installation, by clicking one of the
above links.
Pixeltable’s Gemini integration supports two authentication methods:
Prerequisites
For Google AI Studio:
For Vertex AI:
- A Google Cloud project with the Vertex AI API enabled
- The Google Cloud SDK installed and configured
(
gcloud auth application-default login)
Important notes
- Usage may incur costs based on your plan.
- Be mindful of sensitive data and consider security measures when
integrating with external services.
Now let’s create a Pixeltable directory to hold the tables for our demo.
Connected to Pixeltable database at: postgresql+psycopg://postgres:@/pixeltable?host=/Users/asiegel/.pixeltable/pgdata
Created directory ‘gemini_demo’.
<pixeltable.catalog.dir.Dir at 0x12fdde740>
Generate content
Create a Table: In Pixeltable, create a table with columns to represent
your input data and the columns where you want to store the results from
Gemini.
Created table ‘text’.
Added 0 column values with 0 errors in 0.01 s
No rows affected.
Inserted 2 rows with 0 errors in 4.96 s (0.40 rows/s)
2 rows inserted.
Generate images with Imagen
Created table ‘images’.
Added 0 column values with 0 errors in 0.02 s
No rows affected.
Inserted 1 row with 0 errors in 12.31 s (0.08 rows/s)
1 row inserted.
Generate video with Veo
Created table ‘videos’.
Added 0 column values with 0 errors in 0.01 s
No rows affected.
Inserted 1 row with 0 errors in 40.06 s (0.02 rows/s)
1 row inserted.
Generate Video from an existing Image
We’ll add an additional computed column to our existing images_t to
animate the generated images.
Added 1 column value with 0 errors in 52.22 s (0.02 rows/s)
1 row updated.
Learn more
To learn more about advanced techniques like RAG operations in
Pixeltable, check out the RAG Operations in
Pixeltable
tutorial.
If you have any questions, don’t hesitate to reach out.