// request reference
Google AI Mode parameters
Send query parameters with GET /api/google/ai-mode. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.
The groups below list every request field, including compatibility restrictions. Read the extended reference for detailed types, defaults, parameter combinations and additional examples.
Question
Ask Google AI Mode the way you would in the search box.
qRequired question, up to 2,048 characters with no controls.
Example / input hint: what is the best espresso machine for a small kitchen
Geography
Choose a human-readable location or a canonical UULE, never both.
locationNamed search origin; at most 63 characters once Google-encoded. Conflicts with uule.
Example / input hint: Austin, Texas
uuleCanonical Google location token, up to 2,048 characters; conflicts with location.
Example / input hint: w+CAIQICI…
Localization
Control the first-party Google host, language, country, and device layout.
hlGoogle interface and result language.
Example / input hint: en
glTwo-letter country localization code.
Example / input hint: us
google_domainA Google domain such as google.com or google.co.uk.
Example / input hint: google.com
deviceGoogle returns its real layout for the selected device.
desktoptabletmobileConversation
Ask a follow-up in the same thread. Request a token on one turn, then send it back with the next question.
continuableReturn a subsequent_request_token so this answer can be followed up.
truefalsesubsequent_request_tokenToken from a previous continuable response. Send a new question with it.
Example / input hint: ai1.…
Image prompt
Add a picture to the question. Google Lens receives the image; the answer comes from AI Mode.
image_urlPublic http or https image, up to 20 MB. Cannot be combined with a continuation token.
Example / input hint: https://example.com/photo.jpg
// response
Work with the complete JSON response
Response groups include text_blocks, references. Groups and fields depend on the upstream result.
The SDK examples use raise_for_error() or raiseForError() so API errors are not mistaken for successful results.