The Interaction resource.

interface Interaction {
    agent?:
        | string & {}
        | "deep-research-pro-preview-12-2025"
        | "deep-research-preview-04-2026"
        | "deep-research-max-preview-04-2026";
    agent_config?: | GeminiNextGenAPIClient.Interactions.DeepResearchAgentConfig
    | GeminiNextGenAPIClient.Interactions.DynamicAgentConfig;
    created: string;
    environment?: string
    | GeminiNextGenAPIClient.Interactions.Environment;
    environment_id?: string;
    id: string;
    input?:
        | string
        | GeminiNextGenAPIClient.Interactions.Step[]
        | GeminiNextGenAPIClient.Interactions.TextContent
        | GeminiNextGenAPIClient.Interactions.ImageContent
        | GeminiNextGenAPIClient.Interactions.AudioContent
        | GeminiNextGenAPIClient.Interactions.DocumentContent
        | GeminiNextGenAPIClient.Interactions.VideoContent
        | GeminiNextGenAPIClient.Interactions.Content[];
    model?: GeminiNextGenAPIClient.Interactions.Model;
    output_audio?: GeminiNextGenAPIClient.Interactions.AudioContent;
    output_image?: GeminiNextGenAPIClient.Interactions.ImageContent;
    output_text?: string;
    output_video?: GeminiNextGenAPIClient.Interactions.VideoContent;
    previous_interaction_id?: string;
    response_format?: unknown;
    response_mime_type?: string;
    response_modalities?: ("audio" | "video" | "image" | "text" | "document")[];
    role?: string;
    service_tier?: "flex" | "priority" | "standard";
    status:
        | "failed"
        | "completed"
        | "cancelled"
        | "in_progress"
        | "requires_action"
        | "incomplete"
        | "budget_exceeded";
    steps: GeminiNextGenAPIClient.Interactions.Step[];
    system_instruction?: string;
    tools?: GeminiNextGenAPIClient.Interactions.Tool[];
    updated: string;
    usage?: GeminiNextGenAPIClient.Interactions.Usage;
    webhook_config?: GeminiNextGenAPIClient.Interactions.WebhookConfig;
}

Properties

agent?:
    | string & {}
    | "deep-research-pro-preview-12-2025"
    | "deep-research-preview-04-2026"
    | "deep-research-max-preview-04-2026"

The name of the Agent used for generating the interaction.

Configuration parameters for the agent interaction.

created: string

Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.

environment_id?: string

Output only. The environment ID for the interaction. Only populated if environment config is set in the request.

id: string

Required. Output only. A unique identifier for the interaction completion.

The input for the interaction.

The name of the Model used for generating the interaction.

The last audio generated by the model in response to the current request.

Note: this is added by the SDK.

The last image generated by the model in response to the current request.

Note: this is added by the SDK.

output_text?: string

Concatenated text from the last model output in response to the current request.

Note: this is added by the SDK.

The last video generated by the model in response to the current request.

Note: this is added by the SDK.

previous_interaction_id?: string

The ID of the previous interaction, if any.

response_format?: unknown

Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.

response_mime_type?: string

The mime type of the response. This is required if response_format is set.

response_modalities?: ("audio" | "video" | "image" | "text" | "document")[]

The requested modalities of the response (TEXT, IMAGE, AUDIO).

role?: string

Output only. The role of the interaction.

service_tier?: "flex" | "priority" | "standard"

The service tier for the interaction.

status:
    | "failed"
    | "completed"
    | "cancelled"
    | "in_progress"
    | "requires_action"
    | "incomplete"
    | "budget_exceeded"

Required. Output only. The status of the interaction.

Required. Output only. The steps that make up the interaction.

system_instruction?: string

System instruction for the interaction.

A list of tool declarations the model may call during interaction.

updated: string

Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Output only. Statistics on the interaction request's token usage.

Optional. Webhook configuration for receiving notifications when the interaction completes.