Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Required. The content of the current conversation with the model.
For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
Optional. A list of Tools the model may use to generate the next response.
A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
Optional. Tool config. This config is shared for all tools provided in the request.
labels
map (key: string, value: string)
Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.
label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. label values are optional. label keys must start with a letter.
Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[],[],null,["# Method: publishers.models.generateContent\n\nGenerate content with multimodal inputs in express mode. \n\n### Endpoint\n\npost `https:``/``/aiplatform.googleapis.com``/v1``/{model}:generateContent`\n\n### Path parameters\n\n`model` `string` \nRequired. The fully qualified name of the publisher model to use.\n\nPublisher model format: `publishers/google/models/*`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `contents[]` `object (`[Content](/vertex-ai/generative-ai/docs/reference/rest/v1/Content)`)` \nRequired. The content of the current conversation with the model.\n\nFor single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.\n`tools[]` `object (`[Tool](/vertex-ai/generative-ai/docs/reference/rest/v1/projects.locations.cachedContents#Tool)`)` \nOptional. A list of `Tools` the model may use to generate the next response.\n\nA `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n`toolConfig` `object (`[ToolConfig](/vertex-ai/generative-ai/docs/reference/rest/v1/projects.locations.cachedContents#ToolConfig)`)` \nOptional. Tool config. This config is shared for all tools provided in the request.\n`labels` `map (key: string, value: string)` \nOptional. The labels with user-defined metadata for the request. It is used for billing and reporting only.\n\nlabel keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. label values are optional. label keys must start with a letter.\n`safetySettings[]` `object (`[SafetySetting](/vertex-ai/generative-ai/docs/reference/rest/v1/SafetySetting)`)` \nOptional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.\n`generationConfig` `object (`[GenerationConfig](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerationConfig)`)` \nOptional. Generation config.\n`systemInstruction` `object (`[Content](/vertex-ai/generative-ai/docs/reference/rest/v1/Content)`)` \nOptional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph. \n\n### Response body\n\nIf successful, the response body contains an instance of [GenerateContentResponse](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse)."]]