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.
cachedContent
string
Optional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: projects/{project}/locations/{location}/cachedContents/{cachedContent}
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-08-21 UTC."],[],[],null,["# Method: endpoints.generateContent\n\n**Full name**: projects.locations.endpoints.generateContent\n\nGenerate content with multimodal inputs. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1beta1``/{model}:generateContent` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`model` `string` \nRequired. The fully qualified name of the publisher model or tuned model endpoint to use.\n\nPublisher model format: `projects/{project}/locations/{location}/publishers/*/models/*`\n\nTuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `contents[]` `object (`[Content](/vertex-ai/docs/reference/rest/v1beta1/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`cachedContent` `string` \nOptional. The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: `projects/{project}/locations/{location}/cachedContents/{cachedContent}`\n`tools[]` `object (`[Tool](/vertex-ai/docs/reference/rest/v1beta1/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/docs/reference/rest/v1beta1/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/docs/reference/rest/v1beta1/SafetySetting)`)` \nOptional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.\n`modelArmorConfig` `object (`[ModelArmorConfig](/vertex-ai/docs/reference/rest/v1beta1/ModelArmorConfig)`)` \nOptional. Settings for prompt and response sanitization using the Model Armor service. If supplied, safetySettings must not be supplied.\n`generationConfig` `object (`[GenerationConfig](/vertex-ai/docs/reference/rest/v1beta1/GenerationConfig)`)` \nOptional. Generation config.\n`systemInstruction` `object (`[Content](/vertex-ai/docs/reference/rest/v1beta1/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/docs/reference/rest/v1beta1/GenerateContentResponse)."]]