Test Your Gemini API Connection
Run a small test program to check whether your API key works. Use an official Gemini SDK and send a simple prompt to a supported model. If the request fails, check the key, model name, API access, quota limits, and project settings.