examples/; copy environment variables from the relevant guide. Run npm ci there for Node examples. See the Python guide for Python setup and the documentation directory’s README.md for complete local checks.
From examples to production
- Run documentation validation against local fixtures to check code and page consistency.
- Use isolated test settings for one minimal target-deployment request, then verify each required extension separately.
- Test business failures, timeouts, streaming interruption, and duplicate submission handling before setting queue, concurrency, and logging policies.
- Record target-service results using the production checklist. Local passes do not replace real model verification.
Files, search, and generation parameters
Confirm model and native-channel support before running; also see data controls.
Audio/video input and text revisions
Each example makes one request. Verify real results with the target model; see troubleshooting.
Tool policies and JSON validation
- Tool selection and parallel controls:
examples/tool-policy.mjs, four policies, at most two turns and one read-only call. - JSON mode:
examples/json-mode.mjs, Chat / Responses protocols with separate completion and business-field validation.
Native Gemini built-in tools
Three-mode example:examples/gemini-builtins.mjs selects search, URL context, or upstream code execution. One request per run; checks task evidence as well as completion.