{
  "openapi": "3.0.3",
  "info": {
    "title": "Gemini API",
    "description": "The Gemini Interactions API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.",
    "version": "v1",
    "x-google-revision": "0"
  },
  "servers": [
    {
      "url": "https://generativelanguage.googleapis.com",
      "description": "Global Endpoint"
    }
  ],
  "paths": {
    "/{api_version}/interactions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/api_version"
        }
      ],
      "post": {
        "operationId": "CreateInteraction",
        "description": "Creates a new interaction.",
        "requestBody": {
          "description": "The request body.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateModelInteractionParams"
                  },
                  {
                    "$ref": "#/components/schemas/CreateAgentInteractionParams"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Interaction"
                },
                "examples": {
                  "simple": {
                    "summary": "Simple Request",
                    "value": {
                      "created": "2025-11-26T12:25:15Z",
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "object": "interaction",
                      "steps": [
                        {
                          "type": "model_output",
                          "content": [
                            {
                              "type": "text",
                              "text": "Hello! I'm functioning perfectly and ready to assist you.\n\nHow are you doing today?"
                            }
                          ]
                        }
                      ],
                      "status": "completed",
                      "updated": "2025-11-26T12:25:15Z",
                      "usage": {
                        "input_tokens_by_modality": [
                          {
                            "modality": "text",
                            "tokens": 7
                          }
                        ],
                        "total_cached_tokens": 0,
                        "total_input_tokens": 7,
                        "total_output_tokens": 20,
                        "total_thought_tokens": 22,
                        "total_tokens": 49,
                        "total_tool_use_tokens": 0
                      }
                    }
                  },
                  "multi_turn": {
                    "summary": "Multi-turn",
                    "value": {
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "status": "completed",
                      "object": "interaction",
                      "created": "2025-11-26T12:22:47Z",
                      "updated": "2025-11-26T12:22:47Z",
                      "steps": [
                        {
                          "type": "model_output",
                          "content": [
                            {
                              "type": "text",
                              "text": "The capital of France is Paris."
                            }
                          ]
                        }
                      ],
                      "usage": {
                        "input_tokens_by_modality": [
                          {
                            "modality": "text",
                            "tokens": 50
                          }
                        ],
                        "total_cached_tokens": 0,
                        "total_input_tokens": 50,
                        "total_output_tokens": 10,
                        "total_thought_tokens": 0,
                        "total_tokens": 60,
                        "total_tool_use_tokens": 0
                      }
                    }
                  },
                  "multimodal_image": {
                    "summary": "Image Input",
                    "value": {
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "status": "completed",
                      "object": "interaction",
                      "created": "2025-11-26T12:22:47Z",
                      "updated": "2025-11-26T12:22:47Z",
                      "steps": [
                        {
                          "type": "model_output",
                          "content": [
                            {
                              "type": "text",
                              "text": "A white humanoid robot with glowing blue eyes stands holding a red skateboard."
                            }
                          ]
                        }
                      ],
                      "usage": {
                        "input_tokens_by_modality": [
                          {
                            "modality": "text",
                            "tokens": 10
                          },
                          {
                            "modality": "image",
                            "tokens": 258
                          }
                        ],
                        "total_cached_tokens": 0,
                        "total_input_tokens": 268,
                        "total_output_tokens": 20,
                        "total_thought_tokens": 0,
                        "total_tokens": 288,
                        "total_tool_use_tokens": 0
                      }
                    }
                  },
                  "function_calling": {
                    "summary": "Function Calling",
                    "value": {
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "status": "requires_action",
                      "object": "interaction",
                      "created": "2025-11-26T12:22:47Z",
                      "updated": "2025-11-26T12:22:47Z",
                      "steps": [
                        {
                          "type": "function_call",
                          "id": "gth23981",
                          "name": "get_weather",
                          "arguments": {
                            "location": "Boston, MA"
                          }
                        }
                      ],
                      "usage": {
                        "input_tokens_by_modality": [
                          {
                            "modality": "text",
                            "tokens": 100
                          }
                        ],
                        "total_cached_tokens": 0,
                        "total_input_tokens": 100,
                        "total_output_tokens": 25,
                        "total_thought_tokens": 0,
                        "total_tokens": 125,
                        "total_tool_use_tokens": 50
                      }
                    }
                  }
                }
              },
              "text/event-stream": {
                "x-speakeasy-sse-sentinel": "[DONE]",
                "schema": {
                  "$ref": "#/components/schemas/InteractionSseStreamEvent"
                }
              }
            }
          },
          "4XX": {
            "description": "Error creating interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Error creating interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Creating an interaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/api_version"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "simple",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"input\": \"Hello, how are you?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "simple",
            "source": "from google import genai\n\nclient = genai.Client()\ninteraction = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=\"Hello, how are you?\",\n)\nprint(interaction.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "simple",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: 'Hello, how are you?',\n});\nconsole.log(interaction.output_text);\n"
          },
          {
            "lang": "sh",
            "label": "multi_turn",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"input\": [\n      { \"type\": \"user_input\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello!\" }] },\n      { \"type\": \"model_output\", \"content\": [{ \"type\": \"text\", \"text\": \"Hi there! How can I help you today?\" }] },\n      { \"type\": \"user_input\", \"content\": [{ \"type\": \"text\", \"text\": \"What is the capital of France?\" }] }\n    ]\n  }'\n"
          },
          {
            "lang": "python",
            "label": "multi_turn",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=[\n        { \"type\": \"user_input\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello!\" }] },\n        { \"type\": \"model_output\", \"content\": [{ \"type\": \"text\", \"text\": \"Hi there! How can I help you today?\" }] },\n        { \"type\": \"user_input\", \"content\": [{ \"type\": \"text\", \"text\": \"What is the capital of France?\" }] }\n    ]\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "multi_turn",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: [\n        { type: 'user_input', content: [{ type: 'text', text: 'Hello' }] },\n        { type: 'model_output', content: [{ type: 'text', text: 'Hi there! How can I help you today?' }] },\n        { type: 'user_input', content: [{ type: 'text', text: 'What is the capital of France?' }] }\n    ]\n});\nconsole.log(interaction.output_text);\n"
          },
          {
            "lang": "sh",
            "label": "multimodal_image",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"input\": [\n      {\n        \"type\": \"text\",\n        \"text\": \"What is in this picture?\"\n      },\n      {\n        \"type\": \"image\",\n        \"data\": \"BASE64_ENCODED_IMAGE\",\n        \"mime_type\": \"image/png\"\n      }\n    ]\n  }'\n"
          },
          {
            "lang": "python",
            "label": "multimodal_image",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=[\n      { \"type\": \"text\", \"text\": \"What is in this picture?\" },\n      { \"type\": \"image\", \"data\": \"BASE64_ENCODED_IMAGE\", \"mime_type\": \"image/png\" }\n    ]\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "multimodal_image",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: [\n      { type: 'text', text: 'What is in this picture?' },\n      { type: 'image', data: 'BASE64_ENCODED_IMAGE', mime_type: 'image/png' }\n    ]\n});\nconsole.log(interaction.output_text);\n"
          },
          {
            "lang": "sh",
            "label": "function_calling",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [\n      {\n        \"type\": \"function\",\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state, e.g. San Francisco, CA\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      }\n    ],\n    \"input\": \"What is the weather like in Boston, MA?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "function_calling",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\n        \"type\": \"function\",\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"location\": {\n                    \"type\": \"string\",\n                    \"description\": \"The city and state, e.g. San Francisco, CA\"\n                }\n            },\n            \"required\": [\"location\"]\n        }\n    }],\n    input=\"What is the weather like in Boston, MA?\"\n)\nprint(response.steps[-1])\n"
          },
          {
            "lang": "javascript",
            "label": "function_calling",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{\n        type: 'function',\n        name: 'get_weather',\n        description: 'Get the current weather in a given location',\n        parameters: {\n            type: 'object',\n            properties: {\n                location: {\n                    type: 'string',\n                    description: 'The city and state, e.g. San Francisco, CA'\n                }\n            },\n            required: ['location']\n        }\n    }],\n    input: 'What is the weather like in Boston, MA?'\n});\nconsole.log(interaction.steps.at(-1));\n"
          }
        ],
        "x-speakeasy-group": "interactions",
        "x-speakeasy-name-override": "create",
        "x-speakeasy-exports": [
          {
            "group": "interactions",
            "name": "InteractionCreateParams",
            "representation": "input"
          }
        ]
      }
    },
    "/{api_version}/interactions/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "Successful retrieval of the interaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Interaction"
                },
                "examples": {
                  "get": {
                    "summary": "Get Interaction",
                    "value": {
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "status": "completed",
                      "object": "interaction",
                      "created": "2025-11-26T12:25:15Z",
                      "updated": "2025-11-26T12:25:15Z",
                      "steps": [
                        {
                          "type": "model_output",
                          "content": [
                            {
                              "type": "text",
                              "text": "I'm doing great, thank you for asking! How can I help you today?"
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "text/event-stream": {
                "x-speakeasy-sse-sentinel": "[DONE]",
                "schema": {
                  "$ref": "#/components/schemas/InteractionSseStreamEvent"
                }
              }
            }
          },
          "4XX": {
            "description": "Error getting interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Error getting interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieving an interaction",
        "description": "Retrieves the full details of a single interaction based on its `Interaction.id`.",
        "operationId": "getInteractionById",
        "parameters": [
          {
            "$ref": "#/components/parameters/api_version"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the interaction to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "last_event_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true."
          },
          {
            "name": "stream",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If set to true, the generated content will be streamed incrementally."
          }
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "get",
            "source": "# [setup]\nINTERACTION_ID=$(curl -s -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gemini-3.5-flash\", \"input\": \"Say hello.\"}' \\\n  | python3 -c \"import sys,json; print(json.load(sys.stdin)['id'])\")\n# [/setup]\n\ncurl -X GET \"https://generativelanguage.googleapis.com/v1/interactions/$INTERACTION_ID\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \n"
          },
          {
            "lang": "python",
            "label": "get",
            "source": "from google import genai\n\nclient = genai.Client()\n\n# [setup]\ncreated = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=\"Say hello.\"\n)\n# [/setup]\n\ninteraction = client.interactions.get(id=created.id)\nprint(interaction.status)\n"
          },
          {
            "lang": "javascript",
            "label": "get",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\n\n// [setup]\nconst created = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: 'Say hello.'\n});\n// [/setup]\n\nconst interaction = await ai.interactions.get(created.id);\nconsole.log(interaction.status);\n"
          }
        ],
        "x-speakeasy-group": "interactions",
        "x-speakeasy-name-override": "get",
        "x-speakeasy-sse-overload": true,
        "x-speakeasy-exports": [
          {
            "group": "interactions",
            "name": "InteractionGetParams",
            "representation": "input"
          }
        ]
      },
      "delete": {
        "operationId": "deleteInteraction",
        "description": "Deletes the interaction by id.",
        "summary": "Deleting an interaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/api_version"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the interaction to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful deletion of the interaction."
          },
          "4XX": {
            "description": "Error deleting interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Error deleting interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "delete",
            "source": "# [setup]\nINTERACTION_ID=$(curl -s -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gemini-3.5-flash\", \"input\": \"Hello\"}' \\\n  | python3 -c \"import sys,json; print(json.load(sys.stdin)['id'])\")\n# [/setup]\n\ncurl -X DELETE \"https://generativelanguage.googleapis.com/v1/interactions/$INTERACTION_ID\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \n"
          },
          {
            "lang": "python",
            "label": "delete",
            "source": "from google import genai\n\nclient = genai.Client()\n\n# [setup]\ncreated = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=\"Hello\",\n)\n# [/setup]\n\nclient.interactions.delete(id=created.id)\nprint(\"Interaction deleted successfully.\")\n"
          },
          {
            "lang": "javascript",
            "label": "delete",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\n\n// [setup]\nconst created = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: 'Hello',\n});\n// [/setup]\n\nawait ai.interactions.delete(created.id);\nconsole.log('Interaction deleted successfully.');\n"
          }
        ],
        "x-speakeasy-group": "interactions",
        "x-speakeasy-name-override": "delete",
        "x-speakeasy-exports": [
          {
            "group": "interactions",
            "name": "InteractionDeleteParams",
            "representation": "input"
          }
        ]
      }
    },
    "/{api_version}/interactions/{id}/cancel": {
      "post": {
        "responses": {
          "200": {
            "description": "Successful cancellation of the interaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Interaction"
                },
                "examples": {
                  "cancel": {
                    "summary": "Cancel Interaction",
                    "value": {
                      "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg",
                      "model": "gemini-3.5-flash",
                      "status": "cancelled",
                      "object": "interaction",
                      "created": "2025-11-26T12:25:15Z",
                      "updated": "2025-11-26T12:25:15Z"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error cancelling interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Error cancelling interaction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Canceling an interaction",
        "description": "Cancels an interaction by id. This only applies to background interactions that are still running.",
        "operationId": "cancelInteractionById",
        "parameters": [
          {
            "$ref": "#/components/parameters/api_version"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the interaction to cancel.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "cancel",
            "source": "# [setup]\nINTERACTION_ID=$(curl -s -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gemini-3.5-flash\", \"input\": \"Write a long essay about the history of computing.\", \"background\": true}' \\\n  | python3 -c \"import sys,json; print(json.load(sys.stdin)['id'])\")\n# [/setup]\n\ncurl -X POST \"https://generativelanguage.googleapis.com/v1/interactions/$INTERACTION_ID/cancel\" \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \n"
          },
          {
            "lang": "python",
            "label": "cancel",
            "source": "from google import genai\n\nclient = genai.Client()\n\n# Start a background interaction so it stays in-progress.\ncreated = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    input=\"Write a long essay about the history of computing.\",\n    tools=[{\"type\": \"computer_use\"}],\n    background=True,\n)\n\n# Cancel the in-progress interaction.\ninteraction = client.interactions.cancel(id=created.id)\nprint(interaction.status)\n"
          },
          {
            "lang": "javascript",
            "label": "cancel",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\n\n// Start a background interaction so it stays in-progress.\nconst created = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    input: 'Write a long essay about the history of computing.',\n    tools: [{ type: 'computer_use' }],\n    background: true,\n});\n\n// Cancel the in-progress interaction.\nconst interaction = await ai.interactions.cancel(created.id);\nconsole.log(interaction.status);\n"
          }
        ],
        "x-speakeasy-group": "interactions",
        "x-speakeasy-name-override": "cancel"
      }
    }
  },
  "components": {
    "parameters": {
      "api_version": {
        "name": "api_version",
        "description": "Which version of the API to use.",
        "schema": {
          "type": "string"
        },
        "in": "path",
        "required": true
      },
      "google_genai_user_project": {
        "name": "x-goog-user-project",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "Quota project header to send with Google GenAI API requests.",
        "x-speakeasy-name-override": "user_project"
      }
    },
    "securitySchemes": {
      "googleGenAIAuth": {
        "type": "http",
        "scheme": "custom",
        "x-speakeasy-custom-security-scheme": {
          "schema": {
            "type": "object",
            "properties": {
              "accessToken": {
                "type": "string",
                "description": "OAuth access token sent as a bearer Authorization header."
              },
              "apiKey": {
                "type": "string",
                "description": "Gemini API key sent as x-goog-api-key."
              },
              "defaultHeaders": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Additional default headers to apply before request-specific headers and auth."
              }
            },
            "required": []
          }
        }
      }
    },
    "schemas": {
      "AgentOption": {
        "title": "Agent",
        "description": "The agent to interact with.",
        "x-speakeasy-model-namespace": "interactions",
        "type": "string",
        "enum": [
          "deep-research-pro-preview-12-2025",
          "deep-research-preview-04-2026",
          "deep-research-max-preview-04-2026",
          "antigravity-preview-05-2026"
        ],
        "x-speakeasy-unknown-values": "allow",
        "x-speakeasy-enum-format": "union",
        "x-speakeasy-enum-descriptions": [
          "Gemini Deep Research Agent",
          "Gemini Deep Research Agent",
          "Gemini Deep Research Max Agent",
          "Use the Antigravity managed agent to perform multi-step tasks that require reasoning, file operations, and tool use."
        ]
      },
      "AllowedTools": {
        "description": "The configuration for allowed tools.",
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "x-google-enum-descriptions": [
              "Auto tool choice.",
              "Any tool choice.",
              "No tool choice.",
              "Validated tool choice."
            ],
            "enum": [
              "auto",
              "any",
              "none",
              "validated"
            ],
            "x-speakeasy-model-namespace": "interactions",
            "description": "The mode of the tool choice."
          },
          "tools": {
            "description": "The names of the allowed tools.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "Annotation": {
        "description": "Citation information for model-generated content.",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UrlCitation"
          },
          {
            "$ref": "#/components/schemas/FileCitation"
          },
          {
            "$ref": "#/components/schemas/PlaceCitation"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ArgumentsDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "type": "string"
          },
          "type": {
            "const": "arguments_delta"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "AudioContent": {
        "description": "An audio content block.",
        "type": "object",
        "properties": {
          "channels": {
            "description": "The number of audio channels.",
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "description": "The audio content.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "description": "The mime type of the audio.",
            "type": "string",
            "x-google-enum-descriptions": [
              "WAV audio format",
              "MP3 audio format",
              "AIFF audio format",
              "AAC audio format",
              "OGG audio format",
              "FLAC audio format",
              "MPEG audio format",
              "M4A audio format",
              "L16 audio format",
              "OPUS audio format",
              "ALAW audio format",
              "MULAW audio format"
            ],
            "enum": [
              "audio/wav",
              "audio/mp3",
              "audio/aiff",
              "audio/aac",
              "audio/ogg",
              "audio/flac",
              "audio/mpeg",
              "audio/m4a",
              "audio/l16",
              "audio/opus",
              "audio/alaw",
              "audio/mulaw"
            ]
          },
          "sample_rate": {
            "description": "The sample rate of the audio.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "audio"
          },
          "uri": {
            "description": "The URI of the audio.",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "audio": {
              "summary": "Audio",
              "value": {
                "type": "audio",
                "data": "BASE64_ENCODED_AUDIO",
                "mime_type": "audio/wav"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-exports": [
          {
            "group": "interactions",
            "name": "audio_content_param",
            "representation": "input"
          }
        ]
      },
      "AudioDelta": {
        "type": "object",
        "properties": {
          "channels": {
            "description": "The number of audio channels.",
            "type": "integer",
            "format": "int32"
          },
          "data": {
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "type": "string",
            "x-google-enum-descriptions": [
              "WAV audio format",
              "MP3 audio format",
              "AIFF audio format",
              "AAC audio format",
              "OGG audio format",
              "FLAC audio format",
              "MPEG audio format",
              "M4A audio format",
              "L16 audio format",
              "OPUS audio format",
              "ALAW audio format",
              "MULAW audio format"
            ],
            "enum": [
              "audio/wav",
              "audio/mp3",
              "audio/aiff",
              "audio/aac",
              "audio/ogg",
              "audio/flac",
              "audio/mpeg",
              "audio/m4a",
              "audio/l16",
              "audio/opus",
              "audio/alaw",
              "audio/mulaw"
            ]
          },
          "sample_rate": {
            "description": "The sample rate of the audio.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "audio"
          },
          "uri": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "AudioResponseFormat": {
        "description": "Configuration for audio output format.",
        "type": "object",
        "properties": {
          "bit_rate": {
            "description": "Bit rate in bits per second (bps). Only applicable for compressed formats\n(MP3, Opus).",
            "type": "integer",
            "format": "int32"
          },
          "delivery": {
            "description": "The delivery mode for the audio output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Audio data is returned inline in the response.",
              "Audio data is returned as a URI."
            ],
            "enum": [
              "inline",
              "uri"
            ]
          },
          "mime_type": {
            "description": "The MIME type of the audio output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "MP3 audio format.",
              "OGG Opus audio format.",
              "Raw PCM (L16) audio format.",
              "WAV audio format.",
              "A-law audio format.",
              "Mu-law audio format."
            ],
            "enum": [
              "audio/mp3",
              "audio/ogg_opus",
              "audio/l16",
              "audio/wav",
              "audio/alaw",
              "audio/mulaw"
            ]
          },
          "sample_rate": {
            "description": "Sample rate in Hz.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "audio"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "audio_response_format": {
              "summary": "Audio Output",
              "value": {
                "type": "audio",
                "sample_rate": 24000
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecution": {
        "description": "A tool that can be used by the model to execute code.",
        "type": "object",
        "properties": {
          "type": {
            "const": "code_execution"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "code_execution",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"code_execution\"\n    }],\n    \"input\": \"Calculate the first 10 Fibonacci numbers\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "code_execution",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\"type\": \"code_execution\"}],\n    input=\"Calculate the first 10 Fibonacci numbers\"\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "code_execution",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{ type: 'code_execution' }],\n    input: 'Calculate the first 10 Fibonacci numbers'\n});\nconsole.log(interaction.output_text);\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecutionCallArguments": {
        "description": "The arguments to pass to the code execution.",
        "type": "object",
        "properties": {
          "code": {
            "description": "The code to be executed.",
            "type": "string"
          },
          "language": {
            "description": "Programming language of the `code`.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Python >= 3.10, with numpy and simpy available."
            ],
            "enum": [
              "python"
            ]
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecutionCallDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "$ref": "#/components/schemas/CodeExecutionCallArguments"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "code_execution_call"
          }
        },
        "required": [
          "arguments",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecutionCallStep": {
        "description": "Code execution call step.",
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The arguments to pass to the code execution.",
            "$ref": "#/components/schemas/CodeExecutionCallStepArguments"
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "code_execution_call"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "examples": [
          {
            "code_execution_call": {
              "summary": "CodeExecutionCallStep",
              "value": {
                "type": "code_execution_call",
                "id": "code_call_71021",
                "arguments": {
                  "code": "print(sum(range(1, 11)))"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecutionCallStepArguments": {
        "description": "The arguments to pass to the code execution.",
        "type": "object",
        "properties": {
          "code": {
            "description": "The code to be executed.",
            "type": "string"
          },
          "language": {
            "description": "Programming language of the `code`.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Python >= 3.10, with numpy and simpy available."
            ],
            "enum": [
              "python"
            ]
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "CodeExecutionCallArguments"
      },
      "CodeExecutionResultDelta": {
        "type": "object",
        "properties": {
          "is_error": {
            "type": "boolean"
          },
          "result": {
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "code_execution_result"
          }
        },
        "required": [
          "result",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CodeExecutionResultStep": {
        "description": "Code execution result step.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "is_error": {
            "description": "Whether the code execution resulted in an error.",
            "type": "boolean"
          },
          "result": {
            "description": "The output of the code execution.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "code_execution_result"
          }
        },
        "required": [
          "call_id",
          "type"
        ],
        "examples": [
          {
            "code_execution_result": {
              "summary": "CodeExecutionResultStep",
              "value": {
                "type": "code_execution_result",
                "call_id": "code_call_71021",
                "result": "55\n"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Content": {
        "description": "The content of the response.",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextContent"
          },
          {
            "$ref": "#/components/schemas/ImageContent"
          },
          {
            "$ref": "#/components/schemas/AudioContent"
          },
          {
            "$ref": "#/components/schemas/DocumentContent"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ContentDelta": {
        "type": "object",
        "properties": {
          "delta": {
            "$ref": "#/components/schemas/ContentDeltaData"
          },
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "content.delta"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          }
        },
        "required": [
          "delta",
          "event_type",
          "index"
        ],
        "examples": [
          {
            "content_delta": {
              "summary": "Content Delta",
              "value": {
                "event_type": "content.delta",
                "delta": {
                  "type": "text",
                  "text": "Elara\u2019s life was a symphony of quiet moments. A librarian, she found solace in the hushed aisles, the scent of aged paper, and the predictable rhythm of her days. Her small apartment, meticulously ordered, reflected this internal calm, save"
                },
                "index": 1
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ContentDeltaData": {
        "description": "The delta content data for a content block.",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextDelta"
          },
          {
            "$ref": "#/components/schemas/ImageDelta"
          },
          {
            "$ref": "#/components/schemas/AudioDelta"
          },
          {
            "$ref": "#/components/schemas/DocumentDelta"
          },
          {
            "$ref": "#/components/schemas/ThoughtSummaryDelta"
          },
          {
            "$ref": "#/components/schemas/ThoughtSignatureDelta"
          },
          {
            "$ref": "#/components/schemas/FunctionCallDelta"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionCallDelta"
          },
          {
            "$ref": "#/components/schemas/UrlContextCallDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchCallDelta"
          },
          {
            "$ref": "#/components/schemas/FileSearchCallDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsCallDelta"
          },
          {
            "$ref": "#/components/schemas/FunctionResultDelta"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionResultDelta"
          },
          {
            "$ref": "#/components/schemas/UrlContextResultDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchResultDelta"
          },
          {
            "$ref": "#/components/schemas/FileSearchResultDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsResultDelta"
          },
          {
            "$ref": "#/components/schemas/TextAnnotationDelta"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ContentStart": {
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/components/schemas/Content"
          },
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "content.start"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          }
        },
        "required": [
          "content",
          "event_type",
          "index"
        ],
        "examples": [
          {
            "content_start": {
              "summary": "Content Start",
              "value": {
                "event_type": "content.start",
                "content": {
                  "type": "text"
                },
                "index": 1
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ContentStop": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "content.stop"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          }
        },
        "required": [
          "event_type",
          "index"
        ],
        "examples": [
          {
            "content_stop": {
              "summary": "Content Stop",
              "value": {
                "event_type": "content.stop",
                "index": 1
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "CreateAgentInteractionParams": {
        "description": "Parameters for creating agent interactions",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentOption",
            "description": "The name of the `Agent` used for generating the interaction."
          },
          "agent_config": {
            "description": "Configuration parameters for the agent interaction.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DynamicAgentConfig"
              }
            ],
            "discriminator": {
              "propertyName": "type"
            }
          },
          "background": {
            "description": "Input only. Whether to run the model interaction in the background.",
            "writeOnly": true,
            "type": "boolean"
          },
          "created": {
            "description": "Required. Output only. The time at which the response was created in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "description": "Required. Output only. A unique identifier for the interaction completion.",
            "readOnly": true,
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/InteractionsInput"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The labels with user-defined metadata for the request."
          },
          "previous_interaction_id": {
            "description": "The ID of the previous interaction, if any.",
            "type": "string"
          },
          "response_format": {
            "description": "Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponseFormat"
                },
                "example": [
                  {
                    "type": "text",
                    "mime_type": "application/json"
                  }
                ],
                "x-speakeasy-model-namespace": "interactions"
              },
              {
                "$ref": "#/components/schemas/ResponseFormat"
              }
            ]
          },
          "response_mime_type": {
            "description": "The mime type of the response. This is required if response_format is set.",
            "deprecated": true,
            "type": "string"
          },
          "safety_settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SafetySetting"
            },
            "description": "Safety settings for the interaction."
          },
          "status": {
            "description": "Required. Output only. The status of the interaction.",
            "readOnly": true,
            "type": "string",
            "x-google-enum-descriptions": [
              "The interaction is in progress.",
              "The interaction requires action/input from the user.",
              "The interaction is completed.",
              "The interaction failed.",
              "The interaction was cancelled.",
              "The interaction is completed, but contains incomplete results (e.g.\nhitting max_tokens)."
            ],
            "enum": [
              "in_progress",
              "requires_action",
              "completed",
              "failed",
              "cancelled",
              "incomplete"
            ]
          },
          "store": {
            "description": "Input only. Whether to store the response and request for later retrieval.",
            "writeOnly": true,
            "type": "boolean"
          },
          "stream": {
            "description": "Input only. Whether the interaction will be streamed.",
            "writeOnly": true,
            "type": "boolean"
          },
          "system_instruction": {
            "description": "System instruction for the interaction.",
            "type": "string"
          },
          "tools": {
            "description": "A list of tool declarations the model may call during interaction.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "updated": {
            "description": "Required. Output only. The time at which the response was last updated in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string",
            "format": "date-time"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "Output only. Statistics on the interaction request's token usage.",
            "readOnly": true
          }
        },
        "required": [
          "agent",
          "input"
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "CreateAgentInteraction"
      },
      "CreateModelInteractionParams": {
        "description": "Parameters for creating model interactions",
        "properties": {
          "background": {
            "description": "Input only. Whether to run the model interaction in the background.",
            "writeOnly": true,
            "type": "boolean"
          },
          "cached_content": {
            "description": "The name of the cached content used as context to serve the prediction.\nNote: only used in explicit caching, where users can have control over\ncaching (e.g. what content to cache) and enjoy guaranteed cost savings.\nFormat:\n`projects/{project}/locations/{location}/cachedContents/{cachedContent}`",
            "type": "string"
          },
          "created": {
            "description": "Required. Output only. The time at which the response was created in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string",
            "format": "date-time"
          },
          "generation_config": {
            "$ref": "#/components/schemas/GenerationConfig",
            "description": "Input only. Configuration parameters for the model interaction.",
            "writeOnly": true
          },
          "id": {
            "description": "Required. Output only. A unique identifier for the interaction completion.",
            "readOnly": true,
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/InteractionsInput"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The labels with user-defined metadata for the request."
          },
          "model": {
            "$ref": "#/components/schemas/ModelOption",
            "description": "The name of the `Model` used for generating the interaction."
          },
          "previous_interaction_id": {
            "description": "The ID of the previous interaction, if any.",
            "type": "string"
          },
          "response_format": {
            "description": "Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponseFormat"
                },
                "example": [
                  {
                    "type": "text",
                    "mime_type": "application/json"
                  }
                ],
                "x-speakeasy-model-namespace": "interactions"
              },
              {
                "$ref": "#/components/schemas/ResponseFormat"
              }
            ]
          },
          "response_mime_type": {
            "description": "The mime type of the response. This is required if response_format is set.",
            "deprecated": true,
            "type": "string"
          },
          "safety_settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SafetySetting"
            },
            "description": "Safety settings for the interaction."
          },
          "status": {
            "description": "Required. Output only. The status of the interaction.",
            "readOnly": true,
            "type": "string",
            "x-google-enum-descriptions": [
              "The interaction is in progress.",
              "The interaction requires action/input from the user.",
              "The interaction is completed.",
              "The interaction failed.",
              "The interaction was cancelled.",
              "The interaction is completed, but contains incomplete results (e.g.\nhitting max_tokens)."
            ],
            "enum": [
              "in_progress",
              "requires_action",
              "completed",
              "failed",
              "cancelled",
              "incomplete"
            ]
          },
          "store": {
            "description": "Input only. Whether to store the response and request for later retrieval.",
            "writeOnly": true,
            "type": "boolean"
          },
          "stream": {
            "description": "Input only. Whether the interaction will be streamed.",
            "writeOnly": true,
            "type": "boolean"
          },
          "system_instruction": {
            "description": "System instruction for the interaction.",
            "type": "string"
          },
          "tools": {
            "description": "A list of tool declarations the model may call during interaction.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "updated": {
            "description": "Required. Output only. The time at which the response was last updated in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string",
            "format": "date-time"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "Output only. Statistics on the interaction request's token usage.",
            "readOnly": true
          }
        },
        "required": [
          "input",
          "model"
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "CreateModelInteraction"
      },
      "DocumentContent": {
        "description": "A document content block.",
        "type": "object",
        "properties": {
          "data": {
            "description": "The document content.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "description": "The mime type of the document.",
            "type": "string",
            "x-google-enum-descriptions": [
              "PDF document format",
              "CSV document format"
            ],
            "enum": [
              "application/pdf",
              "text/csv"
            ]
          },
          "type": {
            "const": "document"
          },
          "uri": {
            "description": "The URI of the document.",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "document": {
              "summary": "Document",
              "value": {
                "type": "document",
                "data": "BASE64_ENCODED_DOCUMENT",
                "mime_type": "application/pdf"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "DocumentDelta": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "type": "string",
            "x-google-enum-descriptions": [
              "PDF document format",
              "CSV document format"
            ],
            "enum": [
              "application/pdf",
              "text/csv"
            ]
          },
          "type": {
            "const": "document"
          },
          "uri": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "DynamicAgentConfig": {
        "description": "Configuration for dynamic agents.",
        "type": "object",
        "properties": {
          "type": {
            "const": "dynamic"
          }
        },
        "additionalProperties": {
          "description": "For agents that are not supported statically in the API definition."
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Error": {
        "description": "Error message from an interaction.",
        "type": "object",
        "properties": {
          "code": {
            "description": "A URI that identifies the error type.",
            "type": "string"
          },
          "message": {
            "description": "A human-readable error message.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "ErrorEvent": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "error"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          }
        },
        "required": [
          "event_type"
        ],
        "examples": [
          {
            "error_event": {
              "summary": "Error Event",
              "value": {
                "event_type": "error",
                "error": {
                  "message": "Failed to get completed interaction: Result not found.",
                  "code": "not_found"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileCitation": {
        "description": "A file citation annotation.",
        "type": "object",
        "properties": {
          "custom_metadata": {
            "description": "User provided metadata about the retrieved context.",
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          },
          "document_uri": {
            "description": "The URI of the file.",
            "type": "string"
          },
          "end_index": {
            "description": "End of the attributed segment, exclusive.",
            "type": "integer",
            "format": "int32"
          },
          "file_name": {
            "description": "The name of the file.",
            "type": "string"
          },
          "media_id": {
            "description": "Media ID in-case of image citations, if applicable.",
            "type": "string"
          },
          "page_number": {
            "description": "Page number of the cited document, if applicable.",
            "type": "integer",
            "format": "int32"
          },
          "source": {
            "description": "Source attributed for a portion of the text.",
            "type": "string"
          },
          "start_index": {
            "description": "Start of segment of the response that is attributed to this source.\n\nIndex indicates the start of the segment, measured in bytes.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "file_citation"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearch": {
        "description": "A tool that can be used by the model to search files.",
        "type": "object",
        "properties": {
          "file_search_store_names": {
            "description": "The file search store names to search.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata_filter": {
            "description": "Metadata filter to apply to the semantic retrieval documents and chunks.",
            "type": "string"
          },
          "top_k": {
            "description": "The number of semantic retrieval chunks to retrieve.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "file_search"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "file_search",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"file_search\",\n      \"file_search_store_names\": [\"fileSearchStores/m64d1sevsr4y-xfyawui3fxqg\"]\n    }],\n    \"input\": \"Who is the author of the book?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "file_search",
            "source": "from google import genai\n\nclient = genai.Client()\n\n# Create a file search store so we have a valid one to use.\nstore = client.file_search_stores.create()\n\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\n        \"type\": \"file_search\",\n        \"file_search_store_names\": [store.name]\n    }],\n    input=\"What documents are available?\"\n)\nprint(response.output_text)\n\n# [cleanup]\nclient.file_search_stores.delete(name=store.name)\n# [/cleanup]\n"
          },
          {
            "lang": "javascript",
            "label": "file_search",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\n\n// Create a file search store so we have a valid one to use.\nconst store = await ai.fileSearchStores.create({});\nif (!store.name) {\n    throw new Error('Store creation failed: Name is undefined');\n}\n\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{\n        type: 'file_search',\n        file_search_store_names: [store.name]\n    }],\n    input: 'What documents are available?'\n});\nconsole.log(interaction.output_text);\n\n// [cleanup]\nawait ai.fileSearchStores.delete({name: store.name});\n// [/cleanup]\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearchCallDelta": {
        "type": "object",
        "properties": {
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "file_search_call"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearchCallStep": {
        "description": "File Search call step.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "file_search_call"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "examples": [
          {
            "file_search_call": {
              "summary": "FileSearchCallStep",
              "value": {
                "type": "file_search_call",
                "id": "file_call_88192"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearchResult": {
        "description": "The result of the File Search.",
        "type": "object",
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearchResultDelta": {
        "type": "object",
        "properties": {
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileSearchResult"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "file_search_result"
          }
        },
        "required": [
          "result",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FileSearchResultStep": {
        "description": "File Search result step.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "file_search_result"
          }
        },
        "required": [
          "call_id",
          "type"
        ],
        "examples": [
          {
            "file_search_result": {
              "summary": "FileSearchResultStep",
              "value": {
                "type": "file_search_result",
                "call_id": "file_call_88192"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Function": {
        "description": "A tool that can be used by the model.",
        "type": "object",
        "properties": {
          "description": {
            "description": "A description of the function.",
            "type": "string"
          },
          "name": {
            "description": "The name of the function.",
            "type": "string"
          },
          "parameters": {
            "description": "The JSON Schema for the function's parameters."
          },
          "type": {
            "const": "function"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "function_calling",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"function\",\n      \"name\": \"get_weather\",\n      \"description\": \"Get the current weather in a given location\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"location\": {\n            \"type\": \"string\",\n            \"description\": \"The city and state, e.g. San Francisco, CA\"\n          }\n        },\n        \"required\": [\"location\"]\n      }\n    }],\n    \"input\": \"What is the weather like in Boston, MA?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "function_calling",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\n        \"type\": \"function\",\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"location\": {\n                    \"type\": \"string\",\n                    \"description\": \"The city and state, e.g. San Francisco, CA\"\n                }\n            },\n            \"required\": [\"location\"]\n        }\n    }],\n    input=\"What is the weather like in Boston?\"\n)\nprint(response.steps[-1])\n"
          },
          {
            "lang": "javascript",
            "label": "function_calling",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{\n        type: 'function',\n        name: 'get_weather',\n        description: 'Get the current weather in a given location',\n        parameters: {\n            type: 'object',\n            properties: {\n                location: {\n                    type: 'string',\n                    description: 'The city and state, e.g. San Francisco, CA'\n                }\n            },\n            required: ['location']\n        }\n    }],\n    input: 'What is the weather like in Boston?'\n});\nconsole.log(interaction.steps.at(-1));\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FunctionCallDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "const": "function_call"
          }
        },
        "required": [
          "arguments",
          "id",
          "name",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FunctionCallStep": {
        "description": "A function tool call step.",
        "type": "object",
        "properties": {
          "arguments": {
            "description": "Required. The arguments to pass to the function.",
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "name": {
            "description": "Required. The name of the tool to call.",
            "type": "string"
          },
          "type": {
            "const": "function_call"
          }
        },
        "required": [
          "arguments",
          "id",
          "name",
          "type"
        ],
        "examples": [
          {
            "function_call": {
              "summary": "FunctionCallStep",
              "value": {
                "type": "function_call",
                "id": "call_98231",
                "name": "get_weather",
                "arguments": {
                  "location": "Boston, MA"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FunctionResultDelta": {
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "is_error": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "result": {
            "oneOf": [
              {
                "type": "object"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ImageContent"
                    },
                    {
                      "$ref": "#/components/schemas/TextContent"
                    }
                  ]
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "type": {
            "const": "function_result"
          }
        },
        "required": [
          "call_id",
          "result",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "FunctionResultStep": {
        "description": "Result of a function tool call.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "is_error": {
            "description": "Whether the tool call resulted in an error.",
            "type": "boolean"
          },
          "name": {
            "description": "The name of the tool that was called.",
            "type": "string"
          },
          "result": {
            "description": "The result of the tool call.",
            "oneOf": [
              {
                "type": "object"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ImageContent"
                    },
                    {
                      "$ref": "#/components/schemas/TextContent"
                    }
                  ]
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "type": {
            "const": "function_result"
          }
        },
        "required": [
          "call_id",
          "result",
          "type"
        ],
        "examples": [
          {
            "function_result": {
              "summary": "FunctionResultStep",
              "value": {
                "type": "function_result",
                "call_id": "call_98231",
                "name": "get_weather",
                "result": [
                  {
                    "type": "text",
                    "text": "{\"weather\":\"sunny\"}"
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GenerationConfig": {
        "description": "Configuration parameters for model interactions.",
        "type": "object",
        "properties": {
          "max_output_tokens": {
            "description": "The maximum number of tokens to include in the response.",
            "type": "integer",
            "format": "int32"
          },
          "seed": {
            "description": "Seed used in decoding for reproducibility.",
            "type": "integer",
            "format": "int32"
          },
          "stop_sequences": {
            "description": "A list of character sequences that will stop output interaction.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "temperature": {
            "description": "Controls the randomness of the output.",
            "type": "number",
            "format": "float"
          },
          "thinking_level": {
            "description": "The level of thought tokens that the model should generate.",
            "$ref": "#/components/schemas/ThinkingLevel"
          },
          "thinking_summaries": {
            "description": "Whether to include thought summaries in the response.",
            "$ref": "#/components/schemas/ThinkingSummaries"
          },
          "tool_choice": {
            "description": "The tool choice configuration.",
            "oneOf": [
              {
                "type": "string",
                "x-google-enum-descriptions": [
                  "Auto tool choice.",
                  "Any tool choice.",
                  "No tool choice.",
                  "Validated tool choice."
                ],
                "enum": [
                  "auto",
                  "any",
                  "none",
                  "validated"
                ],
                "x-speakeasy-model-namespace": "interactions"
              },
              {
                "$ref": "#/components/schemas/ToolChoiceConfig"
              }
            ]
          },
          "top_p": {
            "description": "The maximum cumulative probability of tokens to consider when sampling.",
            "type": "number",
            "format": "float"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMaps": {
        "description": "A tool that can be used by the model to call Google Maps.",
        "type": "object",
        "properties": {
          "enable_widget": {
            "description": "Whether to return a widget context token in the tool call result of the\nresponse.",
            "type": "boolean"
          },
          "latitude": {
            "description": "The latitude of the user's location.",
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "description": "The longitude of the user's location.",
            "type": "number",
            "format": "double"
          },
          "type": {
            "const": "google_maps"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "google_maps",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"google_maps\",\n      \"latitude\": 37.7749,\n      \"longitude\": -122.4194\n    }],\n    \"input\": \"What is the best food near me?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "google_maps",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\n        \"type\": \"google_maps\",\n        \"latitude\": 37.7749,\n        \"longitude\": -122.4194\n    }],\n    input=\"What is the best food near me?\"\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "google_maps",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{\n        type: 'google_maps',\n        latitude: 37.7749,\n        longitude: -122.4194\n    }],\n    input: 'What is the best food near me?'\n});\nconsole.log(interaction.output_text);\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsCallArguments": {
        "description": "The arguments to pass to the Google Maps tool.",
        "type": "object",
        "properties": {
          "queries": {
            "description": "The queries to be executed.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsCallDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The arguments to pass to the Google Maps tool.",
            "$ref": "#/components/schemas/GoogleMapsCallArguments"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_maps_call"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsCallStep": {
        "description": "Google Maps call step.",
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The arguments to pass to the Google Maps tool.",
            "$ref": "#/components/schemas/GoogleMapsCallStepArguments"
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_maps_call"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "examples": [
          {
            "google_maps_call": {
              "summary": "GoogleMapsCallStep",
              "value": {
                "type": "google_maps_call",
                "id": "maps_call_39201",
                "arguments": {
                  "latitude": 37.7749,
                  "longitude": -122.4194
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsCallStepArguments": {
        "description": "The arguments to pass to the Google Maps tool.",
        "type": "object",
        "properties": {
          "queries": {
            "description": "The queries to be executed.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "GoogleMapsCallArguments"
      },
      "GoogleMapsResult": {
        "description": "The result of the Google Maps.",
        "type": "object",
        "properties": {
          "places": {
            "description": "The places that were found.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Places"
            }
          },
          "widget_context_token": {
            "description": "Resource name of the Google Maps widget context token.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsResultDelta": {
        "type": "object",
        "properties": {
          "result": {
            "description": "The results of the Google Maps.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleMapsResult"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_maps_result"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsResultItem": {
        "description": "The result of the Google Maps.",
        "type": "object",
        "properties": {
          "places": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleMapsResultPlaces"
            }
          },
          "widget_context_token": {
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "GoogleMapsResult"
      },
      "GoogleMapsResultPlaces": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "place_id": {
            "type": "string"
          },
          "review_snippets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewSnippet"
            }
          },
          "url": {
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleMapsResultStep": {
        "description": "Google Maps result step.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleMapsResultItem"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_maps_result"
          }
        },
        "required": [
          "call_id",
          "type"
        ],
        "examples": [
          {
            "google_maps_result": {
              "summary": "GoogleMapsResultStep",
              "value": {
                "type": "google_maps_result",
                "call_id": "maps_call_39201",
                "result": [
                  {
                    "place_id": "ChIJIQBpAG2ahYAR9R7bNdTLg8M",
                    "name": "Golden Gate Park",
                    "rating": 4.8
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearch": {
        "description": "A tool that can be used by the model to search Google.",
        "type": "object",
        "properties": {
          "search_types": {
            "description": "The types of search grounding to enable.",
            "type": "array",
            "items": {
              "type": "string",
              "x-google-enum-descriptions": [
                "Setting this field enables web search. Only text results are returned.",
                "Setting this field enables image search. Image bytes are returned."
              ],
              "enum": [
                "web_search",
                "image_search"
              ]
            }
          },
          "type": {
            "const": "google_search"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "google_search",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"google_search\"\n    }],\n    \"input\": \"Who is the current president of France?\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "google_search",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\"type\": \"google_search\"}],\n    input=\"Who is the current president of France?\"\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "google_search",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{ type: 'google_search' }],\n    input: 'Who is the current president of France?'\n});\nconsole.log(interaction.output_text);\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchCallArguments": {
        "description": "The arguments to pass to Google Search.",
        "type": "object",
        "properties": {
          "queries": {
            "description": "Web search queries for the following-up web search.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchCallDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "$ref": "#/components/schemas/GoogleSearchCallArguments"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_search_call"
          }
        },
        "required": [
          "arguments",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchCallStep": {
        "description": "Google Search call step.",
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The arguments to pass to Google Search.",
            "$ref": "#/components/schemas/GoogleSearchCallStepArguments"
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "search_type": {
            "description": "The type of search grounding enabled.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Setting this field enables web search. Only text results are returned.",
              "Setting this field enables image search. Image bytes are returned."
            ],
            "enum": [
              "web_search",
              "image_search"
            ]
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_search_call"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "examples": [
          {
            "google_search_call": {
              "summary": "GoogleSearchCallStep",
              "value": {
                "type": "google_search_call",
                "id": "search_call_19201",
                "arguments": {
                  "query": "Who won the men's 100m in Paris 2024?"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchCallStepArguments": {
        "description": "The arguments to pass to Google Search.",
        "type": "object",
        "properties": {
          "queries": {
            "description": "Web search queries for the following-up web search.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "GoogleSearchCallArguments"
      },
      "GoogleSearchResult": {
        "description": "The result of the Google Search.",
        "type": "object",
        "properties": {
          "search_suggestions": {
            "description": "Web content snippet that can be embedded in a web page or an app webview.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchResultDelta": {
        "type": "object",
        "properties": {
          "is_error": {
            "type": "boolean"
          },
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleSearchResult"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_search_result"
          }
        },
        "required": [
          "result",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GoogleSearchResultItem": {
        "description": "The result of the Google Search.",
        "type": "object",
        "properties": {
          "search_suggestions": {
            "description": "Web content snippet that can be embedded in a web page or an app webview.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "GoogleSearchResult"
      },
      "GoogleSearchResultStep": {
        "description": "Google Search result step.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "is_error": {
            "description": "Whether the Google Search resulted in an error.",
            "type": "boolean"
          },
          "result": {
            "description": "The results of the Google Search.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleSearchResultItem"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "google_search_result"
          }
        },
        "required": [
          "call_id",
          "type"
        ],
        "examples": [
          {
            "google_search_result": {
              "summary": "GoogleSearchResultStep",
              "value": {
                "type": "google_search_result",
                "call_id": "search_call_19201",
                "result": [
                  {
                    "title": "Paris 2024 Olympics: Noah Lyles wins men's 100m gold",
                    "url": "https://olympics.com/en/news/paris-2024-noah-lyles-wins-mens-100m-gold",
                    "snippet": "American Noah Lyles won the Olympic men's 100m gold medal in a photo finish."
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "GroundingToolCount": {
        "description": "The number of grounding tool counts.",
        "type": "object",
        "properties": {
          "count": {
            "description": "The number of grounding tool counts.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "description": "The grounding tool type associated with the count.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Grounding with Google Web Search and Image Search, & Web Grounding\nfor Enterprise.",
              "Grounding with Google Maps."
            ],
            "enum": [
              "google_search",
              "google_maps"
            ]
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "ImageContent": {
        "description": "An image content block.",
        "type": "object",
        "properties": {
          "data": {
            "description": "The image content.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "description": "The mime type of the image.",
            "type": "string",
            "x-google-enum-descriptions": [
              "PNG image format",
              "JPEG image format",
              "WebP image format",
              "HEIC image format",
              "HEIF image format",
              "GIF image format",
              "BMP image format",
              "TIFF image format"
            ],
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/heic",
              "image/heif",
              "image/gif",
              "image/bmp",
              "image/tiff"
            ]
          },
          "resolution": {
            "description": "The resolution of the media.",
            "$ref": "#/components/schemas/MediaResolution"
          },
          "type": {
            "const": "image"
          },
          "uri": {
            "description": "The URI of the image.",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "image": {
              "summary": "Image",
              "value": {
                "type": "image",
                "data": "BASE64_ENCODED_IMAGE",
                "mime_type": "image/png"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ImageDelta": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "mime_type": {
            "type": "string",
            "x-google-enum-descriptions": [
              "PNG image format",
              "JPEG image format",
              "WebP image format",
              "HEIC image format",
              "HEIF image format",
              "GIF image format",
              "BMP image format",
              "TIFF image format"
            ],
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/heic",
              "image/heif",
              "image/gif",
              "image/bmp",
              "image/tiff"
            ]
          },
          "resolution": {
            "description": "The resolution of the media.",
            "$ref": "#/components/schemas/MediaResolution"
          },
          "type": {
            "const": "image"
          },
          "uri": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ImageResponseFormat": {
        "description": "Configuration for image output format.",
        "type": "object",
        "properties": {
          "aspect_ratio": {
            "description": "The aspect ratio for the image output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "1:1 aspect ratio.",
              "2:3 aspect ratio.",
              "3:2 aspect ratio.",
              "3:4 aspect ratio.",
              "4:3 aspect ratio.",
              "4:5 aspect ratio.",
              "5:4 aspect ratio.",
              "9:16 aspect ratio.",
              "16:9 aspect ratio.",
              "21:9 aspect ratio.",
              "1:8 aspect ratio.",
              "8:1 aspect ratio.",
              "1:4 aspect ratio.",
              "4:1 aspect ratio."
            ],
            "enum": [
              "1:1",
              "2:3",
              "3:2",
              "3:4",
              "4:3",
              "4:5",
              "5:4",
              "9:16",
              "16:9",
              "21:9",
              "1:8",
              "8:1",
              "1:4",
              "4:1"
            ]
          },
          "delivery": {
            "description": "The delivery mode for the image output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Image data is returned inline in the response.",
              "Image data is returned as a URI."
            ],
            "enum": [
              "inline",
              "uri"
            ]
          },
          "image_size": {
            "description": "The size of the image output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "512px image size.",
              "1K image size.",
              "2K image size.",
              "4K image size."
            ],
            "enum": [
              "512",
              "1K",
              "2K",
              "4K"
            ]
          },
          "mime_type": {
            "description": "The MIME type of the image output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "JPEG image format."
            ],
            "enum": [
              "image/jpeg"
            ]
          },
          "type": {
            "const": "image"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "image_response_format": {
              "summary": "Image Output",
              "value": {
                "type": "image",
                "mime_type": "image/jpeg",
                "aspect_ratio": "16:9",
                "image_size": "1K"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Interaction": {
        "description": "The Interaction resource.",
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentOption",
            "description": "The name of the `Agent` used for generating the interaction."
          },
          "agent_config": {
            "description": "Configuration parameters for the agent interaction.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DynamicAgentConfig"
              }
            ],
            "discriminator": {
              "propertyName": "type"
            }
          },
          "created": {
            "description": "Output only. The time at which the response was created in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string"
          },
          "generation_config": {
            "$ref": "#/components/schemas/GenerationConfig",
            "description": "Input only. Configuration parameters for the model interaction.",
            "writeOnly": true
          },
          "id": {
            "description": "Required. Output only. A unique identifier for the interaction completion.",
            "readOnly": true,
            "type": "string",
            "default": ""
          },
          "input": {
            "$ref": "#/components/schemas/InteractionsInput"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The labels with user-defined metadata for the request."
          },
          "model": {
            "$ref": "#/components/schemas/ModelOption",
            "description": "The name of the `Model` used for generating the interaction."
          },
          "output_audio": {
            "description": "The last audio generated by the model in response to the current request.\n\nNote: this is added by the SDK.",
            "$ref": "#/components/schemas/AudioContent"
          },
          "output_image": {
            "description": "The last image generated by the model in response to the current request.\n\nNote: this is added by the SDK.",
            "$ref": "#/components/schemas/ImageContent"
          },
          "output_text": {
            "description": "Concatenated text from the last model output in response to the current request.\n\nNote: this is added by the SDK.",
            "type": "string"
          },
          "previous_interaction_id": {
            "description": "The ID of the previous interaction, if any.",
            "type": "string"
          },
          "response_format": {
            "description": "Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponseFormat"
                },
                "example": [
                  {
                    "type": "text",
                    "mime_type": "application/json"
                  }
                ],
                "x-speakeasy-model-namespace": "interactions"
              },
              {
                "$ref": "#/components/schemas/ResponseFormat"
              }
            ]
          },
          "response_mime_type": {
            "description": "The mime type of the response. This is required if response_format is set.",
            "deprecated": true,
            "type": "string"
          },
          "safety_settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SafetySetting"
            },
            "description": "Safety settings for the interaction."
          },
          "status": {
            "description": "Required. Output only. The status of the interaction.",
            "readOnly": true,
            "type": "string",
            "x-google-enum-descriptions": [
              "The interaction is in progress.",
              "The interaction requires action/input from the user.",
              "The interaction is completed.",
              "The interaction failed.",
              "The interaction was cancelled.",
              "The interaction is completed, but contains incomplete results (e.g.\nhitting max_tokens)."
            ],
            "enum": [
              "in_progress",
              "requires_action",
              "completed",
              "failed",
              "cancelled",
              "incomplete"
            ]
          },
          "steps": {
            "description": "Output only. The steps that make up the interaction, when included in the response.",
            "readOnly": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          },
          "system_instruction": {
            "description": "System instruction for the interaction.",
            "type": "string"
          },
          "tools": {
            "description": "A list of tool declarations the model may call during interaction.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "updated": {
            "description": "Output only. The time at which the response was last updated in ISO 8601 format\n(YYYY-MM-DDThh:mm:ssZ).",
            "readOnly": true,
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "Output only. Statistics on the interaction request's token usage.",
            "readOnly": true
          }
        },
        "required": [
          "status"
        ],
        "example": {
          "created": "2025-12-04T15:01:45Z",
          "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
          "model": "gemini-3.5-flash",
          "object": "interaction",
          "steps": [
            {
              "type": "model_output",
              "content": [
                {
                  "type": "text",
                  "text": "Hello! I'm doing well, functioning as expected. Thank you for asking! How are you doing today?"
                }
              ]
            }
          ],
          "status": "completed",
          "updated": "2025-12-04T15:01:45Z",
          "usage": {
            "input_tokens_by_modality": [
              {
                "modality": "text",
                "tokens": 7
              }
            ],
            "total_cached_tokens": 0,
            "total_input_tokens": 7,
            "total_output_tokens": 23,
            "total_thought_tokens": 49,
            "total_tokens": 79,
            "total_tool_use_tokens": 0
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "InteractionCompletedEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "interaction.completed"
          },
          "interaction": {
            "$ref": "#/components/schemas/InteractionSseEventInteraction",
            "description": "Partial completed interaction resource emitted at the end of the stream."
          },
          "metadata": {
            "$ref": "#/components/schemas/StreamMetadata",
            "description": "Optional metadata accompanying ANY streamed event."
          }
        },
        "required": [
          "event_type",
          "interaction"
        ],
        "examples": [
          {
            "interaction_completed": {
              "summary": "Interaction Completed",
              "value": {
                "event_type": "interaction.completed",
                "interaction": {
                  "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
                  "model": "gemini-3.5-flash",
                  "status": "completed",
                  "created": "2025-12-04T15:01:45Z",
                  "updated": "2025-12-04T15:01:45Z"
                },
                "event_id": "evt_123"
              }
            }
          },
          {
            "interaction_completed": {
              "summary": "Interaction Completed",
              "value": {
                "event_type": "interaction.completed",
                "interaction": {
                  "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
                  "model": "gemini-3-flash-preview",
                  "object": "interaction",
                  "status": "completed",
                  "created": "2025-12-04T15:01:45Z",
                  "updated": "2025-12-04T15:01:45Z"
                },
                "event_id": "evt_123"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "InteractionCreatedEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "interaction.created"
          },
          "interaction": {
            "$ref": "#/components/schemas/InteractionSseEventInteraction",
            "description": "Partial interaction resource emitted when the stream is created."
          },
          "metadata": {
            "$ref": "#/components/schemas/StreamMetadata",
            "description": "Optional metadata accompanying ANY streamed event."
          }
        },
        "required": [
          "event_type",
          "interaction"
        ],
        "examples": [
          {
            "interaction_created": {
              "summary": "Interaction Created",
              "value": {
                "event_type": "interaction.created",
                "interaction": {
                  "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
                  "model": "gemini-3.5-flash",
                  "status": "in_progress",
                  "created": "2025-12-04T15:01:45Z",
                  "updated": "2025-12-04T15:01:45Z"
                },
                "event_id": "evt_123"
              }
            }
          },
          {
            "interaction_created": {
              "summary": "Interaction Created",
              "value": {
                "event_type": "interaction.created",
                "interaction": {
                  "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
                  "model": "gemini-3-flash-preview",
                  "object": "interaction",
                  "status": "in_progress"
                },
                "event_id": "evt_123"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "InteractionSseEvent": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/InteractionCreatedEvent"
          },
          {
            "$ref": "#/components/schemas/InteractionCompletedEvent"
          },
          {
            "$ref": "#/components/schemas/InteractionStatusUpdate"
          },
          {
            "$ref": "#/components/schemas/ErrorEvent"
          },
          {
            "$ref": "#/components/schemas/StepStart"
          },
          {
            "$ref": "#/components/schemas/StepDelta"
          },
          {
            "$ref": "#/components/schemas/StepStop"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "InteractionSSEEvent",
        "discriminator": {
          "propertyName": "event_type"
        }
      },
      "InteractionSseEventInteraction": {
        "type": "object",
        "description": "Partial interaction resource emitted by interaction lifecycle SSE events.\nStreaming lifecycle payloads may omit fields that are only available on\nfull non-streaming Interaction responses.\n",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "agent": {
            "description": "The agent to interact with.",
            "type": "string"
          },
          "created": {
            "description": "Output only. The time at which the response was created in ISO 8601 format.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "Required. Output only. A unique identifier for the interaction completion.",
            "readOnly": true,
            "type": "string"
          },
          "model": {
            "description": "The model that will complete your prompt.",
            "type": "string"
          },
          "object": {
            "description": "Output only. The resource type.",
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "description": "Required. Output only. The status of the interaction.",
            "enum": [
              "in_progress",
              "requires_action",
              "completed",
              "failed",
              "cancelled",
              "incomplete"
            ],
            "readOnly": true,
            "type": "string",
            "x-google-enum-descriptions": [
              "The interaction is in progress.",
              "The interaction requires action/input from the user.",
              "The interaction is completed.",
              "The interaction failed.",
              "The interaction was cancelled.",
              "The interaction is completed, but contains incomplete results (e.g. hitting max_tokens)."
            ]
          },
          "steps": {
            "description": "Output only. The steps that make up the interaction, if included in this event.",
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "readOnly": true,
            "type": "array"
          },
          "updated": {
            "description": "Output only. The time at which the response was last updated in ISO 8601 format.",
            "readOnly": true,
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "Output only. Statistics on the interaction request's token usage.",
            "readOnly": true
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "InteractionSseStreamEvent": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InteractionSseEvent"
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "InteractionSSEStreamEvent"
      },
      "InteractionStatusUpdate": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "interaction.status_update"
          },
          "interaction_id": {
            "type": "string"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          },
          "status": {
            "type": "string",
            "x-google-enum-descriptions": [
              "The interaction is in progress.",
              "The interaction requires action/input from the user.",
              "The interaction is completed.",
              "The interaction failed.",
              "The interaction was cancelled.",
              "The interaction is completed, but contains incomplete results (e.g.\nhitting max_tokens)."
            ],
            "enum": [
              "in_progress",
              "requires_action",
              "completed",
              "failed",
              "cancelled",
              "incomplete"
            ]
          }
        },
        "required": [
          "event_type",
          "interaction_id",
          "status"
        ],
        "examples": [
          {
            "interaction_status_update": {
              "summary": "Interaction Status Update",
              "value": {
                "event_type": "interaction.status_update",
                "interaction_id": "v1_ChdTMjQ0YWJ5TUF1TzcxZThQdjRpcnFRcxIXUzI0NGFieU1BdU83MWU4UHY0aXJxUXM",
                "status": "in_progress"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "InteractionsInput": {
        "description": "The input for the interaction.",
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "title": "StepList"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Content"
            },
            "title": "ContentList"
          },
          {
            "$ref": "#/components/schemas/Content"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "MediaResolution": {
        "type": "string",
        "x-google-enum-descriptions": [
          "Low resolution.",
          "Medium resolution.",
          "High resolution.",
          "Ultra high resolution."
        ],
        "enum": [
          "low",
          "medium",
          "high",
          "ultra_high"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ModalityTokens": {
        "description": "The token count for a single response modality.",
        "type": "object",
        "properties": {
          "modality": {
            "description": "The modality associated with the token count.",
            "$ref": "#/components/schemas/ResponseModality"
          },
          "tokens": {
            "description": "Number of tokens for the modality.",
            "type": "integer",
            "format": "int32"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "ModelOption": {
        "title": "Model",
        "description": "The model that will complete your prompt.\\n\\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.",
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "Model",
        "type": "string",
        "enum": [
          "models/gemini-2.5-flash-lite",
          "models/gemini-2.5-flash-image",
          "models/gemini-3.1-flash-lite",
          "models/gemini-3.1-flash-image",
          "models/gemini-3.5-flash"
        ],
        "x-speakeasy-unknown-values": "allow",
        "x-speakeasy-enum-format": "union",
        "x-speakeasy-enum-descriptions": [
          "Our smallest and most cost effective model, built for at scale usage.",
          "Our native image generation model, optimized for speed, flexibility, and contextual understanding. Text input and output is priced the same as 2.5 Flash.",
          "Our most cost-efficient model, optimized for high-volume agentic tasks, translation, and simple data processing.",
          "Pro-level visual intelligence with Flash-speed efficiency and reality-grounded generation capabilities.",
          "Our most intelligent model for sustained frontier performance in agentic and coding tasks."
        ],
        "x-speakeasy-exports": [
          {
            "group": "interactions",
            "name": "model"
          },
          {
            "group": "interactions",
            "name": "model_param"
          }
        ]
      },
      "ModelOutputStep": {
        "description": "Output generated by the model.",
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Content"
            }
          },
          "type": {
            "const": "model_output"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "model_output": {
              "summary": "ModelOutputStep",
              "value": {
                "type": "model_output",
                "content": [
                  {
                    "type": "text",
                    "text": "The capital of France is Paris."
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "PlaceCitation": {
        "description": "A place citation annotation.",
        "type": "object",
        "properties": {
          "end_index": {
            "description": "End of the attributed segment, exclusive.",
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "description": "Title of the place.",
            "type": "string"
          },
          "place_id": {
            "description": "The ID of the place, in `places/{place_id}` format.",
            "type": "string"
          },
          "review_snippets": {
            "description": "Snippets of reviews that are used to generate answers about the\nfeatures of a given place in Google Maps.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewSnippet"
            }
          },
          "start_index": {
            "description": "Start of segment of the response that is attributed to this source.\n\nIndex indicates the start of the segment, measured in bytes.",
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "const": "place_citation"
          },
          "url": {
            "description": "URI reference of the place.",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Places": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Title of the place.",
            "type": "string"
          },
          "place_id": {
            "description": "The ID of the place, in `places/{place_id}` format.",
            "type": "string"
          },
          "review_snippets": {
            "description": "Snippets of reviews that are used to generate answers about the\nfeatures of a given place in Google Maps.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewSnippet"
            }
          },
          "url": {
            "description": "URI reference of the place.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "ResponseFormat": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/AudioResponseFormat"
          },
          {
            "$ref": "#/components/schemas/TextResponseFormat"
          },
          {
            "$ref": "#/components/schemas/ImageResponseFormat"
          },
          {
            "$ref": "#/components/schemas/VideoResponseFormat",
            "additionalProperties": true
          },
          {
            "type": "object"
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ResponseModality": {
        "type": "string",
        "x-google-enum-descriptions": [
          "Indicates the model should return text.",
          "Indicates the model should return images.",
          "Indicates the model should return audio.",
          "Indicates the model should return video.",
          "Indicates the model should return documents."
        ],
        "enum": [
          "text",
          "image",
          "audio",
          "video",
          "document"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ReviewSnippet": {
        "description": "Encapsulates a snippet of a user review that answers a question about\nthe features of a specific place in Google Maps.",
        "type": "object",
        "properties": {
          "review_id": {
            "description": "The ID of the review snippet.",
            "type": "string"
          },
          "title": {
            "description": "Title of the review.",
            "type": "string"
          },
          "url": {
            "description": "A link that corresponds to the user review on Google Maps.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "Step": {
        "description": "A step in the interaction.",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/UserInputStep"
          },
          {
            "$ref": "#/components/schemas/ModelOutputStep"
          },
          {
            "$ref": "#/components/schemas/ThoughtStep"
          },
          {
            "$ref": "#/components/schemas/FunctionCallStep"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionCallStep"
          },
          {
            "$ref": "#/components/schemas/UrlContextCallStep"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchCallStep"
          },
          {
            "$ref": "#/components/schemas/FileSearchCallStep"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsCallStep"
          },
          {
            "$ref": "#/components/schemas/FunctionResultStep"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionResultStep"
          },
          {
            "$ref": "#/components/schemas/UrlContextResultStep"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchResultStep"
          },
          {
            "$ref": "#/components/schemas/FileSearchResultStep"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsResultStep"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "StepDelta": {
        "type": "object",
        "properties": {
          "delta": {
            "$ref": "#/components/schemas/StepDeltaData"
          },
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "step.delta"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StepDeltaMetadata"
          }
        },
        "required": [
          "delta",
          "event_type",
          "index"
        ],
        "examples": [
          {
            "step_delta": {
              "summary": "Step Delta",
              "value": {
                "event_type": "step.delta",
                "index": 0,
                "delta": {
                  "type": "text",
                  "text": "Hello"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "StepDeltaData": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextDelta"
          },
          {
            "$ref": "#/components/schemas/ImageDelta"
          },
          {
            "$ref": "#/components/schemas/AudioDelta"
          },
          {
            "$ref": "#/components/schemas/DocumentDelta"
          },
          {
            "$ref": "#/components/schemas/ThoughtSummaryDelta"
          },
          {
            "$ref": "#/components/schemas/ThoughtSignatureDelta"
          },
          {
            "$ref": "#/components/schemas/TextAnnotationDelta"
          },
          {
            "$ref": "#/components/schemas/ArgumentsDelta"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionCallDelta"
          },
          {
            "$ref": "#/components/schemas/UrlContextCallDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchCallDelta"
          },
          {
            "$ref": "#/components/schemas/FileSearchCallDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsCallDelta"
          },
          {
            "$ref": "#/components/schemas/CodeExecutionResultDelta"
          },
          {
            "$ref": "#/components/schemas/UrlContextResultDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleSearchResultDelta"
          },
          {
            "$ref": "#/components/schemas/FileSearchResultDelta"
          },
          {
            "$ref": "#/components/schemas/GoogleMapsResultDelta"
          },
          {
            "$ref": "#/components/schemas/FunctionResultDelta"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "StepDeltaMetadata": {
        "type": "object",
        "description": "Optional metadata accompanying ANY streamed event.",
        "x-speakeasy-model-namespace": "interactions",
        "properties": {
          "total_usage": {
            "$ref": "#/components/schemas/Usage",
            "description": "Statistics on the interaction request's token usage."
          }
        }
      },
      "StepStart": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "step.start"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          },
          "step": {
            "$ref": "#/components/schemas/Step"
          }
        },
        "required": [
          "event_type",
          "index",
          "step"
        ],
        "examples": [
          {
            "step_start": {
              "summary": "Step Start",
              "value": {
                "event_type": "step.start",
                "index": 0,
                "step": {
                  "type": "model_output"
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "StepStop": {
        "type": "object",
        "properties": {
          "event_id": {
            "description": "The event_id token to be used to resume the interaction stream, from\nthis event.",
            "type": "string"
          },
          "event_type": {
            "const": "step.stop"
          },
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "metadata": {
            "description": "Optional metadata accompanying ANY streamed event.",
            "$ref": "#/components/schemas/StreamMetadata"
          },
          "step_usage": {
            "description": "Model usage stats for this specific step.",
            "$ref": "#/components/schemas/Usage"
          },
          "usage": {
            "description": "Cumulative model usage stats from the start of the session.",
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "event_type",
          "index"
        ],
        "examples": [
          {
            "step_stop": {
              "summary": "Step Stop",
              "value": {
                "event_type": "step.stop",
                "index": 0
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "StreamMetadata": {
        "type": "object",
        "properties": {
          "total_usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "TextAnnotationDelta": {
        "type": "object",
        "properties": {
          "annotations": {
            "description": "Citation information for model-generated content.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Annotation"
            }
          },
          "type": {
            "const": "text_annotation_delta"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "TextContent": {
        "description": "A text content block.",
        "type": "object",
        "properties": {
          "annotations": {
            "description": "Citation information for model-generated content.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Annotation"
            }
          },
          "text": {
            "description": "Required. The text content.",
            "type": "string"
          },
          "type": {
            "const": "text"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "examples": [
          {
            "text": {
              "summary": "Text",
              "value": {
                "type": "text",
                "text": "Hello, how are you?"
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "TextDelta": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "type": {
            "const": "text"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "TextResponseFormat": {
        "description": "Configuration for text output format.",
        "type": "object",
        "properties": {
          "mime_type": {
            "description": "The MIME type of the text output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "JSON output format.",
              "Plain text output format."
            ],
            "enum": [
              "application/json",
              "text/plain"
            ]
          },
          "schema": {
            "description": "The JSON schema that the output should conform to. Only applicable when\nmime_type is application/json.",
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object."
            }
          },
          "type": {
            "const": "text"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "text_response_format": {
              "summary": "Text Output (JSON Schema)",
              "value": {
                "type": "text",
                "mime_type": "application/json",
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingredients": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "recipe_name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ingredients",
                    "recipe_name"
                  ]
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ThinkingLevel": {
        "type": "string",
        "x-google-enum-descriptions": [
          "Little to no thinking.",
          "Low thinking level.",
          "Medium thinking level.",
          "High thinking level."
        ],
        "enum": [
          "minimal",
          "low",
          "medium",
          "high"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ThinkingSummaries": {
        "type": "string",
        "x-google-enum-descriptions": [
          "Auto thinking summaries.",
          "No thinking summaries."
        ],
        "enum": [
          "auto",
          "none"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ThoughtSignatureDelta": {
        "type": "object",
        "properties": {
          "signature": {
            "description": "Signature to match the backend source to be part of the generation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "thought_signature"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ThoughtStep": {
        "description": "A thought step.",
        "type": "object",
        "properties": {
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "summary": {
            "description": "A summary of the thought.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Content"
            }
          },
          "type": {
            "const": "thought"
          }
        },
        "required": [
          "type"
        ],
        "examples": [
          {
            "thought": {
              "summary": "ThoughtStep",
              "value": {
                "type": "thought",
                "signature": "thought_sig_abcd1234",
                "summary": [
                  {
                    "type": "text",
                    "text": "The model is searching Google for the capital of France."
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "ThoughtSummaryDelta": {
        "type": "object",
        "properties": {
          "content": {
            "description": "A new summary item to be added to the thought.",
            "$ref": "#/components/schemas/Content"
          },
          "type": {
            "const": "thought_summary"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "Tool": {
        "description": "A tool that can be used by the model.",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Function"
          },
          {
            "$ref": "#/components/schemas/CodeExecution"
          },
          {
            "$ref": "#/components/schemas/UrlContext"
          },
          {
            "$ref": "#/components/schemas/GoogleSearch"
          },
          {
            "$ref": "#/components/schemas/FileSearch"
          },
          {
            "$ref": "#/components/schemas/GoogleMaps"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "discriminator": {
          "propertyName": "type"
        }
      },
      "ToolChoiceConfig": {
        "description": "The tool choice configuration containing allowed tools.",
        "type": "object",
        "properties": {
          "allowed_tools": {
            "description": "The allowed tools.",
            "$ref": "#/components/schemas/AllowedTools"
          }
        },
        "example": {
          "allowed_tools": {
            "mode": "any",
            "tools": [
              "my_tool"
            ]
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "UrlCitation": {
        "description": "A URL citation annotation.",
        "type": "object",
        "properties": {
          "end_index": {
            "description": "End of the attributed segment, exclusive.",
            "type": "integer",
            "format": "int32"
          },
          "start_index": {
            "description": "Start of segment of the response that is attributed to this source.\n\nIndex indicates the start of the segment, measured in bytes.",
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "description": "The title of the URL.",
            "type": "string"
          },
          "type": {
            "const": "url_citation"
          },
          "url": {
            "description": "The URL.",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLCitation"
      },
      "UrlContext": {
        "description": "A tool that can be used by the model to fetch URL context.",
        "type": "object",
        "properties": {
          "type": {
            "const": "url_context"
          }
        },
        "required": [
          "type"
        ],
        "x-codeSamples": [
          {
            "lang": "sh",
            "label": "url_context",
            "source": "curl -X POST https://generativelanguage.googleapis.com/v1/interactions \\\n  -H \"x-goog-api-key: $GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-3.5-flash\",\n    \"tools\": [{\n      \"type\": \"url_context\"\n    }],\n    \"input\": \"Summarize https://www.example.com\"\n  }'\n"
          },
          {
            "lang": "python",
            "label": "url_context",
            "source": "from google import genai\n\nclient = genai.Client()\nresponse = client.interactions.create(\n    model=\"gemini-3.5-flash\",\n    tools=[{\"type\": \"url_context\"}],\n    input=\"Summarize https://www.example.com\"\n)\nprint(response.output_text)\n"
          },
          {
            "lang": "javascript",
            "label": "url_context",
            "source": "import {GoogleGenAI} from '@google/genai';\n\nconst ai = new GoogleGenAI({});\nconst interaction = await ai.interactions.create({\n    model: 'gemini-3.5-flash',\n    tools: [{ type: 'url_context' }],\n    input: 'Summarize https://www.example.com'\n});\nconsole.log(interaction.output_text);\n"
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContext"
      },
      "UrlContextCallArguments": {
        "description": "The arguments to pass to the URL context.",
        "type": "object",
        "properties": {
          "urls": {
            "description": "The URLs to fetch.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextCallArguments"
      },
      "UrlContextCallDelta": {
        "type": "object",
        "properties": {
          "arguments": {
            "$ref": "#/components/schemas/UrlContextCallArguments"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "url_context_call"
          }
        },
        "required": [
          "arguments",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextCallDelta"
      },
      "UrlContextCallStep": {
        "description": "URL context call step.",
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The arguments to pass to the URL context.",
            "$ref": "#/components/schemas/UrlContextCallArguments"
          },
          "id": {
            "description": "Required. A unique ID for this specific tool call.",
            "type": "string"
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "url_context_call"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "examples": [
          {
            "url_context_call": {
              "summary": "UrlContextCallStep",
              "value": {
                "type": "url_context_call",
                "id": "url_call_10219",
                "arguments": {
                  "urls": [
                    "https://www.example.com"
                  ]
                }
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextCallStep"
      },
      "UrlContextResult": {
        "description": "The result of the URL context.",
        "type": "object",
        "properties": {
          "status": {
            "description": "The status of the URL retrieval.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Url retrieval is successful.",
              "Url retrieval is failed due to error.",
              "Url retrieval is failed because the content is behind paywall.",
              "Url retrieval is failed because the content is unsafe."
            ],
            "enum": [
              "success",
              "error",
              "paywall",
              "unsafe"
            ]
          },
          "url": {
            "description": "The URL that was fetched.",
            "type": "string"
          }
        },
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextResult"
      },
      "UrlContextResultDelta": {
        "type": "object",
        "properties": {
          "is_error": {
            "type": "boolean"
          },
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UrlContextResult"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "url_context_result"
          }
        },
        "required": [
          "result",
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextResultDelta"
      },
      "UrlContextResultStep": {
        "description": "URL context result step.",
        "type": "object",
        "properties": {
          "call_id": {
            "description": "Required. ID to match the ID from the function call block.",
            "type": "string"
          },
          "is_error": {
            "description": "Whether the URL context resulted in an error.",
            "type": "boolean"
          },
          "result": {
            "description": "The results of the URL context.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UrlContextResult"
            }
          },
          "signature": {
            "description": "A signature hash for backend validation.",
            "type": "string",
            "format": "byte",
            "x-speakeasy-base64-input-mode": "file"
          },
          "type": {
            "const": "url_context_result"
          }
        },
        "required": [
          "call_id",
          "type"
        ],
        "examples": [
          {
            "url_context_result": {
              "summary": "UrlContextResultStep",
              "value": {
                "type": "url_context_result",
                "call_id": "url_call_10219",
                "result": [
                  {
                    "url": "https://www.example.com",
                    "title": "Example Domain",
                    "snippet": "This domain is for use in illustrative examples in documents."
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions",
        "x-speakeasy-name-override": "URLContextResultStep"
      },
      "Usage": {
        "description": "Statistics on the interaction request's token usage.",
        "type": "object",
        "properties": {
          "cached_tokens_by_modality": {
            "description": "A breakdown of cached token usage by modality.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityTokens"
            }
          },
          "grounding_tool_count": {
            "description": "Grounding tool count.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroundingToolCount"
            }
          },
          "input_tokens_by_modality": {
            "description": "A breakdown of input token usage by modality.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityTokens"
            }
          },
          "output_tokens_by_modality": {
            "description": "A breakdown of output token usage by modality.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityTokens"
            }
          },
          "tool_use_tokens_by_modality": {
            "description": "A breakdown of tool-use token usage by modality.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityTokens"
            }
          },
          "total_cached_tokens": {
            "description": "Number of tokens in the cached part of the prompt (the cached content).",
            "type": "integer",
            "format": "int32"
          },
          "total_input_tokens": {
            "description": "Number of tokens in the prompt (context).",
            "type": "integer",
            "format": "int32"
          },
          "total_output_tokens": {
            "description": "Total number of tokens across all the generated responses.",
            "type": "integer",
            "format": "int32"
          },
          "total_thought_tokens": {
            "description": "Number of tokens of thoughts for thinking models.",
            "type": "integer",
            "format": "int32"
          },
          "total_tokens": {
            "description": "Total token count for the interaction request (prompt + responses + other\ninternal tokens).",
            "type": "integer",
            "format": "int32"
          },
          "total_tool_use_tokens": {
            "description": "Number of tokens present in tool-use prompt(s).",
            "type": "integer",
            "format": "int32"
          }
        },
        "x-speakeasy-model-namespace": "interactions"
      },
      "UserInputStep": {
        "description": "Input provided by the user.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Content"
            },
            "title": "ContentList"
          },
          "type": {
            "const": "user_input"
          }
        },
        "examples": [
          {
            "user_input": {
              "summary": "UserInputStep",
              "value": {
                "type": "user_input",
                "content": [
                  {
                    "type": "text",
                    "text": "What is the capital of France?"
                  }
                ]
              }
            }
          }
        ],
        "x-speakeasy-model-namespace": "interactions"
      },
      "VideoResponseFormat": {
        "description": "Configuration for video output format.",
        "type": "object",
        "properties": {
          "aspect_ratio": {
            "description": "The aspect ratio for the video output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "16:9 aspect ratio.",
              "9:16 aspect ratio."
            ],
            "enum": [
              "16:9",
              "9:16"
            ]
          },
          "delivery": {
            "description": "The delivery mode for the video output.",
            "type": "string",
            "x-google-enum-descriptions": [
              "Video data is returned inline in the response.",
              "Video data is returned as a URI."
            ],
            "enum": [
              "inline",
              "uri"
            ]
          },
          "duration": {
            "description": "The duration for the video output.",
            "type": "string",
            "format": "google-duration"
          },
          "type": {
            "const": "video"
          }
        },
        "required": [
          "type"
        ],
        "x-speakeasy-model-namespace": "interactions"
      }
    }
  },
  "x-speakeasy-retries": {
    "strategy": "backoff",
    "backoff": {
      "initialInterval": 500,
      "maxInterval": 8000,
      "maxElapsedTime": 30000,
      "exponent": 2
    },
    "statusCodes": [
      408,
      409,
      429,
      "5XX"
    ],
    "retryConnectionErrors": true
  },
  "x-speakeasy-globals": {
    "parameters": [
      {
        "$ref": "#/components/parameters/api_version"
      },
      {
        "$ref": "#/components/parameters/google_genai_user_project"
      }
    ]
  },
  "security": [
    {
      "googleGenAIAuth": []
    }
  ]
}
