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

# Inworld Text Embedder

[Overview](./overview) > Inworld Text Embedder

**Class:** `UInworldTextEmbedder` | **Inherits from:** `UObject`

Provides functionality to embed text as vector embeddings using Inworld AI's Text Embedding services. This class offers both synchronous and asynchronous methods for embedding text inputs into high-dimensional vector representations. Delegates can be used to handle asynchronous results, which include success indicators and the resulting embeddings. Text embeddings are useful for semantic similarity comparisons, intent matching, and knowledge retrieval operations.

## Methods

* [CreateInworldTextEmbedder](#createinworldtextembedder)
* [Embed](#embed)
* [EmbedAsync](#embedasync)
* [EmbedAsync](#embedasync)

## Reference

### CreateInworldTextEmbedder

Creates an instance of UInworldTextEmbedder with the given configuration ID.

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_CreateInworldTextEmbedder.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=8294d3105c7db614d2044ba37473be60" alt="CreateInworldTextEmbedder Blueprint Node" width="240" height="97" data-path="img/unreal/runtime/nd_img_CreateInworldTextEmbedder.png" />

## Examples

```c++ theme={"system"}
UInworldTextEmbedder* CreateInworldTextEmbedder(const FString& ConfigId)
```

#### Parameters

| Parameter | Type             | Description                                                             |
| --------- | ---------------- | ----------------------------------------------------------------------- |
| ConfigId  | `const FString&` | Identifier for the configuration to use for creating the text embedder. |

#### Returns

**Type:** `UInworldTextEmbedder*`
**Description:** A pointer to the instance of UInworldTextEmbedder.

***

### Embed

Embeds the input text into embeddings synchronously.

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_Embed.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=fcda69f617c54332de82a6ce69dfbd5a" alt="Embed Blueprint Node" width="251" height="138" data-path="img/unreal/runtime/nd_img_Embed.png" />

## Examples

```c++ theme={"system"}
bool Embed(
    const TArray<FString>& Text,
    TArray<FInworldTextEmbedding>& OutTextEmbeddings
)
```

#### Parameters

| Parameter         | Type                             | Description                                             |
| ----------------- | -------------------------------- | ------------------------------------------------------- |
| Text              | `const TArray<FString>&`         | An array of text strings to embed.                      |
| OutTextEmbeddings | `TArray<FInworldTextEmbedding>&` | Outputs the resulting embeddings if embedding succeeds. |

#### Returns

**Type:** `bool`
**Description:** True if the embedding operation is successful, false otherwise.

***

### EmbedAsync

Embeds the input text into embeddings asynchronously.

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_EmbedAsync.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=00fd6e48ac036e13a546b037f3c662ea" alt="EmbedAsync Blueprint Node" width="238" height="168" data-path="img/unreal/runtime/nd_img_EmbedAsync.png" />

## Examples

```c++ theme={"system"}
void EmbedAsync(
    const TArray<FString>& Text,
    FOnTextEmbedded Callback
)
```

#### Parameters

| Parameter | Type                     | Description                                               |
| --------- | ------------------------ | --------------------------------------------------------- |
| Text      | `const TArray<FString>&` | An array of text strings to embed.                        |
| Callback  | `FOnTextEmbedded`        | A delegate to handle the embedding result asynchronously. |

***

### EmbedAsync

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_EmbedAsync.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=00fd6e48ac036e13a546b037f3c662ea" alt="EmbedAsync Blueprint Node" width="238" height="168" data-path="img/unreal/runtime/nd_img_EmbedAsync.png" />

## Examples

```c++ theme={"system"}
void EmbedAsync()
```

***
