Content

The content of the response.

Fields
type Union type
type can be only one of the following:
text object (TextContent)
image object (ImageContent)
audio object (AudioContent)
document object (DocumentContent)
video object (VideoContent)
thought
(deprecated)
object (ThoughtContent)
toolCall
(deprecated)
object (ToolCallContent)
toolResult
(deprecated)
object (ToolResultContent)
JSON representation
{

  // type
  "text": {
    object (TextContent)
  },
  "image": {
    object (ImageContent)
  },
  "audio": {
    object (AudioContent)
  },
  "document": {
    object (DocumentContent)
  },
  "video": {
    object (VideoContent)
  },
  "thought": {
    object (ThoughtContent)
  },
  "toolCall": {
    object (ToolCallContent)
  },
  "toolResult": {
    object (ToolResultContent)
  }
  // Union type
}

TextContent

A text content block.

Fields
text string

Required. The text content.

annotations[] object (Annotation)

Citation information for model-generated content.

JSON representation
{
  "text": string,
  "annotations": [
    {
      object (Annotation)
    }
  ]
}

ImageContent

An image content block.

Fields
mimeType enum (MimeType)

The mime type of the image.

resolution enum (MediaResolution)

The resolution of the media.

data_or_uri Union type
The image content. data_or_uri can be only one of the following:
data string (bytes format)

The image content.

A base64-encoded string.

uri string

The URI of the image.

JSON representation
{
  "mimeType": enum (MimeType),
  "resolution": enum (MediaResolution),

  // data_or_uri
  "data": string,
  "uri": string
  // Union type
}

AudioContent

An audio content block.

Fields
mimeType enum (MimeType)

The mime type of the audio.

channels integer

The number of audio channels.

sampleRate integer

The sample rate of the audio.

data_or_uri Union type
The audio content. data_or_uri can be only one of the following:
data string (bytes format)

The audio content.

A base64-encoded string.

uri string

The URI of the audio.

JSON representation
{
  "mimeType": enum (MimeType),
  "channels": integer,
  "sampleRate": integer,

  // data_or_uri
  "data": string,
  "uri": string
  // Union type
}

DocumentContent

A document content block.

Fields
mimeType enum (MimeType)

The mime type of the document.

data_or_uri Union type
The document content. data_or_uri can be only one of the following:
data string (bytes format)

The document content.

A base64-encoded string.

uri string

The URI of the document.

JSON representation
{
  "mimeType": enum (MimeType),

  // data_or_uri
  "data": string,
  "uri": string
  // Union type
}

VideoContent

A video content block.

Fields
mimeType enum (MimeType)

The mime type of the video.

resolution enum (MediaResolution)

The resolution of the media.

data_or_uri Union type
The video content. data_or_uri can be only one of the following:
data string (bytes format)

The video content.

A base64-encoded string.

uri string

The URI of the video.

JSON representation
{
  "mimeType": enum (MimeType),
  "resolution": enum (MediaResolution),

  // data_or_uri
  "data": string,
  "uri": string
  // Union type
}

ThoughtContent

A thought content block.

Fields
signature string (bytes format)

signature to match the backend source to be part of the generation.

A base64-encoded string.

summary[] object (ThoughtSummaryContent)

A summary of the thought.

JSON representation
{
  "signature": string,
  "summary": [
    {
      object (ThoughtSummaryContent)
    }
  ]
}

ThoughtSummaryContent

Fields
type Union type
type can be only one of the following:
text object (TextContent)
image object (ImageContent)
JSON representation
{

  // type
  "text": {
    object (TextContent)
  },
  "image": {
    object (ImageContent)
  }
  // Union type
}

ToolCallContent

Tool call content.

Fields
id string

Required. A unique id for this specific tool call.

signature string (bytes format)

A signature hash for backend validation.

A base64-encoded string.

type Union type
type can be only one of the following:
functionCall object (FunctionCallContent)
codeExecutionCall object (CodeExecutionCallContent)
urlContextCall object (UrlContextCallContent)
mcpServerToolCall object (McpServerToolCallContent)
googleSearchCall object (GoogleSearchCallContent)
fileSearchCall object (FileSearchCallContent)
googleMapsCall object (GoogleMapsCallContent)
JSON representation
{
  "id": string,
  "signature": string,

  // type
  "functionCall": {
    object (FunctionCallContent)
  },
  "codeExecutionCall": {
    object (CodeExecutionCallContent)
  },
  "urlContextCall": {
    object (UrlContextCallContent)
  },
  "mcpServerToolCall": {
    object (McpServerToolCallContent)
  },
  "googleSearchCall": {
    object (GoogleSearchCallContent)
  },
  "fileSearchCall": {
    object (FileSearchCallContent)
  },
  "googleMapsCall": {
    object (GoogleMapsCallContent)
  }
  // Union type
}

FunctionCallContent

A function tool call content block.

Fields
name string

Required. The name of the tool to call.

arguments object (Struct)

Required. The arguments to pass to the function.

JSON representation
{
  "name": string,
  "arguments": {
    object (Struct)
  }
}

CodeExecutionCallContent

code execution content.

Fields
arguments object (CodeExecutionCallArguments)

Required. The arguments to pass to the code execution.

JSON representation
{
  "arguments": {
    object (CodeExecutionCallArguments)
  }
}

