Introducing the Google Slides API

Wesley chun.

Developer Advocate, Google Cloud

At Google I/O 2016, we gave developers a preview of the Google Slides API. Since then, the gears have been cranking at full speed, and we've been working with various early-access partners and developers to showcase what you can do with it. Today, we're happy to announce that the Slides API v1 is now generally available and represents the first time that developers have ever been able to programmatically access Slides! The Slides API breaks new ground, changing the way that presentations are created. No longer do they require manual creation by users on their desktops or mobile devices. Business data on inventory items like retail merchandise, homes/property, hotels/lodging, restaurants/menus, venues/events, and other "cataloged" assets can be instantly turned into presentations based on pre-existing slide templates. Traditionally, the sheer amount of data (and of course time[!]) that went into creating these slide decks made it unwieldy if done by hand. Applications leveraging the API can easily generate presentations like these, customized as desired, and in short order. Developers use the API by crafting a JSON payload for each request. (We recommend you batch multiple commands together to send to the API.) You can think of these as actions one can perform from the Slides user interface but available programmatically. To give you an idea of how the new API works, here are what some requests look like for several common operations:

If you're interested in seeing what developers have already built using the API, take a look at our initial set of partner integrations by Conga, Trello, Lucidchart, Zapier and more, as described in detail in our G Suite blog post .

Video Thumbnail

To help you get started, check out the DevByte above from our new series dedicated to G Suite developers. In the video, we demonstrate how to take "variables" or placeholders in a template deck and use the API to generate new decks replacing those proxies with the desired text or image. Want to dive deeper into its code sample? Check out this blogpost . If you're not a Python developer, it'll be your pseudocode as you can use any language supported by the Google APIs Client Libraries . Regardless of your development environment, you can use similar "scaffolding" to generate many presentations with varying content for your users. Stay tuned for more videos that highlight other Slides API features. The Slides API is available to projects in your Google Developers console today. Developers can find out more in the official documentation which features an API overview plus Quickstarts , sample code in multiple languages and environments, to bootstrap your next project. We look forward to seeing all the amazing slide deck generating applications you build with our first ever API!

  • Application Development
  • Workspace Developers

Related articles

https://storage.googleapis.com/gweb-cloudblog-publish/images/containers_2022_anH39my.max-700x700.jpg

Best practices for consuming public Docker Hub content

By Rishi Mukhopadhyay • 2-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/General-GC_Blog_header_2436x1200-v1.max-700x700.jpg

The overwhelmed person’s guide to Google Cloud: week of Dec 18

By Forrest Brazeal • 2-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/Google_Cloud_AIML_thumbnail.max-700x700.jpg

Have the AI build your app for you!

By Max Saltonstall • 2-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/DuetAi_02.max-700x700.jpg

Build apps faster with new Duet AI in Google Cloud training content

By Priyanka Vergadia • 3-minute read

Build data-rich presentations in seconds with integrated apps and the Slides API

Vishnu sivaji.

Director, Product Management, Google Workspace

Try Google Workspace at No Cost

Get a business email, all the storage you need, video conferencing, and more.

Presentations are a staple in business communication. When done right, they help tell a story that can captivate, persuade, or inspire audiences. But crafting that story can be tedious, especially if you’re constantly flipping between screens to copy and paste charts, images, or figures into your slides.

If only there was an API for that….

Today, we’re announcing the general availability of the Google Slides API which gives developers programmatic access to create and update presentations in Slides from any data source. We previewed the Slides API at I/O earlier this year to change how business presentations are built. Now, your teams can use a number of ready-to-go integrations to turn your business data into presentations, with just a click.

Build beautiful, up-to-date presentations in seconds using Conga, Trello, Lucidchart and Zapier

Whether you’re looking to populate a quarterly business review (QBR) deck, add specs for weekly design review slides, or refresh event registration data for your daily update, the third-party apps below let you quickly and easily build beautiful, data-rich presentations.

  • Generate your next QBR deck with Conga : Conga makes document creation and reporting for Salesforce easy. With its Slides API integration you can create a quarterly business review presentation in Slides from your standard Salesforce Account records in seconds. Read more here .
  • Create vivid project updates with Trello : Trello helps you organize and prioritize project information in highly visual ways. With its Slide API integration, you can turn any Trello board or set of cards into a Slides presentation with just a click.  Read more here .
  • Review complex visualizations with Lucidchart : Lucidchart helps you create complex diagrams and visuals easily. With its Slides API integration you can export flowcharts, mockups, and other such visuals, break them into slides to cover specifics in more detail, and rapidly iterate on the content.  You can find Lucidchart on the G Suite Marketplace  and  read more about the integration here .
  • Create and respond to custom proposals requests with Zapier : Zapier lets you create and automate business workflows. With its Slides API integration you can create, collaborate, and share dynamic presentations using Slides with just a few workflow rules. You can get started with the  Slides integration on Zapier  or  learn more about it here .

