GenerateContentRequest interface
Stay organized with collections
Save and categorize content based on your preferences.
Request sent through GenerativeModel.generateContent()
Signature:
export interface GenerateContentRequest extends BaseParams
Extends: BaseParams
Properties
GenerateContentRequest.contents
Signature:
contents: Content[];
GenerateContentRequest.systemInstruction
Signature:
systemInstruction?: string | Part | Content;
GenerateContentRequest.toolConfig
Signature:
toolConfig?: ToolConfig;
GenerateContentRequest.tools
Signature:
tools?: Tool[];
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.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# GenerateContentRequest interface\n\nRequest sent through [GenerativeModel.generateContent()](./ai.generativemodel.md#generativemodelgeneratecontent)\n\n**Signature:** \n\n export interface GenerateContentRequest extends BaseParams \n\n**Extends:** [BaseParams](./ai.baseparams.md#baseparams_interface)\n\nProperties\n----------\n\n| Property | Type | Description |\n|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|-------------|\n| [contents](./ai.generatecontentrequest.md#generatecontentrequestcontents) | [Content](./ai.content.md#content_interface)\\[\\] | |\n| [systemInstruction](./ai.generatecontentrequest.md#generatecontentrequestsysteminstruction) | string \\| [Part](./ai.md#part) \\| [Content](./ai.content.md#content_interface) | |\n| [toolConfig](./ai.generatecontentrequest.md#generatecontentrequesttoolconfig) | [ToolConfig](./ai.toolconfig.md#toolconfig_interface) | |\n| [tools](./ai.generatecontentrequest.md#generatecontentrequesttools) | [Tool](./ai.md#tool)\\[\\] | |\n\nGenerateContentRequest.contents\n-------------------------------\n\n**Signature:** \n\n contents: Content[];\n\nGenerateContentRequest.systemInstruction\n----------------------------------------\n\n**Signature:** \n\n systemInstruction?: string | Part | Content;\n\nGenerateContentRequest.toolConfig\n---------------------------------\n\n**Signature:** \n\n toolConfig?: ToolConfig;\n\nGenerateContentRequest.tools\n----------------------------\n\n**Signature:** \n\n tools?: Tool[];"]]