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

# Google Gemini

> Integrate your application with the Google Gemini API

## 🚀 Quickstart

Connect to Google Gemini with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Google Gemini*.
  </Step>

  <Step title="Authorize Google Gemini">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then enter your Google Gemini API key. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the Google Gemini API">
    Let's make your first request to the Google Gemini API (list models). Replace the placeholders below with your [API key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/v1beta/models" \
          -H "Authorization: Bearer <NANGO-API-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });

        const res = await nango.get({
            endpoint: '/v1beta/models',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/docs/reference/backend/backend-sdk/node#get-a-connection-with-credentials) or [API](/docs/reference/backend/http-api/connections/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/docs/guides/primitives/auth) to integrate Nango in your app.
  </Step>
</Steps>

## 📚 Google Gemini Integration Guides

Nango maintained guides for common use cases.

* [How do I link my Google Gemini account?](/docs/api-integrations/google-gemini/connect)\
  Learn how to generate your Google Gemini API key and authenticate with Google Gemini

Official docs: [Google Gemini API docs](https://ai.google.dev/api)

## 🧩 Pre-built syncs & actions for Google Gemini

Explore Nango-provided actions in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type | Source code |
| - | - | - | - |
| `batch-embed-contents` | Generate embeddings for multiple text contents in a single request. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/batch-embed-contents.ts) |
| `count-tokens` | Count tokens for a given request without generating a response. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/count-tokens.ts) |
| `delete-file` | Delete an uploaded file from the Gemini Files API. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/delete-file.ts) |
| `embed-content` | Generate a single embedding vector for text content. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/embed-content.ts) |
| `generate-content` | Generate content using a Gemini model with optional system instructions, tools, and generation config. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/generate-content.ts) |
| `get-file` | Retrieve metadata for a specific uploaded file. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/get-file.ts) |
| `get-model` | Retrieve a specific Gemini model by name. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/get-model.ts) |
| `list-cached-contents` | List cached content entries (context cache) with pagination. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/list-cached-contents.ts) |
| `list-files` | List files uploaded to the Gemini Files API. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/list-files.ts) |
| `list-models` | List available Gemini models with pagination. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/actions/list-models.ts) |
| `cached-contents` | Sync cached content entries (context cache) | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/syncs/cached-contents.ts) |
| `models` | Sync available Gemini models | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/google-gemini/syncs/models.ts) |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.