The content of the response.
typeUnion type
type can be only one of the following:| JSON representation |
|---|
{ // type "text": { object ( |
TextContent
A text content block.
textstring
Required. The text content.
Citation information for model-generated content.
| JSON representation |
|---|
{
"text": string,
"annotations": [
{
object ( |
ImageContent
An image content block.
mimeTypeenum (MimeType)
The mime type of the image.
The resolution of the media.
data_or_uriUnion type
data_or_uri can be only one of the following:The image content.
A base64-encoded string.
uristring
The URI of the image.
| JSON representation |
|---|
{ "mimeType": enum ( |
AudioContent
An audio content block.
The mime type of the audio.
channelsinteger
The number of audio channels.
sampleRateinteger
The sample rate of the audio.
data_or_uriUnion type
data_or_uri can be only one of the following:The audio content.
A base64-encoded string.
uristring
The URI of the audio.
| JSON representation |
|---|
{
"mimeType": enum ( |
DocumentContent
A document content block.
mimeTypeenum (MimeType)
The mime type of the document.
data_or_uriUnion type
data_or_uri can be only one of the following:The document content.
A base64-encoded string.
uristring
The URI of the document.
| JSON representation |
|---|
{
"mimeType": enum ( |
VideoContent
A video content block.
mimeTypeenum (MimeType)
The mime type of the video.
The resolution of the media.
data_or_uriUnion type
data_or_uri can be only one of the following:The video content.
A base64-encoded string.
uristring
The URI of the video.
| JSON representation |
|---|
{ "mimeType": enum ( |
ThoughtContent
A thought content block.
signature to match the backend source to be part of the generation.
A base64-encoded string.
A summary of the thought.
| JSON representation |
|---|
{
"signature": string,
"summary": [
{
object ( |
ThoughtSummaryContent
typeUnion type
| JSON representation |
|---|
{ // type "text": { object ( |
ToolCallContent
Tool call content.
idstring
Required. A unique id for this specific tool call.
A signature hash for backend validation.
A base64-encoded string.
typeUnion type
type can be only one of the following:| JSON representation |
|---|
{ "id": string, "signature": string, // type "functionCall": { object ( |
FunctionCallContent
A function tool call content block.
namestring
Required. The name of the tool to call.
Required. The arguments to pass to the function.
| JSON representation |
|---|
{
"name": string,
"arguments": {
object ( |
CodeExecutionCallContent
code execution content.
Required. The arguments to pass to the code execution.
| JSON representation |
|---|
{
"arguments": {
object ( |
UrlContextCallContent
URL context content.
Required. The arguments to pass to the URL context.
| JSON representation |
|---|
{
"arguments": {
object ( |
McpServerToolCallContent
MCPServer tool call content.
namestring
Required. The name of the tool which was called.
serverNamestring
Required. The name of the used MCP server.
Required. The JSON object of arguments for the function.
| JSON representation |
|---|
{
"name": string,
"serverName": string,
"arguments": {
object ( |
GoogleSearchCallContent
Google Search content.
Required. The arguments to pass to Google Search.
The type of search grounding enabled.
| JSON representation |
|---|
{ "arguments": { object ( |
FileSearchCallContent
This type has no fields.
File Search content.
GoogleMapsCallContent
Google Maps content.
The arguments to pass to the Google Maps tool.
| JSON representation |
|---|
{
"arguments": {
object ( |
ToolResultContent
Tool result content.
callIdstring
Required. id to match the id from the function call block.
A signature hash for backend validation.
A base64-encoded string.
typeUnion type
type can be only one of the following:| JSON representation |
|---|
{ "callId": string, "signature": string, // type "functionResult": { object ( |
FunctionResultContent
A function tool result content block.
namestring
The name of the tool that was called.
isErrorboolean
Whether the tool call resulted in an error.
resultUnion type
result can be only one of the following:stringResultstring
| JSON representation |
|---|
{ "name": string, "isError": boolean, // result "structResult": { object ( |
FunctionResultSubcontentList
| JSON representation |
|---|
{
"contents": [
{
object ( |
FunctionResultSubcontent
typeUnion type
| JSON representation |
|---|
{ // type "text": { object ( |
CodeExecutionResultContent
code execution result content.
resultstring
Required. The output of the code execution.
isErrorboolean
Whether the code execution resulted in an error.
| JSON representation |
|---|
{ "result": string, "isError": boolean } |
UrlContextResultContent
URL context result content.
Required. The results of the URL context.
isErrorboolean
Whether the URL context resulted in an error.
| JSON representation |
|---|
{
"result": [
{
object ( |
GoogleSearchResultContent
Google Search result content.
Required. The results of the Google Search.
isErrorboolean
Whether the Google Search resulted in an error.
| JSON representation |
|---|
{
"result": [
{
object ( |
McpServerToolResultContent
MCPServer tool result content.
namestring
name of the tool which is called for this specific tool call.
serverNamestring
The name of the used MCP server.
resultUnion type
result can be only one of the following:stringResultstring
| JSON representation |
|---|
{ "name": string, "serverName": string, // result "structResult": { object ( |
FileSearchResultContent
File Search result content.
Optional. The results of the File Search.
| JSON representation |
|---|
{
"result": [
{
object ( |
GoogleMapsResultContent
Google Maps result content.
Required. The results of the Google Maps.
| JSON representation |
|---|
{
"result": [
{
object ( |