Web Search (Google Search)
The Gemini series provides internet-connected variants with built-in Google Search: the model retrieves information first and then answers, making it suitable for time-sensitive Q&A, fact checking, and similar scenarios. Enable it through the model name suffix; no extra parameters are needed.
Available Connected Models
gemini-3.5-flash-google-searchgemini-3.1-flash-google-searchgemini-2.5-flash-google-searchgemini-2.5-flash-lite-google-search
How to Call
Exactly the same as ordinary chat:
curl https://api.4allapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIPROXY_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-3.5-flash-google-search", "messages": [{"role": "user", "content": "今天美元兑日元汇率大概多少?"}] }'Usage Notes
- Answers are based on real-time search results, but there may still be errors; critical decisions such as financial or medical ones should be verified again;
- Connected search adds latency (usually 1–3 seconds more) and token usage;
- For requests that do not need real-time information, use a regular model; do not route everything through the connected variant by default;
- Stating “cite sources” in the prompt can encourage the model to include references in its answer, making manual verification easier.