Developers can start using the Slides API today. Documentation and demos are available at  developers.google.com/slides  and they can  read more about it here .

  • Product Announcements
  • Developers and Practitioners

Related articles

https://storage.googleapis.com/gweb-cloudblog-publish/images/digital_sovereignty.max-700x700.png

Protect sensitive messages in Gmail with PIV/CAC smart cards and client-side encryption

By Julien Duplant • 3-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/GWS_Blog_header_Digital_sovereignty_no_tit.m.max-700x700_e3COLmb.png

More choice in Google Workspace with new client-side encryption partners

By Johney Burke • 2-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/Forrester_hero.max-700x700.jpg

Google Workspace named a Leader in Forrester UCaaS Wave 2023

By Dave Citron • 2-minute read

https://storage.googleapis.com/gweb-cloudblog-publish/images/google_meet_avocor_figma_lucid_miro.max-2436.max-700x700.jpg

The next phase of digital whiteboarding for Google Workspace

By Dave Citron • 3-minute read

Google Workspace

Build data-rich presentations in seconds with integrated apps and the Slides API

Nov 09, 2016

Presentations are a staple in business communication. When done right, they help tell a story that can captivate, persuade, or inspire audiences. But crafting that story can be tedious, especially if you’re constantly flipping between screens to copy and paste charts, images, or figures into your slides.

If only there was an API for that….

Today, we’re announcing the general availability of the Google Slides API which gives developers programmatic access to create and update presentations in Slides from any data source. We previewed the Slides API at I/O earlier this year to change how business presentations are built. Now, your teams can use a number of ready-to-go integrations to turn your business data into presentations, with just a click.

Build beautiful, up-to-date presentations in seconds using Conga, Trello, Lucidchart and Zapier

Whether you’re looking to populate a quarterly business review (QBR) deck, add specs for weekly design review slides, or refresh event registration data for your daily update, the third-party apps below let you quickly and easily build beautiful, data-rich presentations.

  • Generate your next QBR deck with Conga : Conga makes document creation and reporting for Salesforce easy. With its Slides API integration you can create a quarterly business review presentation in Slides from your standard Salesforce Account records in seconds. Read more here .
  • Create vivid project updates with Trello : Trello helps you organize and prioritize project information in highly visual ways. With its Slide API integration, you can turn any Trello board or set of cards into a Slides presentation with just a click. Read more here .
  • Review complex visualizations with Lucidchart : Lucidchart helps you create complex diagrams and visuals easily. With its Slides API integration you can export flowcharts, mockups, and other such visuals, break them into slides to cover specifics in more detail, and rapidly iterate on the content. You can find Lucidchart on the G Suite Marketplace and read more about the integration here .
  • Create and respond to custom proposals requests with Zapier : Zapier lets you create and automate business workflows. With its Slides API integration you can create, collaborate, and share dynamic presentations using Slides with just a few workflow rules. You can get started with the Slides integration on Zapier or learn more about it here .

All of these app integrations are available to try today — and this is just the beginning. We’re working with many other software vendors, including ProsperWorks , AODocs and Form Publisher to help you do more in less time in all sorts of ways.

Developers can start using the Slides API today. Documentation and demos are available at developers.google.com/slides and they can read more about it here .

Related stories

Women in AI

4 things we learned at the Women in AI event

G Tips Roundup Hero

23 of our most helpful tips from 2023

23 of our biggest moments in 2023.

hero _ get it by dec 24

3 Google features to help you get last-minute holiday gifts

Build with Gemini dk 16_9 (1)

It’s time for developers and enterprises to build with Gemini Pro

Gemini_DeveloperCloud_Opt1 (1)

Gemini API and more new AI tools for developers and enterprises

Let’s stay in touch. Get the latest news from Google in your inbox.

Search code, repositories, users, issues, pull requests...

Provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

