Complete Reference · AI Platform & API · May 2026
thinkingBudget — 0 disables, -1 dynamic. Budget controls cost.x-goog-api-key header or GOOGLE_API_KEY env var. Get free at aistudio.google.comgcloud auth application-default logintemperaturefloat 0–2 · randomness control
topPfloat 0–1 · nucleus sampling
topKint · top-K sampling tokens
maxOutputTokensint · max response tokens
stopSequencesstring[] · stop generation here
responseMimeType"text/plain" or "application/json"
responseSchemaobject · JSON schema for structured output
thinkingBudget0=off · -1=dynamic · int=fixed tokens
includeThoughtsbool · return thinking trace in response
BLOCK_NONE · BLOCK_LOW_AND_ABOVEBLOCK_MEDIUM_AND_ABOVE · BLOCK_ONLY_HIGH
includeThoughts:true.GOOGLE_API_KEY env var.