> ## 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.

# Nomic

Portkey provides a robust and secure gateway to facilitate the integration of various Large Language Models (LLMs) into your applications, including [Nomic](https://docs.nomic.ai/reference/getting-started/).

Nomic has especially become popular due to it's superior embeddings and is now available through Portkey's AI gateway as well.

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 a [virtual key](/product/ai-gateway/virtual-keys) system.

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

## Portkey SDK Integration with Nomic

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

### 1. Create a Virtual Key for Nomic in your Portkey account

You can head over to the virtual keys tab and create one for Nomic. This will be then used to make API requests to Nomic without needing the protected API key. [Grab your Nomic API key from here](https://atlas.nomic.ai/).

<Frame caption="Create a virtual key for Nomic in Portkey">
  <img src="https://mintcdn.com/portkey-docs/wAHXB_jjwLt8bYcN/images/llms/nomic.png?fit=max&auto=format&n=wAHXB_jjwLt8bYcN&q=85&s=f8fa2f96f33574c67681fd2c4dcec56c" alt="Logo" width="1424" height="988" data-path="images/llms/nomic.png" />
</Frame>

### 2. Install the Portkey SDK and Initialize with this Virtual Key

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

<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"]
        virtualKey: "VIRTUAL_KEY" // Your Nomic Virtual Key
    })
    ```
  </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
        virtual_key="VIRTUAL_KEY"   # Replace with your virtual key for Nomic
    )
    ```
  </Tab>
</Tabs>

### 3. Invoke the Embeddings API with Nomic

Use the Portkey instance to send requests to your Nomic API. You can also override the virtual key directly in the API call if needed.

<Tabs>
  <Tab title="NodeJS SDK">
    ```js theme={"system"}
    const embeddings = await portkey.embeddings.create({
        input: "create vector representation on this sentence",
        model: "nomic-embed-text-v1.5",
    });

    console.log(embeddings);
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={"system"}
    embeddings = portkey.embeddings.create(
        input='create vector representation on this sentence',
        model='nomic-embed-text-v1.5'
    )

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

## Next Steps

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

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

You'll find more information in the relevant sections:

1. [API Reference for Embeddings](/provider-endpoints/embeddings)
2. [Add metadata to your requests](/product/observability/metadata)
3. [Add gateway configs to your Nomic requests](/product/ai-gateway/configs)
4. [Tracing Nomic requests](/product/observability/traces)