Learn How to Use the Google Slides API

googleworkspace/slides-api

Name already in use.

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more about the CLI .

  • Open with GitHub Desktop
  • Download ZIP

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Google slides api codelab.

In this codelab, you’ll learn how you can use Google Slides API as a custom presentation tool for an analysis of the most common software licenses. You’ll be querying all open source code on GitHub using BigQuery and creating a slide deck using Google Slides API to present your results. The sample application is built using Node.js, but the same basic principles are applicable to any architecture.

Getting Started

Go to the Slides Codelab to get started.

Security policy

Contributors 3.

  • JavaScript 80.2%
  • Shell 19.8%
  • Português – Brasil

Generate Google Slides presentations from Big Data in Node.js

1. overview.

In this codelab, you'll learn how you can use Google Slides as a custom presentation tool for an analysis of the most common software licenses. You'll be querying all open source code on GitHub using the BigQuery API and creating a slide deck using Google Slides API to present your results. The sample application is built using Node.js, but the same basic principles are applicable to any architecture.

What you'll learn

  • Creating presentations using the Slides API
  • Using BigQuery to gain insights into a large dataset
  • Copying a file using the Google Drive API

What you'll need

  • Node.js installed
  • Access to the internet and a web browser
  • A Google account
  • A Google Cloud Platform Project

2. Get the sample code

You can either download all the sample code to your computer...

file_download Download Zip

...or clone the GitHub repository from the command line.

The repository contains a set of directories representing each step along the process, in case you need to reference a working version.

You'll be working off the copy located in the start directory, but you can refer to, or copy files from, the others as needed.

3. Run the sample app

First, let's get the Node script up and running. With the code downloaded, follow the instructions below to install and start the Node.js application:

  • Open a command line terminal on your computer and navigate to the codelab's start directory.
  • Enter the following command to install the Node.js dependencies.
  • Enter the following command to run the script:
  • Observe the greeting that shows the steps for this project.

You can see our list of TODOs in slides.js , license.js , and auth.js . Note that we use JavaScript Promises to chain the steps needed to complete the app since each step is dependant on the previous step being completed.

If you're not familiar with promises, don't worry, we'll provide all the code you'll need. In short, promises give us a way to handle asynchronous processing in a more synchronous fashion.

4. Get Client Secrets

To use the Slides, Bigquery, and Drive APIs, we'll create an OAuth Client and a Service Account.

Setup Google Developers Console

  • Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue , then Go to credentials .
  • On the Add credentials to your project page, click the Cancel button.
  • At the top of the page, select the OAuth consent screen tab. Select an Email address , enter Product name Slides API Codelab , and click the Save button.

Enable BigQuery, Drive, and Slides APIs

  • Select the Dashboard tab, click the Enable API button and enable the following 3 APIs:
  • BigQuery API
  • Google Drive API
  • Google Slides API

Download OAuth Client Secret (for Slides and Drive)

  • Select the Credentials tab, click the Create credentials button and select OAuth client ID .
  • Select the application type Other , enter the name Google Slides API Codelab , and click the Create button.Click OK to dismiss the resulting dialog.
  • Click the file_download (Download JSON) button to the right of the client ID.
  • Rename your secret file to client_secret.json and copy it into both the start/ and finish/ directories.

Download Service Account Secret (for BigQuery)

  • Select the Credentials tab, click the Create credentials button and select Service account key .
  • In the dropdown, select New Service Account . Choose name Slides API Codelab Service for your service. Then click Role and scroll to BigQuery and select both BigQuery Data Viewer and BigQuery Job User .
  • For the Key type , select JSON .
  • Click Create . The key file will be automatically downloaded to your computer. Click Close to exit the dialog that appears.
  • Rename your secret file to service_account_secret.json and copy it into both the start/ and finish/ directories.

Get Client Secrets

In start/auth.js , let's fill out the method getClientSecrets .

We now have loaded the client secrets. The credentials will be passed to the next promise. Run the project with node . to make sure there are no errors.

5. Create an OAuth2 Client

To create slides, let's add authentication to Google APIs by adding the following code to our auth.js file. This authentication will request access to your Google Account to read and write files in Google Drive, create presentations in Google Slides, and execute read-only queries from Google BigQuery. (Note: We didn't change getClientSecrets )

6. Setup BigQuery

Explore bigquery (optional).

