Coding agents
Gemini CLI setup
Connect the official Gemini CLI to Modelflare with your API key through the native Gemini API.
1. Create an API key
Section titled “1. Create an API key”Create a Modelflare API key.
2. Install Gemini CLI
Section titled “2. Install Gemini CLI”npm install -g @google/gemini-cli@latestgemini --version3. Configure Modelflare
Section titled “3. Configure Modelflare”Replace YOUR_MODELFLARE_API_KEY with your complete Modelflare API key.
$env:GEMINI_API_KEY="YOUR_MODELFLARE_API_KEY"$env:GOOGLE_GEMINI_BASE_URL="https://modelflare.dev"export GEMINI_API_KEY="YOUR_MODELFLARE_API_KEY"export GOOGLE_GEMINI_BASE_URL="https://modelflare.dev"4. Start and test
Section titled “4. Start and test”Replace YOUR_MODEL_ID with a model ID from the Modelflare model catalog. In the same terminal, open your project directory and run:
gemini --model YOUR_MODEL_IDIf prompted, select Use Gemini API key, then send:
Reply with one sentence confirming the connection is working.A normal reply means setup is complete.