> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.embeddings.providers.nim

## Module Contents

### Classes

| Name                                                                                                          | Description                                                   |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`NIMEmbeddingModel`](#nemoguardrails-embeddings-providers-nim-NIMEmbeddingModel)                             | Embedding model using langchain-nvidia-ai-endpoints.          |
| [`NVIDIAAIEndpointsEmbeddingModel`](#nemoguardrails-embeddings-providers-nim-NVIDIAAIEndpointsEmbeddingModel) | A wrapper with a different name for the NIM embedding models. |

### API

```python
class nemoguardrails.embeddings.providers.nim.NIMEmbeddingModel(
    embedding_model: str,
    kwargs = {}
)
```

**Bases:** [EmbeddingModel](/guardrails-python-sdk/nemoguardrails/embeddings/providers/base#nemoguardrails-embeddings-providers-base-EmbeddingModel)

Embedding model using langchain-nvidia-ai-endpoints.

This class is a wrapper for using embedding models powered by NIM (hosted in the NVIDIA API Catalog or locally).

**Parameters:**

The name embedding model to be used.

```python
nemoguardrails.embeddings.providers.nim.NIMEmbeddingModel.encode(
    documents: typing.List[str]
) -> typing.List[typing.List[float]]
```

Encode a list of documents into their corresponding sentence embeddings.

**Parameters:**

The list of documents to be encoded.

**Returns:** `List[List[float]]`

List\[List\[float]]: The list of sentence embeddings, where each embedding is a list of floats.

```python
nemoguardrails.embeddings.providers.nim.NIMEmbeddingModel.encode_async(
    documents: typing.List[str]
) -> typing.List[typing.List[float]]
```

async

Encode a list of documents into their corresponding sentence embeddings.

**Parameters:**

The list of documents to be encoded.

**Returns:** `List[List[float]]`

List\[List\[float]]: The list of sentence embeddings, where each embedding is a list of floats.

```python
class nemoguardrails.embeddings.providers.nim.NVIDIAAIEndpointsEmbeddingModel()
```

**Bases:** [NIMEmbeddingModel](#nemoguardrails-embeddings-providers-nim-NIMEmbeddingModel)

A wrapper with a different name for the NIM embedding models.

There will be a better separation in the future between local NIM and NVIDIA AI Endpoints.