BigQuery allows us to query massive datasets in seconds. Let's use the web interface before querying programmatically. If you've never set up BigQuery before, follow the steps here .

Open the Cloud Console to browse the GitHub data available in BigQuery and run your own queries. Let's find out the most popular software licences on GitHub by writing this query and pressing the Run button.

bigquery.sql

We just analyzed millions of public repos on GitHub and found out the most popular licenses. Cool! Now let's setup running the same query, but this time programmatically.

Setup BigQuery

Replace the code in the file license.js . The function bigquery.query will return a promise .

license **.js**

Try to console.log some of the data inside our Promise's callback to understand the structure of our objects and see the code work in action.

7. Create Slides

Now for the fun part! Let's create slides by calling the Slides API's create and batchUpdate methods. Our file should be replaced with the following:

8. Open Slides

Lastly, let's open the presentation in the browser. Update the following method in slides.js .

Run your project one last time to show the final result.

9. Congratulations!

You've successfully generated Google Slides from data analyzed using BigQuery. Your script creates a presentation using the Google Slides API and BigQuery to report an analysis of the most common software licenses.

Possible Improvements

Here are some additional ideas for making an even more compelling integration:

  • Add images to each slide
  • Share your slides via email using the Gmail API
  • Customize the template slide as a command line argument
  • Read the Google Slides API developer documentation .
  • Post questions and find answers on Stack Overflow under the google-slides-api tag .

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.

Google Slides API . presentations . pages

Instance methods.

Close httplib2 connections.

get(presentationId, pageObjectId, x__xgafv=None)

Gets the latest version of the specified page in the presentation.

getThumbnail(presentationId, pageObjectId, thumbnailProperties_mimeType=None, thumbnailProperties_thumbnailSize=None, x__xgafv=None)

Generates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image. This request counts as an [expensive read request](/slides/limits) for quota purposes.

Method Details

google presentations api

  • BY Krzysztof Wędrowicz

Generating presentations using Google Slides API

  • Updated: December 14, 2020
  • Published: March 23, 2017

Imagine you need to create plenty of presentations that look the same, but have a slightly different content, like text or images. Well, you can do it all by hand if you have tons of time and find relaxation in doing repeatable tasks over and over again. However, today I’ll give you a better solution. A few months ago Google provided API to its Slides service, which we’ll use to achieve our goal: automating the process of creating presentations.

Real-life use case

One of our clients came to us with a problem. He needed to create many presentations for each of his (very many) products. Up until then, his employees had to do it by hand, but the client found it too time-consuming. He wanted a tool which would automatically generate ready-to-use presentations from a template with just some input. I’ll show you how we achieved it.

Requirements

What you need? Not much, really. Basic PHP knowledge and familiarity with composer (a PHP dependency manager). And a Google account, of course. I strongly recommend you also to read Google PHP quickstart first, as it shows a sample script we based our solution upon. There is also an instruction on how to enable Google Slides API in the Google Api Console, which is a required step for our script to work.

Templates concept

Google Slides API offers a great many possibilities. You can create a presentation adding every single text programmatically, moving it to the correct place and then styling it. However, this process is very time consuming and complicated. Alternatively, you can create a presentation template by hand and then, via API, replace elements that are already positioned and styled. The whole process of creating a template is enclosed in just a few steps:

  • Create a new Google Slides presentation, which will be the template from which we will generate other presentations.
  • Fill the template with common static content.
  • For elements that need to be replaced, use text and shapes with {{ placeholders }}. {{ variableName }} is just a convention which helps to distinguish static text from placeholders.
  • Format elements according to your needs.

And here we are! In 4 steps, we have a ready-to-use template. Cool, isn’t it?

Make sure you’ve enabled the Google Slides API, authenticated yourself and downloaded the credentials as described in the aforementioned quickstart . The script is divided into 4 steps :

Clone template as a new presentation

Upload images to google drive, replace placeholders with target content, download presentation as pdf.

After your work is done, you can also download your presentation as a PDF file . It’s a pretty simple Google Drive API call.

Put all steps together

We can do better: on developers and domain models

We can do better: on developers and domain models

Symfony Flex: A new RAD way for Symfony

Symfony Flex: A new RAD way for Symfony

Docker for Mac: Performance Tweaks

Docker for Mac: Performance Tweaks

  • Google API , Google Slides , php , use case

google presentations api

slides icon

Cloud Storage

gmail icon

Custom Business Email

Meet icon

