Gemini 3.5 Flash

Gemini 3.5 Flash is Google’s most intelligent Flash-series multimodal model for sustained frontier performance on agentic and coding tasks. It accepts text, images, video, audio, and PDFs, and is designed for long-horizon workflows, sub-agent orchestration, complex coding loops, multimodal understanding, and high-speed reasoning at production scale.

Complete technical specification for integration
Ready-to-use code snippets for common workflows
API Options
Platform-level options for task execution and delivery.
taskType
stringrequiredvalue: textInferenceIdentifier for the type of task being performed
taskUUID
stringrequiredUUID v4UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.
outputFormat
stringdefault: TEXTSpecifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.
Allowed values2 values
webhookURL
stringURISpecifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.
Learn more1 resource
- WebhooksPLATFORM
- Webhooks
deliveryMethod
stringdefault: syncDetermines how the API delivers task results.
Allowed values3 values
- Returns complete results directly in the API response.
- Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.
- Streams results token-by-token as they are generated.
Learn more1 resource
- Task PollingPLATFORM
includeCost
booleandefault: falseInclude task cost in the response.
includeUsage
booleandefault: falseInclude token usage statistics in the response.
numberResults
integermin: 1max: 4default: 1Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
Inputs
Input resources for the task (images, audio, etc). These must be nested inside the inputs object.
inputs object.inputs»audiosaudios
array of stringsmin items: 1Array of audio inputs (UUID, URL, or Base64).
inputs»documentsdocuments
array of stringsmin items: 1Array of document inputs (UUID, URL, or Base64).
inputs»imagesimages
array of stringsmin items: 1Array of image inputs (UUID, URL, Data URI, or Base64).
inputs»videosvideos
array of stringsmin items: 1Array of video inputs (UUID, URL, or Base64).
Core Parameters
Primary parameters that define the task output.
model
stringrequiredvalue: google-gemini-3-5-flashIdentifier of the model to use for generation.
Learn more3 resources
seed
integermin: 0max: 4294967295Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
jsonSchema
object | stringJSON Schema for structured output. Only honoured when
outputFormatis JSON. Accepts the OpenAI envelope ({name, schema, strict}) or a bare JSON Schema; bare schemas are auto-wrapped withname='response'andstrict=true.
messages
array of objectsrequiredmin items: 1Array of chat messages forming the conversation context. The final message must use the user role.
Settings
Technical parameters to fine-tune the inference process. These must be nested inside the settings object.
settings object.settings»systemPromptsystemPrompt
stringmin: 1max: 200000System-level instruction that guides the model's behavior and output style across the entire generation.
settings»temperaturetemperature
floatmin: 0max: 2step: 0.01default: 1Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.
settings»topPtopP
floatmin: 0max: 1step: 0.01default: 0.95Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity.
settings»frequencyPenaltyfrequencyPenalty
floatmin: -2max: 2step: 0.01default: 0Penalizes tokens based on their frequency in the output so far. A value of 0.0 disables the penalty.
settings»maxTokensmaxTokens
integermin: 1max: 65535default: 65535Maximum number of tokens to generate in the response.
settings»presencePenaltypresencePenalty
floatmin: -2max: 2step: 0.01default: 0Encourages the model to introduce new topics. A value of 0.0 disables the penalty.
settings»stopSequencesstopSequences
array of stringsmin: 1max: 50max items: 5Array of sequences that will cause the model to stop generating further tokens when encountered.
settings»thinkingLevelthinkingLevel
stringdefault: highControls the depth of internal reasoning the model performs before generating a response.
Allowed values5 values
settings»topKtopK
integervalue: 64Top-K sampling parameter that limits the number of highest-probability tokens considered at each step.
toolChoice
objectControls how the model selects which tool to call. This only takes effect when
toolsare defined.Examples3 examples
Let the model decide (default):
"toolChoice": { "type": "auto" }Force a specific tool call:
"toolChoice": { "type": "tool", "name": "get_weather" }Require any tool call:
"toolChoice": { "type": "any" }Properties2 properties
toolChoice»typetype
stringrequiredStrategy the model uses to decide when and which tools to call.
Allowed values4 values
- The model decides whether to call a tool based on the conversation context. This is the recommended default.
- The model must call at least one tool but chooses which one. Useful when you always need structured output.
- The model must call the specific tool identified by
name. Use this to force a particular function call. - The model will not call any tool, even if tools are defined. Useful for forcing a text-only response.
toolChoice»namename
stringName of the specific tool the model must call. Required when type is
tool.
tools
array of objectsmin items: 1An array of tool definitions that the model may call during generation. The model can invoke one or more tools based on the conversation context, outputting structured calls with arguments instead of (or alongside) free-text.
For
functiontools, each definition requires:type:"function"name: Unique identifier (alphanumeric, hyphens, underscores; max 64 chars).description: What the function does. The model uses this to decide when to call it.schema: JSON Schema object describing the expected input arguments.
The
searchtool is executed server-side by the provider. You don't need to handle the tool result yourself.The
codeInterpretertool is executed server-side by the provider. You don't need to handle the tool result yourself.Examples4 examples
Function tool, weather lookup:Built-in web search:"tools": [ { "type": "function", "name": "get_weather", "description": "Get current weather for a city", "schema": { "type": "object", "properties": { "city": { "type": "string", "description": "City name" } }, "required": ["city"] } } ], "toolChoice": { "type": "auto" }Built-in code interpreter:"tools": [ { "type": "search" } ]Multiple function tools:"tools": [ { "type": "codeInterpreter" } ]"tools": [ { "type": "function", "name": "search_products", "description": "Search the product catalog by query and filters.", "schema": { "type": "object", "properties": { "query": { "type": "string" }, "category": { "type": "string" } }, "required": ["query"] } }, { "type": "function", "name": "add_to_cart", "description": "Add a product to the user's shopping cart.", "schema": { "type": "object", "properties": { "productId": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 } }, "required": ["productId"] } } ]Properties4 properties
tools»typetype
stringrequiredThe kind of tool to make available to the model. User-defined functions require
nameandschema, while built-in tools (search,codeInterpreter) are executed server-side by the provider.Allowed values2 values
tools»namename
stringmax: 64Unique function name. Required for function tools.
tools»descriptiondescription
stringExplanation of what the function does, used by the model to decide when to call it.
tools»schemaschema
objectJSON Schema object describing the function's input parameters.
Provider Settings
Parameters specific to this model provider. These must be nested inside the providerSettings.google object.
providerSettings.google object.providerSettings»google»mediaResolutionmediaResolution
stringControls the token budget allocated to images and video frames. Higher values preserve more detail at the cost of additional tokens.
Allowed values3 values
providerSettings»google»searchsearch
booleandefault: falseEnable live web search grounding to incorporate real-world, up-to-date information into image generation.
providerSettings»google»searchLatitudesearchLatitude
floatmin: -90max: 90Latitude for location-biased Google Search grounding.
providerSettings»google»searchLongitudesearchLongitude
floatmin: -180max: 180Longitude for location-biased Google Search grounding.
providerSettings»google»thoughtSignaturethoughtSignature
stringmax: 100000Encrypted reasoning context returned from a previous response. Pass it back to maintain multi-turn reasoning continuity.