Skip to documentation
DEVELOPER DOCS / HASHBIDXMODEL ACCESS. ONE INTEGRATION.

TOOL INTEGRATION

Gemini CLI

Google's terminal AI agent. HashBid serves the native Gemini protocol, so the official CLI works with a few environment variables and one settings entry.

Official docs

Before you start

API Key
<YOUR_API_KEY>

Create one on the API Keys page. Paste the raw key, without Bearer.

Base URL
https://hashbidx.ai/v1/gemini

Must end with /v1/gemini — the CLI appends /v1beta/models/… itself.

Model
gemini-2.5-flash

Example only — use a model ID from the Models page.

Setup

01Install Gemini CLI

Requires Node.js 20 or later.

Check Node.js
node --version
npm
npm install -g @google/gemini-cli

02Set the environment variables

Gemini CLI ignores OpenAI-style variables; it only reads its own. Use a Gemini model enabled on the Models page.

macOS / Linux
export GEMINI_API_KEY="<YOUR_API_KEY>"
export GOOGLE_GEMINI_BASE_URL="https://hashbidx.ai/v1/gemini"
export GEMINI_MODEL="<MODEL_ID>"
Windows (PowerShell)
$env:GEMINI_API_KEY="<YOUR_API_KEY>"
$env:GOOGLE_GEMINI_BASE_URL="https://hashbidx.ai/v1/gemini"
$env:GEMINI_MODEL="<MODEL_ID>"
Windows (CMD)
set GEMINI_API_KEY=<YOUR_API_KEY>
set GOOGLE_GEMINI_BASE_URL=https://hashbidx.ai/v1/gemini
set GEMINI_MODEL=<MODEL_ID>

These only last for the current session. To keep them, add the export lines to ~/.zshrc / ~/.bashrc, or set them as Windows user environment variables.

03Select API key authentication

Tell Gemini CLI to authenticate with GEMINI_API_KEY; without this it stops with Invalid auth method selected. Create ~/.gemini/settings.json (Windows: %USERPROFILE%\.gemini\settings.json), or merge the security entry into your existing file.

~/.gemini/settings.json
{
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}

04Start Gemini CLI

Run it in the same terminal. If asked whether to connect VS Code, choose Yes to let it read your open files. With the variables and the auth setting in place, the login menu is skipped.

Terminal
gemini

Verify it works

  • You land at the > prompt without a sign-in menu.
  • Ask Hello, please introduce yourself. and get a reply.
  • The request shows up on the Logs page of this console.

FAQ

404 / “Invalid URL”

GOOGLE_GEMINI_BASE_URL must be https://hashbidx.ai/v1/gemini — not the bare /v1 base used by OpenAI tools. Restart the terminal after fixing it.

“Content generator not initialized” or an auth-method prompt

Check that ~/.gemini/settings.json sets security.auth.selectedType to gemini-api-key. Then make sure the CLI sees your variables: use GEMINI_API_KEY, not OPENAI_API_KEY, and run gemini in the window where you set them.

Model not found

Check GEMINI_MODEL against the exact model ID on the Models page.

All developer tools
BUILD WITH HASHBIDX

Find your model. Make your first call.

Models & pricing