Video and voice conferencing

calendar icon

Shared Calendars

docs icon

Word Processing

sheets icon

Spreadsheets

Presentation Builder

forms icon

Survey builder

google workspace

Google Workspace

An integrated suit of secure, cloud-native collaboration and productivity apps powered by Google AI.

Tell impactful stories, with Google Slides

Create, present, and collaborate on online presentations in real-time and from any device.

  • For my personal use
  • For work or my business

icon for add comment button

Jeffery Clark

T h i s   c h a r t   h e l p s   b r i d g i n g   t h e   s t o r y !

comment box buttons

E s t i m a t e d   b u d g e t

Cursor

Make beautiful presentations, together

Stay in sync in your slides, with easy sharing and real-time editing. Use comments and assign action items to build your ideas together.

Slides create presentations

Present slideshows with confidence

With easy-to-use presenter view, speaker notes, and live captions, Slides makes presenting your ideas a breeze. You can even present to Google Meet video calls directly from Slides.

Slides present with confidence

Seamlessly connect to your other Google apps

Slides is thoughtfully connected to other Google apps you love, saving you time. Embed charts from Google Sheets or reply to comments directly from Gmail. You can even search the web and Google Drive for relevant content and images directly from Slides.

Slides connect to Google apps

Extend collaboration and intelligence to PowerPoint files

Easily edit Microsoft PowerPoint presentations online without converting them, and layer on Slides’ enhanced collaborative and assistive features like comments, action items, and Smart Compose.

Slides connect to Google apps

Work on fresh content

With Slides, everyone’s working on the latest version of a presentation. And with edits automatically saved in version history, it’s easy to track or undo changes.

Design slides faster, with built-in intelligence

Make slides faster, with built-in intelligence

Assistive features like Smart Compose and autocorrect help you build slides faster with fewer errors.

Stay productive, even offline

Stay productive, even offline

You can access, create, and edit Slides even without an internet connection, helping you stay productive from anywhere.

Security, compliance, and privacy

badge ISO IEC

Secure by default

We use industry-leading security measures to keep your data safe, including advanced malware protections. Slides is also cloud-native, eliminating the need for local files and minimizing risk to your devices.

Encryption in transit and at rest

All files uploaded to Google Drive or created in Slides are encrypted in transit and at rest.

Compliance to support regulatory requirements

Our products, including Slides, regularly undergo independent verification of their security, privacy, and compliance controls .

Private by design

Slides adheres to the same robust privacy commitments and data protections as the rest of Google Cloud’s enterprise services .

privacy icon

You control your data.

We never use your slides content for ad purposes., we never sell your personal information to third parties., find the plan that’s right for you, google slides is a part of google workspace.

Every plan includes

keep icon

Collaborate from anywhere, on any device

Access, create, and edit your presentations wherever you are — from any mobile device, tablet, or computer — even when offline.

Google Play store

Get a head start with templates

Choose from a variety of presentations, reports, and other professionally-designed templates to kick things off quickly..

Slides Template Proposal

Photo Album

Slides Template Photo album

Book Report

Slides Template Book report

Visit the Slides Template Gallery for more.

Ready to get started?

google presentations api

Google Slides

Free Online Presentations for Personal Use

Google Slides API Integrations

Build and run workflows using the google slides api. use 1000s of source-available triggers and actions across 1,600+ apps. or write custom code to integrate any app or api in seconds..

Using the Google Slides API, you can build applications that do the following:

  • Create new presentations or edit existing ones
  • Add or remove slides
  • Add or remove slide content
  • Change slide layouts
  • Format text
  • Insert or delete images
  • Crop images
  • Add or remove comments

Choose an API to Connect with Google Slides API #

1 - 24 of 1,600+ apps by most popular.

HTTP / Webhook

Popular Google Slides Integrations #

google presentations api

Popular Google Slides Actions #

Create a blank presentation or duplicate an existing presentation. See the docs here

Find a presentation on Google Drive. See the docs here

Merge data into a presentation. See the docs here

Refresh a chart from Sheets. See the docs here

Authentication #

Google Slides uses OAuth authentication. When you connect your Google Slides account, Pipedream will open a popup window where you can sign into Google Slides and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google Slides API.

