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

# Embed Batch • AI Agent SDK

> embed_batch: Generate embeddings for multiple texts.

# embed\_batch

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**EmbeddingAgent**](../classes/EmbeddingAgent) class in the [**embedding\_agent**](../modules/embedding_agent) module.

Generate embeddings for multiple texts.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def embed_batch(texts: List[str], model: Optional[str]) -> List[List[float]]
```

## Parameters

<ParamField query="texts" type="List" required={true}>
  List of texts to embed
</ParamField>

<ParamField query="model" type="Optional" required={false}>
  Override model for this call \*\*kwargs: Additional provider-specific parameters
</ParamField>

### Returns

<ResponseField name="Returns" type="List[List[float]]">
  List of embedding vectors
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
agent = EmbeddingAgent()
    embeddings = agent.embed_batch(["Hello", "World"])
    print(f"Generated {len(embeddings)} embeddings")
```

## Uses

* `embedding`

## Used By

* [`EmbeddingAgent.similarity`](../functions/EmbeddingAgent-similarity)
* [`EmbeddingAgent.find_most_similar`](../functions/EmbeddingAgent-find_most_similar)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/embedding_agent.py#L224">
  `praisonaiagents/agent/embedding_agent.py` at line 224
</Card>
