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

# Google Palm

Portkey provides a robust and secure gateway to facilitate the integration of various Large Language Models (LLMs) into your applications, including [Google Palm APIs](https://developers.generativeai.google/guide/palm%5Fapi%5Foverview).

With Portkey, you can take advantage of features like fast AI gateway access, observability, prompt management, and more, all while ensuring the secure management of your LLM API keys through [Model Catalog](/docs/product/model-catalog).

<Note>
  Provider Slug. `palm`
</Note>

## Portkey SDK Integration with Google Palm

Portkey provides a consistent API to interact with models from various providers. To integrate Google Palm with Portkey:

### 1. Install the Portkey SDK

Add the Portkey SDK to your application to interact with Google Palm's API through Portkey's gateway.

<Tabs>
  <Tab title="NodeJS">
    ```
    npm install --save portkey-ai
    ```
  </Tab>

  <Tab title="Python">
    ```
    pip install portkey-ai
    ```
  </Tab>
</Tabs>

### 2. Initialize Portkey with Your AI Provider

Set up Portkey with your AI Provider slug. Add your Google Palm API key to [Model Catalog](https://app.portkey.ai/model-catalog) to get the provider slug.

<Tabs>
  <Tab title="NodeJS SDK">
    ```js theme={"system"}
    import Portkey from 'portkey-ai'


    const portkey = new Portkey({

        apiKey: "PORTKEY_API_KEY", // defaults to process.env["PORTKEY_API_KEY"]

        provider:"@google-palm-prod" // Your AI Provider slug from Model Catalog

    })
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={"system"}
    from portkey_ai import Portkey

    portkey = Portkey(

        api_key="PORTKEY_API_KEY",  # Replace with your Portkey API key

        provider="@google-palm-prod"  # Your AI Provider slug from Model Catalog

    )
    ```
  </Tab>
</Tabs>

### **3. Invoke Chat Completions with** Google Palm

Use the Portkey instance to send requests to Google Palm.

<Tabs>
  <Tab title="NodeJS SDK">
    ```js theme={"system"}
    const chatCompletion = await portkey.chat.completions.create({

        messages: [{ role: 'user', content: 'Say this is a test' }],

        model: 'chat-bison-001',

    });

    console.log(chatCompletion.choices);
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={"system"}
    completion = portkey.chat.completions.create(

        messages= [{ "role": 'user', "content": 'Say this is a test' }],

        model= 'chat-bison-001'

    )

    print(completion)
    ```
  </Tab>
</Tabs>

## Managing Google Palm Prompts

You can manage all prompts to Google Palm in the [Prompt Library](/docs/product/prompt-library). All the current models of Google Palm are supported and you can easily start testing different prompts.

Once you're ready with your prompt, you can use the `portkey.prompts.completions.create` interface to use the prompt in your application.

## Next Steps

The complete list of features supported in the SDK are available on the link below.

<Card title="SDK" href="/docs/api-reference/sdk" />

You'll find more information in the relevant sections:

1. [Add metadata to your requests](/docs/product/observability/metadata)
2. [Add gateway configs to your Palm requests](/docs/product/ai-gateway/configs)
3. [Tracing Google Palm requests](/docs/product/observability/traces)
4. [Setup a fallback from OpenAI to Palm APIs](/docs/product/ai-gateway/fallbacks)

***

<Card title="Portkey is now PRISMA AIRS AI Gateway. See it in action." href="https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey&utm_medium=referral&utm_campaign=prisma_airs&utm_content=docs_nav#contact" icon="arrow-up-right-from-square">
  Contact Us
</Card>


## Related topics

- [Overview](/docs/virtual_key_old/integrations/llms.md)
- [Supported Providers](/docs/aigw/api-reference/inference-api/supported-providers.md)
- [Portkey Models](/docs/product/model-catalog/portkey-models.md)