Pipedream requests the following authorization scopes when you connect your account:

  • authorization GET https://accounts.google.com/o/oauth2/auth ? client_id= {{oauth.client_id}} & state= {{oauth.state}} & redirect_uri= {{oauth.redirect_uri}} & response_type= code & scope= {{oauth.space_separated_scopes}} & access_type= offline & prompt= consent
  • accessToken POST https://oauth2.googleapis.com/token content-type: application/x-www-form-urlencoded accept: application/json client_id= {{oauth.client_id}} & client_secret= {{oauth.client_secret}} & grant_type= authorization_code & code= {{oauth.code}} & redirect_uri= {{oauth.redirect_uri}}
  • refreshToken POST https://oauth2.googleapis.com/token content-type: application/x-www-form-urlencoded accept: application/json client_id= {{oauth.client_id}} & client_secret= {{oauth.client_secret}} & grant_type= refresh_token & refresh_token= {{oauth.refresh_token}}
  • Entertainment

How to Access and Use Google Gemini API Key (with Examples)

' src=

  • You can access the Gemini API key for free and without having to set up cloud billing. Google has made the process straightforward.
  • Currently, Google is offering Gemini Pro models for both text and text-and-vision models for use via the API.
  • You can feed images to Gemini Pro's visual model via the API and check out its multimodal capabilities with coding examples.
Note: The Google Gemini API key is free for now for both text and vision models. It will be free until general availability early next year. So, you can send up to 60 requests per minute without having to set up Google Cloud billing or incurring any costs.

Set Up Python and Pip on Your Computer

  • Head to our guide and install Python along with Pip on your PC or Mac . You need to install Python 3.9 or above version.
  • If you have a Linux computer, you can follow our tutorial to install Python and Pip on Ubuntu or other distros.
  • You can run the below commands in the Terminal to verify Python and Pip installation on your computer. It should return the version number.

check python and pip version

  • Once the installation is successful, run the below command to install Google’s Generative AI dependency.

install google generative ai dependency using pip

How to Get the Gemini Pro API Key

  • Next, head over to makersuite.google.com/app/apikey ( visit ) and sign in with your Google account.
  • Under API keys, click the “ Create API key in new project ” button.

generate google gemini api key

  • Copy the API key and keep it private. Do not publish or share the API key publicly.

copy gemini api key

How to Use the Gemini Pro API Key (Text-only Model)

  • First off, launch a code editor of your choice. If you are a beginner, simply install Notepad++ ( visit ). For advanced users, Visual Studio Code ( visit ) is a great tool.
  • Next, copy the below code and paste it into your code editor.
  • In the code editor, paste your Gemini API key. As you can see, we have defined the ‘gemini-pro’ model, which is a text-only model. Also, we have added a query where you can ask questions .

gemini api key demonstration in sample code

  • Now, save the code and give a name to the file. Make sure to add .py at the end. I have named my file gemini.py and saved it on the Desktop.

save file as python in windows

  • Next, fire up the Terminal and run the below command to move to the Desktop .
  • Once you are on the Desktop in the Terminal, simply run the below command to execute the gemini.py file using Python.

run a python file in terminal

  • It will now answer the question you had set in the gemini.py file.

gemini pro api key responding to a question

  • You can change the question in the code editor, save it, and run the gemini.py file again to get a new response right in the Terminal. That’s how you can use the Google Gemini API key to access the text-only Gemini Pro model.

gemini pro api key responding to a question 2

How to Use the Gemini Pro API Key (Text-and-Vision Model)

  • Open a new file in your code editor and paste the below code .
  • Make sure to paste your Gemini API key. Here, we are using the gemini-pro-vision model, which is a text-and-vision model.

gemini pro vision api key demonstration in sample code

  • Now, save the file on your Desktop and add .py at the end of the filename. I have named it geminiv.py here.

save file as python on windows

  • In the third line of the code, as you can see, I point the AI to an image.jpg file that is saved on my Desktop with the exact name. Whatever image you want to process, make sure it’s saved in the same location as geminiv.py file, and the filename is the same with the correct extension. You can pass local JPG and PNG files up to 4MB.

defining image in code to use for gemini pro vision

  • In the sixth line of code, you can ask questions related to the image. Since I am feeding a food-related image, I am asking Gemini Pro to calculate the total calorie count.
  • It’s time to run the code in the Terminal. Simply move to the Desktop (in my case), and run the below commands one by one. Make sure to save the file if you have made any changes.

run python file on windows via terminal

  • The visual Gemini Pro model answers the question straight up. You can ask further questions and ask the AI to explain the reasoning .

