Full name: projects.locations.interactions.createStream
Creates an interaction and streams the response.
Endpoint
posthttps://{service-endpoint}/v1/projects/*/locations/*/interactions:createStream
Where {service-endpoint} is one of the supported service endpoints.
Request body
The request body contains data with the following structure:
streamboolean
Input only. Whether the interaction will be streamed.
storeboolean
Input only. Whether to store the response and request for later retrieval.
A signature hash for backend validation.
A base64-encoded string.
interaction.stepList.steps[].thought.summary[].text.textstring
Required. The text content.
interaction.stepList.steps[].thought.summary[].text.annotations[].urlCitation.urlstring
The URL.
interaction.stepList.steps[].thought.summary[].text.annotations[].urlCitation.titlestring
The title of the URL.
interaction.stepList.steps[].thought.summary[].text.annotations[].startIndexinteger
Start of segment of the response that is attributed to this source.
Index indicates the start of the segment, measured in bytes.
interaction.stepList.steps[].thought.summary[].text.annotations[].endIndexinteger
End of the attributed segment, exclusive.
interaction.stepList.steps[].thought.summary[].image.mimeTypeStringstring
Flexible MIME type string of the image, superseding mimeType = 1. Note: Bespoke logic in the GAOS parser/serializer maps this to the "mimeType" JSON key.
The resolution of the media.
interaction.stepList.steps[].thought.summary[].audio.mimeTypeStringstring
Flexible MIME type string of the audio, superseding mimeType = 1. Note: Bespoke logic in the GAOS parser/serializer maps this to the "mimeType" JSON key.
interaction.stepList.steps[].thought.summary[].audio.channelsinteger
The number of audio channels.
interaction.stepList.steps[].thought.summary[].audio.sampleRateinteger
The sample rate of the audio.
interaction.stepList.steps[].thought.summary[].document.mimeTypeStringstring
Flexible MIME type string of the document, superseding mimeType = 1. Note: Bespoke logic in the GAOS parser/serializer maps this to the "mimeType" JSON key.
interaction.stepList.steps[].thought.summary[].video.mimeTypeStringstring
Flexible MIME type string of the video, superseding mimeType = 1. Note: Bespoke logic in the GAOS parser/serializer maps this to the "mimeType" JSON key.
The resolution of the media.
interaction.stepList.steps[].thought.summary[].video.namestring
A user-defined name for this content block. Can be referenced by the model in the final response.
interaction.stepList.steps[].toolCall.functionCall.namestring
Required. The name of the tool to call.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].namestring
interaction.stepList.steps[].toolCall.idstring
Required. A unique id for this specific tool call.
A signature hash for backend validation.
A base64-encoded string.
interaction.idstring
Required. Output only. A unique identifier for the interaction completion.
Required. Output only. The status of the interaction.
interaction.createdstring
Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
interaction.updatedstring
Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
interaction.systemInstructionstring
System instruction for the interaction.
A list of tool declarations the model may call during interaction.
Output only. Statistics on the interaction request's token usage.
interaction.previousInteractionIdstring
The id of the previous interaction, if any.
interaction.environmentIdstring
Output only. The environment id for the interaction. Only populated if environment config is set in the request.
Required. Output only. The steps that make up the interaction, when included in the response.
Safety settings for the interaction.
interaction.labelsmap (key: string, value: string)
The labels with user-defined metadata for the request.
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.
Output only. Diagnostic faults / platform errors recorded on the interaction.
backgroundboolean
Input only. Whether to run the model interaction in the background.
inputUnion type
interaction.stringContentstring
A string input for the interaction, it will be processed as a single text input.
Input only. The steps for the interaction.
The content for the interaction.
typeUnion type
NOTE: We use these instead of the Citation message for historical reasons. A URL citation annotation.
interaction.stepList.steps[].thought.summary[].text.annotations[].fileCitationobject (FileCitation)
A file citation annotation.
interaction.stepList.steps[].thought.summary[].text.annotations[].placeCitationobject (PlaceCitation)
A place citation annotation.
word-level ASR annotation with timing and speaker info.
data_or_uriUnion type
The image content.
A base64-encoded string.
interaction.stepList.steps[].thought.summary[].image.uristring
The URI of the image.
data_or_uriUnion type
The audio content.
A base64-encoded string.
interaction.stepList.steps[].thought.summary[].audio.uristring
The URI of the audio.
data_or_uriUnion type
The document content.
A base64-encoded string.
interaction.stepList.steps[].thought.summary[].document.uristring
The URI of the document.
data_or_uriUnion type
The video content.
A base64-encoded string.
interaction.stepList.steps[].thought.summary[].video.uristring
The URI of the video.
processingUnion type
kindUnion type
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.nullValuenull
Represents a null value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.numberValuenumber
Represents a double value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.stringValuestring
Represents a string value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.boolValueboolean
Represents a boolean value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.structValueobject (Struct)
Represents a structured value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.listValueobject (ListValue)
Represents a repeated value.
interaction.stepList.steps[].toolCall.functionCall.arguments.fields[].value.contentValueobject (Content)
Represents rich content (text, image, etc.).
typeUnion type
typeUnion type
DO NOT USE -- These are for 3P JSON only
response_format_configUnion type
request_typeUnion type
Interaction for generating the completion using models.
Interaction for generating the completion using agents.
environmentUnion type
interaction.envIdstring
The environment id for the interaction. Can be 'remote' for default environment.
Response body
If successful, the response body contains a stream of InteractionStreamingEvent instances.