Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API quickstart

A foundational guide for setting up the Gemini API, including obtaining an API key and implementing initial code using the GenAI SDK.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API quickstart

A foundational guide for setting up the Gemini API, including obtaining an API key and implementing initial code using the GenAI SDK.

When To Use

Use when you need to perform the initial setup and write the first lines of code to interact with the Gemini API using the GenAI SDK.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-quickstart-workflow-guide.mdA markdown guide providing instructions for installing the Google GenAI SDK and making initial Gemini API requests using Python and JavaScript.Questions about a markdown guide providing instructions for installing the Google GenAI SDK and making initial Gemini API requests us...
examples/gemini-api-quickstart-gemini-api-python-install-command.textThe pip install command required to install the google-genai Python SDK.Exact payloads, commands, or snippets shown in The pip install command required to install the google-genai Python SDK.
examples/gemini-api-quickstart-gemini-api-nodejs-install-command.textThe npm installation command required to set up the Google Generative AI SDK for Node.js.Exact payloads, commands, or snippets shown in The npm installation command required to set up the Google Generative AI SDK for Node.js.
examples/gemini-api-quickstart-go-install-command.textThe shell command to install the Google GenAI SDK for Go.Exact payloads, commands, or snippets shown in The shell command to install the Google GenAI SDK for Go.
examples/gemini-api-quickstart-dependencies.textA list of required software dependencies and version requirements for the Gemini API quickstart guide.Exact payloads, commands, or snippets shown in A list of required software dependencies and version requirements for the Gemini API quickstart guide.
examples/gemini-api-quickstart-gemini-api-dotnet-package-installation.textThe dotnet CLI command required to add the Google.GenAI package to a project.Exact payloads, commands, or snippets shown in The dotnet CLI command required to add the Google.GenAI package to a project.
examples/gemini-api-quickstart-gemini-api-python-generatecontent-quickstart.textA Python code example demonstrating how to initialize the Gemini client and use the generateContent method to produce a text response.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize the Gemini client and use the generateContent method to produce...
examples/gemini-api-quickstart-gemini-api-nodejs-generatecontent-quickstart.textA Node.js code example demonstrating how to initialize the GoogleGenAI client and use the generateContent method to get a response from a Gemini model.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize the GoogleGenAI client and use the generateContent method to g...
examples/gemini-api-quickstart-gemini-api-golang-generatecontent-quickstart.textA Go language implementation demonstrating how to initialize a client and call the GenerateContent method using the Google GenAI SDK.Exact payloads, commands, or snippets shown in A Go language implementation demonstrating how to initialize a client and call the GenerateContent method using the G...
examples/gemini-api-quickstart-gemini-api-java-generate-quickstart.textA Java code example demonstrating how to use the Gemini API to generate text from a text input prompt.Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the Gemini API to generate text from a text input prompt.
examples/gemini-api-quickstart-gemini-api-csharp-generate-quickstart.textA C# code example demonstrating how to use the Google GenAI SDK to generate content using the Gemini API.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to use the Google GenAI SDK to generate content using the Gemini API.
examples/gemini-api-quickstart-gemini-api-google-apps-script-quickstart.textA Google Apps Script implementation demonstrating how to initialize the Gemini API using script properties for the API key and sending a text prompt payload.Exact payloads, commands, or snippets shown in A Google Apps Script implementation demonstrating how to initialize the Gemini API using script properties for the AP...
examples/gemini-api-quickstart-gemini-api-curl-generatecontent-request.textA curl command demonstrating a POST request to the Gemini API generateContent endpoint using a model identifier and API key.Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the Gemini API generateContent endpoint using a model identifier and A...

What This Skill Covers

  • This quickstart shows you how to install our libraries and make your first Gemini API request.
  • Main sections: Before you begin, Install the Google GenAI SDK, Python, JavaScript, Go.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/quickstart