Vertex AI Advanced icon

Vertex AI Advanced

Interact with Google Vertex AI models — multimodal text, image, audio, and video

Text → Message a Model

AI-generated

Summary

Send a sequence of chat messages to a specified Google Vertex AI text model to generate a conversational completion, optionally using built-in tools and generation options.

Inputs

  • Project ID (required) — The Google Cloud Platform project ID used for the API call.
  • Model (required) — Select or specify the Vertex AI text model to message.
  • Messages (required) — An ordered collection of messages forming the conversation. Each message requires content text and a role ('user' or 'model') shaping the conversation.
  • Simplify Output — Boolean flag to receive simplified model responses instead of full raw API data; defaults to true.
  • Output Content as JSON — If true, attempts to get the model response in JSON format.
  • Built-in Tools — Optional built-in tools to enable during the model interaction: Google Search, Google Maps coordinates, URL content reading, and code execution.
  • Options — Optional generation settings including system message to instruct model behavior, penalties (frequency, presence), maximum tokens in output, number of completions, randomness controls (temperature, topP, topK), thinking budget, and whether to merge candidate responses.

Output shape

a list of response candidates from the model, each candidate containing generated content and metadata

If 'Simplify Output' is enabled, each output item corresponds to a candidate with simplified JSON content and is paired with the input item index. Otherwise, a single item with the full raw API response including all candidates is returned. If 'Include Merged Response' option is set, candidates include a single merged text string concatenating all text parts of the model's response.

Examples

Example 1: Chat with a Vertex AI conversational model

Provide project ID, select a Gemini model, and input a series of messages alternating roles 'user' and 'model'. Customize output simplification and optionally enable tools like Google Search for up-to-date info. Use generation options to control length and creativity of response.

Links

Discussion