google ยท Google AI Docs
Google AI API Generating content
Overview of the various content generation capabilities supported by the Gemini API, including text, vision, audio, code execution, JSON mode, and function calling.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Google AI API Generating content
Overview of the various content generation capabilities supported by the Gemini API, including text, vision, audio, code execution, JSON mode, and function calling.
When To Use
Use when you need to implement multimodal generation tasks such as text-to-text, image analysis, audio processing, or structured JSON output using the Gemini API.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/google-ai-api-generating-workflow-guide.md | API reference documentation for the models.generateContent method including endpoint details, path parameters, and request body structure. | Questions about aPI reference documentation for the models.generateContent method including endpoint details, path parameters, and re... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python.text | A Python script demonstrating how to use the Google GenAI client to generate text content using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the Google GenAI client to generate text content using the gemini-2.0-flash... |
examples/google-ai-api-generating-google-ai-api-generatecontent-javascript.text | A JavaScript code example demonstrating how to use the Google Generative AI SDK to call the generateContent method with a text prompt. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the Google Generative AI SDK to call the generateContent method wi... |
examples/google-ai-api-generating-google-ai-api-generatecontent-go.text | A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method to generate text from a user prompt. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method to generate... |
examples/google-ai-api-generating-google-ai-api-generate-curl-request.text | A curl command demonstrating a POST request to the Gemini 2.0 Flash model endpoint to generate text content. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the Gemini 2.0 Flash model endpoint to generate text content. |
examples/google-ai-api-generating-google-ai-api-generatecontent-java.text | A Java code example demonstrating how to use the Google AI API to generate content using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the Google AI API to generate content using the gemini-2.0-flash model. |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-multimodal.text | A Python script using the Google GenAI SDK to generate text content from an image using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python script using the Google GenAI SDK to generate text content from an image using the gemini-2.0-flash model. |
examples/google-ai-api-generating-google-ai-api-generatecontent-nodejs-multimodal.text | A Node.js code example demonstrating how to upload a media file and use the generateContent method with the Gemini 2.0 Flash model. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to upload a media file and use the generateContent method with the Gemini 2.... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup.text | A Go code example demonstrating how to initialize a Gemini API client and upload a media file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a media file for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-bash-multimodal-request.text | A bash script demonstrating how to encode an image to base64 and construct a JSON payload for a multimodal generate content request. | Exact payloads, commands, or snippets shown in A bash script demonstrating how to encode an image to base64 and construct a JSON payload for a multimodal generate c... |
examples/google-ai-api-generating-google-ai-api-generate-java-multimodal-request.text | A Java code example demonstrating how to send a multimodal request containing both text and image data to the Gemini API using the generateContent method. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to send a multimodal request containing both text and image data to the Gemini... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-audio-summ.text | A Python script using the Google GenAI SDK to upload an audio file and generate a summary using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python script using the Google GenAI SDK to upload an audio file and generate a summary using the gemini-2.0-flash... |
examples/google-ai-api-generating-google-ai-api-generatecontent-nodejs-audio-uplo.text | A Node.js code example demonstrating how to upload an audio file and use the generateContent method with the Gemini 2.0 Flash model. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to upload an audio file and use the generateContent method with the Gemini 2... |
examples/google-ai-api-generating-google-ai-api-generate-go-audio-upload.text | A Go code example demonstrating how to initialize a Gemini API client and upload an MP3 file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload an MP3 file for content generation. |
examples/google-ai-api-generating-google-ai-api-upload-audio-api-bash.text | A bash script demonstrating how to use the File API to upload audio data to the Google AI API for content generation. | Exact payloads, commands, or snippets shown in A bash script demonstrating how to use the File API to upload audio data to the Google AI API for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-python-video-upload-proc.text | A Python code example demonstrating how to upload a video file to the Google AI API and poll its state until it becomes active. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to upload a video file to the Google AI API and poll its state until it becom... |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-video-upload.text | A Node.js code example demonstrating how to upload a video file and poll for its active state using the Google Generative AI SDK. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to upload a video file and poll for its active state using the Google Genera... |
examples/google-ai-api-generating-google-ai-api-generate-go-video-upload.text | A Go code example demonstrating how to initialize a Gemini API client and upload a video file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a video file for content generation. |
examples/google-ai-api-generating-google-ai-api-api-audio-upload-bash.text | A bash script demonstrating how to use the File API to upload audio data to the Google AI API via a resumable request. | Exact payloads, commands, or snippets shown in A bash script demonstrating how to use the File API to upload audio data to the Google AI API via a resumable request. |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-multimodal-2.text | A Python script using the Google GenAI SDK to upload a PDF file and generate a summary using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python script using the Google GenAI SDK to upload a PDF file and generate a summary using the gemini-2.0-flash model. |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup-2.text | A Go code example demonstrating how to initialize a Gemini API client and upload a PDF file using the Google AI SDK. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a PDF file using the Google AI SDK. |
examples/google-ai-api-generating-google-ai-api-generate-resumable-upload-metadat.text | A curl command demonstrating how to initiate a resumable file upload request by capturing response headers to a temporary file. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to initiate a resumable file upload request by capturing response headers to a tempo... |
examples/google-ai-api-generating-google-ai-api-generate-python-chat-history.text | A Python code example demonstrating how to initialize a chat session with predefined history using the Google GenAI SDK. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize a chat session with predefined history using the Google GenAI SDK. |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-chat-history.text | A Node.js code example demonstrating how to initialize the GoogleGenAI client and create a chat session with predefined message history. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize the GoogleGenAI client and create a chat session with predefin... |
examples/google-ai-api-generating-google-ai-api-generatecontent-go-client-initial.text | A Go code example demonstrating how to initialize a Gemini API client and pass initial conversation history using the genai package. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and pass initial conversation history using the... |
examples/google-ai-api-generating-google-ai-api-generatecontent-curl-request.text | A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model. |
examples/google-ai-api-generating-google-ai-api-generate-java-client.text | A Java code example demonstrating how to initialize a client and use the generateContent method with a chat session. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to initialize a client and use the generateContent method with a chat session. |
examples/google-ai-api-generating-google-ai-api-python-create-cached.text | A Python code example demonstrating how to upload a file and create cached content using the Google GenAI SDK. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to upload a file and create cached content using the Google GenAI SDK. |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-upload.text | A Node.js code example demonstrating how to upload a file and use the Google AI API to generate content. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to upload a file and use the Google AI API to generate content. |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup-3.text | A Go code example demonstrating how to initialize a Gemini API client and upload a text file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a text file for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-migration-guide.text | A text document detailing the migration instructions and SDK updates for Gemini 2 within the Google AI API. | Exact payloads, commands, or snippets shown in A text document detailing the migration instructions and SDK updates for Gemini 2 within the Google AI API. |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-recipe-typ.text | A Python code example demonstrating how to use the Google GenAI SDK to generate structured content using a TypedDict for recipe data. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Google GenAI SDK to generate structured content using a TypedDict... |
examples/google-ai-api-generating-google-ai-api-generatecontent-nodejs.text | A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content with a specific response schema. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content with a specific resp... |
examples/google-ai-api-generating-google-ai-api-generatecontent-go-client-initial-2.text | A Go code example demonstrating how to initialize a Gemini API client using a context and API key. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client using a context and API key. |
examples/google-ai-api-generating-google-ai-api-generatecontent-curl-request-2.text | A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model with a JSON response configuration. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model with a J... |
examples/google-ai-api-generating-google-ai-api-generate-java-definition.text | A Java code snippet demonstrating how to define a structured response schema using the Google AI API client. | Exact payloads, commands, or snippets shown in A Java code snippet demonstrating how to define a structured response schema using the Google AI API client. |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-client.text | A Python code example demonstrating how to use the Google GenAI client to call the generateContent method with a specific model and prompt. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Google GenAI client to call the generateContent method with a spec... |
examples/google-ai-api-generating-google-ai-api-generatecontent-go-2.text | A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method to process a text prompt. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method to process... |
examples/google-ai-api-generating-google-ai-api-generatecontent-java-client.text | A Java code example demonstrating how to use the Google AI API client to generate content using a specific model and prompt. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the Google AI API client to generate content using a specific model and... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-client-set.text | A Python code example demonstrating how to initialize the Google GenAI client and define functions for content generation. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize the Google GenAI client and define functions for content genera... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-initialization.text | A Go code example demonstrating how to initialize a Gemini API client and configure model parameters for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and configure model parameters for content gene... |
examples/google-ai-api-generating-google-ai-api-generate-javascript-quickstart.text | A JavaScript code example demonstrating how to import the GoogleGenAI library and initialize the client to generate content using the Google AI API. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to import the GoogleGenAI library and initialize the client to generate c... |
examples/google-ai-api-generating-google-ai-api-generate-tool-declarations-json.text | A JSON structure defining function declarations for tool use within a Google AI API generate content request. | Exact payloads, commands, or snippets shown in A JSON structure defining function declarations for tool use within a Google AI API generate content request. |
examples/google-ai-api-generating-google-ai-api-generate-java-client-2.text | A Java code example demonstrating how to initialize a client and define function declarations for generating content using the Google AI API. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to initialize a client and define function declarations for generating content... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-client-2.text | A Python code example demonstrating how to use the Google GenAI SDK to generate content using the generate_content method with specific model configurations. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Google GenAI SDK to generate content using the generatecontent met... |
examples/google-ai-api-generating-google-ai-api-generatecontent-javascript-2.text | A JavaScript code example demonstrating how to use the GoogleGenAI SDK to call the generateContent method with a specific model and prompt. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the GoogleGenAI SDK to call the generateContent method with a spec... |
examples/google-ai-api-generating-google-ai-api-generatecontent-go-3.text | A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and call the GenerateContent method. |
examples/google-ai-api-generating-google-ai-api-generate-curl-request-2.text | A curl command demonstrating a POST request to the Gemini 2.0 Flash model endpoint with generation configuration parameters. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the Gemini 2.0 Flash model endpoint with generation configuration para... |
examples/google-ai-api-generating-google-ai-api-generate-java.text | A Java code example demonstrating how to use the Google AI API to generate content with specific configuration parameters like temperature and max output tokens. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the Google AI API to generate content with specific configuration parame... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-client-3.text | A Python code example demonstrating how to use the Google GenAI client to generate content using the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Google GenAI client to generate content using the gemini-2.0-flash... |
examples/google-ai-api-generating-google-ai-api-generate-nodejs.text | A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content from a text prompt. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content from a text prompt. |
examples/google-ai-api-generating-google-ai-api-generate-go-client-initialization-2.text | A Go code example demonstrating how to initialize a Gemini API client and prepare a prompt for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and prepare a prompt for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-curl-request-3.text | A curl command demonstrating a JSON request body for the Google AI API generateContent method including safety settings and text content. | Exact payloads, commands, or snippets shown in A curl command demonstrating a JSON request body for the Google AI API generateContent method including safety settin... |
examples/google-ai-api-generating-google-ai-api-generate-java-safety-settings.text | A Java code example demonstrating how to configure safety settings when calling the generateContent method in the Google AI API. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to configure safety settings when calling the generateContent method in the Goo... |
examples/google-ai-api-generating-google-ai-api-generatecontent-python-system-ins.text | A Python code example demonstrating how to use the system instruction parameter within a generateContent request using the Google GenAI SDK. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the system instruction parameter within a generateContent request usin... |
examples/google-ai-api-generating-google-ai-api-generatecontent-nodejs-2.text | A Node.js code example demonstrating how to use the GoogleGenAI SDK to generate content with a system instruction. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the GoogleGenAI SDK to generate content with a system instruction. |
examples/google-ai-api-generating-google-ai-api-generate-go.text | A Go code example demonstrating how to initialize a Gemini API client and construct user message contents to generate content. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and construct user message contents to generate... |
examples/google-ai-api-generating-google-ai-api-generatecontent-curl-request-3.text | A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model with system instructions. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the generateContent endpoint using the Gemini 2.0 Flash model with sys... |
examples/google-ai-api-generating-google-ai-api-generate-java-client-3.text | A Java code example demonstrating how to use the Google AI API client to generate content with system instructions. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the Google AI API client to generate content with system instructions. |
examples/google-ai-api-generating-google-ai-api-generatecontentstream-python.text | A Python script demonstrating how to use the Google GenAI client to generate content using a streaming response from the gemini-2.0-flash model. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the Google GenAI client to generate content using a streaming response from... |
examples/google-ai-api-generating-google-ai-api-generatecontent-nodejs-stream.text | A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content using a streaming response. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the Google Generative AI SDK to generate content using a streaming re... |
examples/google-ai-api-generating-google-ai-api-generate-go-2.text | A Go code example demonstrating how to initialize a Gemini API client and use the GenerateContent method to request a story. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and use the GenerateContent method to request a... |
examples/google-ai-api-generating-google-ai-api-generate-curl-request-4.text | A curl command demonstrating a streaming request to the Gemini 2.0 Flash model using the generateContent endpoint. | Exact payloads, commands, or snippets shown in A curl command demonstrating a streaming request to the Gemini 2.0 Flash model using the generateContent endpoint. |
examples/google-ai-api-generating-google-ai-api-generate-java-stream.text | A Java code example demonstrating how to use the generateContentStream method to stream responses from the Gemini 2.0 Flash model. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to use the generateContentStream method to stream responses from the Gemini 2.0... |
examples/google-ai-api-generating-google-ai-api-generatecontentstream-python-mult.text | A Python script using the Google GenAI SDK to stream content generation from a Gemini model using both text and an image input. | Exact payloads, commands, or snippets shown in A Python script using the Google GenAI SDK to stream content generation from a Gemini model using both text and an im... |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-stream.text | A Node.js code example demonstrating how to use the Google AI API to generate content using a streaming response and file uploads. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the Google AI API to generate content using a streaming response and... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup-4.text | A Go code example demonstrating how to initialize a Gemini API client and upload a media file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a media file for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-curl-request-5.text | A curl command demonstrating a POST request to the Gemini API using a JSON payload containing text and inline image data. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the Gemini API using a JSON payload containing text and inline image d... |
examples/google-ai-api-generating-google-ai-api-generate-java-multimodal-image-re.text | A Java code example demonstrating how to send a multimodal request containing both text and image data to the Gemini 2.0 Flash model using the generateContentStream method. | Exact payloads, commands, or snippets shown in A Java code example demonstrating how to send a multimodal request containing both text and image data to the Gemini... |
examples/google-ai-api-generating-google-ai-api-generate-python-audio-stream.text | A Python script demonstrating how to upload an audio file and use the generateContentStream method to receive a streamed text summary from a Gemini model. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to upload an audio file and use the generateContentStream method to receive a strea... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup-5.text | A Go code example demonstrating how to initialize a Gemini API client and upload an audio file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload an audio file for content generation. |
examples/google-ai-api-generating-google-ai-api-upload-audio-api-bash-2.text | A bash script demonstrating how to use the File API to upload audio data to the Google AI API via a resumable request. | Exact payloads, commands, or snippets shown in A bash script demonstrating how to use the File API to upload audio data to the Google AI API via a resumable request. |
examples/google-ai-api-generating-google-ai-api-generate-python-video-upload-proc-2.text | A Python code example demonstrating how to upload a video file and poll its state until it becomes active using the Google GenAI client. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to upload a video file and poll its state until it becomes active using the G... |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-video-upload-2.text | A Node.js code example demonstrating how to upload a video file and poll for its processing state using the Google AI SDK. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to upload a video file and poll for its processing state using the Google AI... |
examples/google-ai-api-generating-google-ai-api-generate-go-video-upload-2.text | A Go code example demonstrating how to initialize a Gemini API client and upload a video file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a video file for content generation. |
examples/google-ai-api-generating-google-ai-api-api-audio-upload-curl.text | A curl command sequence demonstrating how to use the File API to upload audio data to the Google AI API via a resumable request. | Exact payloads, commands, or snippets shown in A curl command sequence demonstrating how to use the File API to upload audio data to the Google AI API via a resumab... |
examples/google-ai-api-generating-google-ai-api-generate-python-stream-response.text | A Python script demonstrating how to upload a PDF and use the generate_content_stream method to receive a streamed text response from the Gemini model. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to upload a PDF and use the generatecontentstream method to receive a streamed text... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-setup-6.text | A Go code example demonstrating how to initialize a Gemini API client and upload a PDF file for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client and upload a PDF file for content generation. |
examples/google-ai-api-generating-google-ai-api-generate-resumable-upload-metadat-2.text | A curl command demonstrating how to initiate a resumable file upload request by capturing response headers to a temporary file. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to initiate a resumable file upload request by capturing response headers to a tempo... |
examples/google-ai-api-generating-google-ai-api-generate-python-client-setup.text | A Python code example demonstrating how to initialize the Google GenAI client and use the send_message_stream method to generate content. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize the Google GenAI client and use the sendmessagestream method to... |
examples/google-ai-api-generating-google-ai-api-generate-nodejs-chat-history-2.text | A Node.js code example demonstrating how to initialize the GoogleGenAI client and create a chat session with predefined message history. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize the GoogleGenAI client and create a chat session with predefin... |
examples/google-ai-api-generating-google-ai-api-generate-go-client-initialization-3.text | A Go code example demonstrating how to initialize a Gemini API client using a context and API key to prepare for content generation. | Exact payloads, commands, or snippets shown in A Go code example demonstrating how to initialize a Gemini API client using a context and API key to prepare for cont... |
examples/google-ai-api-generating-google-ai-api-generate-curl-request-6.text | A curl command demonstrating a POST request to the streamGenerateContent endpoint using the Gemini 2.0 Flash model. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the streamGenerateContent endpoint using the Gemini 2.0 Flash model. |
What This Skill Covers
- The Gemini API supports content generation with images, audio, code, tools, and more. For details on each of these features, read on and check out the task-f...
- Main sections:
Method: models.generateContent,Endpoint,Path parameters,Request body,Example request.
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/api/generate-content