gemini pro vision explaining the reasoning.jpg

  • You can feed a different image as well, but make sure to match the image filename, change the question in the code, and run the geminiv.py file again to get new responses.

How to Use the Gemini Pro API Key in Chat Format

  • Open your code editor and paste the below code .
  • As usual, paste your API key similar to the above sections.

gemini pro api code used for chatting with conversation history

  • Now, save the file on the Desktop or your preferred location. Make sure to add .py at the end. I have named it geminichat.py file.

save a file as python on windows

  • Now, launch the Terminal and move to the Desktop. After that, run the geminichat.py file.

run a python file in windows.jpg

  • You can now continue the conversation effortlessly, and it will also remember chat history . So this is another great way to use the Google Gemini API key.

gemini pro api responding in a terminal chat

Passionate about Windows, ChromeOS, Android, security and privacy issues. Have a penchant to solve everyday computing problems.

Thanks, very usefull but geminiv.py, ModuleNotFoundError: No modüle named ‘PIL’ . How can I fix it?

run this command pip install Pillow

Add new comment

iPhone Camera Blinking? Here's How to Fix It

  • Get Inspired
  • Announcements

Introducing the Google Slides API

November 09, 2016

Posted by Wesley Chun , Developer Advocate, G Suite

At Google I/O 2016, we gave developers a preview of the Google Slides API. Since then, the gears have been cranking at full speed, and we've been working with various early-access partners and developers to showcase what you can do with it. Today, we're happy to announce that the Slides API v1 is now generally available and represents the first time that developers have ever been able to programmatically access Slides!

The Slides API breaks new ground, changing the way that presentations are created. No longer do they require manual creation by users on their desktops or mobile devices. Business data on inventory items like retail merchandise, homes/property, hotels/lodging, restaurants/menus, venues/events, and other "cataloged" assets can be instantly turned into presentations based on pre-existing slide templates. Traditionally, the sheer amount of data (and of course time[!]) that went into creating these slide decks made it unwieldy if done by hand. Applications leveraging the API can easily generate presentations like these, customized as desired, and in short order.

Developers use the API by crafting a JSON payload for each request. (We recommend you batch multiple commands together to send to the API.) You can think of these as actions one can perform from the Slides user interface but available programmatically. To give you an idea of how the new API works, here are what some requests look like for several common operations:

If you're interested in seeing what developers have already built using the API, take a look at our initial set of partner integrations by Conga, Trello, Lucidchart, Zapier and more, as described in detail in our G Suite blog post .

To help you get started, check out the DevByte above from our new series dedicated to G Suite developers. In the video, we demonstrate how to take "variables" or placeholders in a template deck and use the API to generate new decks replacing those proxies with the desired text or image. Want to dive deeper into its code sample? Check out this blogpost . If you're not a Python developer, it'll be your pseudocode as you can use any language supported by the Google APIs Client Libraries . Regardless of your development environment, you can use similar "scaffolding" to generate many presentations with varying content for your users. Stay tuned for more videos that highlight other Slides API features.

The Slides API is available to projects in your Google Developers console today. Developers can find out more in the official documentation which features an API overview plus Quickstarts , sample code in multiple languages and environments, to bootstrap your next project. We look forward to seeing all the amazing slide deck generating applications you build with our first ever API!

IMAGES

  1. Google Slides API

    google presentations api

  2. Google Slides API

    google presentations api

  3. Google Slides API

    google presentations api

  4. What is Google APIs & its Importance for Business| Tudip

    google presentations api

  5. List of Google APIs

    google presentations api

  6. Getting started using Google APIs (2019)

    google presentations api

VIDEO

  1. GOOGLE PRESENTATIONS

  2. Sustainability: Why Should We Care?

  3. Google Apps Script

  4. google api application

  5. pdfRest PDF to PowerPoint

  6. 1 Google API Introduction

