> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Google Gemini with API Key – StackOne Hub

> Link a Google Gemini account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using Google Gemini actions.

<Warning>A Google account is required. API keys are free for testing and development.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Generating an API Key</h2>

  <p>To connect Google Gemini with StackOne, you'll need to generate an API key from Google AI Studio.</p>

  <Steps>
    <Step title="Access Google AI Studio">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Visit Google AI Studio, sign in with your Google account, and go to the <a href="https://aistudio.google.com/app/apikey" target="_blank" rel="noopener noreferrer">Get API Key</a> page located at the bottom of the sidebar.</p>
      </div>
    </Step>

    <Step title="Create a project or import an existing project">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>If you have existing Google Cloud projects, you can select one or create a new one to associate with your API key.</p>

        <ul>
          <li>To create a new project, click <strong>+ Create project</strong> by navigating to the <strong>Projects</strong> page from the sidebar menu.</li>
          <li>Enter a name for your project and click the <strong>Create project</strong> button.</li>
          <li>If you want to use any existing projects from your other Google Cloud projects, click <strong>Import projects</strong>, search and select projects from the drawer that opens on the right, and click the <strong>Import</strong> button.</li>
          <li>The imported project will be visible in the Projects grid.</li>
          <li>To create an API key for a project, click the <strong>Create API Key</strong> link in the <strong>Keys</strong> column, or navigate to the <strong>Get API Key</strong> page via the left sidebar menu.</li>
        </ul>
      </div>
    </Step>

    <Step title="Create API Key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click the <strong>Create API Key</strong> button located in the top right corner of the page.</p>

        <ul>
          <li>If you have existing Google Cloud projects, you can select one or create a new one.</li>
          <li>If you want to create a project, select <strong>+ Create project</strong>, enter your project name, and click the <strong>Create project</strong> button.</li>
          <li>The created project will be automatically selected in the `Choose an imported project` field.</li>
          <li>Enter a name for your API key in the `Name your key` field (e.g., StackOne Integration Key).</li>
          <li>Click the <strong>Create Key</strong> button to generate your API key.</li>
          <li>If you already have prior projects, you can simply enter the name for your API key and select the project from the dropdown, then click the <strong>Create Key</strong> button.</li>
        </ul>
      </div>
    </Step>

    <Step title="Copy the API Key">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Copy the generated API key and store it securely for use later.</p>

        <ul>
          <li>Format: `AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`</li>
          <li>Note: Keep your API key secure and do not share it publicly</li>
          <li>The API key authenticates all requests to the Gemini API.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>API Key</strong></li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></li>
        <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
        <li>Once authorization is successful, you will see a confirmation popup</li>
      </ul>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>
