← All docs

Bring your own API key

Use your Gemini key so runs are not blocked by the shared quota.

Bring your own API key diagram

Flow

01AI Studio key
02Settings / Vault
03Encrypted store
04gemini_client
05Your quota

Why

The shared Gemini key on a free tier can return 429 RESOURCE_EXHAUSTED. Your own key keeps planning, MCP-from-prompt, debug, generate, and resume unblocked.

How

Settings → Your Gemini API key, or Vault with name gemini and field api_key. Values are encrypted and never returned. The next workflow, MCP build, debug, or generate call loads cred:gemini for your user.

Fallback

If no user key is stored, AgentOS uses GEMINI_API_KEY from the server environment.