⌘K

Gemini 3.5 Flash

gemini-3.5-flash

Google's fast frontier model for real-world agentic tasks. Supports text, image, video, audio, and PDF inputs with a 1,048,576-token context window and up to 65,536 output tokens.

API Notes

gemini-3.5-flash has an input token limit of 1,048,576 and an output token limit of 65,536

gemini-3.5-flash supports text, image, video, audio, and PDF inputs, and returns text output

gemini-3.5-flash supports function calling, structured outputs, search grounding, Google Maps grounding, code execution, file search, URL context, caching, Batch API, Flex inference, Priority inference, and thinking

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: gemini-3.5-flash


messages array required

Array of message objects representing the conversation history

role string required

Message role

Options: user, assistant, system, developer

content string | array required

Text string or multimodal array


max_tokens integer

Maximum tokens to generate in the completion

Range: 1 - 65536


temperature number

Sampling temperature to use

Default: 1.0

Range: 0.0 - 2.0


top_p number

Nucleus sampling parameter

Default: 1.0

Range: 0.0 - 1.0


stream boolean

Whether to stream response incrementally

Default: false


Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated resource content

type string

Resource type

Value: image|video

url string

Processed resource URL

jobId string

Remote task ID


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information