COMMENTS

  1. Introduction

    The Google Slides API lets you create and modify Google Slides presentations. Apps can integrate with the Google Slides API to create beautiful slide decks automatically from user- and...

  2. Introducing the Google Slides API

    Applications leveraging the API can easily generate presentations like these, customized as desired, and in short order. Developers use the API by crafting a JSON payload for each request....

  3. Build data-rich presentations in seconds with ...

    Build data-rich presentations in seconds with integrated apps and the Slides API | Google Workspace Blog Developers and Practitioners Build data-rich presentations in seconds with...

  4. Build data-rich presentations in seconds with integrated apps and the

    Today, we're announcing the general availability of the Google Slides API which gives developers programmatic access to create and update presentations in Slides from any data source. We previewed the Slides API at I/O earlier this year to change how business presentations are built.

  5. googleworkspace/slides-api: Learn How to Use the Google Slides API

    In this codelab, you'll learn how you can use Google Slides API as a custom presentation tool for an analysis of the most common software licenses. You'll be querying all open source code on GitHub using BigQuery and creating a slide deck using Google Slides API to present your results.

  6. Generate Google Slides presentations from Big Data in Node.js

    Overview In this codelab, you'll learn how you can use Google Slides as a custom presentation tool for an analysis of the most common software licenses. You'll be querying all open source...

  7. Google Slides API

    Google Slides API. presentations Instance Methods. pages() Returns the pages Resource. batchUpdate(presentationId, body=None, x__xgafv=None) Applies one or more updates to the presentation. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied.

  8. Google Slides API

    Google Slides API. presentations. pages Instance Methods. close() Close httplib2 connections. ... Object IDs used by google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share the same namespace. "shape": { # A PageElement kind representing a generic shape that does not have a more specific classification. # A generic shape.

  9. Generating presentations using Google Slides API

    Google Slides API offers a great many possibilities. You can create a presentation adding every single text programmatically, moving it to the correct place and then styling it. However, this process is very time consuming and complicated.

  10. Automatize presentation reports using Google Slides API

    GenAI for Google Workspace: Exploring the PaLM 2 API and LLM capabilities in Google Sheets with… In this post I'll show how you can start experimenting with LLMs in Google Workspace using ...

  11. Google Slides: Online Slideshow Maker

    Create, present, and collaborate on online presentations in real-time and from any device. Try Slides for Work Go to Slides Don't have an account? See what you can do with Google Slides...

  12. Google Slides API- insert slide from external slide into current pptx

    @Tanaike comment is not correct though: you can copy slides from another presentation with this snippet var srcPresentationId = "aPresentationId"; var src = SlidesApp.openById (srcPresentationId).getSlides () src.forEach (function (ele, idx) { SlidesApp.getActivePresentation ().appendSlide (ele, idx) }) - Davide Arcinotti Mar 8, 2022 at 13:26

  13. Google Slides API Integrations

    Google Slides uses OAuth authentication. When you connect your Google Slides account, Pipedream will open a popup window where you can sign into Google Slides and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google Slides API.

  14. The Best APIs to Create PowerPoint Presentations

    APIs minimize repetitive design work. Auto-Generating Business Reports One of the most valuable use cases is auto-generating reports as PowerPoint presentations. While teams often rely on...

  15. Create smart chips for link previewing in Google Docs

    The manifest file contains the URL pattern for the Google Books API. The smart chip displays an icon and short title or description of the link's content. When the user hovers over the chip, they see a card interface that previews more information about the file or link. You can customize the card interface that appears when the user hovers ...

  16. SlidesAI Review: What You Need to Know in 2024

    Open the SlidesAI add-on: Return to your Google Slides presentation, click "Extensions," and select "SlidesAI.". Choose "Generate Slides.". Optionally, use "Magic Write" to enhance your slides after generation. Provide instructions to SlidesAI: You'll find two sections in the pop-up window. In the "Text" section, input ...

  17. How to Access and Use Google Gemini API Key (with Examples)

    After Gemini AI's announcement, Google has released API access for its Gemini models.Currently, the company is offering API access to Gemini Pro, including text-only and text-and-vision models. It's an interesting release because so far, Google has not added the visual capability to Bard as it is running the text-only model.

  18. Costco members can save $1,000 on a new 2024 Cadillac Lyriq

    Per a release from the Costco Auto Program this morning, customers can take advantage of a $1,000 member-only incentive on a new Cadillac model, including the 2024 LYRIQ model. Additionally, those ...

  19. Google Slides

    Use the REST APIs below to interact programmatically with Google Slides. Slides API Access and update Google Slides programmatically with popular programming languages, including...

  20. Introducing the Google Slides API

    The Slides API is available to projects in your Google Developers console today. Developers can find out more in the official documentation which features an API overview plus Quickstarts, sample code in multiple languages and environments, to bootstrap your next project. We look forward to seeing all the amazing slide deck generating ...