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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/gemini-api-quickstart-workflow-guide.md | A 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.text | The 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.text | The 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.text | The 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.text | A 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.text | The 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