UrlContextCallContent

URL context content.

Fields
arguments object (UrlContextCallArguments)

Required. The arguments to pass to the URL context.

JSON representation
{
  "arguments": {
    object (UrlContextCallArguments)
  }
}

McpServerToolCallContent

MCPServer tool call content.

Fields
name string

Required. The name of the tool which was called.

serverName string

Required. The name of the used MCP server.

arguments object (Struct)

Required. The JSON object of arguments for the function.

JSON representation
{
  "name": string,
  "serverName": string,
  "arguments": {
    object (Struct)
  }
}

GoogleSearchCallContent

Google Search content.

Fields
arguments object (GoogleSearchCallArguments)

Required. The arguments to pass to Google Search.

searchType enum (SearchType)

The type of search grounding enabled.

JSON representation
{
  "arguments": {
    object (GoogleSearchCallArguments)
  },
  "searchType": enum (SearchType)
}

FileSearchCallContent

This type has no fields.

File Search content.

GoogleMapsCallContent

Google Maps content.

Fields
arguments object (GoogleMapsCallArguments)

The arguments to pass to the Google Maps tool.

JSON representation
{
  "arguments": {
    object (GoogleMapsCallArguments)
  }
}

ToolResultContent

Tool result content.

Fields
callId string

Required. id to match the id from the function call block.

signature string (bytes format)

A signature hash for backend validation.

A base64-encoded string.

type Union type
type can be only one of the following:
functionResult object (FunctionResultContent)
codeExecutionResult object (CodeExecutionResultContent)
urlContextResult object (UrlContextResultContent)
googleSearchResult object (GoogleSearchResultContent)
mcpServerToolResult object (McpServerToolResultContent)
fileSearchResult object (FileSearchResultContent)
googleMapsResult object (GoogleMapsResultContent)
JSON representation
{
  "callId": string,
  "signature": string,

  // type
  "functionResult": {
    object (FunctionResultContent)
  },
  "codeExecutionResult": {
    object (CodeExecutionResultContent)
  },
  "urlContextResult": {
    object (UrlContextResultContent)
  },
  "googleSearchResult": {
    object (GoogleSearchResultContent)
  },
  "mcpServerToolResult": {
    object (McpServerToolResultContent)
  },
  "fileSearchResult": {
    object (FileSearchResultContent)
  },
  "googleMapsResult": {
    object (GoogleMapsResultContent)
  }
  // Union type
}

FunctionResultContent

A function tool result content block.

Fields
name string

The name of the tool that was called.

isError boolean

Whether the tool call resulted in an error.

result Union type
The result of the tool call. result can be only one of the following:
structResult object (Struct)
contentList object (FunctionResultSubcontentList)
stringResult string
JSON representation
{
  "name": string,
  "isError": boolean,

  // result
  "structResult": {
    object (Struct)
  },
  "contentList": {
    object (FunctionResultSubcontentList)
  },
  "stringResult": string
  // Union type
}

FunctionResultSubcontentList

Fields
contents[] object (FunctionResultSubcontent)
JSON representation
{
  "contents": [
    {
      object (FunctionResultSubcontent)
    }
  ]
}

FunctionResultSubcontent

Fields
type Union type
type can be only one of the following:
text object (TextContent)
image object (ImageContent)
JSON representation
{

  // type
  "text": {
    object (TextContent)
  },
  "image": {
    object (ImageContent)
  }
  // Union type
}

CodeExecutionResultContent

code execution result content.

Fields
result string

Required. The output of the code execution.

isError boolean

Whether the code execution resulted in an error.

JSON representation
{
  "result": string,
  "isError": boolean
}

UrlContextResultContent

URL context result content.

Fields
result[] object (UrlContextResult)

Required. The results of the URL context.

isError boolean

Whether the URL context resulted in an error.

JSON representation
{
  "result": [
    {
      object (UrlContextResult)
    }
  ],
  "isError": boolean
}

GoogleSearchResultContent

Google Search result content.

Fields
result[] object (GoogleSearchResult)

Required. The results of the Google Search.

isError boolean

Whether the Google Search resulted in an error.

JSON representation
{
  "result": [
    {
      object (GoogleSearchResult)
    }
  ],
  "isError": boolean
}

McpServerToolResultContent

MCPServer tool result content.

Fields
name string

name of the tool which is called for this specific tool call.

serverName string

The name of the used MCP server.

result Union type
The output from the MCP server call. Can be simple text or rich content. result can be only one of the following:
structResult object (Struct)
contentList object (FunctionResultSubcontentList)
stringResult string
JSON representation
{
  "name": string,
  "serverName": string,

  // result
  "structResult": {
    object (Struct)
  },
  "contentList": {
    object (FunctionResultSubcontentList)
  },
  "stringResult": string
  // Union type
}

FileSearchResultContent

File Search result content.

Fields
result[] object (FileSearchResult)

Optional. The results of the File Search.

JSON representation
{
  "result": [
    {
      object (FileSearchResult)
    }
  ]
}

GoogleMapsResultContent

Google Maps result content.

Fields
result[] object (GoogleMapsResult)

Required. The results of the Google Maps.

JSON representation
{
  "result": [
    {
      object (GoogleMapsResult)
    }
  ]
}